POST
/
v1
/
incidents
/
{id}
/
assign_role_to_user
curl --request POST \
  --url https://api.rootly.com/v1/incidents/{id}/assign_role_to_user \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
  "data": {
    "type": "incidents",
    "attributes": {
      "user_id": "<string>",
      "incident_role_id": "<string>"
    }
  }
}'
{
  "data": {
    "id": "7291bc8b-b404-4c49-8aba-fb82b8324961",
    "type": "incidents",
    "attributes": {
      "parent_incident_id": null,
      "sequential_id": 1,
      "title": "Voluptas earum similique natus.",
      "slug": "voluptas-earum-similique-natus",
      "kind": "normal",
      "private": false,
      "summary": "Dolorem debitis sit. Iure ipsam dolorem. Numquam temporibus itaque.",
      "status": "started",
      "source": "web",
      "url": "http://localhost:3001/account/incidents/1-voluptas-earum-similique-natus",
      "short_url": null,
      "user": {
        "data": {
          "id": "320",
          "type": "users",
          "attributes": {
            "name": "Reynaldo Raynor",
            "email": "cleopatra_streich@davis.test",
            "phone": null,
            "phone_2": null,
            "full_name": "Reynaldo Raynor",
            "full_name_with_team": "[Sipes, Bosco and Rodriguez] Reynaldo Raynor",
            "slack_id": null,
            "time_zone": "UTC",
            "updated_at": "2025-03-28T23:02:46.987-07:00",
            "created_at": "2025-03-28T23:02:46.531-07:00"
          },
          "relationships": {
            "email_addresses": {
              "data": [
                {
                  "id": "9b8fe110-ad20-49a1-b630-9c205ea60a17",
                  "type": "user_email_addresses"
                }
              ]
            },
            "phone_numbers": {
              "data": []
            },
            "devices": {
              "data": []
            }
          }
        }
      },
      "severity": {
        "data": {
          "id": "764d8831-6e9b-450d-8c67-5b13ebbfdae3",
          "type": "severities",
          "attributes": {
            "name": "xdann",
            "slug": "xdann",
            "description": "Vero nam iste eos.",
            "severity": "medium",
            "color": "#E58A1F",
            "position": 1,
            "notify_emails": [],
            "slack_channels": [],
            "slack_aliases": [],
            "created_at": "2025-03-28T23:02:46.952-07:00",
            "updated_at": "2025-03-28T23:02:46.952-07:00"
          }
        }
      },
      "in_triage_by": null,
      "started_by": {
        "data": {
          "id": "320",
          "type": "users",
          "attributes": {
            "name": "Reynaldo Raynor",
            "email": "cleopatra_streich@davis.test",
            "phone": null,
            "phone_2": null,
            "full_name": "Reynaldo Raynor",
            "full_name_with_team": "[Sipes, Bosco and Rodriguez] Reynaldo Raynor",
            "slack_id": null,
            "time_zone": "UTC",
            "updated_at": "2025-03-28T23:02:46.987-07:00",
            "created_at": "2025-03-28T23:02:46.531-07:00"
          },
          "relationships": {
            "email_addresses": {
              "data": [
                {
                  "id": "9b8fe110-ad20-49a1-b630-9c205ea60a17",
                  "type": "user_email_addresses"
                }
              ]
            },
            "phone_numbers": {
              "data": []
            },
            "devices": {
              "data": []
            }
          }
        }
      },
      "mitigated_by": null,
      "resolved_by": null,
      "closed_by": null,
      "cancelled_by": null,
      "mitigation_message": null,
      "resolution_message": null,
      "cancellation_message": null,
      "public_title": null,
      "duplicate_incident_id": null,
      "retrospective_progress_status": "not_started",
      "zoom_meeting_id": null,
      "zoom_meeting_start_url": null,
      "zoom_meeting_join_url": null,
      "zoom_meeting_password": null,
      "zoom_meeting_pstn_password": null,
      "zoom_meeting_h323_password": null,
      "zoom_meeting_global_dial_in_numbers": [],
      "shortcut_story_id": null,
      "shortcut_story_url": null,
      "shortcut_task_id": null,
      "shortcut_task_url": null,
      "asana_task_id": null,
      "asana_task_url": null,
      "github_issue_id": null,
      "github_issue_url": null,
      "gitlab_issue_id": null,
      "gitlab_issue_url": null,
      "jira_issue_key": null,
      "jira_issue_id": null,
      "jira_issue_url": null,
      "google_meeting_id": null,
      "google_meeting_url": null,
      "trello_card_id": null,
      "trello_card_url": null,
      "linear_issue_id": null,
      "linear_issue_url": null,
      "zendesk_ticket_id": null,
      "zendesk_ticket_url": null,
      "motion_task_id": null,
      "motion_task_url": null,
      "clickup_task_id": null,
      "clickup_task_url": null,
      "slack_channel_name": null,
      "slack_channel_id": null,
      "slack_channel_url": null,
      "slack_channel_short_url": null,
      "slack_channel_deep_link": null,
      "slack_channel_archived": false,
      "slack_last_message_ts": null,
      "service_now_incident_id": null,
      "service_now_incident_key": null,
      "service_now_incident_url": null,
      "opsgenie_incident_id": null,
      "opsgenie_incident_url": null,
      "opsgenie_alert_id": null,
      "opsgenie_alert_url": null,
      "victor_ops_incident_id": null,
      "victor_ops_incident_url": null,
      "pagerduty_incident_id": null,
      "pagerduty_incident_number": null,
      "pagerduty_incident_url": null,
      "mattermost_channel_id": null,
      "mattermost_channel_name": null,
      "mattermost_channel_url": null,
      "confluence_page_id": null,
      "confluence_page_url": null,
      "quip_page_id": null,
      "quip_page_url": null,
      "airtable_base_key": null,
      "airtable_table_name": null,
      "airtable_record_id": null,
      "airtable_record_url": null,
      "google_drive_id": null,
      "google_drive_parent_id": null,
      "google_drive_url": null,
      "sharepoint_page_id": null,
      "sharepoint_page_url": null,
      "datadog_notebook_id": null,
      "datadog_notebook_url": null,
      "freshservice_ticket_id": null,
      "freshservice_ticket_url": null,
      "freshservice_task_id": null,
      "freshservice_task_url": null,
      "scheduled_for": null,
      "scheduled_until": null,
      "in_triage_at": null,
      "started_at": "2025-03-28T23:02:46.959-07:00",
      "detected_at": null,
      "acknowledged_at": null,
      "mitigated_at": null,
      "resolved_at": null,
      "closed_at": null,
      "cancelled_at": null,
      "created_at": "2025-03-28T23:02:46.959-07:00",
      "updated_at": "2025-03-28T23:03:09.125-07:00",
      "labels": {}
    },
    "relationships": {
      "causes": {
        "data": []
      },
      "subscribers": {
        "data": [
          {
            "id": "5b2162e4-5a43-4995-8284-59bd034b2c72",
            "type": "incident_subscribers"
          }
        ]
      },
      "roles": {
        "data": [
          {
            "id": "4d636558-7fb9-4ab0-ba21-4c7784281052",
            "type": "incident_role_assignments"
          }
        ]
      },
      "environments": {
        "data": []
      },
      "incident_types": {
        "data": []
      },
      "services": {
        "data": []
      },
      "functionalities": {
        "data": []
      },
      "groups": {
        "data": []
      },
      "events": {
        "data": [
          {
            "id": "dc599143-9f76-42d6-af05-d233a0e02cfb",
            "type": "incident_events"
          },
          {
            "id": "5dd4f190-da80-486a-90ae-77e4d37b27c9",
            "type": "incident_events"
          },
          {
            "id": "8f1c4598-ff17-41e1-b2f4-9d4d630d66e2",
            "type": "incident_events"
          }
        ]
      },
      "action_items": {
        "data": []
      },
      "custom_field_selections": {
        "data": []
      },
      "feedbacks": {
        "data": []
      },
      "attachments": {
        "data": []
      },
      "slack_messages": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "4d636558-7fb9-4ab0-ba21-4c7784281052",
      "type": "incident_role_assignments",
      "attributes": {
        "incident_role": {
          "data": {
            "id": "d506c842-ac8b-4f69-985a-9264f041e6ef",
            "type": "incident_roles",
            "attributes": {
              "slug": "soluta-blanditiis-id-aut",
              "name": "Soluta blanditiis id aut.",
              "summary": null,
              "description": null,
              "position": 1,
              "optional": false,
              "enabled": true,
              "allow_multi_user_assignment": false,
              "created_at": "2025-03-28T23:02:48.886-07:00",
              "updated_at": "2025-03-28T23:02:48.886-07:00"
            }
          }
        },
        "user": {
          "data": {
            "id": "318",
            "type": "users",
            "attributes": {
              "name": "Trinh West",
              "email": "herbert.klein@von.example",
              "phone": null,
              "phone_2": null,
              "full_name": "Trinh West",
              "full_name_with_team": "[Sipes, Bosco and Rodriguez] Trinh West",
              "slack_id": null,
              "time_zone": "UTC",
              "updated_at": "2025-03-28T23:03:08.986-07:00",
              "created_at": "2025-03-28T23:02:45.499-07:00"
            },
            "relationships": {
              "email_addresses": {
                "data": [
                  {
                    "id": "e0aed56f-7d53-4411-9ecd-6a284984c6e3",
                    "type": "user_email_addresses"
                  }
                ]
              },
              "phone_numbers": {
                "data": []
              },
              "devices": {
                "data": []
              }
            }
          }
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/vnd.api+json
data
object
required

Response

200
application/vnd.api+json
assign user to incident
data
object
required