Client Admin API Keys¶
Reference for the client_admin_api_keys endpoints of the Surfmeter API.
Surfmeter API – Client Admin API Keys v1¶
The Surfmeter API lets you manage clients, users, capabilities, measurements, and organization-wide settings programmatically.
Servers¶
| Description | URL |
|---|---|
| https://surfmeter-server.{host}/client_admin_api/v1 | https://surfmeter-server.{host}/client_admin_api/v1 |
Client Admin API Keys¶
GET /client_admin_api_keys¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
Response 200 OK
{
"client_admin_api_keys": [
{
"id": 0,
"name": "string",
"valid_from": "string",
"valid_until": "string",
"key_preview": "string",
"effective_role": "string",
"last_used_at": "string",
"created_at": "string",
"client_admin_user_id": 0
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"client_admin_api_keys": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string",
"nullable": true
},
"valid_from": {
"type": "string"
},
"valid_until": {
"type": "string"
},
"key_preview": {
"type": "string"
},
"effective_role": {
"type": "string",
"nullable": true
},
"last_used_at": {
"type": "string",
"nullable": true
},
"created_at": {
"type": "string"
},
"client_admin_user_id": {
"type": "integer"
}
},
"required": [
"id",
"valid_from",
"valid_until",
"key_preview",
"client_admin_user_id"
]
}
}
},
"required": [
"client_admin_api_keys"
]
}
POST /client_admin_api_keys¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
Request body
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.
Schema of the request body
{
"description": "Request data for creating a client admin API key",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"valid_until": {
"type": "string",
"format": "date-time",
"example": "2026-01-15T10:30:00Z"
},
"effective_role": {
"type": "string",
"enum": [
"org_admin",
"admin",
"editor",
"viewer"
]
}
}
}
Response 201 Created
{
"client_admin_api_key": {
"id": 0,
"valid_from": "2026-01-15T10:30:00Z",
"valid_until": "2026-01-15T10:30:00Z",
"name": "string",
"api_key": "string",
"key_preview": "string",
"effective_role": "string",
"last_used_at": "string",
"created_at": "string",
"client_admin_user_id": 0
}
}
Schema of the response body
{
"description": "Response for client admin API key create action",
"type": "object",
"required": [
"client_admin_api_key"
],
"properties": {
"client_admin_api_key": {
"type": "object",
"required": [
"id",
"valid_from",
"valid_until",
"api_key",
"client_admin_user_id"
],
"properties": {
"id": {
"type": "integer"
},
"valid_from": {
"type": "string",
"format": "date-time",
"example": "2026-01-15T10:30:00Z"
},
"valid_until": {
"type": "string",
"format": "date-time",
"example": "2026-01-15T10:30:00Z"
},
"name": {
"type": "string",
"nullable": true
},
"api_key": {
"type": "string"
},
"key_preview": {
"type": "string"
},
"effective_role": {
"type": "string",
"nullable": true
},
"last_used_at": {
"type": "string",
"nullable": true
},
"created_at": {
"type": "string"
},
"client_admin_user_id": {
"type": "integer"
}
}
}
}
}
GET /client_admin_api_keys/{id}¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No |
Response 200 OK
{
"client_admin_api_key": {
"id": 0,
"valid_from": "2026-01-15T10:30:00Z",
"valid_until": "2026-01-15T10:30:00Z",
"name": "string",
"key_preview": "string",
"effective_role": "string",
"last_used_at": "string",
"created_at": "string",
"client_admin_user_id": 0
}
}
Schema of the response body
{
"description": "Response for client admin API key show action",
"type": "object",
"required": [
"client_admin_api_key"
],
"properties": {
"client_admin_api_key": {
"type": "object",
"required": [
"id",
"valid_from",
"valid_until",
"key_preview",
"client_admin_user_id"
],
"properties": {
"id": {
"type": "integer"
},
"valid_from": {
"type": "string",
"format": "date-time",
"example": "2026-01-15T10:30:00Z"
},
"valid_until": {
"type": "string",
"format": "date-time",
"example": "2026-01-15T10:30:00Z"
},
"name": {
"type": "string",
"nullable": true
},
"key_preview": {
"type": "string"
},
"effective_role": {
"type": "string",
"nullable": true
},
"last_used_at": {
"type": "string",
"nullable": true
},
"created_at": {
"type": "string"
},
"client_admin_user_id": {
"type": "integer"
}
}
}
}
}
DELETE /client_admin_api_keys/{id}¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No |
Response 200 OK
Schemas¶
ClientAdminApiKeyCreateData¶
| Name | Type |
|---|---|
effective_role |
string |
name |
string |
valid_until |
string(date-time) |
ClientAdminApiKeyCreateResponse¶
| Name | Type |
|---|---|
client_admin_api_key |
Properties: id, valid_from, valid_until, name, api_key, key_preview, effective_role, last_used_at, created_at, client_admin_user_id |
ClientAdminApiKeyDestroyResponse¶
ClientAdminApiKeyIndexResponse¶
| Name | Type |
|---|---|
client_admin_api_keys |
Array<Properties: id, name, valid_from, valid_until, key_preview, effective_role, last_used_at, created_at, client_admin_user_id> |
ClientAdminApiKeyShowResponse¶
| Name | Type |
|---|---|
client_admin_api_key |
Properties: id, valid_from, valid_until, name, key_preview, effective_role, last_used_at, created_at, client_admin_user_id |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| ApiKeyAuth | apiKey | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |