Account API
Profile, API keys, SSH keys, and service overview
Base URL: https://api.wayscloud.services
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/account/profile | Get profile |
GET | /v1/account/api-keys | List API keys |
POST | /v1/account/api-keys/service | Create service key |
POST | /v1/account/api-keys/pat | Create PAT |
DELETE | /v1/account/api-keys/{key_id} | Revoke API key |
GET | /v1/account/ssh-keys | List SSH keys |
POST | /v1/account/ssh-keys | Add SSH key |
DELETE | /v1/account/ssh-keys/{key_id} | Delete SSH key |
GET | /v1/account/services | List services |
GET /v1/account/profile
Get profile
Retrieve your account profile with customer ID, email, and account type.
Response:
| Field | Type | Description |
|---|---|---|
customer_id | string | |
email | string | |
first_name | string | |
last_name | string | |
company | string | |
customer_type | string | Values: private, business |
status | string | |
created_at | string |
Example:
curl https://api.wayscloud.services/v1/account/profile \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET"Response:
{
"customer_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"email": "kristen.nygaard@simula.no",
"first_name": "Kristen",
"last_name": "Nygaard",
"company": "Simula Research Laboratory",
"customer_type": "business",
"status": "active",
"created_at": "2024-01-15T09:30:00Z"
}GET /v1/account/api-keys
List API keys
List all API keys (service keys and PATs) on your account. Use to audit keys or find keys to revoke.
Response example:
[
{
"id": "a8b9c0d1-e2f3-4567-89ab-cdef01234567",
"key_prefix": "wayscloud_2xK9mPq",
"key_type": "service",
"service": "database",
"description": "Production database access",
"scopes": [
"database:read",
"database:write"
],
"is_active": true,
"created_at": "2024-03-01T14:00:00Z",
"last_used_at": "2024-03-15T08:45:22Z"
}
]Example:
curl https://api.wayscloud.services/v1/account/api-keys \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET"Response:
[
{
"id": "a8b9c0d1-e2f3-4567-89ab-cdef01234567",
"key_prefix": "wayscloud_2xK9mPq",
"key_type": "service",
"service": "database",
"description": "Production database access",
"scopes": [
"database:read",
"database:write"
],
"is_active": true,
"created_at": "2024-03-01T14:00:00Z",
"last_used_at": "2024-03-15T08:45:22Z"
}
]POST /v1/account/api-keys/service
Create service key
Create a service API key for accessing databases, storage, VPS, DNS, IoT, or LLM. The full key is shown only once—store it securely.
Request Body:
| Field | Type | Description |
|---|---|---|
service | string | Required. Values: database, storage, llm-api, dns, vps |
description | string |
Example:
{
"service": "database",
"description": "CI/CD pipeline database access"
}Response:
| Field | Type | Description |
|---|---|---|
id | string | |
key | string | Full key - shown only once |
key_prefix | string | |
key_type | string | |
warning | string |
Example:
curl -X POST https://api.wayscloud.services/v1/account/api-keys/service \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"service": "database",
"description": "CI/CD pipeline database access"
}'Response:
{
"id": "c0d1e2f3-a4b5-6789-abcd-ef0123456789",
"key": "wayscloud_3mN8pQrStUvWxYz_AbCdEfGhIjKlMnOpQrStUvWxYz0123456789",
"key_prefix": "wayscloud_3mN8pQr",
"key_type": "service",
"warning": "Save this key now. It cannot be retrieved later."
}POST /v1/account/api-keys/pat
Create PAT
Create a Personal Access Token for account management and automation. Choose scopes carefully. The full token is shown only once.
Request Body:
| Field | Type | Description |
|---|---|---|
scopes | array | Required. |
description | string | |
expires_in_days | integer |
Example:
{
"scopes": [
"api_keys:write",
"ssh_keys:read",
"services:read"
],
"description": "Terraform automation token",
"expires_in_days": 90
}Response:
| Field | Type | Description |
|---|---|---|
id | string | |
key | string | Full key - shown only once |
key_prefix | string | |
key_type | string | |
warning | string |
Example:
curl -X POST https://api.wayscloud.services/v1/account/api-keys/pat \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"scopes": [
"api_keys:write",
"ssh_keys:read",
"services:read"
],
"description": "Terraform automation token",
"expires_in_days": 90
}'Response:
{
"id": "c0d1e2f3-a4b5-6789-abcd-ef0123456789",
"key": "wayscloud_3mN8pQrStUvWxYz_AbCdEfGhIjKlMnOpQrStUvWxYz0123456789",
"key_prefix": "wayscloud_3mN8pQr",
"key_type": "service",
"warning": "Save this key now. It cannot be retrieved later."
}DELETE /v1/account/api-keys/
Revoke API key
Permanently revoke an API key or PAT. Takes effect immediately. This action cannot be undone.
Response:
| Field | Type | Description |
|---|---|---|
success | boolean | |
message | string |
Example:
curl -X DELETE https://api.wayscloud.services/v1/account/api-keys/{key_id} \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET"Response:
{
"success": true,
"message": "Resource deleted successfully"
}GET /v1/account/ssh-keys
List SSH keys
List all SSH public keys registered for VPS access. Shows fingerprint and usage count.
Response example:
[
{
"id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
"name": "deploy-server",
"fingerprint": "SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8",
"key_type": "ssh-ed25519",
"created_at": "2024-02-20T11:15:00Z",
"vm_count": 3
}
]Example:
curl https://api.wayscloud.services/v1/account/ssh-keys \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET"Response:
[
{
"id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
"name": "deploy-server",
"fingerprint": "SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8",
"key_type": "ssh-ed25519",
"created_at": "2024-02-20T11:15:00Z",
"vm_count": 3
}
]POST /v1/account/ssh-keys
Add SSH key
Register a new SSH public key. Supports RSA, Ed25519, and ECDSA. Keys are automatically deployed to new VPS instances.
Request Body:
| Field | Type | Description |
|---|---|---|
name | string | Required. |
public_key | string | Required. |
Example:
{
"name": "deploy-server",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl user@workstation"
}Response:
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
fingerprint | string | |
key_type | string | |
created_at | string | |
vm_count | integer |
Example:
curl -X POST https://api.wayscloud.services/v1/account/ssh-keys \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"name": "deploy-server",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl user@workstation"
}'Response:
{
"id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
"name": "deploy-server",
"fingerprint": "SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8",
"key_type": "ssh-ed25519",
"created_at": "2024-02-20T11:15:00Z",
"vm_count": 3
}DELETE /v1/account/ssh-keys/
Delete SSH key
Remove an SSH key from your account. Existing VPS instances keep the key until manually removed or recreated.
Response:
| Field | Type | Description |
|---|---|---|
success | boolean | |
message | string |
Example:
curl -X DELETE https://api.wayscloud.services/v1/account/ssh-keys/{key_id} \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET"Response:
{
"success": true,
"message": "Resource deleted successfully"
}GET /v1/account/services
List services
Get all your active services: databases, storage buckets, VPS instances, DNS zones, IoT devices, and GlobalSIM cards.
Response example:
[
{
"id": "f3a4b5c6-d7e8-9012-cdef-345678901234",
"service_type": "database",
"name": "webapp-prod-db",
"status": "running",
"region": "oslo",
"created_at": "2024-02-01T10:00:00Z",
"metadata": {
"engine": "postgresql",
"version": "16"
}
}
]Example:
curl https://api.wayscloud.services/v1/account/services \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET"Response:
[
{
"id": "f3a4b5c6-d7e8-9012-cdef-345678901234",
"service_type": "database",
"name": "webapp-prod-db",
"status": "running",
"region": "oslo",
"created_at": "2024-02-01T10:00:00Z",
"metadata": {
"engine": "postgresql",
"version": "16"
}
}
]