Hivebrowser

API Keys

Create and manage API keys for programmatic access.

Use forMachine-to-machine access

Issue keys for backend services, workers, queues, and automation jobs only.

ProtectKeep keys out of clients

Store keys in a secret manager and never expose them in browser bundles or logs.

OperateRotate with ownership

Split keys by environment or service so rotation and incident response stay clear.

Operational Boundary

API keys are for backend services, workers, queues, and automation jobs only. Split keys by environment or service, store them in a secret manager, disable old keys when workflows, vendors, or employees change, and monitor usage before removing fallback paths.

Create an API Key

POST/v1/api-keysShow endpoint detailsHide endpoint details
POST/v1/api-keys

Authorization

AuthorizationRequiredBearer <token>

API key passed as a Bearer token in the Authorization header.

In: header

x-hivebrowser-api-key<token>

API key passed directly in the x-hivebrowser-api-key header.

In: header

Request Body

application/jsonRequired
nameRequiredstring

Display name for the API key

Minimum length: 1Maximum length: 120
expiresAtstring | null

Optional expiration date (ISO 8601)

Format: "date-time"
cURL
curl -X POST "https://api.hivebrowser.ai/v1/api-keys" \  -H "Authorization: Bearer <token>" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "expiresAt": "2019-08-24T14:15:22Z"  }'
JavaScript
fetch("https://api.hivebrowser.ai/v1/api-keys", {  headers: {    "Authorization": "Bearer <token>"  },  body: JSON.stringify({    "name": "string",    "expiresAt": "2019-08-24T14:15:22Z"  })});
Response 201

API key created (includes secret)

Response example
{
  "data": {
    "id": "string",
    "teamId": "string",
    "name": "string",
    "keyPrefix": "string",
    "status": "ACTIVE",
    "lastUsedAt": "2019-08-24T14:15:22Z",
    "expiresAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "secret": "string"
  }
}
Response 400

Invalid request payload

Response example
{
  "error": "string",
  "message": "string"
}
Response 401

Missing or invalid API key

Response example
{
  "error": "string",
  "message": "string"
}

List API Keys

GET/v1/api-keysShow endpoint detailsHide endpoint details
GET/v1/api-keys

Authorization

AuthorizationRequiredBearer <token>

API key passed as a Bearer token in the Authorization header.

In: header

x-hivebrowser-api-key<token>

API key passed directly in the x-hivebrowser-api-key header.

In: header

cURL
curl -X GET "https://api.hivebrowser.ai/v1/api-keys" \  -H "Authorization: Bearer <token>"
JavaScript
fetch("https://api.hivebrowser.ai/v1/api-keys", {  headers: {    "Authorization": "Bearer <token>"  }});
Response 200

API key list

Response example
{
  "data": {
    "items": [
      {
        "id": "string",
        "teamId": "string",
        "name": "string",
        "keyPrefix": "string",
        "status": "ACTIVE",
        "lastUsedAt": "2019-08-24T14:15:22Z",
        "expiresAt": "2019-08-24T14:15:22Z",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      }
    ],
    "total": 0,
    "page": 1,
    "pageSize": 0
  }
}
Response 401

Missing or invalid API key

Response example
{
  "error": "string",
  "message": "string"
}

Disable an API Key

POST/v1/api-keys/{id}/disableShow endpoint detailsHide endpoint details
POST/v1/api-keys/{id}/disable

Authorization

AuthorizationRequiredBearer <token>

API key passed as a Bearer token in the Authorization header.

In: header

x-hivebrowser-api-key<token>

API key passed directly in the x-hivebrowser-api-key header.

In: header

Path Parameters

idRequiredstring

API key ID

cURL
curl -X POST "https://api.hivebrowser.ai/v1/api-keys/string/disable" \  -H "Authorization: Bearer <token>"
JavaScript
fetch("https://api.hivebrowser.ai/v1/api-keys/string/disable", {  headers: {    "Authorization": "Bearer <token>"  }});
Response 200

API key disabled

Response example
{
  "data": {
    "id": "string",
    "teamId": "string",
    "name": "string",
    "keyPrefix": "string",
    "status": "ACTIVE",
    "lastUsedAt": "2019-08-24T14:15:22Z",
    "expiresAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
Response 401

Missing or invalid API key

Response example
{
  "error": "string",
  "message": "string"
}
Response 404

Resource not found

Response example
{
  "error": "string",
  "message": "string"
}