API

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: 47

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_TOKEN

language

Header: language · Used in methods: 56

Response language — ISO 639-1 code, for example ru

Example

language: en

role

Header: role · Used in methods: 56

User role: partner or affiliate

Example

role: affiliate

chain

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_TOKEN

Header sets

The method accepts one of the sets. Sets with an API token are suitable for integrations.

api-token + language + rolemethods: 47
language + rolemethods: 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 →