Skip to content
Sign in Create account

Delete saved provider API key

DELETE /api/providers/{provider}/key

Removes the authenticated user's saved provider key. Requires byok.write and org.settings-write. A syntactically valid slug with no saved key is an idempotent success; a malformed slug returns 422.

Authenticate with a portal session token.

Parameters

  • provider string path required

Responses

200 Provider key removed; a missing saved key is still a successful no-op.

application/json object

  • message string required
    Value: "Provider key removed."

Generated sample

{
  "message": "Provider key removed."
}
401 Missing or invalid bearer token.

application/json object

Any keys are accepted.

403 Authenticated caller lacks the required permission, ability, or role.

application/json object

Any keys are accepted.

422 Provider slug is malformed.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

429 The request was rate limited. API-generated responses are JSON;

Response headers

  • Retry-After string header

    Seconds to wait before retrying, when provided.

  • X-RateLimit-Scope string header

    Identifies the scope of the request limit, when provided.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

text/html string