Revoke a customer key
curl --request DELETE \
--url https://api.aireserve.com/v1/customers/{customerId}/keys/{keyId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aireserve.com/v1/customers/{customerId}/keys/{keyId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aireserve.com/v1/customers/{customerId}/keys/{keyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "<string>",
"org_id": "<string>",
"status": "revoked",
"revoked_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}Customer keys
Revoke a customer key
Revoke one of the customer’s keys. Requests made with it are rejected immediately; usage already recorded stays attributed to the customer. Idempotent: revoking an already-revoked key answers 200 with the original revoked_at. A key that does not belong to this customer (or to your organization) is 404.
DELETE
/
v1
/
customers
/
{customerId}
/
keys
/
{keyId}
Revoke a customer key
curl --request DELETE \
--url https://api.aireserve.com/v1/customers/{customerId}/keys/{keyId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aireserve.com/v1/customers/{customerId}/keys/{keyId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aireserve.com/v1/customers/{customerId}/keys/{keyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "<string>",
"org_id": "<string>",
"status": "revoked",
"revoked_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}Authorizations
Your AI Reserve API key (aireserve_api_…) from the API Keys page in the portal (https://portal.aireserve.com/keys).
Path Parameters
Your end-customer id, URL-encoded — the same opaque id you would otherwise send as x-aireserve-customer (1–128 printable characters).
Required string length:
1 - 128The key's id from the create or list response.
Response
Key revoked.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Available options:
revoked Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$