Check a key
const url = 'https://api.usesonora.com/v1/me';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.usesonora.com/v1/me \ --header 'Authorization: Bearer <token>'The workspace the key belongs to and the key’s own scopes. Any valid key may call it.
Any valid API key may call this endpoint; an OAuth access token may not.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The key works.
The workspace a key belongs to, and the key itself.
object
object
Examplegenerated
{ "tenant": { "id": "example", "name": "example", "subdomain": "example" }, "apiKey": { "id": "example", "name": "example", "prefix": "example", "scopes": [ "example" ], "createdAt": "2026-04-15T12:00:00Z", "expiresAt": "2026-04-15T12:00:00Z" }}unauthorized: The Authorization header is missing, or the key is invalid, revoked or expired.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}insufficient_scope: The key or token lacks the scope this endpoint needs, and details.required names it; or an OAuth access token called an endpoint only an API key can.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}rate_limited: Too many requests for this key; retry after Retry-After seconds.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}internal_error: Something went wrong on Sonora’s side. Retry, and quote requestId if it persists.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}Try it
Try it runs the reference's read endpoints, and this one describes the API key calling it, so only a key can. Create a key in Sonora under Settings → API and call it from your own code.