Accounts & Keys
Give a permission
Grant a user one permission on one account, or on `*`.
POST/grantsself-hosted · access token · manage_members
Self-hosted. Served by synpath serve on your own machine or host, which must be running; the engine and its order types live there. Nothing on this page runs on Synpath's servers.
Request body
| Name | Type | Description |
|---|---|---|
user_id | string | |
account | string | venue:name, or *. |
permission | string | view, trade, manage_credentials or manage_members. |
Response
The grant. Status 201. Recorded in the audit log.
import os
import httpx
TOKEN = os.environ["SYNPATH_ACCESS_TOKEN"]
r = httpx.post("http://127.0.0.1:8000/trading/grants", headers={"Authorization": f"Bearer {TOKEN}"}, json={"user_id":"u_alice","account":"polymarket:desk-a","permission":"trade"})
r.raise_for_status()
print(r.json())200
{
"id": "g_19",
"user_id": "u_alice",
"account": "kalshi:desk-a",
"permission": "trade",
"granted_ts": 1789655008000
}
