Salesmsg Keywords API

Keywords

GitHub OpenAPI

Operations 11

GET /keywords Search keywords #
POST /keywords Create keyword #
DELETE /keywords Delete bulk keywords #
GET /keywords/{keyword} Get keyword #
PUT /keywords/{keyword} Update keyword #
DELETE /keywords/{keyword} Delete keyword #
GET /keywords/mandated Get mandated keywords #
GET /keywords/{keyword}/stats Get keyword stats #
GET /keywords/{keyword}/contacts Get keyword contacts #
PUT /keywords/subscribe/toggle/{keyword}/{contact} Delete bulk keywords #
PUT /keywords/toggle/{keyword} Toggle keyword #

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-keywords-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-keywords-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SalesMessage Public Keywords 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: Keywords
  description: Keywords
paths:
  /keywords:
    get:
      tags:
      - Keywords
      summary: Search keywords
      description: 'REQUIRED SCOPES [''keywords:read'']

        Search keywords'
      operationId: d303eff4a621f97d0b16876190b93f7a
      parameters:
      - name: limit
        in: query
        description: The number of items to return per page.
        schema:
          type: integer
          default: 10
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KeywordResource'
      security:
      - apiAuth:
        - keywords:read
      x-versions:
      - public
    post:
      tags:
      - Keywords
      summary: Create keyword
      description: 'REQUIRED SCOPES [''keywords:write'']

        Create keyword'
      operationId: b1ccff9332c8124754b5e06c90b661fa
      requestBody:
        content:
          application/json:
            schema:
              properties:
                name:
                  description: Name
                  type: string
                is_active:
                  description: Activate
                  type: boolean
                message:
                  description: Message
                  type: string
                numbers:
                  description: Days
                  type: array
                  items:
                    type: integer
                title:
                  description: Title
                  type: string
              type: object
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeywordResource'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: status
                    type: string
                  errors:
                    title: errors
                    type: array
                    items:
                      type: string
                  error:
                    title: error
                    type: string
                type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                properties:
                  error:
                    title: error
                    type: string
                type: object
      security:
      - apiAuth:
        - keywords:write
      x-versions:
      - public
    delete:
      tags:
      - Keywords
      summary: Delete bulk keywords
      description: 'REQUIRED SCOPES [''keywords:write'']

        Delete bulk keywords'
      operationId: c6274b3fd49e610b781cc9e2c062779b
      requestBody:
        content:
          application/json:
            schema:
              properties:
                ids:
                  description: Ids
                  type: array
                  items:
                    type: integer
                bulk_all:
                  description: Bulk All
                  type: boolean
                  default: false
              type: object
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  action:
                    type: string
                  ids:
                    type: array
                    items:
                      type: integer
                type: object
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                properties:
                  ids:
                    title: ids
                    type: string
                type: object
      security:
      - apiAuth:
        - keywords:write
      x-versions:
      - public
  /keywords/{keyword}:
    get:
      tags:
      - Keywords
      summary: Get keyword
      description: 'REQUIRED SCOPES [''keywords:read'']

        Get keyword by ID'
      operationId: d100ef3abce6aff01ad0f005435e0451
      parameters:
      - name: keyword
        in: path
        description: The ID of the keyword
        required: true
        schema:
          type: string
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeywordResource'
      security:
      - apiAuth:
        - keywords:read
      x-versions:
      - public
    put:
      tags:
      - Keywords
      summary: Update keyword
      description: 'REQUIRED SCOPES [''keywords:write'']

        Update keyword'
      operationId: 35f446b9ac231bf80a8cb780a3c14a15
      parameters:
      - name: keyword
        in: path
        description: The ID of the keyword
        required: true
        schema:
          type: string
          example: ''
      requestBody:
        content:
          application/json:
            schema:
              properties:
                name:
                  description: Name
                  type: string
                is_active:
                  description: Activate
                  type: boolean
                message:
                  description: Message
                  type: string
                numbers:
                  description: Days
                  type: array
                  items:
                    type: integer
                title:
                  description: Title
                  type: string
              type: object
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeywordResource'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: status
                    type: string
                  errors:
                    title: errors
                    type: array
                    items:
                      type: string
                  error:
                    title: error
                    type: string
                type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                properties:
                  error:
                    title: error
                    type: string
                type: object
      security:
      - apiAuth:
        - keywords:write
      x-versions:
      - public
    delete:
      tags:
      - Keywords
      summary: Delete keyword
      description: 'REQUIRED SCOPES [''keywords:write'']

        Delete keyword'
      operationId: 457d92b7d330389182272e97a2576225
      parameters:
      - name: keyword
        in: path
        description: The ID of the keyword
        required: true
        schema:
          type: string
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      security:
      - apiAuth:
        - keywords:write
      x-versions:
      - public
  /keywords/mandated:
    get:
      tags:
      - Keywords
      summary: Get mandated keywords
      description: 'REQUIRED SCOPES [''keywords:read'']

        Get mandated keywords'
      operationId: b9b5eafa32d3876ff233d8ed2407683a
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      security:
      - apiAuth:
        - keywords:read
      x-versions:
      - public
  /keywords/{keyword}/stats:
    get:
      tags:
      - Keywords
      summary: Get keyword stats
      description: 'REQUIRED SCOPES [''keywords:read'']

        Get keyword stats'
      operationId: 70c9926e0cafcd354f4796473d762307
      parameters:
      - name: keyword
        in: path
        description: The ID of the keyword
        required: true
        schema:
          type: string
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
      security:
      - apiAuth:
        - keywords:read
      x-versions:
      - public
  /keywords/{keyword}/contacts:
    get:
      tags:
      - Keywords
      summary: Get keyword contacts
      description: 'REQUIRED SCOPES [''keywords:read'']

        Get keyword contacts'
      operationId: 256bbd53965ad2b1d2fa7baf7d5160ca
      parameters:
      - name: keyword
        in: path
        description: The ID of the keyword
        required: true
        schema:
          type: string
          example: ''
      - name: page
        in: query
        description: The page of a collection to return.
        schema:
          type: integer
          default: '1'
      - name: limit
        in: query
        description: The number of items to return per page.
        schema:
          type: integer
          default: '10'
      - name: term
        in: query
        description: Search term
        required: false
        schema:
          type: string
      - name: filter
        in: query
        description: Filter
        required: false
        schema:
          type: string
          enum:
          - subscribed
          - opted_out
      - name: from
        in: query
        description: Start date for the statistics range (YYYY-MM-DD)
        required: true
        schema:
          type: string
          format: date
      - name: to
        in: query
        description: Start date for the statistics range (YYYY-MM-DD)
        required: true
        schema:
          type: string
          format: date
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContactResource'
      security:
      - apiAuth:
        - keywords:read
      x-versions:
      - public
  /keywords/subscribe/toggle/{keyword}/{contact}:
    put:
      tags:
      - Keywords
      summary: Delete bulk keywords
      description: 'REQUIRED SCOPES [''keywords:write'']

        Delete bulk keywords'
      operationId: 0a5b377033e2acae8a9ef9821fc9aca7
      parameters:
      - name: keyword
        in: path
        description: The ID of the keyword
        required: true
        schema:
          type: string
          example: ''
      - name: contact
        in: path
        description: The ID of the contact
        required: true
        schema:
          type: string
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
      security:
      - apiAuth:
        - keywords:write
      x-versions:
      - public
  /keywords/toggle/{keyword}:
    put:
      tags:
      - Keywords
      summary: Toggle keyword
      description: 'REQUIRED SCOPES [''keywords:write'']

        Toggle keyword'
      operationId: 8e9ee418248870630900caf939df43ee
      parameters:
      - name: keyword
        in: path
        description: The ID of the keyword
        required: true
        schema:
          type: string
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeywordResource'
      security:
      - apiAuth:
        - keywords:write
      x-versions:
      - public
components:
  schemas:
    ContactCustomFieldResource:
      description: Class ContactCustomFieldResource
      properties:
        id:
          title: ID
          type: integer
        custom_field_id:
          title: Custom Field ID
          type: integer
        contact_id:
          title: Contact ID
          type: integer
        field_key:
          title: Field Key
          type: string
        organization_id:
          title: Organization ID
          type: integer
        text:
          title: Text
          type: string
        number:
          title: Number
          type: integer
        date:
          title: Date
          type: string
        created_at:
          title: Create Date
          type: string
        updated_at:
          title: Update Date
          type: string
        value:
          title: Value Data
          type: array
          items:
            properties:
              type:
                title: Type
                type: string
              value:
                title: Value
                type: string
            type: object
      type: object
      xml:
        name: ContactCustomFieldResource
    ContactTagResource:
      description: Class ContactTagResource
      properties:
        id:
          title: ID
          type: integer
        name:
          title: Name
          type: string
        label:
          title: Label
          type: string
        created_at:
          title: Created At
          type: string
      type: object
      xml:
        name: ContactTagResource
    KeywordResource:
      properties:
        id:
          title: ID
          type: integer
        owner_id:
          title: Owner ID
          type: integer
        organization_id:
          title: Organization ID
          type: integer
        is_active:
          title: Active
          type: boolean
        name:
          title: Name
          type: string
        message:
          title: Message
          type: string
        created_at:
          title: Created At
          type: string
        updated_at:
          title: Updated At
          type: string
        disabled_at:
          title: Disabled At
          type: string
      type: object
      xml:
        name: KeywordResource
    ContactResource:
      description: Class ContactResource
      properties:
        id:
          title: ID
          description: Returns the contact in array format.
          type: integer
        owner_id:
          title: Owner ID
          type: integer
        color:
          title: Color
          type: string
        first_name:
          title: First name
          type: string
        last_name:
          title: Last name
          type: string
        full_name:
          title: Full name
          type: string
        email:
          title: Email
          type: string
        photo_url:
          title: Photo Url
          type: string
        number:
          title: Number
          type: string
        country:
          title: Country
          type: string
        country_calling_code:
          title: Calling Code
          type: string
        national_number:
          title: National Number
          type: string
        typeted_number:
          title: typeted Number
          type: string
        is_blocked:
          title: typeted Number
          type: boolean
        opt_out:
          title: Opt Out Status
          type: boolean
        opt_out_at:
          title: Opt Out Date
          type: string
        opt_in_request_at:
          title: Opt In Request Date
          type: string
        opt_in_requests:
          title: Opt In Requests
          type: array
          items:
            properties:
              number_id:
                title: Number ID
                type: integer
            type: object
        opt_in_at:
          title: Opt In Date
          type: string
        shortcode_opt_outs:
          title: Shortcode Opted-out
          type: array
          items:
            properties:
              id:
                title: Opt Out ID
                type: integer
              number_id:
                title: Opt Out Number ID
                type: integer
              name:
                title: Opt Out Number ID
                type: string
              disabled:
                title: Disabled
                type: boolean
              timestamp:
                title: Opt Out Date
                type: string
              value:
                title: Opt Out Value
                type: boolean
            type: object
        created_at:
          title: Created At
          type: string
        updated_at:
          title: Updated At
          type: string
        integration_vendor_id:
          title: Integration Vendor Id
          type: integer
        prevent_autolink:
          title: Prevent Autolink
          type: boolean
        integration:
          title: Integration
          type: array
          items:
            properties:
              id:
                title: Integration ID
                type: integer
              key:
                title: Integration Key
                type: string
              name:
                title: Integration Name
                type: string
              photo_url:
                title: Integration Photo Url
                type: string
            type: object
        custom_fields:
          title: Custom Fields
          type: array
          items:
            $ref: '#/components/schemas/ContactCustomFieldResource'
        tags:
          title: Tags
          type: array
          items:
            $ref: '#/components/schemas/ContactTagResource'
        notes:
          title: Notes
          type: array
          items:
            properties:
              id:
                title: ID
                type: integer
              text:
                title: Text
                type: string
              created_at:
                title: Created At
                type: string
              updated_at:
                title: Updated At
                type: string
            type: object
      type: object
      xml:
        name: ContactResource
  securitySchemes:
    apiAuth:
      type: http
      description: Login with email and password to get the authentication token
      bearerFormat: JWT
      scheme: bearer