Session cookie (web dashboard)
When you use the LeadScout web dashboard, signing in sets a session cookie automatically. The browser sends that cookie with every API request — you do not need to set any headers manually. This method is not suitable for server-to-server or mobile integrations.Bearer JWT token (mobile and integrations)
For programmatic access, obtain an access token for the LeadScout API audience and attach it to every request as anAuthorization header.
401 response.
You must request the token with the correct API audience for your environment. Tokens issued for a different audience will be rejected even if the signature is valid.
Obtaining a token
To obtain API access credentials for server-to-server or custom integrations, contact the LeadScout team. They will provide your client ID, client secret, and API audience values. Once you have those, exchange them for a bearer token using the OAuth 2.0 client credentials flow:Making an authenticated request
Once you have a token, pass it in theAuthorization header:
Error responses
401 Unauthorized
You receive a401 when no credential is present or the provided token is invalid — for example, when the token is expired, the signature does not match, or the audience claim is wrong.
403 Forbidden
You receive a403 when your credential is valid but your role or permissions do not allow the requested action. For example, a sales role user attempting to create a webhook (admin-only) will receive a 403.
