Skip to main content
POST
Create API key

Authentication

Requires x-auth-token and x-device-id headers. Obtain these by calling the login endpoint with your Bayse account credentials.
You can also create API keys in the Bayse web app at app.bayse.markets/settings/api-keys, or in the web app, via More > Account Settings > API Keys in the Developer Tool section. Use this endpoint when you want to create keys programmatically.

Request body

string
required
A descriptive label for this key (e.g. "Production", "Trading bot"). Each API key must have a unique name in your account.

Example request

Response

string
Unique identifier for this API key.
string
The name you provided.
string
Public key (pk_*) — include this in the X-Public-Key header on all authenticated requests.
string
Secret key (sk_*) — use this to generate HMAC signatures. Only returned on creation.
object
Instructions for generating valid request signatures.
string
ISO 8601 creation timestamp.
The secretKey is only shown once. Store it securely — it cannot be retrieved again. If lost, rotate the key to generate a new one.