Skip to main content
POST
/
v1
/
auth
/
api-keys
Create an API key
curl --request POST \
  --url https://api.foresight.now/v1/auth/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "permissions": [
    "read"
  ]
}
'
{
  "key_id": "fs_key_abc123",
  "secret": "fs_secret_..."
}

Authorizations

Authorization
string
header
required

Privy-issued JWT. Required for L1 routes; accepted on L2 routes.

Body

application/json
permissions
enum<string>[]

Defaults to ["read"] when omitted.

Available options:
read,
trade

Response

Created

key_id
string
required
Example:

"fs_key_abc123"

secret
string
required

Plaintext secret. Returned only once at creation time — store it now.

Example:

"fs_secret_..."