cURL
curl --request POST \ --url https://api.truthlocks.com/v1/api-keys \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --data ' { "name": "Production API Key", "scopes": [ "attestations:mint", "attestations:read" ] } '
{ "id": "880e8400-e29b-41d4-a716-446655440000", "name": "Production API Key", "secret": "tl_live_abc123xyz789abcdef1234567890abcdef", "scopes": ["attestations:mint", "attestations:read"], "created_at": "2026-01-13T12:00:00Z" }
Creates a new API key. The secret is returned once and cannot be retrieved again.
API key for machine-to-machine authentication
Human-readable name for the key
Permission scopes (default is wildcard)
API key created
Full API key (shown once)