Work with this as data
Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/salesmsg:salesmsg-contact-import-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
OpenAPI Specification
openapi: 3.2.0
info:
title: SalesMessage Public Contact Import API
description: '## Introduction
This API documentation will start with an overview of the Salesmsg authorization methods and flows, followed by reference information about each specific endpoint. ## Mock Server
Additionally, if you want to try the API requests out on our mock server, then you can import the endpoints and set baseUrl variable in your collection as `https://e33e4a6a-ff9d-419f-a378-ec53560c0bb7.mock.pstmn.io`
## Authentication
Supported authorization methods include: **Personal Access Token (PAT)** and **OAuth2**. Whether to use PAT or regular OAuth2 tokens highly depends on your use case. - **OAuth2** authorization type is to go for in case you want to allow other users to authenticate against SalesMessage in order for your app to use the issued token as well as utilize the SalesMessage’s functionality. - **PAT** 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 SalesMessage account to manage organizations. ### OAuth2
The first step in implementing OAuth2 is registering an oauth application and retrieving your client ID and client secret. Most people who will be implementing OAuth2 will want to find and utilize a library in the language of their choice. For those implementing OAuth2 from scratch, please see RFC 6749 for details. After you create your application with SalesMessage, make sure that you have your `client_id` and `client_secret` handy. The next step is to figure out which OAuth2 flow is right for your purposes. Here are your options:
- Authorization code grant flow
- Implicit grant flow
##### OAuth2 URLs
| URL | Description |
|-----------------------|------|
| `https://app.salesmessage.com/auth/oauth` | Base authorization URL |
| `https://api.salesmessage.com/pub/v2.3/oauth/token` | Token URL |
#### 1. Authorization code grant flow
The authorization code grant flow is most suitable for **web and mobile applications**. It differs from the other grant types by requiring the application to launch a browser first to begin the integration. The integration consists of the following steps:
1. The application opens a browser to send the user to the OAuth server. 2. The user receives the authorization prompt and approves the application request. 3. The user is redirected back to the app with the authorization code in the query string. 4. The application exchanges the authorization code for an access token. Below, you can find the description of the authorization code grant flow in detail. ##### Get user permission
The application sends the user to a browser to get their permission. To begin the authorization flow, construct and open a URL like:
```
https://app.salesmessage.com/auth/oauth
?response_type=code
&client_id={client_id}
&redirect_uri={redirect_uri}
&scope={scope}
&state={state}
```
##### Examples:
```
# Read/write users
https://app.salesmessage.com/auth/oauth?response_type=code&client_id=269&redirect_uri=https://example.app/callback&scope=users:read%20users:write&state=xcoiv98y2kd22vusuye3kch
# Read contacts
https://app.salesmessage.com/auth/oauth?response_type=code&client_id=269&redirect_uri=https://example.app/callback&scope=contacts:read&state=xcoiv98y2kd22vusuye3kch
```
Here’s each query parameter explained:
| Parameter | Description |
|-----------------------|------|
| `Response_type` | Set to code indicating that you want an authorization code as the response. |
| `Client_id` | The identifier for apps. You will find it on the OAuth Applications page. |
| `Redirect_uri` | Used to redirect to after the user is granted permission or denied permission. The URI needs to have been entered in the Redirect URI field that the user specified at creating the application.'
version: v2.3
servers:
- url: https://api.salesmessage.com/pub/v2.3
tags:
- name: Contact Import
description: Contact Import
paths:
/contacts/import/upload:
post:
tags:
- Contact Import
summary: Upload file with contacts
description: 'REQUIRED SCOPES [''contact-imports:write'']
Upload file with contacts. See example and file format here: https://help.salesmessage.com/en/articles/3192286-import-your-contacts'
operationId: bbb779228517b46e522a1598484f19fb
requestBody:
content:
multipart/form-data:
schema:
required:
- file
properties:
file:
type: string
format: binary
type: object
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
firstRow:
type: array
items:
type: string
previewRows:
type: array
items:
type: string
options:
type: array
items:
properties:
key:
title: Key
type: string
name:
title: Name
type: string
type: object
autoDetectedRowOptions:
type: array
items:
properties:
email:
title: Email
type: string
number:
title: Number
type: string
type: object
type: object
security:
- apiAuth:
- contact-imports:write
x-versions:
- public
/contacts/import/list:
post:
tags:
- Contact Import
summary: Update contacts imports
description: 'REQUIRED SCOPES [''contact-imports:write'']
Update contacts imports'
operationId: a5815b5a51b8fb1dcb61714c2477c6b2
requestBody:
content:
application/json:
schema:
required:
- list
properties:
list:
description: Contact list
type: string
example: ''
type: object
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
firstRow:
type: array
items:
type: string
previewRows:
type: array
items:
type: string
options:
type: array
items:
properties:
key:
title: Key
type: string
name:
title: Name
type: string
type: object
autoDetectedRowOptions:
type: array
items:
properties:
email:
title: Email
type: string
number:
title: Number
type: string
type: object
type: object
security:
- apiAuth:
- contact-imports:write
x-versions:
- public
/contacts/import/{contactImport}:
delete:
tags:
- Contact Import
summary: Delete contacts import
description: 'REQUIRED SCOPES [''contact-imports:write'']
Delete contacts import'
operationId: 3b80ad06ec703503ec8f0d42ca7456bd
parameters:
- name: contactImport
in: path
description: The ID of the Contact Import
required: true
schema:
type: integer
example: ''
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
type: string
example: '[]'
security:
- apiAuth:
- contact-imports:write
x-versions:
- public
/contacts/import/download/{contactImport}:
get:
tags:
- Contact Import
summary: Download contact import list as CSV
description: 'REQUIRED SCOPES [''contact-imports:read'']
Download contact import list as CSV'
operationId: b75c71dd999157ebc788b5b426ea4fbe
parameters:
- name: contactImport
in: path
description: ID of the contact import
required: true
schema:
type: integer
responses:
'200':
description: Successful operation
headers:
Content-Type:
description: text/csv
schema:
type: string
Content-Disposition:
description: attachment; filename
schema:
type: string
Content-Length:
description: Size of the file in bytes
schema:
type: integer
'404':
description: No list found
content:
application/json:
schema:
properties:
message:
type: string
example: No list found
type: object
'401':
description: Unauthenticated
'403':
description: Forbidden
security:
- apiAuth:
- contact-imports:read
x-versions:
- public
/contacts/import/finish/{contactImport}:
post:
tags:
- Contact Import
summary: Finish a contact import process
description: 'REQUIRED SCOPES [''contact-imports:write'']
Finish a contact import process'
operationId: ffe490751bc6c04d466d1f3683c02312
parameters:
- name: contactImport
in: path
description: ID of the contact import
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Me'
'400':
description: Bad request
'401':
description: Unauthenticated
'403':
description: Forbidden
'404':
description: Contact import not found
security:
- apiAuth:
- contact-imports:write
x-versions:
- public
/contacts/import:
get:
tags:
- Contact Import
summary: Get list of contact imports
description: 'REQUIRED SCOPES [''contact-imports:read'']
Get list of contact imports'
operationId: a5b723962b37109a8edb9839e30b0e0d
parameters:
- name: page
in: query
description: Page number
required: false
schema:
type: integer
- name: limit
in: query
description: Number of items per page
required: false
schema:
type: integer
responses:
'200':
description: Successful operation
content:
application/json:
schema:
properties:
data:
type: array
items:
$ref: '#/components/schemas/ContactImportResource'
meta:
properties:
current_page:
type: integer
from:
type: integer
last_page:
type: integer
path:
type: string
per_page:
type: integer
to:
type: integer
total:
type: integer
type: object
type: object
'401':
description: Unauthenticated
'403':
description: Forbidden
security:
- apiAuth:
- contact-imports:read
x-versions:
- public
/contacts/import/progress/{contactImport}:
get:
tags:
- Contact Import
summary: Get contact contacts import progress
description: 'REQUIRED SCOPES [''contact-imports:read'']
Get contact contacts import progress'
operationId: 4b073239b0dd512a2e8578b14c16aecf
parameters:
- name: contactImport
in: path
description: The ID of the Contact Import
required: true
schema:
type: integer
example: ''
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
id:
type: integer
type: object
security:
- apiAuth:
- contact-imports:read
x-versions:
- public
/contacts/import/request/review/{contactImport}:
post:
tags:
- Contact Import
summary: Request review for a contact import
description: 'REQUIRED SCOPES [''contact-imports:write'']
Request review for a contact import'
operationId: 9b0ac268be19297ea048caa95fd461e8
parameters:
- name: contactImport
in: path
description: ID of the contact import
required: true
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
properties:
mapping:
description: Field mapping for the import
type: array
items:
type: string
type: object
responses:
'200':
description: Successful operation
content:
application/json:
schema:
properties:
success:
type: boolean
message:
type: string
type: object
'400':
description: Bad request
'401':
description: Unauthenticated
'403':
description: Forbidden
'404':
description: Contact import not found
security:
- apiAuth:
- contact-imports:write
x-versions:
- public
/contacts/import/start/{contactImport}:
post:
tags:
- Contact Import
summary: Start a contact import process
description: 'REQUIRED SCOPES [''contact-imports:write'']
Start a contact import process'
operationId: ed9b210433cf39d8085959b7fde37adb
parameters:
- name: contactImport
in: path
description: ID of the contact import
required: true
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
properties:
mapping:
description: Field mapping for the import
type: array
items:
type: string
tags:
description: Tags to apply to imported contacts
type: array
items:
type: string
type: object
responses:
'200':
description: Successful operation
content:
application/json:
schema:
properties:
success:
type: boolean
message:
type: string
import_id:
type: integer
type: object
'400':
description: Bad request
'401':
description: Unauthorized
'500':
description: Internal Server Error
security:
- apiAuth:
- contact-imports:write
x-versions:
- public
/contacts/import/status:
get:
tags:
- Contact Import
summary: Get contacts import status
description: 'REQUIRED SCOPES [''contact-imports:read'']
Get contacts import status'
operationId: 8d19fecd8b8c2a037fd252c14d1db2cc
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
allowed:
type: boolean
type: object
security:
- apiAuth:
- contact-imports:read
x-versions:
- public
components:
schemas:
UserResource:
description: Class UserResource
properties:
id:
title: ID
type: integer
email:
title: Email
type: string
first_name:
title: First Name
type: string
last_name:
title: Last Name
type: string
full_name:
title: Full Name
type: string
role:
title: Role
type: string
inbox_id:
title: Inbox ID
type: integer
organization_id:
title: Organization ID
type: integer
photo_url:
title: Photo URL
type: string
unread:
title: Unread Total
type: integer
number:
title: Number
type: string
formatted_number:
title: Formatted Number
type: string
isRingEverywhere:
title: Ring Everywhere
type: boolean
organizationNumber:
title: Organization Number
type: array
items:
properties:
id:
title: ID
type: integer
country:
title: Country
type: string
number:
title: Number
type: string
formatted_number:
title: Formatted Number
type: string
mms:
title: MMS
type: string
type: object
userPermissions:
title: User Permissions
type: array
items:
type: string
type: object
xml:
name: UserResource
Me:
description: Class Me
properties:
unread:
title: Unread Count
type: integer
type: object
xml:
name: Me
ContactImportResource:
properties:
id:
type: integer
user_id:
type: integer
organization_id:
type: integer
contacts:
type: integer
added:
type: integer
skipped:
type: integer
current:
type: integer
approved_at:
type:
- string
- 'null'
format: date-time
approved_by:
type:
- integer
- 'null'
created_at:
type: string
format: date-time
duplicate_count:
type: integer
duplicate_reasons:
type: object
failed_at:
type:
- string
- 'null'
format: date-time
failed_reason:
type:
- string
- 'null'
finished_at:
type:
- string
- 'null'
format: date-time
list:
type: 'null'
mapping:
type: object
path:
type: string
skipped_count:
type: integer
skipped_reasons:
type: object
started_at:
type:
- string
- 'null'
format: date-time
status:
type: string
updated_at:
type: string
format: date-time
user:
$ref: '#/components/schemas/UserResource'
type: object
securitySchemes:
apiAuth:
type: http
description: Login with email and password to get the authentication token
bearerFormat: JWT
scheme: bearer