Quick Start
This guide gets you to a working, authenticated request against your own SMBcrm account/location: a token, a base URL, and one API call. It takes about five minutes.
Step 1: Get a token
Section titled “Step 1: Get a token”The fastest path is a Private Integration Token (PIT), created from your SMBcrm
account’s settings. Choose only the scopes you need. For this guide, a read-only scope
like contacts.readonly is enough.
See Private Integration Tokens for where to generate one and how to store it. If Private Integrations isn’t listed under Settings, turn the feature on under Labs and reload the page.
Step 2: Set the base URL and headers
Section titled “Step 2: Set the base URL and headers”Every request goes to the same base URL and needs the same two headers:
https://services.smbcrm.com| Header | Value |
|---|---|
Authorization |
Bearer <token> |
Version |
v3 |
Add Content-Type: application/json on requests that send a JSON body. The exceptions are
the OAuth token endpoint (application/x-www-form-urlencoded) and
file uploads (multipart/form-data, which your HTTP client sets for you). See
Base URL & Headers for versioning, pagination, and rate-limit
details.
Step 3: Make a call
Section titled “Step 3: Make a call”Searching contacts is a good first call: it only needs your token and your account/location ID, and it doesn’t change any data.
curl -X POST https://services.smbcrm.com/contacts/search \ -H "Authorization: Bearer <token>" \ -H "Version: v3" \ -H "Content-Type: application/json" \ -d '{ "locationId": "<location_id>", "pageLimit": 5 }'const res = await fetch('https://services.smbcrm.com/contacts/search', { method: 'POST', headers: { Authorization: `Bearer ${token}`, Version: 'v3', 'Content-Type': 'application/json', }, body: JSON.stringify({ locationId: '<location_id>', pageLimit: 5, }),});
const data = await res.json();console.log(data);{ "contacts": [ ], "total": 1}If you get a contacts array back, even an empty one, your token, headers, and base URL
are all correct.
