Smart Capital Center API reference

deleteApiKey

DELETE
/api/v2/public/api-keys/{id}

Deactivates one of the user's API keys. Anything using that key stops working.

Auth: X-API-KEY: <your key> header (or Authorization: Bearer <access_token>)

Use when: The user explicitly asks to revoke a key, or a key has leaked.

Don't use when: Cleaning up on your own initiative. Always confirm with the user first, naming the key.

Parameters

Name In Type Required Description
id path integer yes ID of the API key to delete.

Notes for agents

  • 403 means the key belongs to another user. 404 means the id does not exist.
  • Do not delete the key you are currently authenticating with unless the user understands the session will stop working.

Example request

curl -X DELETE https://app.smartcapitalcenter.com/api/v2/public/api-keys/42 \
  -H "X-API-KEY: $SCC_API_KEY"

Response 200

API key deleted successfully.

Standard envelope: {"status", "data", "message", "code"}.

Errors

Code Meaning
403 Access denied - API key belongs to another user
404 API key not found
# deleteApiKey `DELETE /api/v2/public/api-keys/{id}` Deactivates one of the user's API keys. Anything using that key stops working. **Auth:** `X-API-KEY: <your key>` header (or `Authorization: Bearer <access_token>`) **Use when:** The user explicitly asks to revoke a key, or a key has leaked. **Don't use when:** Cleaning up on your own initiative. Always confirm with the user first, naming the key. ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `id` | path | integer | yes | ID of the API key to delete. | ## Notes for agents - `403` means the key belongs to another user. `404` means the id does not exist. - Do not delete the key you are currently authenticating with unless the user understands the session will stop working. ## Example request ```bash curl -X DELETE https://app.smartcapitalcenter.com/api/v2/public/api-keys/42 \ -H "X-API-KEY: $SCC_API_KEY" ``` ## Response `200` API key deleted successfully. Standard envelope: `{"status", "data", "message", "code"}`. ## Errors | Code | Meaning | |---|---| | 403 | Access denied - API key belongs to another user | | 404 | API key not found |