Authorization
Each request to the CRM API includes authorization headers. The headers required for a specific method are listed on its page in the "Authorization" section.
Integrations are authorized using an API token in the Authorization header. The access token token-access is issued upon login via the API and is suitable for applications operating on behalf of the user.
Headers
api-token
Header: Authorization · Format: fs_api_* · Used in methods: 365
API token from the api_tokens section. The value of the Authorization header is Bearer <token>. Partner token: if a chain is selected when issuing the token, it works only with that chain, and the chain header is not required. If no chain is selected, the token has access to all account chains, but does not have an active chain. Each request that requires a chain must include the chain header; otherwise, error 117 with field: chain is returned. /chains returns the account's chains; /chains.switch is not available for the token (error 268).
Example
Authorization: Bearer fs_api_YOUR_TOKENlanguage
Header: language · Used in methods: 374
Response language — ISO 639-1 code, for example ru
Example
language: enrole
Header: role · Used in methods: 374
User role: partner or affiliate
Example
role: partnerchain
Header: chain · Used in methods: 0
The network in which the request is executed. Required only for a partner token issued without network selection; otherwise, ignored
Example
chain: YOUR_TOKENHeader sets
The method accepts one of the sets. Sets with an API token are suitable for integrations.
api-token + language + role | methods: 365 |
language + role | methods: 9 |
Access errors
An invalid, blocked, or expired token, as well as a request without the required header, will return an error with a code. The code values can be found in the "Errors" section.
Errors →