Salesmsg Tags API

SalesMsg’s Tags API is for creating tags and adding them to your contacts. Tags serve for identification of contacts and searching for contacts via associated tags, filtering messages, analytics, conversations, and more. For example, you’ve got a contact that had come from Instagram. By adding the ‘instagram’ tag to the contact, we can then filter and search that exact contact much easier. Tags section is found in the Settings.The Tags APIs enable your application to manage and interact with tags.

GitHub OpenAPI

Operations 11

PUT /tags/contact/{contact}/{tag} Add tag for contact #
DELETE /tags/contact/{contact}/{tag} Remove tag from contact #
GET /tags Get tags #
POST /tags Create tag #
DELETE /tags Bulk delete tags #
POST /tags/contact/{contact}/create Create tag for contact #
GET /tags/{tag} Get tag #
PUT /tags/{tag} Update tag #
DELETE /tags/{tag} Delete a tag #
GET /tags/paginated Get tags paginated #
GET /tags/search Search tags #

Specifications

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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/salesmsg:salesmsg-tags-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

salesmsg-tags-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SalesMessage Public Tags 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: Tags
  description: 'SalesMsg’s Tags API is for creating tags and adding them to your contacts.


    Tags serve for identification of contacts and searching for contacts via associated tags, filtering messages, analytics, conversations, and more. For example, you’ve got a contact that had come from Instagram. By adding the ‘instagram’ tag to the contact, we can then filter and search that exact contact much easier.


    Tags section is found in the Settings.


    The Tags APIs enable your application to manage and interact with tags.'
paths:
  /tags/contact/{contact}/{tag}:
    put:
      tags:
      - Tags
      summary: Add tag for contact
      description: 'REQUIRED SCOPES [''tags:write'']

        Add tag for contact'
      operationId: ee9796ec81058b528a332a3fe6805dae
      parameters:
      - name: contact
        in: path
        description: The ID of the Contact
        required: true
        schema:
          type: string
      - name: tag
        in: path
        description: The ID of the Tag
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  type:
                    type: string
                  message:
                    type: string
                type: object
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: Not Found
                  status:
                    type: integer
                    example: 404
                type: object
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: This action is unauthorized.
                  status:
                    type: integer
                    example: 403
                type: object
      security:
      - apiAuth:
        - tags:write
      x-versions:
      - public
    delete:
      tags:
      - Tags
      summary: Remove tag from contact
      description: 'REQUIRED SCOPES [''tags:write'']

        Remove tag from contact'
      operationId: 93df8ba0d45848d8e63820f592d014da
      parameters:
      - name: contact
        in: path
        description: The ID of the Contact
        required: true
        schema:
          type: string
      - name: tag
        in: path
        description: The ID of the Tag
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  type:
                    type: string
                  message:
                    type: string
                type: object
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: Not Found
                  status:
                    type: integer
                    example: 404
                type: object
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: This action is unauthorized.
                  status:
                    type: integer
                    example: 403
                type: object
      security:
      - apiAuth:
        - tags:write
      x-versions:
      - public
  /tags:
    get:
      tags:
      - Tags
      summary: Get tags
      description: 'REQUIRED SCOPES [''tags:read'']

        This API endpoint returns all tags that are currently used within the system.


        Tags can be sorted by name, label, etc. Additionally, you are allowed to choose a sorting order and the number of results per page, up to 100.'
      operationId: GetTags
      parameters:
      - name: sortBy
        in: query
        description: Sort by field (name, label, etc)
        required: false
        schema:
          type: string
      - name: sortOrder
        in: query
        description: Sorting order
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
          example: 1
      - name: search
        in: query
        description: Tag label
        required: false
        schema:
          type: string
      - name: exclude[]
        in: query
        description: The IDs of the Tags to exclude from searching
        schema:
          type: array
          items:
            type: integer
      - name: ids[]
        in: query
        description: The IDs of the Tags to include
        schema:
          type: array
          items:
            type: integer
      - name: length
        in: query
        description: Results per page
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          example: 10
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Tags List
                    type: array
                    items:
                      $ref: '#/components/schemas/TagResource'
                type: object
      security:
      - apiAuth:
        - tags:read
      x-versions:
      - public
      x-operation-id-source: normalized
      x-operation-id-original: Get tags
    post:
      tags:
      - Tags
      summary: Create tag
      description: 'REQUIRED SCOPES [''tags:write'']

        Through this API endpoint, you can create and add a new tag label in the repository to the ones that already exist.


        As a result, each user in the system can now narrow down the search among their contacts and individualize messages.


        On creating, up to 15 characters are allowed for each tag label.'
      operationId: CreateTag
      parameters:
      - name: label
        in: query
        description: Tag label
        required: true
        schema:
          type: string
          maxLength: 50
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagResource'
      security:
      - apiAuth:
        - tags:write
      x-versions:
      - public
      x-operation-id-source: normalized
      x-operation-id-original: Create tag
    delete:
      tags:
      - Tags
      summary: Bulk delete tags
      description: 'REQUIRED SCOPES [''tags:write'']

        Bulk delete tags'
      operationId: 52b6fe688adcf80cf63f0819de417f22
      requestBody:
        content:
          application/json:
            schema:
              properties:
                ids:
                  description: The IDs of the Tags
                  type: array
                  items:
                    type: integer
                    example: 1
                delete_all:
                  description: Delete All
                  type: boolean
                  example: false
              type: object
      responses:
        '204':
          description: Response
        '404':
          description: Organization not found
          content:
            application/json:
              schema:
                properties:
                  message:
                    title: message
                    type: string
                type: object
      security:
      - apiAuth:
        - tags:write
      x-versions:
      - public
  /tags/contact/{contact}/create:
    post:
      tags:
      - Tags
      summary: Create tag for contact
      description: 'REQUIRED SCOPES [''tags:write'']

        Create tag for contact'
      operationId: 04d5ea8af060e6681952ce359ffc78be
      parameters:
      - name: contact
        in: path
        description: The ID of the Contact
        required: true
        schema:
          type: integer
      - name: label
        in: query
        description: Tag label
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagResource'
      security:
      - apiAuth:
        - tags:write
      x-versions:
      - public
  /tags/{tag}:
    get:
      tags:
      - Tags
      summary: Get tag
      description: 'REQUIRED SCOPES [''tags:read'']

        Get tag'
      operationId: d3bc713cbde6dd815c3564d836a94aae
      parameters:
      - name: tag
        in: path
        description: The ID of the Tag
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagResource'
      security:
      - apiAuth:
        - tags:read
      x-versions:
      - public
    put:
      tags:
      - Tags
      summary: Update tag
      description: 'REQUIRED SCOPES [''tags:write'']

        This API request allows for modifying data for a specific tag by tag id. You can update tag label with any text up to 15 characters.


        The endpoint updates a tag based on the data properties provided in the request body.'
      operationId: UpdateTag
      parameters:
      - name: tag
        in: path
        description: Tag id
        required: true
        schema:
          type: integer
      - name: label
        in: query
        description: Tag label
        required: true
        schema:
          type: string
          maxLength: 50
          uniqueItems: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagResource'
      security:
      - apiAuth:
        - tags:write
      x-versions:
      - public
      x-operation-id-source: normalized
      x-operation-id-original: Update tag
    delete:
      tags:
      - Tags
      summary: Delete a tag
      description: 'REQUIRED SCOPES [''tags:write'']

        This API endpoint deletes a tag of a repository.


        As a result, through this API endpoint, any identified tag will automatically be removed from all the contacts who had it applied to them. The request deletes a tag by id with the corresponding values.'
      operationId: DeleteATag
      parameters:
      - name: tag
        in: path
        description: Tag id
        required: true
        schema:
          type: integer
          example: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                  message:
                    type: string
                type: object
        '404':
          description: Organization not found
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: Not Found
                  status:
                    type: integer
                    example: 404
                type: object
      security:
      - apiAuth:
        - tags:write
      x-versions:
      - public
      x-operation-id-source: normalized
      x-operation-id-original: Delete a tag
  /tags/paginated:
    get:
      tags:
      - Tags
      summary: Get tags paginated
      description: 'REQUIRED SCOPES [''tags:read'']

        This API endpoint returns all tags that are currently used within the system.


        Tags can be sorted by name, label, etc. Additionally, you are allowed to choose a sorting order and the number of results per page, up to 100.'
      operationId: GetTagsPaginated
      parameters:
      - name: sortBy
        in: query
        description: Sort by field (name, label, etc)
        required: false
        schema:
          type: string
      - name: sortOrder
        in: query
        description: Sorting order
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
          example: 1
      - name: search
        in: query
        description: Tag label
        required: false
        schema:
          type: string
      - name: exclude[]
        in: query
        description: The IDs of the Tags to exclude from searching
        schema:
          type: array
          items:
            type: integer
      - name: ids[]
        in: query
        description: The IDs of the Tags to include
        schema:
          type: array
          items:
            type: integer
      - name: length
        in: query
        description: Results per page
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          example: 10
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Tags List
                    type: array
                    items:
                      $ref: '#/components/schemas/TagResource'
                type: object
      security:
      - apiAuth:
        - tags:read
      x-versions:
      - public
      x-operation-id-source: normalized
      x-operation-id-original: Get tags paginated
  /tags/search:
    get:
      tags:
      - Tags
      summary: Search tags
      description: 'REQUIRED SCOPES [''tags:read'']

        Search tags'
      operationId: 3291e76c6bb950e7c9fcec72b4b6cff3
      parameters:
      - name: term
        in: query
        description: Term
        required: true
        schema:
          type: string
      - name: per_page
        in: query
        description: Per Page
        required: true
        schema:
          type: integer
          default: 50
      - name: page
        in: query
        description: Page
        required: true
        schema:
          type: integer
          default: 1
      - name: exclude[]
        in: query
        description: The IDs of the Tags
        schema:
          type: array
          items:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/TagResource'
                  total:
                    type: integer
                  errors:
                    type: boolean
                type: object
      security:
      - apiAuth:
        - tags:read
      x-versions:
      - public
components:
  schemas:
    TagResource:
      description: Class TagResource
      properties:
        id:
          title: ID
          type: integer
        owner_id:
          title: Owner ID
          type: integer
        organization_id:
          title: Organization ID
          type: integer
        label:
          title: Label
          type: string
        name:
          title: Name
          type: string
        type:
          title: Type
          type: string
        classname:
          title: Class Name
          type: string
      type: object
      xml:
        name: TagResource
  securitySchemes:
    apiAuth:
      type: http
      description: Login with email and password to get the authentication token
      bearerFormat: JWT
      scheme: bearer