Create API key
curl --request POST \
--url https://yys-sqr-render-bsbe.onrender.com/api/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "default"
}
'import requests
url = "https://yys-sqr-render-bsbe.onrender.com/api/keys"
payload = { "name": "default" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'default'})
};
fetch('https://yys-sqr-render-bsbe.onrender.com/api/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "my-key",
"token": "<string>",
"active": true,
"last_used_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}API Keys
Create API key
Generate a new API key. Requires Supabase JWT authentication (API keys cannot create other keys).
POST
/
api
/
keys
Create API key
curl --request POST \
--url https://yys-sqr-render-bsbe.onrender.com/api/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "default"
}
'import requests
url = "https://yys-sqr-render-bsbe.onrender.com/api/keys"
payload = { "name": "default" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'default'})
};
fetch('https://yys-sqr-render-bsbe.onrender.com/api/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "my-key",
"token": "<string>",
"active": true,
"last_used_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}Authorizations
Pass a Supabase JWT or a 48-character hex API key as a Bearer token.
Body
application/json
Human-readable key name

