openapi: 3.2.0
info:
title: SimpleTexting API Documentation Tenant phones 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).
Please be sure to keep your bearer token secure. Don’t share it any public areas such as GitHub, client-side code, etc.
'
termsOfService: https://simpletexting.com/terms/
version: 2.0.0
servers:
- url: https://api-app2.simpletexting.com/v2
security:
- api_key: []
tags:
- name: Tenant phones
paths:
/api/phones:
get:
tags:
- Tenant phones
summary: Get all phones
description: Retrieve all phone numbers for account.
operationId: getTenantPhones
parameters:
- name: page
in: query
description: 'The number of phone numbers returned with each request
**Example:** `250`'
required: false
schema:
minimum: 0
type: integer
format: int32
default: 0
example: 250
- name: size
in: query
description: 'The size of the page
**Example:** `150`'
required: false
schema:
maximum: 500
type: integer
format: int32
default: 50
example: 150
responses:
'200':
description: Success. Returns a paginated list of contacts.
content:
application/json:
schema:
$ref: '#/components/schemas/PageViewTenantPhone'
components:
schemas:
PageViewTenantPhone:
type: object
properties:
content:
type: array
description: Page content and number of elements is restricted by page size.
items:
$ref: '#/components/schemas/TenantPhone'
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
TenantPhone:
type: object
properties:
number:
title: Phone number
type: string
example: '1234567890'
name:
title: Phone name
type: string
example: Primary phone
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 ` 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