API Reference / Integrations
DELETE
/integrations/api-keys/:idRevoke an API key
Revoke a partner API key. Replace :id with the key id.
🔒 JWT BearerTry in Console →
Purpose
Immediately invalidate a partner key — e.g. on staff offboarding or suspected leak. After revocation, /partner/* calls with that key return 401.
Authentication
Send your access token as a Bearer header: Authorization: Bearer <token>. Obtain it from Authenticate a user.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | number | Key id |
Request samples
bash
curl -X DELETE https://tourapi.nirajp.com.np/api/v1/integrations/api-keys/1 \ -H "Content-Type: application/json"
Success response
Returns 200 OK with the shape below.
| Field | Type | Description |
|---|---|---|
| message | string | Confirmation text |
json
{
"success": true,
"message": "API key revoked."
}Errors
All errors share the envelope { "success": false, "message": "..." }.
401No or invalid authentication token supplied.
json
{
"success": false,
"message": "Unauthorized"
}404The resource id does not exist or belongs to another organization.
json
{
"success": false,
"message": "Not found"
}403Authenticated but the account/role lacks permission for this action.
json
{
"success": false,
"message": "Forbidden"
}500An unexpected error occurred on our side. Retry; if it persists, contact support.
json
{
"success": false,
"message": "Internal server error"
}