Skip to content

API Overview

The Skytale API manages accounts, API keys, and JWT tokens. It runs on a separate server from the relay.

Base URL

https://api.skytale.sh

All endpoints are prefixed with /v1/.

Authentication

Most endpoints require authentication via the Authorization header:

Authorization: Bearer sk_live_a1b2c3d4...

The API accepts two credential formats:

FormatPrefixUse case
API keysk_live_Account management, key management
JWTeyJRelay authentication (issued via POST /v1/tokens)

The only unauthenticated endpoint is POST /v1/accounts (account creation).

Request format

  • Content-Type: application/json
  • All request bodies are JSON objects

Response format

All responses return JSON. Successful responses return the resource directly:

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "[email protected]",
"name": "My Agent",
"plan_tier": "free"
}

Error responses

Errors return a JSON object with an error field:

{
"error": "missing authorization header"
}

Status codes

CodeMeaning
200Success
204Success (no body, used for DELETE)
400Bad request (invalid input)
401Unauthorized (missing or invalid credentials)
404Not found
500Internal server error

Endpoints

MethodPathAuthDescription
POST/v1/accountsNoCreate an account
GET/v1/accounts/meYesGet current account
POST/v1/keysYesCreate an API key
GET/v1/keysYesList API keys
DELETE/v1/keys/:idYesRevoke an API key
POST/v1/tokensYesExchange key for JWT
GET/healthNoHealth check