Accounts
List API keys
List your API keys, newest first, using cursor pagination: those of the project a request works in, with the organisation’s admin keys for an owner in the console; every one for an admin key.
GET
/
v1
/
organization
/
keys
List API keys
curl --request GET \
--url https://api.sqwish.ai/v1/organization/keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/organization/keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/organization/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"created_at": 123,
"scope": "full",
"role": "owner",
"made_by": "<string>",
"former_member": true,
"project_id": "<string>",
"review_by": 123,
"monthly_cap_usd": "<string>",
"month_spent_usd": "<string>",
"last_used_at": 123,
"revoked_at": 123
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Query Parameters
List API keys
curl --request GET \
--url https://api.sqwish.ai/v1/organization/keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/organization/keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/organization/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"created_at": 123,
"scope": "full",
"role": "owner",
"made_by": "<string>",
"former_member": true,
"project_id": "<string>",
"review_by": 123,
"monthly_cap_usd": "<string>",
"month_spent_usd": "<string>",
"last_used_at": 123,
"revoked_at": 123
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}