Skip to main content
POST
Request Key Handoff
Build a link that opens the dashboard’s create-key form with a name and permissions already filled in. Use this when key management is blocked because the calling key does not have api_keys:manage. Every other /api/v1/api-keys route requires api_keys:manage, and that scope cannot be granted through the API by a key that is missing it - otherwise any leaked key could mint a full-access successor for itself. This endpoint needs only account:read because it creates nothing, changes nothing, and returns no secret. The new key is issued in the browser, under the owner’s own authenticated session, after they review the form and click Create. When the caller is an account-scoped seq_user_ key, select the company with the x-company-id header. Personal keys are routed to Account → API Keys; company keys to workspace Settings → API Keys.

Request

string
Suggested name for the new key. Trimmed to 80 characters in the link.
string
Suggested permission preset. Supported presets: full_access, read_only, agent_safe, ai_drafting, data_ingest_safe, data_ingest_automations, transactional_sender, marketing_sender.
string[]
Suggested explicit permission scopes. Overrides preset. An unsupported scope is rejected here rather than silently dropped from the owner’s form.
string
ID of the key this one replaces. Pass the literal string current for the key the request is authenticated with. The dashboard offers to revoke the predecessor once the replacement exists, which finishes a rotation in a single visit.

Responses

Rotating a key you cannot manage

  1. Call this endpoint with replaceApiKeyId: "current" and the permissions the replacement needs.
  2. Hand the URL to the workspace owner and stop. Do not poll: the key never comes back through the API.
  3. The owner reviews the prefilled form, creates the key, and stores it in your secret store.
  4. Verify the replacement with Get Account before retiring anything.
  5. Revoke the predecessor from the dashboard prompt, or with Revoke API Key if the owner granted the new key api_keys:manage.