Revoke an API key (developer)
curl --request POST \
--url https://api.simplepay.mx/v1/api-keys/{id}/revoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-sp-step-up-token: <x-sp-step-up-token>' \
--data '
{
"tenant_id": "<string>"
}
'const options = {
method: 'POST',
headers: {
'x-sp-step-up-token': '<x-sp-step-up-token>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({tenant_id: '<string>'})
};
fetch('https://api.simplepay.mx/v1/api-keys/{id}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.simplepay.mx/v1/api-keys/{id}/revoke"
payload = { "tenant_id": "<string>" }
headers = {
"x-sp-step-up-token": "<x-sp-step-up-token>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"key": {
"created_at": "2023-11-07T05:31:56Z",
"created_by_email": "jsmith@example.com",
"description": "<string>",
"environment": "sandbox",
"expires_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"obfuscated_value": "<string>",
"scopes": [
"<string>"
],
"status": "active"
},
"object": "simplepay.v1.api_key"
}Customer-bearer and admin-only revocation. Obtain a single-use step-up proof for action api_key.revoke and params_hash over canonical stable JSON {key_ref_id:<id>}; reuse the same Idempotency-Key. Revocation takes effect at the uncached lifecycle gate on the next service-key request.
POST
/
v1
/
api-keys
/
{id}
/
revoke
Revoke an API key (developer)
curl --request POST \
--url https://api.simplepay.mx/v1/api-keys/{id}/revoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-sp-step-up-token: <x-sp-step-up-token>' \
--data '
{
"tenant_id": "<string>"
}
'const options = {
method: 'POST',
headers: {
'x-sp-step-up-token': '<x-sp-step-up-token>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({tenant_id: '<string>'})
};
fetch('https://api.simplepay.mx/v1/api-keys/{id}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.simplepay.mx/v1/api-keys/{id}/revoke"
payload = { "tenant_id": "<string>" }
headers = {
"x-sp-step-up-token": "<x-sp-step-up-token>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"key": {
"created_at": "2023-11-07T05:31:56Z",
"created_by_email": "jsmith@example.com",
"description": "<string>",
"environment": "sandbox",
"expires_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"obfuscated_value": "<string>",
"scopes": [
"<string>"
],
"status": "active"
},
"object": "simplepay.v1.api_key"
}Autorizaciones
SimplePay customer session bearer. Never a tenant API credential.
Encabezados
Short-lived, single-use SimplePay recent-auth proof bound to this mutation and Idempotency-Key.
Required string length:
32 - 4096Required string length:
8 - 255Parámetros de ruta
Cuerpo
application/json
Respuesta
200 - application/json
API key revoked.
Hide child attributes
Hide child attributes
Maximum string length:
120Opciones disponibles:
sandbox, live Opciones disponibles:
active, failed, provisioning, revoked, revoking, rotating Última modificación el 1 de septiembre de 2026