API keys
Create an API key
Creates an API key. The response is the only time that you see the secret key. Store it in a secret manager.
A write key can use all hacker routes. A read key can only use GET. Expiry is from 1 to 365 days (default 90), or null for no expiry. The limit is 100 keys. This route needs a website sign-in.
POST
/
api
/
keys
Create an API key
curl --request POST \
--url https://kalligator.com/api/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scope": "write",
"expires_in_days": 90
}
'import requests
url = "https://kalligator.com/api/keys"
payload = {
"name": "<string>",
"scope": "write",
"expires_in_days": 90
}
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: '<string>', scope: 'write', expires_in_days: 90})
};
fetch('https://kalligator.com/api/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "<string>",
"scope": "read",
"hint": "<string>",
"created_at": "<string>",
"last_used_at": "<string>",
"expires_at": "<string>",
"key": "<string>"
}{
"detail": "<string>",
"code": "<string>",
"current": {
"id": "<string>",
"program_id": "<string>",
"program_name": "<string>",
"status": "draft",
"display_status": "<string>",
"title": "<string>",
"revision": 123,
"created_at": "<string>",
"updated_at": "<string>",
"submitted_at": "<string>",
"withdrawn_at": "<string>",
"asset": "<string>",
"description": "<string>",
"cvss_vector": "<string>",
"attachments": {},
"submission": {
"submitted_at": "<string>",
"attachments": {},
"content": {
"title": "<string>",
"asset": "<string>",
"description": "<string>",
"cvss_vector": ""
},
"program": {
"policy_version": 123,
"name": "<string>",
"scope": "<string>",
"exclusions": "<string>",
"rules": "<string>",
"eligibility": "<string>",
"disclosure": "<string>",
"rewards": {}
},
"stripe": {
"status": "<string>",
"checked_at": "<string>"
}
},
"decision": {
"outcome": "accepted",
"at": "<string>",
"message": "<string>"
},
"payout": {
"status": "approving",
"amount_cents": 123,
"approved_at": "<string>",
"transferred_at": "<string>",
"received_at": "<string>",
"payout_failed_at": "<string>"
}
}
}{
"detail": "<string>",
"code": "<string>",
"current": {
"id": "<string>",
"program_id": "<string>",
"program_name": "<string>",
"status": "draft",
"display_status": "<string>",
"title": "<string>",
"revision": 123,
"created_at": "<string>",
"updated_at": "<string>",
"submitted_at": "<string>",
"withdrawn_at": "<string>",
"asset": "<string>",
"description": "<string>",
"cvss_vector": "<string>",
"attachments": {},
"submission": {
"submitted_at": "<string>",
"attachments": {},
"content": {
"title": "<string>",
"asset": "<string>",
"description": "<string>",
"cvss_vector": ""
},
"program": {
"policy_version": 123,
"name": "<string>",
"scope": "<string>",
"exclusions": "<string>",
"rules": "<string>",
"eligibility": "<string>",
"disclosure": "<string>",
"rewards": {}
},
"stripe": {
"status": "<string>",
"checked_at": "<string>"
}
},
"decision": {
"outcome": "accepted",
"at": "<string>",
"message": "<string>"
},
"payout": {
"status": "approving",
"amount_cents": 123,
"approved_at": "<string>",
"transferred_at": "<string>",
"received_at": "<string>",
"payout_failed_at": "<string>"
}
}
}Authorizations
A Firebase ID token, or a Kalligator API key (kal_…).
Body
application/json
A label for the key, 1 to 80 characters. For example, the name of your agent.
Required string length:
1 - 80write (default) or read. A read key can only use GET.
Available options:
read, write Days until the key expires, from 1 to 365. Default 90. Send null for no expiry.
Required range:
1 <= x <= 365Response
Successful Response
Available options:
read, write The secret key. It starts with kal_. This is the only time that the API shows it.
⌘I
Create an API key
curl --request POST \
--url https://kalligator.com/api/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scope": "write",
"expires_in_days": 90
}
'import requests
url = "https://kalligator.com/api/keys"
payload = {
"name": "<string>",
"scope": "write",
"expires_in_days": 90
}
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: '<string>', scope: 'write', expires_in_days: 90})
};
fetch('https://kalligator.com/api/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "<string>",
"scope": "read",
"hint": "<string>",
"created_at": "<string>",
"last_used_at": "<string>",
"expires_at": "<string>",
"key": "<string>"
}{
"detail": "<string>",
"code": "<string>",
"current": {
"id": "<string>",
"program_id": "<string>",
"program_name": "<string>",
"status": "draft",
"display_status": "<string>",
"title": "<string>",
"revision": 123,
"created_at": "<string>",
"updated_at": "<string>",
"submitted_at": "<string>",
"withdrawn_at": "<string>",
"asset": "<string>",
"description": "<string>",
"cvss_vector": "<string>",
"attachments": {},
"submission": {
"submitted_at": "<string>",
"attachments": {},
"content": {
"title": "<string>",
"asset": "<string>",
"description": "<string>",
"cvss_vector": ""
},
"program": {
"policy_version": 123,
"name": "<string>",
"scope": "<string>",
"exclusions": "<string>",
"rules": "<string>",
"eligibility": "<string>",
"disclosure": "<string>",
"rewards": {}
},
"stripe": {
"status": "<string>",
"checked_at": "<string>"
}
},
"decision": {
"outcome": "accepted",
"at": "<string>",
"message": "<string>"
},
"payout": {
"status": "approving",
"amount_cents": 123,
"approved_at": "<string>",
"transferred_at": "<string>",
"received_at": "<string>",
"payout_failed_at": "<string>"
}
}
}{
"detail": "<string>",
"code": "<string>",
"current": {
"id": "<string>",
"program_id": "<string>",
"program_name": "<string>",
"status": "draft",
"display_status": "<string>",
"title": "<string>",
"revision": 123,
"created_at": "<string>",
"updated_at": "<string>",
"submitted_at": "<string>",
"withdrawn_at": "<string>",
"asset": "<string>",
"description": "<string>",
"cvss_vector": "<string>",
"attachments": {},
"submission": {
"submitted_at": "<string>",
"attachments": {},
"content": {
"title": "<string>",
"asset": "<string>",
"description": "<string>",
"cvss_vector": ""
},
"program": {
"policy_version": 123,
"name": "<string>",
"scope": "<string>",
"exclusions": "<string>",
"rules": "<string>",
"eligibility": "<string>",
"disclosure": "<string>",
"rewards": {}
},
"stripe": {
"status": "<string>",
"checked_at": "<string>"
}
},
"decision": {
"outcome": "accepted",
"at": "<string>",
"message": "<string>"
},
"payout": {
"status": "approving",
"amount_cents": 123,
"approved_at": "<string>",
"transferred_at": "<string>",
"received_at": "<string>",
"payout_failed_at": "<string>"
}
}
}