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.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • API Reference
      • POSTCreate an API key
      • GETList API keys
      • GETRetrieve an API key
      • PATCHUpdate an API key
      • DELDelete an API key
  • Reference
    • Filters API Reference
LogoLogo
DiscordPlatform
API ReferenceTemporary API Keys

Update an API key

PATCH
https://api.respan.ai/api/temporary-keys/:id/
PATCH
/api/temporary-keys/:id/
$curl -X PATCH https://api.respan.ai/api/temporary-keys/id/ \
> -H "Authorization: Bearer sk_live_xxxxx" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890",
3 "name": "Analytics Integration Key",
4 "prefix": "resp_",
5 "is_test": false,
6 "expiry_date": "2024-12-31T23:59:59Z",
7 "max_usage": 10000,
8 "rate_limit": 500,
9 "spending_limit": 2500.75,
10 "created_at": "2024-01-15T09:30:00Z"
11}
Update an API key's name, expiry, or test status.
Was this page helpful?
Previous

Delete an API key

Next
Built with

Path parameters

idstringRequired
The ID of the temporary API key to update.

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Request

This endpoint expects an object.
namestringOptional
Key name.
expiry_datedatetimeOptional

Expiry date (ISO 8601).

is_testbooleanOptional
Test or production key.
prefixstringOptional
Key prefix.

Response

Updated API key.
idstring
API key ID.
namestring
Key name.
prefixstring
Key prefix.
is_testboolean
Test or production key.
expiry_datedatetime
Expiry date.
max_usageinteger

Max usage count. -1 = unlimited.

rate_limitinteger
Calls per minute.
spending_limitdouble
Spending limit in USD.
created_atdatetime

Errors

401
Unauthorized Error
404
Not Found Error