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.
| Name | Type | Required | Description |
|---|
X-PROJECT-API-KEY | string | Yes | Your 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.
| Route | Method | Description |
|---|
/api/v1/project/account | GET | List project accounts |
/api/v1/project/account | POST | Create a new account |
/api/v1/project/account/{id} | GET | Get a specific account |
/api/v1/project/account/{id}/metadata | PUT | Update account metadata |
/api/v1/project/account/{id}/session | POST | Create a session |
/api/v1/project/account/{id}/session/{sid}/refresh | POST | Refresh a session |
/api/v1/project/account/{id}/session/{sid}/expire | POST | Expire a session |
/api/v1/project/account/{id}/sessions/expire-all | POST | Expire all sessions |
/api/v1/project/account/{id}/api-key | GET | List account API keys |
/api/v1/project/account/{id}/api-key | POST | Create an account API key |
/api/v1/project/account/{id}/api-key/{pk} | DELETE | Delete an account API key |