1. Check your organization is entitled
Agency API access is a product feature. If Settings β API is not in your Turris navigation, your organization does not have it yet; contact support@turrisfi.com. Each area of the API needs the same product feature as the matching screen in the agency application. If you can see a section in the app, its endpoints are available to your credential; if you cannot, they return 403 with anerrorType of product_feature_subscription_required and a message naming the feature to ask for.
A 403 on one area never affects the others.
2. Mint a credential
1
Log into the Turris agency application
Use the environment you intend to integrate against. Sandbox first.
2
Go to Settings β API
Create an OAuth (machine-to-machine) client.
3
Store the client id and secret
The secret is stored hashed and cannot be retrieved again. If you lose it, delete the client and create another.
An API Client is the recommended agency credential, and this guide uses it. Agencies can also mint a Restricted Access Token from the same settings page: a single long-lived secret, fenced by an exact-match IP allowlist, for callers that cannot perform the token exchange below. It reaches the same endpoints but never expires, so prefer the API Client wherever you have a backend.
3. Exchange it for a token
4. Read your entities first
downstreamEntityId, and this is where those ids come from.
5. Understand what your credential can see
Your credential sees its own organization plus everything beneath it, and never anything above it. Minted at your top company, it reaches the top company and every branch. Minted at a branch, it reaches that branch alone: not the parent, not sibling branches. The Agency API explains why this is narrower than what the web application shows a branch user, and why you should mint at the top company if your integration covers the whole group.Narrowing to one entity
Every list acceptsdownstreamEntityId except three:
/v2/downstream/markets/{upstreamDownstreamAssociationId}/documents, /entity-contacts and /market-contacts take only the association id plus page and limit.
An id outside your scope returns 404, not 403. Treat a 404 on an id you believe is yours as a sign the credential was minted lower in the tree than you thought.