Skip to content
Endless Documentation

Expire a rotated secret

DELETE
/api-keys/{api_key_id}/secrets/{secret_id}

Ends the grace period of a secret a rotation replaced: it stops working now. The key's current secret cannot be expired this way; revoke or rotate the key instead.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A Clerk session JWT, or a workspace API key (esk_live_…) created in workspace settings. A key acts as the member who created it, narrowed to its abilities, projects and credit limit.

Path Parameters

api_key_id*string
Formatuuid
secret_id*string
Formatuuid

Header Parameters

Endless-Api-Version?string

Pin the caller to an API major (1). Omit to accept the current version. A major this deployment cannot serve is refused with 400 unsupported_api_version.

Response Body

OK

application/json
  1. response
id*string
Formatuuid
organization_id*string
name*string
description*string|null
project_access*string
Value in"all""selected"
spending_limit*|null
allowed_ips*array<string>
expires_at*|null
last_used_at*|null
created_by_id*string
revoked_at*|null
revoked_by_id*string|null
revoked_reason*|null
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
token_prefix*string
token_hint*string
secret_created_at*string
Formatdate-time
retiring_secrets*array<>
scopes*array<>
status*string
Value in"active""expired""revoked"
project_ids*array<>
created_by*|null
credits_used*integer
Range0 <= value <= 9007199254740991
capabilities*
Example Request
curl -X DELETE 'https://api.endless.app/api-keys/0191e5a3-5ae6-76d0-9b18-7c934ef05a06/secrets/0191e5a3-6b14-7c02-8e41-2d5f0a9c3b17'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "organization_id": "string",  "name": "string",  "description": "string",  "project_access": "all",  "spending_limit": -2147483648,  "allowed_ips": [    "string"  ],  "expires_at": "2019-08-24T14:15:22Z",  "last_used_at": "2019-08-24T14:15:22Z",  "created_by_id": "string",  "revoked_at": "2019-08-24T14:15:22Z",  "revoked_by_id": "string",  "revoked_reason": "revoked",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "token_prefix": "string",  "token_hint": "string",  "secret_created_at": "2019-08-24T14:15:22Z",  "retiring_secrets": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "token_hint": "string",      "expires_at": "2019-08-24T14:15:22Z",      "last_used_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z"    }  ],  "scopes": [    "models:read"  ],  "status": "active",  "project_ids": [    "b5c0e7c3-d26d-4797-906b-f511ec4c5077"  ],  "created_by": {    "id": "string",    "first_name": "string",    "last_name": "string",    "email": "string",    "image_url": "string"  },  "credits_used": 0,  "capabilities": {    "can_rotate": true,    "can_widen": true  }}