Skip to main content
Project API keys are used when your backend server needs to manage accounts, create sessions, or generate account API keys. They are secret and should never be exposed to clients.
NameTypeRequiredDescription
X-PROJECT-API-KEYstringYesYour project secret key, formatted as sk_...

Create an account

curl -X POST "https://synthesis.trade/api/v1/project/account" \
  -H "Content-Type: application/json" \
  -H "X-PROJECT-API-KEY: sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345678901234=" \
  -d '{"metadata": {"user_id": "123"}}'

Create a session for an account

curl -X POST "https://synthesis.trade/api/v1/project/account/{account_id}/session" \
  -H "X-PROJECT-API-KEY: sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345678901234="

Create an account API key

curl -X POST "https://synthesis.trade/api/v1/project/account/{account_id}/api-key" \
  -H "X-PROJECT-API-KEY: sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345678901234="
The secret_key is only returned once when created. Store it securely immediately.

Available routes

All routes under /api/v1/project/* require the project API key.
RouteMethodDescription
/api/v1/project/accountGETList project accounts
/api/v1/project/accountPOSTCreate a new account
/api/v1/project/account/{id}GETGet a specific account
/api/v1/project/account/{id}/metadataPUTUpdate account metadata
/api/v1/project/account/{id}/sessionPOSTCreate a session
/api/v1/project/account/{id}/session/{sid}/refreshPOSTRefresh a session
/api/v1/project/account/{id}/session/{sid}/expirePOSTExpire a session
/api/v1/project/account/{id}/sessions/expire-allPOSTExpire all sessions
/api/v1/project/account/{id}/api-keyGETList account API keys
/api/v1/project/account/{id}/api-keyPOSTCreate an account API key
/api/v1/project/account/{id}/api-key/{pk}DELETEDelete an account API key