API Keys

Revoke an API key

Soft-revoke a user-created posterly API key after explicit confirmation. The calling token must be a dashboard-created API key with accounts:write. OAuth-issued tokens, managed assistant tokens, and session-authenticated requests cannot revoke API keys. The endpoint refuses to revoke the API key currently authenticating the request.

delete/api/v1/api-keys/{id}

Request

  • Base URL: https://www.poster.ly
  • URL: https://www.poster.ly/api/v1/api-keys/{id}
  • Auth: HTTP bearer

Path parameters

idstring uuid required

API key resource ID to revoke. This is not the secret pst_live_ value.

Query parameters

confirmboolean

Alternative to the JSON body: pass confirm=true after explicit user confirmation.

Request body

confirmtrue required

Must be true after the user explicitly confirms that this API key should be revoked.

Example request

{
  "confirm": true
}

Response

API key revoked successfully, or it was already revoked.

revokedtrue required
already_revokedboolean required

True when the key was already revoked before this request.

Example response

{
  "revoked": true,
  "already_revoked": false,
  "api_key": {
    "id": "6e1a2b76-9f41-4d6d-a4c8-13d70f89bb31",
    "name": "Poke agent key",
    "key_prefix": "pst_live_abcd",
    "scopes": [
      "accounts:read",
      "posts:read",
      "posts:write"
    ],
    "workspace_id": null,
    "expires_at": null,
    "created_at": "2026-06-06T12:00:00.000Z",
    "is_revoked": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.