X-Auth-Token and X-Org-Id headers is covered on the Authentication page.
All endpoints sit under the /v1/authentication base path, relative to the environment base URLs documented on the API reference introduction.
Key concepts
- Principal — the authenticated identity behind a token: either a user or a machine-to-machine (M2M) client. The principal authenticates once; each request then states which organisation it applies to.
- Organisation grant — an entitlement linking a principal to an organisation it can act on. Grants are managed by Flow Payroll and are the source of truth for who can access which organisation.
- Organisation id — the identifier returned for each organisation. Send it as the
X-Org-Idheader on subsequent requests to other Flow Payroll APIs to scope them to that organisation. - Pagination token — an opaque cursor returned alongside a page of results. Pass it back to fetch the next page; when it is absent, you have the full list.
API structure
Organisations
GET /my-organisations lists every organisation the authenticated principal has been granted access to, with each organisation’s id, registered legal name, and trading name. Results are paginated: set pageSize (1–100, default 50) and follow paginationToken until it is no longer returned.
This endpoint works before an organisation is selected — you do not send
X-Org-Id to call it. That makes it the natural source for an organisation picker in your own product, and the first call a multi-organisation integration makes after minting a token.Typical workflow
- Mint an access token with your client credentials — see Authentication.
- Call
GET /my-organisationswith the token to list the organisations you can act on. - If the response includes a
paginationToken, pass it back as thepaginationTokenquery parameter and repeat until it is absent. - Pick the target organisation and send its
organisationIdas theX-Org-Idheader on your calls to the other Flow Payroll APIs. - Refresh the list periodically, or when a request is rejected for organisation access, rather than hard-coding organisation ids — your grants can change over time.
Notes and best practices
pageSizeaccepts 1–100 and defaults to 50; values outside the range are clamped rather than rejected.- Treat
paginationTokenas opaque. Sending a token that is not valid returns a400response. legalNamecan be null if the organisation directory has no record for the organisation yet, andtradingNameis only set when it differs from the legal name — handle both when displaying organisation names.- Cache one token and reuse it across all your organisations. Switching organisation is a header change on the next request, not a new token.
Authentication
Every request must carry a valid token in theX-Auth-Token header; because this API returns identity-scoped data, it is the one part of the platform you call without X-Org-Id — see Authentication for the full header semantics. Responses use the shared envelope described in Response format.