openapi: 3.0.1
info:
title: Listrak Two-Way SMS API
description: "# Introduction\n\nWelcome to the Listrak Two-Way SMS REST\
\ API!\n\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.\n\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.\n\n# Versioning\n\nThe API version\
\ will be incremented if breaking changes are introduced. Breaking changes may\
\ include:\n\n- Addition of required headers, parameters, or model fields to a\
\ current route\n- Alterations that would result in currently valid requests failing,\
\ or performing unexpectedly\n\nChanges that are not considered breaking may include:\n\
\n- Addition of new model fields\n- Addition of new routes\n- Addition of new\
\ response headers\n- Any alteration to a route that is marked as In Development\n\n# Feedback\n\nWe are actively seeking feedback\
\ in the following areas:\n- Code samples\n- Response examples\n- Resource and\
\ field descriptions\n\nPlease provide your feedback to us at restapifeedback@listrak.com.\n\
\n# Integration Setup\nTo enable API access, **you must create an _Integration_**\
\ on the _Integrations_ page. In the Listrak application on the navigation bar\
\ go to: Manage → Integrations.\n\nPlease specify integration type `Two-Way\
\ SMS` for your integration.\n\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.\n\
\n# Webhooks\n\nWhen creating a custom Two-Way SMS integration you will be required\
\ to add a webhook endpoint. This endpoint must be a publicly accessible http\
\ endpoint which Listrak will send a request to when an invalid MO is received\
\ from a contact or an MO is received for an open support ticket.\nAn example\
\ of the JSON request body is below:\n\n```\n{\n \"SenderCode\": 12345,\n \"\
CountryCode\": \"US\",\n \"PhoneId\": 15558675309,\n \"Text\": \"This is an\
\ invalid MO\"\n}\n```\n\n# Status Codes\n\n| Status Code | Status | Description\
\ |\n| --- | --- | --- |\n| 201 | Created | A new resource has been created. |\n\
| 204 | No Content | The request was processed successfully but there is no content\
\ to send in the response. |\n| 400 | Bad Request | Your request is malformed\
\ or invalid. |\n| 403 | Forbidden | The request is not authorized. |\n| 404 |\
\ Not Found | The resource does not exist. |\n| 405 | Method Not Allowed | The\
\ route does not support the requested method. |\n| 409 | Conflict | The request\
\ cannot be processed because doing so would result in conflicting resources.\
\ |\n| 429 | Too Many Requests | The request rate limit has been exceeded. |\n\
| 415 | Unsupported Media Type | Please use a `Content-Type` of `application/json`.\
\ |\n| 500 | Internal Server Error | An unexpected error occurred. Our development\
\ team has been notified. |\n\n# Parameters\n\n## Route Parameters\n\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`.\n\n## Request Body\n\
\nPlease use a `Content-Type` of `application/json` and provide a JSON object\
\ in your request body.\n\n# Authentication\n\nAuthentication is accomplished\
\ using OAuth 2.0. After successful authentication, your token should be included\
\ with every request using the Bearer scheme; specifically, you should set your\
\ Authorization header value to Bearer (Your token value) in each request.\n\n\
You may request a token by making a POST request to our token endpoint at https://auth.listrak.com/OAuth2/Token.\n\
\nThe request should have a Content-Type of x-www-form-urlencoded, and the request\
\ body should include a grant_type of client_credentials, your client_id, and\
\ your client_secret. Here is an example of a valid request:\n\n**POST /OAuth2/Token**\n\
\n**Body**\n\nContent-Type: application/x-www-form-urlencoded\n\n| Key | Value\
\ |\n| --- | --- |\n| grant_type: | client_credentials |\n| client_id: | (Your\
\ client ID) |\n| client_secret: | (Your client secret) |\n\nFor your security\
\ and convenience, you may pause and unpause your API access on our Integrations\
\ page. All requests will be rejected while your API access is paused, including\
\ requests to issue tokens.\n"
version: v1
x-logo:
url: https://api.listrak.com/Email/Resources/Images/Logo.png
altText: Listrak
href: https://www.listrak.com
backgroundColor: '#fafafa'
servers:
- url: https://api.listrak.com/twowaysms
paths:
/tickets:
post:
operationId: openTicket
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TicketOpenRequest'
required: true
responses:
'201':
description: 201 response
'400':
description: 400 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'500':
description: 500 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'403':
description: 403 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'404':
description: 404 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'429':
description: 429 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'409':
description: 409 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
delete:
operationId: closeTicket
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TicketCloseRequest'
required: true
responses:
'404':
description: 404 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'429':
description: 429 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'400':
description: 400 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'500':
description: 500 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'204':
description: 204 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'403':
description: 403 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
/messagestream/{phoneId}:
get:
operationId: getMessageStream
parameters:
- name: batchSize
in: query
schema:
type: string
- name: earliestDateTime
in: query
schema:
type: string
- name: phoneId
in: path
required: true
schema:
type: string
responses:
'404':
description: 404 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'200':
description: 200 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'429':
description: 429 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'400':
description: 400 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'500':
description: 500 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'403':
description: 403 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
/send:
post:
operationId: send
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SendRequest'
required: true
responses:
'429':
description: 429 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'202':
description: 202 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'400':
description: 400 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'500':
description: 500 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
'403':
description: 403 response
headers:
X-Frame-Options:
schema:
type: string
Strict-Transport-Security:
schema:
type: string
X-Content-Type-Options:
schema:
type: string
Content-Security-Policy:
schema:
type: string
components:
schemas:
TicketOpenRequest:
type: object
properties:
integrationType:
$ref: '#/components/schemas/integrationType'
phoneId:
type: integer
description: Numeric ID. Phone Id
format: int64
externalTicketId:
type: string
description: A unique ticket identifier.
description: A request for opening a ticket
SendRequest:
type: object
properties:
integrationType:
$ref: '#/components/schemas/integrationType'
phoneId:
type: integer
description: Numeric ID. Phone Id
format: int64
externalTicketId:
type: string
description: A unique ticket identifier.
messageBody:
type: string
description: Body of a message, limited to 1,000 characters.
description: A request for sending a message to a contact
integrationType:
enum:
- gorgias
- custom
type: string
description: Integration Type
TicketCloseRequest:
type: object
properties:
integrationType:
$ref: '#/components/schemas/integrationType'
phoneId:
type: integer
description: Numeric ID. Phone Id
format: int64
description: A request for closing a ticket
securitySchemes:
Authorizer:
type: apiKey
name: Authorization
in: header
x-amazon-apigateway-authtype: custom