Get The List of Text Message Templates

From docs
Jump to: navigation, search

Mobile_API »Get Text Message Templates List

Base URL

https://apimobile.callproof.com

Endpoint

/api/text-message-templates/list

Purpose

Retrieves a paginated list of SMS/text message templates belonging to the authenticated user. Results can optionally be filtered by message content and are ordered by template ID ascending.

HTTP Method

GET

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

Parameter Type Required Description
search string No Filters templates by message content (partial match)
page integer No Page number for pagination (default: 1). Page size is 10

Request Body

None.

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/text-message-templates/list?search=&page=1' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/text-message-templates/list?search=&page=1' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

Successful Response (200)

Returns a paginated list of text message templates.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
data array List of templates (see below)
firstItemOnPage integer Index of the first item on the current page
lastItemOnPage integer Index of the last item on the current page
hasNextPage boolean Whether a next page is available
hasPreviousPage boolean Whether a previous page is available
isFirstPage boolean Whether the current page is the first page
isLastPage boolean Whether the current page is the last page
next_page_url string/null URL of the next page, when available
prev_page_url string/null URL of the previous page, when available
first_page_url string URL of the first page
last_page_url string URL of the last page
pageCount integer Total number of pages
pageNumber integer Current page number
pageSize integer Number of items per page (10)
totalItemCount integer Total number of matching templates
uri string Requested resource URI

data[]

Field Type Description
id integer Unique identifier of the template
title string Template title (defaults to "Title" when empty)
message string Template message body

Error Responses

Status Code Meaning
400 Bad Request – templates could not be retrieved
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – An error occurred while retrieving templates (for example, "Error while retrieving the text message template details").
  • 401 – Authentication failed or the access token is missing/expired.