Difference between revisions of "Edit The Text Message Templates"

From docs
Jump to: navigation, search
(Created page with "== Update Text Message Template == === Base URL === https://apimobile.callproof.com === Endpoint === /api/text-message-templates/{id} === Purpose === Updates an existing te...")
 
(Successful Response (200))
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Update Text Message Template ==
+
== [[Mobile_API]] »Update Text Message Template ==
  
 
=== Base URL ===
 
=== Base URL ===
Line 43: Line 43:
 
| message || string || Yes || Updated template message body (commas in the message are stored as spaces)
 
| message || string || Yes || Updated template message body (commas in the message are stored as spaces)
 
|}
 
|}
 +
 +
=== cURL Example for Android ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/text-message-templates/YOUR_TEMPLATE_ID' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "title": "YOUR_UPDATED_TITLE", "message": "YOUR_UPDATED_MESSAGE" }' </pre>
 +
 +
=== cURL Example for iOS ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/text-message-templates/YOUR_TEMPLATE_ID' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "title": "YOUR_UPDATED_TITLE", "message": "YOUR_UPDATED_MESSAGE" }' </pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Latest revision as of 06:48, 21 July 2026

Mobile_API »Update Text Message Template

Base URL

https://apimobile.callproof.com

Endpoint

/api/text-message-templates/{id}

Purpose

Updates an existing text message template for the authenticated user, including its title and message body.

HTTP Method

POST

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

Parameter Type Required Description
id integer Yes Unique identifier of the text message template to update

Query Parameters

None.

Request Body

Parameter Type Required Description
title string Yes Updated template title
message string Yes Updated template message body (commas in the message are stored as spaces)

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/text-message-templates/YOUR_TEMPLATE_ID' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "title": "YOUR_UPDATED_TITLE", "message": "YOUR_UPDATED_MESSAGE" }' 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/text-message-templates/YOUR_TEMPLATE_ID' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "title": "YOUR_UPDATED_TITLE", "message": "YOUR_UPDATED_MESSAGE" }' 

Successful Response (200)

Indicates that the text message template was updated successfully.

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
message string Confirmation message (for example, "The text message templates updated successfully.")
uri string Requested resource URI

Error Responses

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