List an org's token gates
Every gate, on or off, with where it applies. Needs `org.tokenGates.view`.
/v1/orgs/{org}/token-gatesEvery gate, on or off, with where it applies. Needs org.tokenGates.view.
Authorization
bearer An org API key (sk_live_…, sk_test_…), or an access token from the Synq issuer (the synq brand, on the accounts host) for this API.
In: header
Path Parameters
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/v1/orgs/string/token-gates"{ "data": [ { "id": "string", "name": "string", "enabled": true, "rule": { "version": 0, "root": { "type": "all", "conditions": [ { "type": "token", "chain": "string", "mint": "string", "min_amount": "string", "wallets": "string", "label": "string", "display": { "name": "string", "symbol": "string", "decimals": 0, "image": "string" } } ] } }, "schedule": { "timezone": "string", "all_day": true, "starts": "string", "ends": "string", "outside": "let_in", "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "state": "string" }, "refusal_message": "string", "summary": "string", "brands": [ "string" ], "apps": [ "string" ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "chains": [ "solana:mainnet" ]}Read a token gate GET
Needs `org.tokenGates.view`.
Change a token gate PATCH
Its name, rule, schedule, message, whether it is on, or where it applies. `rule` replaces the whole tree, read from the chain again as on making a gate; `schedule: null` and `refusal_message: null` clear them; `brands` and `apps` each replace their list. The next sign-in or refresh at an app it applies to checks the change. Turning a gate on checks its rule's chains again (400), and needs a chain where the rule reads one (409 `token_gates_unavailable`). Needs `org.tokenGates.edit`. Changing its rule or schedule, turning it on, or naming brands or apps also wants a plan with token gating (403 `plan_feature_unavailable`), so an org that moved to a plan without it can still turn one off, rename it, clear its message, empty its lists or delete it. Recorded as `token_gate.updated`.