api keys
Create key
Creates a new API key with an optional expiry. The full key value is only returned once in the response.
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"
}