For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
  • API Reference
      • GETList Api Keys
      • POSTCreate Api Key
      • GETGet Api Key
      • DELDelete Api Key
      • PATCHUpdate Api Key
      • PATCHRotate Api Key
  • Python SDK
    • Install
    • Usage
    • Errors
  • CLI
    • Overview
LogoLogo
API Referenceapi-keys

Delete Api Key

DELETE
/api/v1/api-keys/:key_id
DELETE
/api/v1/api-keys/:key_id
$curl -X DELETE https://api.onepin.ai/api/v1/api-keys/key_id \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "data": {
3 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4 "workspace_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
5 "created_by": "d290f1ee-6c54-4b01-90e6-d701748f0851",
6 "name": "Production API Key",
7 "key_type": "read-only",
8 "key_prefix": "pk_live_",
9 "key_suffix": "9f8e7d6c",
10 "scopes": [
11 "workflows:read",
12 "voices:read",
13 "uploads:write"
14 ],
15 "active": false,
16 "last_used_at": "2024-01-15T09:30:00Z",
17 "rate_limit_per_min": 1000,
18 "revoked_at": "2024-01-15T09:30:00Z",
19 "created_at": "2023-12-01T08:00:00Z",
20 "updated_at": "2024-01-15T09:30:00Z",
21 "preview": "pk_live_9f8e7d6c"
22 },
23 "meta": {
24 "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
25 "timestamp": "2024-01-15T09:30:00Z"
26 }
27}

Soft-revoke an API key for the current workspace.

Was this page helpful?
Previous

Update Api Key

Next
Built with

Authentication

AuthorizationBearer
Clerk JWT token

Path parameters

key_idstringRequiredformat: "uuid"

Headers

X-Workspace-Idstring or nullOptional

Response

Successful Response
dataobject
metaobject

Errors

422
Unprocessable Entity Error