Update an existing API key’s name, roles, or team assignments. All fields must be provided (PUT semantics). The calling API key can only assign roles whose scopes are a subset of its own. An API key cannot edit itself, and the api_keys_manage role cannot be assigned via the API.
This endpoint requires a valid API key with the api_keys_manage role at either the account level or team level.
API key from your incident.io dashboard (Settings → API keys)
Unique identifier of the API key to update
"01FCNDV6P870EA6S7TK1DSYDG0"
Human-readable name for the API key
1 - 200"My test API key"
Account-level roles for the API key. These roles apply across the entire account, not scoped to specific teams. Pass an empty array if no account-level roles are needed.
viewer, incident_creator, incident_editor, manage_settings, global_access, catalog_viewer, catalog_editor, incident_memberships_editor, schedules_editor, schedules_reader, schedule_overrides_editor, workflows_editor, private_workflows_editor, on_call_editor, escalation_creator, post_incident_flow_opt_out, security_settings_editor, investigation_download, team_memberships_manage, status_page_publisher, postmortems_manage, api_keys_manage, notification_methods_manage ["viewer", "incident_creator"]IDs of teams to scope the team_role_names to. If provided, team_role_names must also be a non-empty array, and vice versa. Pass an empty array if the key should not be scoped to any teams.
["01FCNDV6P870EA6S7TK1DSYDG0"]Roles to grant for the teams specified in team_ids. If provided, team_ids must also be a non-empty array, and vice versa. Pass an empty array if no team-level roles are needed.
schedules_editor, schedules_reader, schedule_overrides_editor, on_call_editor, escalation_creator, api_keys_manage ["schedules_editor"]OK response.