PATCH /admin/api-keys/{id}

Update API key settings (name, limits, active status)

Path parameters

  • id integer Required
application/json

Body

  • customer_name string
  • customer_email string
  • max_devices integer
  • rate_limit_per_hour integer
  • is_active boolean

    Set to false to disable all requests with this key

Responses

  • 200 application/json

    API key updated successfully

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • data object
  • 401 application/json

    Unauthorized - Invalid admin secret

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 404 application/json

    API key not found

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
PATCH /admin/api-keys/{id}
curl \
 --request PATCH 'http://localhost:7001/admin/api-keys/{id}' \
 --header "X-Admin-Secret: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"customer_name":"string","customer_email":"string","max_devices":42,"rate_limit_per_hour":42,"is_active":true}'
Request examples
{
  "customer_name": "string",
  "customer_email": "string",
  "max_devices": 42,
  "rate_limit_per_hour": 42,
  "is_active": true
}
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "Success",
  "data": {}
}
Response examples (401)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}
Response examples (404)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}