The Leadway API authenticates with a personal Bearer token that you generate from your Leadway portal. The token carries the permissions (scopes) you decide to give it. It does not expire automatically, but you can revoke and replace it whenever you want.
Get your token
Sign in to your Leadway portal at https://app.leadwaycrm.com.
Open Settings → Private Integrations.
Click Create new integration and give it a name.
Select the scopes your integration needs. If you are not sure, start with
contacts.readonlyto test; you can always create additional integrations with more permissions later.Copy the token. You will only see it once, so store it in a secrets manager (1Password, AWS Secrets Manager, a vault). If you lose it, generate another one.
Required headers
Every API call must include:
| Header | Value | Notes |
|---|---|---|
Authorization | Bearer <YOUR_TOKEN> | The token you generated above. |
Version | 2021-07-28 | API version. It is fixed; do not change it unless the documentation of a specific endpoint tells you otherwise. |
Accept | application/json | All responses are JSON. |
Content-Type | application/json | Only on POST, PUT and PATCH. |
Base URL
https://services.leadconnectorhq.comAll documented endpoints hang from this base. For example, listing contacts is GET https://services.leadconnectorhq.com/contacts/?locationId=<YOUR_ACCOUNT_ID>.
Your first request
Let's try a GET /contacts/:
curl https://services.leadconnectorhq.com/contacts/?locationId=<YOUR_ACCOUNT_ID> \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Version: 2021-07-28" \
-H "Accept: application/json"const res = await fetch(
`https://services.leadconnectorhq.com/contacts/?locationId=${process.env.LEADWAY_ACCOUNT_ID}`,
{
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: "2021-07-28",
Accept: "application/json",
},
}
);
const data = await res.json();
console.log(data);import os, requests
res = requests.get(
"https://services.leadconnectorhq.com/contacts/",
params={"locationId": os.environ["LEADWAY_ACCOUNT_ID"]},
headers={
"Authorization": f"Bearer {os.environ['LEADWAY_TOKEN']}",
"Version": "2021-07-28",
"Accept": "application/json",
},
)
print(res.json())Expected response (truncated):
{
"contacts": [
{
"id": "ocQHyuzHvysMo5N5VsXc",
"locationId": "YOUR_ACCOUNT_ID",
"firstName": "...",
"email": "..."
}
],
"count": 1,
"meta": { "total": 1, "currentPage": 1, "nextPage": null, "prevPage": null }
}The locationId field you see in the response represents your account. You will see it in every API response because it is the wire-level identifier of your workspace.
Rotate or revoke your token
If a token leaks or is no longer used, go to Settings → Private Integrations in the portal and rotate or delete the integration. The change is immediate: any pending request with the old token returns 401 Unauthorized.
Recommendation: rotate tokens every 90 days, or whenever someone with access leaves the team.
Common auth errors
| Code | Cause | How to fix it |
|---|---|---|
401 Unauthorized | Invalid, revoked or missing token. | Check the Authorization header. Generate a new token if you lost it. |
403 Forbidden | The token is valid but does not have the required scope. | See the endpoint's scope page and generate a new token with that permission. |
429 Too Many Requests | You exceeded your account's rate limit. | Wait and retry. If this happens often, write to soporte@leadwaycrm.com to adjust your limit. |