openapi: 3.0.0
info:
version: v1
title: Listrak SMS REST API
description: "# Introduction\r\nWelcome to the Listrak SMS REST\
\ API!\r\n\r\nOur API allows developers to integrate with Listrak's application.\
\ It enables the seamless automation of a broad set of functionality, ranging\
\ from basic tasks to complex processes.\r\n\r\nWe aim to provide comprehensive\
\ documentation coverage of our API's capabilities. Each resource and method is\
\ described in detail with implementation notes, descriptions of parameters, headers,\
\ return values, and code samples to aid in development.\r\n\n# Versioning\r\n\
\r\nThe API version is denoted in the URI. This API's base URI is:\r\n\r\n`https://api.listrak.com/sms/v1`\r\
\n\r\n
\r\n\r\nThe API version will be incremented if breaking changes are\
\ introduced. Breaking changes may include:\r\n\r\n- Addition of required headers,\
\ parameters, or model fields to a current route\r\n- Alterations that would result\
\ in currently valid requests failing, or performing unexpectedly\r\n\r\n
\r\
\n\r\nChanges that are not considered breaking may include:\r\n\r\n- Addition\
\ of new model fields\r\n- Addition of new routes\r\n- Addition of new response\
\ headers\r\n- Any alteration to a route that is marked as In Development\r\n# Usage\r\n\r\n## External Libraries\r\n\r\nThe C# code\
\ examples featured on this site require the following packages:\r\n\r\n- Microsoft.AspNet.WebApi.Client\r\
\n- Newtonsoft.Json\r\
\n\r\nThe Php code examples require the following package:\r\n- Guzzle 6\n# Integration Setup\r\nTo enable API access, **you must create\
\ an _Integration_** on the _Integrations_ page. In the Listrak application left\
\ menu, go to: Integrations → Integration Management.\r\n\r\nPlease specify\
\ integration type `SMS` for your integration.\r\n\r\nMake sure to securely store\
\ a copy of your _Client ID_ and _Client Secret_. These values will be needed\
\ to authenticate with the API. For your security, the _Client Secret_ cannot\
\ be retrieved if it is lost.\r\n\n# Status Codes\r\n\r\n| Status Code | Status\
\ | Description |\r\n|-|-|-|\r\n| 200 | OK | The request succeeded. |\r\n| 201\
\ | Created | A new resource has been created. |\r\n| 400 | Bad Request | Your\
\ request is malformed or invalid. |\r\n| 401 | Unauthorized | Authentication\
\ is required. |\r\n| 404 | Not Found | The resource does not exist. |\r\n| 405\
\ | Method Not Allowed | The route does not support the requested method. |\r\n\
| 415 | Unsupported Media Type | Please use a `Content-Type` of `application/json`.\
\ |\r\n| 500 | Internal Server Error | An unexpected error occurred. Our development\
\ team has been notified. |\r\n\n# Error Codes\r\n## General\r\n| Error Code |\
\ Possible Causes |\r\n|-|-|\r\n| ERROR_INVALID_CREDENTIALS | Invalid client credentials,\
\ inactive integration, unauthorized IP address |\r\n| ERROR_INVALID_LIST_ID |\
\ `listId` is not a `listId` that exists or the `listId` does not exist on the\
\ `senderCodeId` supplied |\r\n| ERROR_INVALID_PARAMETER | Null or invalid value\
\ for a parameter, non-unique value for a parameter (if the property is required\
\ to be unique for all resources in the collection) |\r\n| ERROR_INVALID_PHONE_NUMBER\
\ | `phoneNumber` is in an invalid format |\r\n| ERROR_LIST_INACTIVE | The list\
\ is in an inactive state based off of the `listId` provided |\r\n| ERROR_MALFORMED_REQUEST_BODY\
\ | Invalid JSON body was supplied |\r\n| ERROR_RESOURCE_DEPENDENCY | Trying to\
\ delete a resource that is in use |\r\n| ERROR_SENDER_CODE_DISABLED | The sender\
\ code is in a disabled state based off of the `senderCodeId` provided |\r\n|\
\ ERROR_UNABLE_TO_LOCATE_RESOURCE | Valid route was supplied with invalid resource\
\ IDs |\r\n| ERROR_UNAUTHORIZED | Invalid access token, inactive integration,\
\ insufficient access level, unauthorized IP address |\r\n| ERROR_UNHANDLED_EXCEPTION\
\ | Unexpected error during execution of the request |\r\n| ERROR_UNKNOWN_ROUTE\
\ | Invalid route was supplied |\r\n| ERROR_UNSAFE_ROUTE | Invalid character was\
\ supplied in the route ('&' outside of query string, '<', '>', etc.) |\r\n| ERROR_UNSUPPORTED_CONTENT_TYPE\
\ | Invalid `Content-Type` header was supplied (must be `application/json`), missing\
\ `Content-Type` header |\r\n| ERROR_UNSUPPORTED_METHOD | Valid route supplied\
\ with an invalid HTTP method |\r\n| ERROR_UNSUPPORTED_PROTOCOL | Request was\
\ not made over HTTPS |\r\n\r\n## Contact\r\n| Error Code | Possible Causes |\r\
\n|-|-|\r\n| ERROR_BANNED_PHONE_NUMBER | `phoneNumber` is banned from sender code\
\ on update, subscription, or sms send calls |\r\n| ERROR_BIRTHDAY_FIELD_NULL\
\ | `birthday` field does not have correct null value provided |\r\n| ERROR_INVALID_EMAIL_ADDRESS\
\ | `emailAddress` is in an invalid format |\r\n| ERROR_INVALID_SEGMENTATION_FIELD_ID\
\ | `segmentationFieldID` is not one that exists on the sender code |\r\n| ERROR_PENDING_PHONE_NUMBER\
\ | `phoneNumber` is in pending double opt-in state on `listID` provided |\r\n\
| ERROR_PHONE_NUMBER_FOUND | `phoneNumber` already exists on create |\r\n| ERROR_PHONE_NUMBER_NOT_FOUND\
\ | `phoneNumber` not created before updating |\r\n| ERROR_PHONE_NUMBER_NOT_SUBSCRIBED\
\ | `phoneNumber` is not subscribed to listID provided |\r\n| ERROR_PHONE_NUMBER_SUSPENDED\
\ | `phoneNumber` has had its service temporarily suspended and cannot be sent\
\ messages |\r\n| ERROR_SEGMENTATION_FIELD_DISABLED | profile field is in a disabled\
\ or purged state |\r\n| ERROR_SEGMENTATION_MAX_LENGTH | profile field value is\
\ too big for the profile field |\r\n| ERROR_SUBSCRIBED_PHONE_NUMBER | phoneNumber\
\ already is subscribed to the `listID` provided |\r\n\r\n## Transactional Message\r\
\n| Error Code | Possible Causes |\r\n|-|-|\r\n| ERROR_TRANSACTIONAL_MESSAGE_CONTENT_COUPON_CODE\
\ | transactional message content cannot have coupon code tags in it |\r\n| ERROR_TRANSACTIONAL_MESSAGE_EMPTY_MESSAGE\
\ | transactional message content is empty even after filling in profile tags\
\ |\r\n| ERROR_TRANSACTIONAL_MESSAGE_NOT_FOUND | `transactionalMessageID` provided\
\ does not exist on the `listID` provided |\r\n\n# Parameters\r\n## Route Parameters\r\
\n\r\nResource identifiers are specified in the route. For example, in the route\
\ `/Resource/{resourceId}`, `resourceId` is a route parameter. In this example,\
\ if you wish to interact with Resource #123, its route would be `/Resource/123`.\r\
\n\r\n## Query Parameters\r\n\r\nSome routes support additional query parameters;\
\ for example, some resources support query parameters relating to paging. Supported\
\ query parameters are described in their respective documentation areas.\r\n\r\
\n## Request Body\r\n\r\nRequest bodies are required for most `POST` and `PUT`\
\ requests. Please use a `Content-Type` of `application/json` and provide a JSON\
\ object in your request body.\n"
x-logo:
url: /SMS/Resources/Images/Logo.png
paths:
/v1/ShortCode/{senderCodeId}/Broadcast/Immediate:
post:
operationId: BroadcastMessage_PostImmediateBroadcast
summary: Immediate Broadcast
description: "Immediately send an SMS broadcast message to all subscribed contacts\
\ on an SMS List. \r\nIf a segmentation field id is included, the message\
\ will only be sent to the contacts that have the custom checkbox field checked.\r\
\nThe provided title will be used for reporting purposes to identify a particular\
\ SMS broadcast message."
tags:
- BroadcastMessage
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'201':
description: Created
content:
application/json:
schema:
$ref: '#/definitions/ResourceCreated'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/definitions/BroadcastMessage'
/v1/ShortCode/{senderCodeId}/PhoneList/{phoneListId}/Contact:
get:
operationId: Contact_GetContactCollection
summary: Get Contact Collection
description: Returns all contacts that exist on a specific SMS list by optout
status.
tags:
- Contact
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: phoneListId
in: path
description: Identifier used to locate the SMS List.
required: true
format: int32
schema:
type: integer
format: int32
- name: optedOut
in: query
description: Determines the status of contacts on the resulting data. The
default value is `false`.
required: false
schema:
type: boolean
- name: cursor
in: query
description: Value indicating the page of data that's being retrieved. The
default value is `Start`.
required: false
schema:
type: string
- name: count
in: query
description: Number of data members to be displayed per page. The default
value is `1000` and the maximum value is `5000`.
required: false
schema:
type: string
- name: startSubscribeDate
in: query
description: Start date that's being used to filter the data members. This
applies to subscribe date.
required: false
schema:
type: string
- name: endSubscribeDate
in: query
description: End date that's being used to filter the data members. This applies
to subscribe date.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/CollectionPaged[SMSContact]'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
post:
operationId: Contact_PostContactListResource
summary: Create Contact
description: "Creates and subscribes a new contact for a phone number if the\
\ contact does not already exist on the sender code.\r\nThis call will create\
\ a record of the contact as well as subscribe the contact to the list that\
\ was passed in the route.\r\nChanges to segmentation fields apply to the\
\ contact across all sender codes."
tags:
- Contact
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: phoneListId
in: path
description: Identifier for the SMS List that the contact will be created
on.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'201':
description: Created
content:
application/json:
schema:
$ref: '#/definitions/ResourceCreated'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/definitions/SMSContact'
/v1/ShortCode/{senderCodeId}/Contact/{phoneNumber}:
get:
operationId: Contact_GetContactResource
summary: Get Contact
description: Returns a contact for a phone number. The response does not include
a list id. This call will only return the system and custom profile fields
for a contact along with the opted out status.
tags:
- Contact
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: phoneNumber
in: path
description: Phone number for contact.
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/Resource[SMSContactSubscriptionDetails]'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}/Contact:
put:
operationId: Contact_PutContactResource
summary: Update Contact
description: "Updates a contact's information for a phone number. \r\nThis call\
\ will update the system fields, custom profile fields, and the opt-out status\
\ of a contact.\r\nIt is only possible to opt out a contact using this call;\
\ not opting them in to the sender code. \r\nIf a contact is opted out, it\
\ is still possible to update the contacts system and custom profile fields.\r\
\nChanges to segmentation fields apply to the contact across all sender codes."
tags:
- Contact
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/ResourceUpdated'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/definitions/SMSContact'
/v1/ShortCode/{senderCodeId}/OptOut:
get:
operationId: Contact_GetOptOuts
summary: Get Sender Code Opt-Outs
description: Returns all contacts that have been opted-out for a specific SMS
Sender Code
tags:
- Contact
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: cursor
in: query
description: Value indicating the page of data that's being retrieved. The
default value is `Start`.
required: false
schema:
type: string
- name: count
in: query
description: Number of data members to be displayed per page. The default
value is `1000` and the maximum value is `5000`.
required: false
schema:
type: string
- name: startDate
in: query
description: Start date that's being used to filter the data members. This
applies to opt-out date.
required: false
schema:
type: string
- name: endDate
in: query
description: End date that's being used to filter the data members. This applies
to opt-out date.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/Collection[OptOutContact]'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}/ContactImport:
post:
operationId: Contact_PostImportFileResource
summary: Start a Contact Update Import
description: Creates and starts a new update import for the specified sender
code. HTTP request body lengths of up to 250 MB are permitted. Because the
`fileStream` field must be encoded in Base64, and because the remainder of
the JSON payload is counted against the 250 MB limit, the effective maximum
import file size is approximately 185 MB (195,000,000 bytes); therefore, only
attempt to import files up to 185 MB (195,000,000 bytes) in size.
tags:
- Contact
parameters:
- name: senderCodeId
in: path
description: Identifier used to locate the sender code.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'201':
description: Created
content:
application/json:
schema:
$ref: '#/definitions/ResourceCreated'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/definitions/ImportContactFile'
/v1/ShortCode/{senderCodeId}/ContactImport/{importFileId}:
get:
operationId: Contact_GetImportFileResource
summary: Get a Contact Import
description: Retrieves the specified Contact import.
tags:
- Contact
parameters:
- name: senderCodeId
in: path
description: Identifier used to locate the sender code.
required: true
format: int32
schema:
type: integer
format: int32
- name: importFileId
in: path
description: Identifier used to locate the import file.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/Resource[ImportContactFileStatus]'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}/Contact/{phoneNumber}/PhoneList:
get:
operationId: ContactListSubscription_GetContactListCollection
summary: Get Contact List Collection
description: Retrieve a collection of SMS Lists that a contact belongs to along
with subscription status.
tags:
- ContactListSubscription
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: phoneNumber
in: path
description: Phone number to idenify contact to retrieve data.
required: true
schema:
type: string
- name: cursor
in: query
description: Value indicating the page of data that's being retrieved. The
default value is `Start`.
required: false
schema:
type: string
- name: count
in: query
description: Number of data members to be displayed per page. The default
value is `1000` and the maximum value is `5000`.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/Collection[ContactListSubscription]'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}/Contact/{phoneNumber}/PhoneList/{phoneListId}:
post:
operationId: ContactListSubscription_PostContactListSubscription
summary: Subscribe Contact
description: Subscribes a contact to an SMS list. This will only subscribe contacts
that already exist on the sender code. If the contact does not already exist
on the sender code, please use the Create Contact call to create and subscribe
the contact.
tags:
- ContactListSubscription
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: phoneNumber
in: path
description: Phone number to identify contact to subscribe.
required: true
schema:
type: string
- name: phoneListId
in: path
description: Identifier to determine which SMS List to subscribe contact.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'201':
description: Created
content:
application/json:
schema:
$ref: '#/definitions/ResourceCreated'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}/ContactUnsubscribe/{phoneNumber}/PhoneList/{phoneListId}:
delete:
operationId: ContactListSubscription_DeleteUnsubscribeContactListSubscription
summary: Unsubscribe Contact
description: Unsubscribes a contact from an SMS List. This will only unsubscribe
contacts that already exist on the Sender Code, and exist on the SMS List.
tags:
- ContactListSubscription
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: phoneNumber
in: path
description: Phone number to identify contact to unsubscribe.
required: true
schema:
type: string
- name: phoneListId
in: path
description: Identifier to determine which SMS List to unsubscribe contact.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/ResourceDeleted'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}/PhoneList:
get:
operationId: PhoneList_GetListCollection
summary: Get collection of SMS Lists
description: Retrieve a collection of SMS Lists for a sender code by list status.
tags:
- PhoneList
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: status
in: query
description: Status of list types to retrieve. The default value is `active`. Options
are `active` or `inactive`
required: false
schema:
type: string
- name: cursor
in: query
description: Value indicating the page of data that's being retrieved. The
default value is `Start`.
required: false
schema:
type: string
- name: count
in: query
description: Number of data members to be displayed per page. The default
value is `1000` and the maximum value is `5000`.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/Collection[PhoneList]'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}/PhoneList/{phoneListId}:
get:
operationId: PhoneList_GetListResource
summary: Get SMS List
description: Retrieve a single SMS List by List Id.
tags:
- PhoneList
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: phoneListId
in: path
description: Identifier used to specify SMS List.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/PhoneList'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}/SegmentationField/{segmentationFieldId}:
get:
operationId: Segmentation_GetPhoneAttribute
summary: Get a Profile Field
description: Returns the specified profile field.
tags:
- Segmentation
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: segmentationFieldId
in: path
description: Identifier used to locate the profile field.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/Resource[PhoneAttribute]'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}/SegmentationField:
get:
operationId: Segmentation_GetPhoneAttributeCollection
summary: Get all Profile Fields
description: Returns the collection of profile fields that exist for the company
associated with the specified Sender Code.
tags:
- Segmentation
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/Collection[PhoneAttribute]'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode:
get:
operationId: SenderCode_GetShortCodeCollection
summary: Get SMS Sender Codes
description: Retrieve a collection of Sender Code objects for a Company.
tags:
- SenderCode
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/Collection[SenderCode]'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}:
get:
operationId: SenderCode_GetShortCodeResource
summary: Get SMS Sender Code
description: Retrieve a single SMS Sender Code by Sender Code Id.
tags:
- SenderCode
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/Resource[SenderCode]'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}/PhoneList/{phoneListId}/TransactionalMessage:
get:
operationId: TransactionalMessage_GetTransactionalMessageCollection
summary: Get Transactional Messages
description: Retrieve a Collection of Transactional SMS Message for an SMS List.
tags:
- TransactionalMessage
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: phoneListId
in: path
description: Identifier used to specify the SMS List.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/Collection[TransactionalMessage]'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{senderCodeId}/PhoneList/{phoneListId}/TransactionalMessage/{transactionalMessageId}:
get:
operationId: TransactionalMessage_GetTransactionalMessageResource
summary: Get Transactional Message
description: Retrieve a single Transactional SMS Message for an SMS List by
Id.
tags:
- TransactionalMessage
parameters:
- name: senderCodeId
in: path
description: Identifier used to specify the Sender Code.
required: true
format: int32
schema:
type: integer
format: int32
- name: phoneListId
in: path
description: Identifier used to specify the SMS List.
required: true
format: int32
schema:
type: integer
format: int32
- name: transactionalMessageId
in: path
description: Identifier used to specify the Tranactional SMS Message.
required: true
format: int32
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/definitions/TransactionalMessage'
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
/v1/ShortCode/{SenderCodeId}/PhoneList/{phoneListId}/TransactionalMessage/{transactionalMessageId}/Message:
post:
operationId: TransactionalMessage_PostTransactionalMessageSend
summary: Send Transactional Message
description: Send a single Transactional SMS Message for an SMS List by Id.
tags:
- TransactionalMessage
parameters:
- name: phoneListId
in: path
description: Identifier used to specify the SMS List that the message belongs
to.
required: true
format: int32
schema:
type: integer
format: int32
- name: transactionalMessageId
in: path
description: Identifier used to specify the Tranactional SMS Message.
required: true
format: int32
schema:
type: integer
format: int32
- name: SenderCodeId
in: path
required: true
schema:
type: string
responses:
'400':
description: BadRequest
content:
application/json:
schema:
$ref: '#/definitions/Error'
'201':
description: Created
content:
application/json:
schema:
$ref: '#/definitions/ResourceCreated'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/definitions/Error'
'404':
description: NotFound
content:
application/json:
schema:
$ref: '#/definitions/Error'
security:
- OAuth 2: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/definitions/TransactionalMessageContact'
components:
schemas:
BroadcastMessage:
description: A Broadcast Message resource.
required:
- phoneListId
- messageContent
- messageTitle
type: object
properties:
phoneListId:
format: int32
description: Identifier for an SMS List.
type: integer
messageContent:
description: Content of the SMS broadcast message.
type: string
messageTitle:
description: The name of the SMS broadcast message, used for reporting purposes.
maxLength: 50
minLength: 1
type: string
segmentationFieldId:
description: The identifier of a custom checkbox field to use for filtering.
The message will only be sent to recipients with this field checked.
type: string
ResourceCreated:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
resourceId:
description: An identifier used to locate a resource.
type: string
Error:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
error:
description: Error code indicating what error has occured.
type: string
message:
description: Message describing the status and the error that occurred.
type: string
CollectionPaged[SMSContact]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
nextPageCursor:
description: URI of the next page of data.
type: string
data:
description: Collection of data that exists on this paged view.
type: array
items:
$ref: '#/definitions/SMSContact'
SMSContact:
type: object
properties:
phoneNumber:
type: string
emailAddress:
type: string
firstName:
type: string
lastName:
type: string
birthday:
format: date-time
type: string
x-nullable: true
postalCode:
type: string
optedOut:
type: boolean
segmentationFieldValues:
type: array
items:
$ref: '#/definitions/SMSPhoneContactAttribute'
SMSPhoneContactAttribute:
type: object
properties:
segmentationFieldId:
format: int32
type: integer
value:
type: string
Resource[SMSContactSubscriptionDetails]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
data:
$ref: '#/definitions/SMSContactSubscriptionDetails'
description: Return data.
SMSContactSubscriptionDetails:
type: object
properties:
subscribeDate:
format: date-time
description: Subscription date of an SMS Contact.
type: string
x-nullable: true
unsubscribeDate:
format: date-time
description: Date of opt-out from an SMS sender code.
type: string
x-nullable: true
phoneNumber:
type: string
emailAddress:
type: string
firstName:
type: string
lastName:
type: string
birthday:
format: date-time
type: string
x-nullable: true
postalCode:
type: string
optedOut:
type: boolean
segmentationFieldValues:
type: array
items:
$ref: '#/definitions/SMSPhoneContactAttribute'
ResourceUpdated:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
resourceId:
description: An identifier used to locate the updated resource.
type: string
CollectionPaged[OptOutContact]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
nextPageCursor:
description: URI of the next page of data.
type: string
data:
description: Collection of data that exists on this paged view.
type: array
items:
$ref: '#/definitions/OptOutContact'
OptOutContact:
type: object
properties:
phoneNumber:
type: string
optOutDate:
format: date-time
type: string
optOutReason:
enum:
- Campaign
- Admin
- DeliveryFailure
- Import
- API
- Deactivated
- PermanentError
- Workflow
type: string
Collection[OptOutContact]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
data:
description: Collection of return data from the given call.
type: array
items:
$ref: '#/definitions/OptOutContact'
ImportContactFile:
description: A Contact Import File resource.
required:
- fileName
- fileStream
- importType
- hasColumnNames
- textQualifier
- fileMappings
type: object
properties:
fileName:
description: Filename of the import file.
type: string
fileStream:
format: byte
description: Base64-encoded byte array representation of the import file.
type: string
importType:
description: The type of import to conduct. Allowed values are `UpdateSubscribers`.
type: string
hasColumnNames:
description: Whether the first line of the import file contains column names.
type: boolean
textQualifier:
description: The text qualifier used for the import file. Allowed values
are `'`, `"` and blank.
type: string
fileMappings:
description: Representation of import file mappings; these map file columns
to import fields.
type: array
items:
$ref: '#/definitions/ImportContactFileMapping'
ImportContactFileMapping:
description: A Contact Import File Mapping resource.
required:
- fileColumnType
- segmentationFieldId
- fileColumn
type: object
properties:
fileColumnType:
description: Type of value in the column of the import file. Allowed values
are `Phone` and `SegmentationField`.
type: string
segmentationFieldId:
format: int32
description: "Identifier of the associated profile field.\r\n- FileColumnType\
\ `Phone` must have a value of `0`.\r\n- FileColumnType `SegmentationField`\
\ must have a valid SegmentationFieldId for this SenderCode."
type: integer
fileColumn:
format: int32
description: Number identifying the column's ordinal position in the file,
starting from `0`.
type: integer
defaultValue:
description: Default value to be used if a value is not provided during
the import.
type: string
Resource[ImportContactFileStatus]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
data:
$ref: '#/definitions/ImportContactFileStatus'
description: Return data.
ImportContactFileStatus:
type: object
properties:
importFileId:
format: int32
type: integer
smsSenderCodeId:
format: int32
type: integer
fileName:
type: string
startDate:
format: date-time
type: string
x-nullable: true
endDate:
format: date-time
type: string
x-nullable: true
status:
type: string
CollectionPaged[ContactListSubscription]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
nextPageCursor:
description: URI of the next page of data.
type: string
data:
description: Collection of data that exists on this paged view.
type: array
items:
$ref: '#/definitions/ContactListSubscription'
ContactListSubscription:
description: A Contact List Subscription Resource.
type: object
properties:
phoneListId:
format: int32
description: Identifier for a Phone List.
type: integer
subscriptionState:
description: The State of a Contact's Subscription.
type: string
subscribeDate:
format: date-time
description: The Date a Contact Subscribed to a List.
type: string
x-nullable: true
unsubscribeDate:
format: date-time
description: The Date a Contact Unsubscribed from a List.
type: string
x-nullable: true
pendingDate:
format: date-time
description: The Date a Contact entered a pending state on a List.
type: string
x-nullable: true
pendingDoubleOptIn:
description: Flag for if a contact is pending a double opt-in subscription.
type: boolean
pendingAgeGate:
description: Flag for if a contact is pending an age gate response
type: boolean
Collection[ContactListSubscription]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
data:
description: Collection of return data from the given call.
type: array
items:
$ref: '#/definitions/ContactListSubscription'
ResourceDeleted:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
CollectionPaged[PhoneList]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
nextPageCursor:
description: URI of the next page of data.
type: string
data:
description: Collection of data that exists on this paged view.
type: array
items:
$ref: '#/definitions/PhoneList'
PhoneList:
description: SMS Phone List Resource.
type: object
properties:
phoneListId:
format: int32
description: Identifier for an SMS Phone List.
type: integer
phoneListName:
description: Name of SMS Phone List.
type: string
createDate:
format: date-time
description: Create Date of SMS Phone List.
type: string
status:
description: Status of SMS Phone List.
type: string
smsListType:
description: Type of SMS Phone List.
type: string
messageLimit:
format: int32
description: DEPRECATED as of May 2021.
type: integer
messageLimitTimeFrame:
description: DEPRECATED as of May 2021.
type: string
requireDoubleOptIn:
description: SMS Phone List Requires Double Opt In.
type: boolean
requireAgeGate:
description: SMS Phone List Requires Age Gate.
type: boolean
Collection[PhoneList]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
data:
description: Collection of return data from the given call.
type: array
items:
$ref: '#/definitions/PhoneList'
Resource[PhoneAttribute]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
data:
$ref: '#/definitions/PhoneAttribute'
description: Return data.
PhoneAttribute:
description: A Profile Field resource.
type: object
properties:
segmentationFieldId:
format: int32
description: Identifier of the profile field.
type: integer
segmentationFieldName:
description: Name of the profile field.
type: string
dataType:
description: Data type of the profile field. Allowed values are `Text`,
`Number`, `Checkbox`, and `Date`.
type: string
maxLength:
format: int32
description: The maximum character count of the data that can be stored
in the profile field.
type: integer
x-nullable: true
statusFlag:
description: Identifier of the status of the profile field.
type: string
CollectionPaged[PhoneAttribute]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
nextPageCursor:
description: URI of the next page of data.
type: string
data:
description: Collection of data that exists on this paged view.
type: array
items:
$ref: '#/definitions/PhoneAttribute'
Collection[PhoneAttribute]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
data:
description: Collection of return data from the given call.
type: array
items:
$ref: '#/definitions/PhoneAttribute'
Collection[SenderCode]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
data:
description: Collection of return data from the given call.
type: array
items:
$ref: '#/definitions/SenderCode'
SenderCode:
description: SMS Sender Code Resource.
type: object
properties:
shortCodeId:
format: int32
description: "Identifier used to locate sender code resource.\r\nKeeping\
\ it named ShortCodeId to not potentially break client integrations.\r\
\nIf this parameter name changes, it will change the response bodies of\
\ the SenderCodeController routes, and will\r\nrequire adjustments by\
\ clients."
type: integer
code:
description: SMS Sender Code.
type: string
country:
description: ISO 3166-1 Alpha-2 code of the country associated with sender
code.
type: string
merchantName:
description: Name of merchant associated with sender code.
type: string
emailListId:
format: int32
description: Identifier of email list associated with sender code.
type: integer
emailListName:
description: Name of email list associated with sender code.
type: string
externalEventId:
format: int32
description: Identifier of external event associated with sender code.
type: integer
externalEventName:
description: Name of external event associated with sender code.
type: string
phoneNumberSegmentationFieldGroupId:
format: int32
description: Email list attribute id to store a contact's phone number.
type: integer
phoneNumberSegmentationFieldGroupName:
description: Email list attribute name to store a contact's phone number.
type: string
phoneNumberSegmentationFieldId:
format: int32
description: Email list attribute group id to store a contact's phone number.
type: integer
phoneNumberSegmentationFieldName:
description: Email list attribute group name to store a contact's phone
number.
type: string
acquisitionSourceSegmentationFieldGroupId:
format: int32
description: Email list attribute group id to store a contact's acquisition
source.
type: integer
acquisitionSourceSegmentationFieldGroupName:
description: Email list attribute group name to store a contact's acquisition
source.
type: string
acquisitionSourceSegmentationFieldId:
format: int32
description: Email list attribute id to store a contact's acquisition source.
type: integer
acquisitionSourceSegmentationFieldName:
description: Email list attribute name to store a contact's acquisition
source.
type: string
Resource[SenderCode]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
data:
$ref: '#/definitions/SenderCode'
description: Return data.
Collection[TransactionalMessage]:
type: object
properties:
status:
format: int32
description: HTTP status code.
type: integer
data:
description: Collection of return data from the given call.
type: array
items:
$ref: '#/definitions/TransactionalMessage'
TransactionalMessage:
description: A Transactional Message resource.
type: object
properties:
transactionalMessageId:
format: int32
description: Identifier used to locate a transactional message.
type: integer
transactionalMessageName:
description: Name given to a transactional message.
type: string
transactionalMessageStatus:
description: Status of a transactional message.
type: string
TransactionalMessageContact:
description: A Transactional Message Contact resource.
type: object
properties:
phoneNumber:
description: Phone Number associated with a contact.
type: string
messageContent:
description: Content of SMS Message.
type: string
securitySchemes:
OAuth2:
type: oauth2
flows:
clientCredentials:
tokenUrl: https://auth.listrak.com/OAuth2/Token
scopes: {}
servers:
- url: https://api.listrak.com/sms