Management

API Keys

List API keys for the current user

GET
/v1/api-keys
AuthorizationBearer <token>

API key authentication - use your Late API key as a Bearer token

In: header

Response Body

application/json

application/json

curl -X GET "https://getlate.dev/api/v1/api-keys"
{
  "apiKeys": [
    {
      "id": "6507a1b2c3d4e5f6a7b8c9d0",
      "name": "Production API Key",
      "keyPreview": "late_...xyz123",
      "expiresAt": "2025-12-31T23:59:59Z",
      "createdAt": "2024-01-15T10:30:00Z"
    },
    {
      "id": "6507a1b2c3d4e5f6a7b8c9d1",
      "name": "Development Key",
      "keyPreview": "late_...abc789",
      "expiresAt": null,
      "createdAt": "2024-03-20T14:45:00Z"
    }
  ]
}
{
  "error": "Unauthorized"
}

Create a new API key

POST
/v1/api-keys
AuthorizationBearer <token>

API key authentication - use your Late API key as a Bearer token

In: header

namestring
expiresIn?integer

Days until expiry

Response Body

application/json

application/json

curl -X POST "https://getlate.dev/api/v1/api-keys" \  -H "Content-Type: application/json" \  -d '{    "name": "Production API Key",    "expiresIn": 365  }'
{
  "message": "API key created successfully",
  "apiKey": {
    "id": "6507a1b2c3d4e5f6a7b8c9d0",
    "name": "Production API Key",
    "keyPreview": "late_...xyz123",
    "key": "late_sk_1234567890abcdef1234567890abcdef",
    "expiresAt": "2025-12-31T23:59:59Z",
    "createdAt": "2024-01-15T10:30:00Z"
  }
}
Empty
{
  "error": "Unauthorized"
}

Delete an API key

DELETE
/v1/api-keys/{keyId}
AuthorizationBearer <token>

API key authentication - use your Late API key as a Bearer token

In: header

Path Parameters

keyIdstring

Response Body

application/json

application/json

application/json

curl -X DELETE "https://getlate.dev/api/v1/api-keys/string"
{
  "message": "API key deleted successfully"
}
{
  "error": "Unauthorized"
}
{
  "error": "Not found"
}