Update an API key

This endpoint allows you to update the API key for an authenticated user.

put
/users/{userid}/api_keys/{id}

https://console.automox.com/api/users/{userid}/api_keys/{id}
Request
Response
Request
Path Parameters
userid
required
integer
The ID of the user to update keys for.
Headers
Authorization: Bearer
required
string
Your Automox API key for authentication Format: Authorization: Bearer your_automox_api_key
Content-Type: application /json
optional
string
Specify json as the content type
Query Parameters
o
required
integer
The Organization whose keys you want to update.
Body Parameters
is_enabled
required
boolean
Enable or disable an API key
Response
200: OK
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"is_enabled": {
"type": "boolean"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"email": {
"type": "string"
},
}
}
}
}
400: Bad Request
{
"errors": {
"field": [
"Error message for field."
]
}
}