API Keys
bearerAuthorizationBearer <token>Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.
The user's keys. Only the prefix of each key is shown.
application/json- response
api_keys*array<>curl -X GET 'https://example.com/v1/api-keys'{ "api_keys": [ { "id": "string", "name": "string", "prefix": "string", "full_access": true, "scopes": { "property1": "read", "property2": "read" }, "expires_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]}The full key is in the response and is never shown again. Save it now. The name must be unique among your keys, ignoring case.
bearerAuthorizationBearer <token>Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.
application/json- body
name*string1 <= length <= 100full_access?booleanwrite on every resource, including ones added later. Send exactly one of it, scopes
or scope; a body with none of them gets a 422.
scopes?A level per resource, used when full_access is off. Resources left out get none. At
least one resource must be read or write.
scope?stringDeprecatedThe old shorthand, kept for existing clients: that level on every resource except rules
and webhooks.
"read""write"expires_at?|When the key stops working. Must be in the future. Leave out for a key that lasts until it is revoked.
date-timeThe new key, with its full text
application/json- response
id*stringname*stringprefix*stringfull_access*booleanwrite on every resource. scopes is empty then.
scopes*The resources the key may use and how, when full_access is off. A resource that is not listed is none. The old scope field is gone.
expires_at?|date-timelast_used_at?|date-timecreated_at*stringdate-timeupdated_at*stringdate-timekey*stringcurl -X POST 'https://example.com/v1/api-keys' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "string", "name": "string", "prefix": "string", "full_access": true, "scopes": { "property1": "read", "property2": "read" }, "expires_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "key": "ga_ABCDEF…"}bearerAuthorizationBearer <token>Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.
id*stringThe key. Only its prefix is shown.
application/json- response
id*stringname*stringprefix*stringfull_access*booleanwrite on every resource. scopes is empty then.
scopes*The resources the key may use and how, when full_access is off. A resource that is not listed is none. The old scope field is gone.
expires_at?|date-timelast_used_at?|date-timecreated_at*stringdate-timeupdated_at*stringdate-timecurl -X GET 'https://example.com/v1/api-keys/string'{ "id": "string", "name": "string", "prefix": "string", "full_access": true, "scopes": { "property1": "read", "property2": "read" }, "expires_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Only the name can change. A key's access and expiry are fixed when it is created.
bearerAuthorizationBearer <token>Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.
id*stringapplication/json- body
name*string1 <= length <= 100The renamed key
application/json- response
id*stringname*stringprefix*stringfull_access*booleanwrite on every resource. scopes is empty then.
scopes*The resources the key may use and how, when full_access is off. A resource that is not listed is none. The old scope field is gone.
expires_at?|date-timelast_used_at?|date-timecreated_at*stringdate-timeupdated_at*stringdate-timecurl -X PATCH 'https://example.com/v1/api-keys/string' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "string", "name": "string", "prefix": "string", "full_access": true, "scopes": { "property1": "read", "property2": "read" }, "expires_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}bearerAuthorizationBearer <token>Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.
id*stringRevoked
curl -X DELETE 'https://example.com/v1/api-keys/string'