Revoke API Key
https://api-sandbox.letpay.io/access-key/MY_API_KEY
HTTP DELETE /access-key/MY_API_KEY
Revokes a specific API key.
- Form Data Parameters
- No form data parameters required.
Response
The response of this request is a JSON schema.
AUTHORIZATION | API Key |
---|---|
Key | X-Auth-Token |
Value | MY_ACCESS_TOKEN |
Example Request
- 200 - Success
- 401 - Unauthorized
- 404 - Not Found
- 403 - Forbidden
Example Request
200 - Authenticated
curl --location --request DELETE 'https://api-sandbox.letpay.io/access-key/MY_ACCESS_KEY' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN'
Example Response
Header
Content-Type: application/json
Body
No response body
This request doens't return any response body
Example Request
401 - Unauthorized
curl --location --request DELETE 'https://api-sandbox.letpay.io/access-key/MY_ACCESS_KEY' \
--header 'X-Auth-Token: INVALID_ACCESS_TOKEN'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-15T19:23:27.248+0000",
"status": 401,
"error": "Unauthorized",
"message": "Access Denied",
"path": "/access-key/MY_API_KEY"
}
Example Request
404 - Not Found
curl --location --request DELETE 'https://api-sandbox.letpay.io/access-key/MY_ACCESS_KEY_' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-15T19:23:27.248+0000",
"status": 404,
"error": "Not Found",
"message": "We couldn't find this access key. Please make sure you are using the right credentials and the right environment.",
"path": "/access-key/MY_API_KEY"
}
Example Request
404 - Not Found
curl --location --request DELETE 'https://api-sandbox.letpay.io/access-key/NOT_MY_ACCESS_KEY' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-15T19:23:27.248+0000",
"status": 403,
"error": "Forbidden",
"message": "The user does not have permission to delete this accessKey",
"path": "/access-key/NOT_MY_ACCESS_KEY"
}