Create and manage API keys for automation

Generate an API key for automating tasks like DNS management. This returns a key that you must save securely, and an ID for subsequent API calls related to the key.

Headers

Accept Example
Content-Type Example

Body

required
application/json
name string required
scopes array required
is_test boolean required
description string
expires_in_days integer
allowed_dns_zones array
dns_permissions array

Responses

200
success boolean
timestamp string
requestId string
data object
POST https://cloud.hostup.se/api/keys
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/keys" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "scopes": [
      "string"
    ],
    "is_test": true,
    "description": "string",
    "expires_in_days": 0,
    "allowed_dns_zones": [
      "string"
    ],
    "dns_permissions": [
      "string"
    ]
  }'
Response
{
  "success": true,
  "timestamp": "string",
  "requestId": "string",
  "data": {
    "key_id": "string",
    "key": "string",
    "name": "string",
    "description": "string",
    "scopes": [
      "string"
    ],
    "dns_permissions": [
      "string"
    ],
    "created_at": "string",
    "message": "string"
  }
}
Request Body
{
  "name": "string",
  "scopes": [
    "string"
  ],
  "is_test": true,
  "description": "string",
  "expires_in_days": 0,
  "allowed_dns_zones": [
    "string"
  ],
  "dns_permissions": [
    "string"
  ]
}