Disable Key - PUT
Revoke an API key. The key is deactivated and its status is set to REVOKED, immediately blocking it from authenticating requests.
Disabling a key that is already revoked is a no-op and returns 200 OK.
A revoked key can be reactivated later with Enable Key.
Resource URL
Resource Information
| Response Formats | JSON |
| Authentication | Yes (Requires Key) |
| Rate Limited | Yes |
Path Parameters
| Path Parameter | Description | Required |
|---|---|---|
| key | The API key to disable. Must be owned by the authenticated account. | Yes |
Request Parameters
| Request Parameter | Description | Required |
|---|---|---|
| key | The API Key, which is needed to make requests to MapQuest services. | Yes |
Response Object
| Field | Type | Description |
|---|---|---|
| name | string | The display name of the key. |
| key | string | The API key value that was disabled. |
| status | string | The status of the key. Always "REVOKED" after a successful disable. |
Error Responses
Errors are returned as application/problem+json. Refer to the status codes page for more details.
| Status | Description |
|---|---|
| 401 | Missing or invalid consumer identity. The request could not be authenticated. |
| 403 | The authenticated account does not own a key with the provided value. |
| 404 | Consumer not found. No account matches the authenticated identity. |
| 500 | An internal error occurred. Please retry. |
Example Request
PUT https://www.mapquestapi.com/account/v1/keys/IL1deIyHyQA40WpeLeA1bIUXuvTwlGjo/disable?key=KEY
Example Response
json
{
"name": "my-production-app",
"key": "IL1deIyHyQA40WpeLeA1bIUXuvTwlGjo",
"status": "REVOKED"
}