SimpleTexting Custom Fields API

Read account custom fields / merge tags.

OpenAPI Specification

simpletexting-custom-fields-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SimpleTexting API Documentation Custom Fields API
  description: '# Introduction



    Thousands of businesses rely on SimpleTexting to communicate with their audience via text message. With our API, developers can access many of our platform’s features and integrate them with other websites or applications. This document details the available SimpleTexting API functions and their parameters. For additional security, our API is by approval only. If you’d like access, sign up for a trial account and email [support@simpletexting.net](mailto:support@simpletexting.net) with details about your use case.


    **How it works**


    Our API is organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer). It uses standard HTTP response codes and authentication. Before you get started, there a few things to keep in mind:


    - When using the POST request, you must specify that `content-type` is `application/json`.



    - The format of responses for all requests is JSON, you can skip the `Accept` request header or set it to `application/json`.


    # Authentication


    Each time you make a request to our API, we use a bearer token in your header to authenticate your account. API requests without authentication will fail. Your API token can be found under [settings](https://app2.simpletexting.com/integrations/webhooks).<br><br>

    Please be sure to keep your bearer token secure. Don’t share it any public areas such as GitHub, client-side code, etc.


    <!-- ReDoc-Inject: <security-definitions> -->

    '
  termsOfService: https://simpletexting.com/terms/
  version: 2.0.0
servers:
- url: https://api-app2.simpletexting.com/v2
security:
- api_key: []
tags:
- name: Custom Fields
  description: SimpleTexting's Custom Fields feature plays a key role in managing your customer data. Not only does it give you enormous flexibility when it comes to [collecting](https://help.simpletexting.com/using-simpletexting/apps-and-features/collecting-subscriber-data) or [importing](https://help.simpletexting.com/using-simpletexting/lists-and-contacts/importing-contacts) data, it also lets you quickly and easily personalize each message in a [mass text](https://simpletexting.com/mass-texting/) campaign.
paths:
  /api/custom-fields:
    get:
      tags:
      - Custom Fields
      summary: Get all Custom Fields
      description: 'This endpoint allows you to retrieve all custom fields.


        **Example:** Here we return all Custom Fields from an account:


        `https://api-app2.simpletexting.com/v2/api/custom-fields?page=100&size=500`'
      operationId: getCustomFields
      parameters:
      - name: page
        in: query
        description: 'An ordinal number of the page to return with the results of a request (with the custom fields of the given account). Please note that page numbering starts at zero (`0`)



          **Example:** `40`'
        required: false
        schema:
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 40
      - name: size
        in: query
        description: 'The number of the returned custom fields to show per page


          **Example:** `50`'
        required: false
        schema:
          maximum: 500
          type: integer
          format: int32
          default: 50
        example: 50
      responses:
        '200':
          description: Success. All custom fields retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageViewCustomField'
components:
  schemas:
    PageViewCustomField:
      type: object
      properties:
        content:
          type: array
          description: Page content and number of elements is restricted by page size.
          items:
            $ref: '#/components/schemas/CustomField'
        totalPages:
          type: integer
          description: The total number of pages. This is the number of elements divided by the page size.
          format: int32
        totalElements:
          type: integer
          description: Total number of elements.
          format: int64
      description: Page representation for search/fetch result
    CustomField:
      type: object
      properties:
        label:
          title: Custom Field Name
          type: string
          example: My Custom Field
        type:
          title: Field type
          type: string
          example: text
        mergeTag:
          title: Merge Tag
          type: string
          example: my_custom_field
        defaultMaxLength:
          title: Max Length
          type: integer
          format: int32
          example: 30
      description: Page content and number of elements is restricted by page size.
  securitySchemes:
    api_key:
      type: apiKey
      description: 'Bearer authentication (also called token authentication) is an authentication scheme that involves security tokens called bearer tokens. The name “Bearer authentication” can be understood as “give access to the bearer of this token.” The bearer token is a cryptic string, usually generated by the server in response to a login request. The client must send this token in the `Authorization: Bearer <token>` header when making requests to protected resources. To understand more about bearer tokens, please take a look at the following [resource](https://swagger.io/docs/specification/authentication/bearer-authentication/).'
      name: Authorization
      in: header
x-tagGroups:
- name: CAMPAIGNS & MESSAGES
  tags:
  - Campaigns
  - Messages
  - Media Items
  - File Information
- name: Contacts
  tags:
  - Contacts
  - Contacts - Batch Operations
  - Contact Lists
  - Contact Segments
  - Custom Fields
- name: Webhook Services
  tags:
  - Webhooks
  - Webhook Reports