Introducing the Salesmsg API
The Salesmsg API is a powerful tool that allows you to access and manipulate your data and add Salesmsg to your custom automations. Our API is built using Postman and offers improved response times and a wide range of endpoints. You can use our API to add contacts, apply tags, send messages, and more.
How to Access the API
Authentication
Our API covers multiple authentication methods:
PAT (Personal Access Token) authorization type is to go for in case you want to integrate your personal existing account with Salesmsg in order to extend your app’s functionality. PAT are managed by the user, which means that they are tied to a user account. This makes Personal Access Tokens a good choice for development, as well as automation purposes, when an application does only require a single Salesmsg account to manage organizations.
OAuth2 authorization type is to go for in case you want to allow other users to authenticate against Salesmsg in order for your app to use the issued token as well as utilize the Salesmsg’s functionality.
Personal Access Token
From your Settings page, click Personal Access Tokens, then click Create Token to generate your unique API token.
When creating a token, you will be asked to select scopes - these define exactly what the token is allowed to do. Only select the scopes your integration actually needs. See the API Scopes section for the full list.
Once your token is generated, you can start testing using our Live API Portal.
OAuth2
To configure OAuth2, go to Settings > OAuth Applications and click Create Client. When creating an OAuth client, you will also be required to select scopes that define the permissions your app is requesting.
For full details, see our API 2.3 documentation.
API Scopes
All API tokens (PAT and OAuth2) now require scopes. Scopes control exactly which endpoints your token can access. There is no longer a catch-all permission - every integration must declare exactly what it needs.
If a token tries to call an endpoint it doesn't have permission for, the API will return HTTP 403 insufficient_scope.
Scopes
Scopes
Scope | Type | Description |
contacts:read | read | Read contacts via Public API. |
contacts:write | write | Create and update contacts via Public API. |
conversations:read | read | Read conversations via Public API. |
conversations:write | write | Create and update conversations via Public API. |
messages:read | read | Read messages via Public API. |
messages:write | write | Create and update messages via Public API. |
saved-replies:read | read | Read saved-replies via Public API. |
saved-replies:write | write | Create and update saved-replies via Public API. |
teams:read | read | Read teams via Public API. |
teams:write | write | Create and update teams via Public API. |
users:read | read | Read users via Public API. |
users:write | write | Create and update users via Public API. |
tags:read | read | Read tags via Public API. |
tags:write | write | Create and update tags via Public API. |
custom-fields:read | read | Read custom-fields via Public API. |
custom-fields:write | write | Create and update custom-fields via Public API. |
attachments:read | read | Read attachments via Public API. |
attachments:write | write | Create and update attachments via Public API. |
billing:read | read | Read billing via Public API. |
billing:write | write | Create and update billing via Public API. |
broadcasts:read | read | Read broadcasts via Public API. |
broadcasts:write | write | Create and update broadcasts via Public API. |
broadcasts-recurring:read | read | Read recurring broadcasts via Public API. |
broadcasts-recurring:write | write | Create and update recurring broadcasts via Public API. |
toll-free:read | read | Read toll-free numbers via Public API. |
toll-free:write | write | Create and update toll-free numbers via Public API. |
contact-imports:read | read | Read contact imports via Public API. |
contact-imports:write | write | Create and update contact imports via Public API. |
integrations:read | read | Read integrations via Public API. |
integrations:write | write | Create and update integrations via Public API. |
conversions:read | read | Read conversions via Public API. |
conversions:write | write | Create and update conversions via Public API. |
follow-ups:read | read | Read follow-ups via Public API. |
follow-ups:write | write | Create and update follow-ups via Public API. |
groups:read | read | Read groups via Public API. |
groups:write | write | Create and update groups via Public API. |
keywords:read | read | Read keywords via Public API. |
keywords:write | write | Create and update keywords via Public API. |
numbers:read | read | Read numbers via Public API. |
numbers:write | write | Create and update numbers via Public API. |
numbers-landline:read | read | Read landline numbers via Public API. |
numbers-landline:write | write | Create and update landline numbers via Public API. |
off-hours:read | read | Read off-hours via Public API. |
off-hours:write | write | Create and update off-hours via Public API. |
organizations-agency:read | read | Read agency organizations via Public API. |
organizations-agency:write | write | Create and update agency organizations via Public API. |
organizations:read | read | Read organizations via Public API. |
organizations:write | write | Create and update organizations via Public API. |
organizations-invitations:read | read | Read organization invitations via Public API. |
organizations-invitations:write | write | Create and update organization invitations via Public API. |
role-permissions:read | read | Read role permissions via Public API. |
role-permissions:write | write | Create and update role permissions via Public API. |
triggers:read | read | Read triggers via Public API. |
triggers:write | write | Create and update triggers via Public API. |
opt-in-data-files:read | read | Read opt-in data files via Public API. |
opt-in-data-files:write | write | Create and update opt-in data files via Public API. |
call-history:read | read | Read call history via Public API. |
call-history:write | write | Create and update call history via Public API. |
voice:read | read | Read voice via Public API. |
voice:write | write | Create and update voice via Public API. |
website-chat:read | read | Read website chat via Public API. |
website-chat:write | write | Create and update website chat via Public API. |
For the OAuth2 URLs, the authorization code grant flow, and the extra requirements for HIPAA organizations, see Salesmsg API: OAuth Apps and HIPAA PHI Access.
Endpoints
The Salesmsg API covers all functionality of Salesmsg, including the following:
Contacts
Conversations
Messages
Saved replies
Broadcasts
And More.
All endpoints are covered in API 2.3 documentation.
API Documentation
For step-by-step walkthroughs with a Personal Access Token in Swagger and with OAuth2 in Postman, see Use the Salesmsg API with Swagger and Postman.
Refreshing Tokens
Token Lifetime & Refresh
Access tokens are short-lived. Both Personal Access Tokens (PAT) and OAuth2 access tokens expire 60 minutes after they are issued (the token response returns expires_in: 3600).
Any long-running or scheduled integration, for example a recurring nightly or weekly data pull, must detect the expired token and request a fresh one automatically so the job keeps running without interruption. Use the refresh endpoints:
PAT:
POST https://api.salesmessage.com/pub/v2.3/oauth/personal-token/refreshOAuth2:
POST https://api.salesmessage.com/pub/v2.3/oauth/token/refresh
Refreshing OAuth2 Tokens
To refresh an expired OAuth2 token, send a POST request to the token refresh endpoint:
https://api.salesmessage.com/pub/v2.3/oauth/token/refresh
Request Body Parameters
Send the following parameters in a JSON object:
Parameter | Description |
grant_type | Must be set to refresh_token. |
client_id | Your application's client ID. |
client_secret | Your application's client secret. |
refresh_token | The refresh token obtained during the initial token exchange. |
Example Request
POST https://api.salesmessage.com/pub/v2.3/oauth/token/refresh
Content -Type: application/json
{
"grant_type": "refresh_token",
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"refresh_token": "your_refresh_token"
}
Example Response
{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "new_access_token",
"refresh_token": "new_refresh_token"
}Important Notes
The refresh_token should be securely stored and only transmitted over secure channels (e.g., HTTPS).
Always validate the response to confirm the token was successfully refreshed.
Refreshing Personal Access Tokens (PAT)
To refresh a PAT, send a POST request to the PAT refresh endpoint:
https://api.salesmessage.com/pub/v2.3/oauth/personal-token/refresh
Headers
Include the following header to authenticate the request:
Authorization: Bearer <existing_PAT>
Example Request
POST https://api.salesmessage.com/pub/v2.3/oauth/personal-token/refresh
Content-Type: application/json
Authorization: Bearer existing_PAT
Example Response
{
"token_type": "Bearer",
"expires_in": 3600,
Refreshing 2"access_token": "new_personal_access_token"
}Frequently Asked Questions
What API functions are available?
Every functionality that is available on Salesmsg is accessible via our SMS API documentation.
Do I need a subscription to use the API?
Yes, an active Salesmsg subscription is required.
Do I need to select scopes when creating a token?
Yes. All new PATs and OAuth apps require scopes to be selected. There is no catch-all permission. Only request the scopes your integration actually needs.
What languages are available with the API?
We offer a wide range of languages to implement the Salesmsg API...
C# (.net 2.0, 3.5 or later)
C++ (cpprest, Qt5, Tizen)
Go
Java (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured)
Kotlin
Node.js (ES5, ES6, AngularJS with Google Closure Compiler annotations)
PHP
PowerShell
Python
R
Ruby
Rust (rust, rust-server)
Scala (akka, http4s, swagger-async-httpclient)
Swift (2.x, 3.x, 4.x, 5.x)
Typescript (Angular1.x, Angular2.x, Fetch, jQuery, Node)
And More.
What is a Team ID?
A Team ID is your Inbox ID and can be found here:
Related Articles
Need Help? ✋🏻
Contact us on live chat or send an email to us at [email protected].



