Message Templates

Message Templates AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

APIs for managing message templates and their per-language translations. Templates are scoped to a business and contain a primary language plus optional secondary-language translations.

Host: https://business.arattai.in/api/v1

Required headers:

  • Arattai-CompanyId: Required for all endpoints. If you're a BSP creating a template on behalf of a business you manage, pass your BSP company's ID here.


Template Types and Limits
Type Max per business Button limit Notes
promotion503
transaction503
authentication301Only copy_code button allowed. Media ignored.

Supported Media Types
Server detects media type from file extension. Do not send media.type in request payloads.

ExtensionMIME typeMax size
jpeg, jpgimage/jpeg5 MB
pngimage/png5 MB
gifimage/gif5 MB
avifimage/avif5 MB
webpimage/webp5 MB
mp3audio/mpeg20 MB
aacaudio/aac20 MB
amraudio/amr20 MB
mp4video/mp420 MB
webmvideo/webm20 MB
mkvvideo/x-matroska20 MB
pdfapplication/pdf20 MB
txttext/plain20 MB
icstext/calendar5 MB

Draft Status Lifecycle
  • draft → under_review (via /submit)
  • under_review → draft (via /revoke)
  • under_review → approved | rejected (admin action)
  • approved → disabled (via /disable)
  • disabled → approved (via /enable)

Placeholder Variable Syntax: Use {{variable_name}} in message body and title. Variables referenced in message must be declared in place_holders. Mismatch in either direction returns 400 invalid_input.

Detail-only Timestamp Fields
reviewed_time, last_submitted_time, last_approved_time, and last_rejected_time (all epoch milliseconds) are included only in the single-template detail response (GET /messagetemplates/{id}). They are omitted from list responses and from "get all translations" responses.

Notes
  • In list responses, translations include only language, created_time, draft.status, and published.status - no other translation fields are present. published.status allowed values are approved and disabled; if an approved template is later disabled (e.g. due to user reports or other reasons), its published.status becomes disabled.
  • Updating a template, or syncing a translation of it, is blocked with 409 conflict if any translation of that same template is currently under_review. Revoke the review first.
  • When placeholders or buttons change via update, all other translations of that same template (i.e. all secondary-language translations belonging to it) are marked update_required.
  • Draft and published media are tracked separately. Media upload/delete endpoints only affect the draft version.

Error Response Format
{"code": "error_code", "message": "A human-readable description."}

Download Message Templates OpenAPI Document
End Points
Create a Message Template
List Templates for a Business
Update a Message Template
Get a Message Template
Delete a Message Template
List all Templates
Download Template Media
Submit Translations for Review
Revoke Translations from Review
Enable Template or Translations
Disable Template or Translations
Upload Draft Media (Primary Language)
Delete Draft Media (Primary Language)
Sync Multiple Translations (Bulk)
Get all Translations
Sync a Single Translation
Get a Single Translation
Delete a Translation
Upload Draft Media for a Translation
Delete Draft Media for a Translation
Get Template Summary

Create a Message Template AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Creates a new message template scoped to the given business. Also creates the primary-language translation record in DRAFT status.

⚠
NoteThis endpoint accepts application/json as shown below.
  • It also supports multipart/form-data to attach media in the same request - send all template fields as individual form parameters alongside the binary file field.
  • Media can also be added after creation via the Upload Draft Media endpoint.

Required fields: type, language, message.body.
Validation
  • Variables in message must match declarations in place_holders.
  • Maximum 10 place_holders per create/update.
  • Maximum 3 buttons per template (maximum 1 button total for authentication templates, which must be copy_code).
  • Across all template types, at most 1 copy_code button is allowed per template.

Rate Limits
  • Threshold Limit (Number of API calls allowed within a minute) - 30 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 15 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.CREATE

Arguments

type
string
(Required)
Template category.
Allowed values:
  • promotion - Marketing or promotional messages, such as offers, discounts, and festival greetings.
  • transaction - Transactional updates related to an order or payment, such as confirmations and shipping status.
  • authentication - One-time password (OTP) or verification code messages used for login or account verification.
language
string
(Required)
Primary language code (ISO 639-1, e.g. en, fr). Minimum 2 characters. Maximum 10 characters.
name
string
Template name. Minimum 10, maximum 120 characters.
description
string
Template description. Minimum 30, maximum 1000 characters.
message
object
(Required)
Message content object.
Show Sub-Attributes arrow
title
string
Message title.
body
string
(Required)
Message body text. Use {{variable_name}} for placeholders.
place_holders
array
Must be declared whenever a {{variable_name}} placeholder is referenced in the message body or title. Maximum 10 items.
Show Sub-Attributes arrow
name
string
Variable name (alphanumeric + underscore).
type
string
(Required)
Variable type (e.g. string).
sample_value
string
Sample value for preview.
buttons
array
Button definitions attached to the template. Maximum 3 per template (maximum 1 for authentication templates, which must be copy_code). At most 1 copy_code button is allowed per template, regardless of type.
Show Sub-Attributes arrow
type
string
(Required)
Type of action this button performs.
Allowed values:
  • quick_reply - Sends a fixed, predefined reply text back when tapped.
  • url - Opens the specified destination URL when tapped.
  • copy_code - Displays a copyable code, typically used for OTP/authentication templates.
  • miniapp - Opens a linked mini app when tapped; requires miniapp_id.
label
string
Button label text.
miniapp_id
string
ID of the mini app to link. Applicable, and needed, only when type is miniapp.
media
object
Show Sub-Attributes arrow
enabled
boolean
Whether the template supports media attachment.

Path Parameters

id
string
(Required)
Business ID.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates") .post(body) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN", 'content-type': "application/json" } conn.request("POST", "/api/v1/businesses/BUSINESS_ID/messagetemplates", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/businesses/BUSINESS_ID/messagetemplates", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates"); var request = new RestRequest(Method.POST); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request POST \ --url https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "type": "promotion", "language": "en", "name": "Order delivery status", "message": { "title": "Great Indian festival", "body": "Hi {{item_name}}, your order has been dispatched!", "footer": "Thank you" }, "place_holders": [ { "name": "item_name", "type": "string", "sample_value": "Golden retriever collar" } ], "buttons": [ { "type": "quick_reply", "label": "Track Order" } ], "media": { "enabled": true } }
{ "type": "transaction", "language": "en", "name": "Payment confirmation", "message": { "title": "Payment Received", "body": "Hi {{customer_name}}, we have received your payment of {{amount}} for order {{order_id}}.", "footer": "Thank you for shopping with us" }, "place_holders": [ { "name": "customer_name", "type": "string", "sample_value": "Ravi Kumar" }, { "name": "amount", "type": "string", "sample_value": "₹1,499" }, { "name": "order_id", "type": "string", "sample_value": "ORD10293" } ], "buttons": [ { "type": "url", "label": "View Invoice" } ] }
{ "type": "authentication", "language": "en", "name": "OTP verification", "message": { "body": "Your verification code is {{otp_code}}. Do not share this code with anyone." }, "place_holders": [ { "name": "otp_code", "type": "string", "sample_value": "482913" } ], "buttons": [ { "type": "copy_code", "label": "Copy Code" } ] }

Response Example

{ "url": "/api/v1/businesses/501000000002005/messagetemplates" }
{ "code": "invalid_input", "message": "Either the input stream or parameter is invalid or absent" }
{ "code": "resource_limit_reached", "message": "Maximum template limit for this type has been reached" }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

List Templates for a Business AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Lists templates scoped to a single business. Translations in list responses include only status fields. Use GET by ID or GET translations for full content.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 60 requests per minute
  • Secondary Threshold Limit (Number of API calls allowed within 5 minutes) - 150 requests per 5 minutes
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.READ

Path Parameters

id
string
(Required)
Business ID.

Query Parameters

limit
integer
Maximum number of results. Greater than 0, maximum 100. Default 100.
index
integer
Pagination offset. 0-based. Default 0.
type
string
Filter results to templates of a single category.
Allowed values:
  • promotion - Marketing or promotional templates.
  • transaction - Transactional templates.
  • authentication - Authentication/OTP templates.
types
string
Comma-separated list of template categories to filter by (see the type parameter for allowed values). Maximum 3 values.
statuses
string
Comma-separated list of draft statuses to filter by. Maximum 5 values.
Allowed values:
  • draft - Translation has not yet been submitted for review.
  • under_review - Translation has been submitted and is awaiting admin review.
  • approved - Translation has been reviewed and approved.
  • rejected - Translation was reviewed and rejected.
  • update_required - Translation's content is out of sync with the parent template and must be re-synced.
languages
string
Comma-separated language codes. Maximum 100 values.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates") .get() .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN' } }; fetch('https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN" } conn.request("GET", "/api/v1/businesses/BUSINESS_ID/messagetemplates", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/businesses/BUSINESS_ID/messagetemplates", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates"); var request = new RestRequest(Method.GET); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request GET \ --url https://business.arattai.in/api/v1/businesses/BUSINESS_ID/messagetemplates \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response Example

{ "url": "/api/v1/businesses/501000000002005/messagetemplates" }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Update a Message Template AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Updates template metadata and/or default-language draft content. If placeholders or buttons change, all translations are marked update_required. Updates are blocked if any translation is currently under_review.

Validation

  • Same limits as Create apply.
  • Maximum 10 place_holders.
  • Maximum 3 buttons per template (maximum 1 button total for authentication templates, which must be copy_code).
  • Across all template types, at most 1 copy_code button is allowed per template.

Rate Limits
  • Threshold Limit (Number of API calls allowed within a minute) - 30 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.UPDATE

Arguments

name
string
Updated template name.
description
string
Updated template description. Minimum 30, maximum 1000 characters.
message
object
Show Sub-Attributes arrow
title
string
body
string
place_holders
array
Updated placeholder definitions. Replaces the existing set of place_holders for the primary-language draft.
buttons
array
Updated button definitions. Replaces the existing set of buttons for the primary-language draft.
media
object
Show Sub-Attributes arrow
enabled
boolean
status
string
Template-level status toggle.
Allowed values:
  • enabled - Template is active and can be used to send messages.
  • disabled - Template is inactive and cannot be used to send messages.

Path Parameters

id
string
(Required)
Template ID.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID" type: PATCH headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID") .patch(body) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PATCH', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN", 'content-type': "application/json" } conn.request("PATCH", "/api/v1/messagetemplates/TEMPLATE_ID", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PATCH", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID"); var request = new RestRequest(Method.PATCH); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Patch, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("PATCH", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request PATCH \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "name": "Order delivery status updated", "message": { "body": "Hi {{customer_name}}, your order {{order_id}} has been delivered." }, "place_holders": [ { "name": "customer_name", "type": "string" }, { "name": "order_id", "type": "string" } ] }

Response Example

{...}
{ "code": "invalid_input", "message": "The request cannot be performed. Usually because of malformed parameter or missing parameter." }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_operation", "message": "Template has a translation that is currently under review. Revoke first before updating" }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Get a Message Template AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Returns the full template including all translations with complete draft/published content. Optionally include lifetime delivery stats.

Stats fields (include_fields=stats): sent, delivered, replied, delivery_rate (percentage to 2 decimal places), credits (4 decimal places), credits_per_msg (4 decimal places). Credits are charged on delivery only.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 30 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.READ

Path Parameters

id
string
(Required)
Template ID.

Query Parameters

include_fields
string
Comma-separated list of additional fields to include in the response.
Allowed values:
  • stats - Include lifetime (last 6 months) delivery stats.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID") .get() .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN' } }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN" } conn.request("GET", "/api/v1/messagetemplates/TEMPLATE_ID", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID"); var request = new RestRequest(Method.GET); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request GET \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response Example

{ "url": "/api/v1/messagetemplates/501000000016001" }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Delete a Message Template AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Permanently deletes the template and all its translations.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 30 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.DELETE

Path Parameters

id
string
(Required)
Template ID.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID" type: DELETE headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID") .delete(null) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN' } }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN" } conn.request("DELETE", "/api/v1/messagetemplates/TEMPLATE_ID", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID"); var request = new RestRequest(Method.DELETE); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Delete, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("DELETE", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request DELETE \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response Example

{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

List all Templates AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Lists templates across all businesses accessible in the current scope. Translations in list responses include only status fields.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 60 requests per minute
  • Secondary Threshold Limit (Number of API calls allowed within 5 minutes) - 150 requests per 5 minutes
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.READ

Query Parameters

limit
integer
Maximum number of results. Greater than 0, maximum 100. Default 100.
index
integer
Pagination offset. 0-based. Default 0.
type
string
Filter by single type. Values - promotion | transaction | authentication.
types
string
Comma-separated types. Maximum 3 values.
businesses
string
Comma-separated business IDs. Maximum 100.
statuses
string
Comma-separated list of draft statuses to filter by. Maximum 5 values.
Allowed values:
  • draft - Translation has not yet been submitted for review.
  • under_review - Translation has been submitted and is awaiting admin review.
  • approved - Translation has been reviewed and approved.
  • rejected - Translation was reviewed and rejected.
  • update_required - Translation's content is out of sync with the parent template and must be re-synced.
languages
string
Comma-separated language codes. Maximum 100 values.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates") .get() .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN' } }; fetch('https://business.arattai.in/api/v1/messagetemplates', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN" } conn.request("GET", "/api/v1/messagetemplates", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates"); var request = new RestRequest(Method.GET); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://business.arattai.in/api/v1/messagetemplates"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request GET \ --url https://business.arattai.in/api/v1/messagetemplates \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response Example

{ "url": "/api/v1/messagetemplates" }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Download Template Media AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Downloads the media file attached to a message template. The {attachmentId} is the base64-encoded token from the template object's media URL field.

⚠
NoteArattai-CompanyId is not required. The company ID is embedded in the {attachmentId} token and extracted by the server automatically.

Rate Limits
  • Threshold Limit (Number of API calls allowed within a minute) - 30 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 5 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.READ

Path Parameters

attachmentId
string
(Required)
Base64-encoded token from the template media URL field.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/templatemedia/YWJjMTIzZGVmNDU2" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/templatemedia/YWJjMTIzZGVmNDU2") .get() .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .build(); Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}}; fetch('https://business.arattai.in/api/v1/templatemedia/YWJjMTIzZGVmNDU2', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" } conn.request("GET", "/api/v1/templatemedia/YWJjMTIzZGVmNDU2", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/templatemedia/YWJjMTIzZGVmNDU2", "headers": { "Authorization": "Bearer REPLACE_BEARER_TOKEN" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/templatemedia/YWJjMTIzZGVmNDU2"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://business.arattai.in/api/v1/templatemedia/YWJjMTIzZGVmNDU2"), Headers = { { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/templatemedia/YWJjMTIzZGVmNDU2" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://business.arattai.in/api/v1/templatemedia/YWJjMTIzZGVmNDU2"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request GET \ --url https://business.arattai.in/api/v1/templatemedia/YWJjMTIzZGVmNDU2 \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response Example

{ "code": "not_found", "message": "The requested media resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Submit Translations for Review AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Moves specified translation(s) from draft to under_review. Only translations currently in draft status can be submitted.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 50 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.CREATE

Arguments

languages
array
(Required)
Array of language codes to submit for review. Maximum 50.

Path Parameters

id
string
(Required)
Template ID.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/submit" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/submit") .post(body) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/submit', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN", 'content-type': "application/json" } conn.request("POST", "/api/v1/messagetemplates/TEMPLATE_ID/submit", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/submit", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/submit"); var request = new RestRequest(Method.POST); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/submit"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/submit" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/submit"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request POST \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/submit \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "languages": [ "en", "fr" ] }

Response Example

{...}
{ "code": "invalid_input", "message": "The request cannot be performed. Usually because of malformed parameter or missing parameter." }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_operation", "message": "Only draft templates can be submitted for review" }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Revoke Translations from Review AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Moves specified translation(s) from under_review back to draft. Only translations currently in under_review status can be revoked.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 50 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.CREATE

Arguments

languages
array
(Required)
Array of language codes to revoke from review. Maximum 50.

Path Parameters

id
string
(Required)
Template ID.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/revoke" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/revoke") .post(body) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/revoke', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN", 'content-type': "application/json" } conn.request("POST", "/api/v1/messagetemplates/TEMPLATE_ID/revoke", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/revoke", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/revoke"); var request = new RestRequest(Method.POST); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/revoke"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/revoke" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/revoke"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request POST \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/revoke \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "languages": [ "en", "fr" ] }

Response Example

{...}
{ "code": "invalid_input", "message": "The request cannot be performed. Usually because of malformed parameter or missing parameter." }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_operation", "message": "Only templates under review can be revoked" }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Enable Template or Translations AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Two behaviors depending on whether a languages array is provided:

a) languages array present and non-empty: Enables (re-approves) specific translations currently in disabled status. Only disabled translations can be enabled.

b) languages array absent or empty: Enables the template itself (parent row status). Template must be disabled. blocked and deleted templates cannot be enabled.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 50 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.CREATE

Arguments

languages
array
Array of language codes to enable. Omit or send empty array to enable the template itself.

Path Parameters

id
string
(Required)
Template ID.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/enable" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/enable") .post(body) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/enable', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN", 'content-type': "application/json" } conn.request("POST", "/api/v1/messagetemplates/TEMPLATE_ID/enable", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/enable", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/enable"); var request = new RestRequest(Method.POST); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/enable"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/enable" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/enable"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request POST \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/enable \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "languages": [ "en", "fr" ] }
{ "languages": [] }

Response Example

{...}
{ "message": "The request cannot be performed." }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_operation", "message": "Only disabled templates can be enabled" }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Disable Template or Translations AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Two behaviors depending on whether a languages array is provided:

a) languages array present and non-empty: Disables specific translations currently in approved status. Only approved translations can be disabled.

b) languages array absent or empty: Disables the template itself. Template must be enabled.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 50 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.CREATE

Arguments

languages
array
Array of language codes to disable. Omit or send empty array to disable the template itself.

Path Parameters

id
string
(Required)
Template ID.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/disable" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/disable") .post(body) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/disable', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN", 'content-type': "application/json" } conn.request("POST", "/api/v1/messagetemplates/TEMPLATE_ID/disable", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/disable", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/disable"); var request = new RestRequest(Method.POST); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/disable"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/disable" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/disable"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request POST \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/disable \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "languages": [ "en", "fr" ] }
{ "languages": [] }

Response Example

{...}
{ "message": "The request cannot be performed." }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_operation", "message": "Only approved templates can be disabled" }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Upload Draft Media (Primary Language) AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Uploads a new media file (or replaces existing draft media) for the template's primary language translation. Only draft media is updated; published media is unaffected. Blocked if the primary translation is currently under_review.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 10 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.CREATE

Arguments

file
binary
(Required)
The media file to upload. See supported media types in the top-level description.

Path Parameters

id
string
(Required)
Template ID.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
parameters_data = Map(); parameters_data.put("field1", "value1") parameters_data.put("field2", "value2") headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media" type: POST headers: headers_data parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001"); RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n"); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media") .post(body) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001") .build(); Response response = client.newCall(request).execute();
const form = new FormData(); form.append("field1", "value1"); form.append("field2", "value2"); const options = { method: 'POST', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN', 'content-type': 'multipart/form-data; boundary=---011000010111000001101001' } }; options.body = form; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n" headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN", 'content-type': "multipart/form-data; boundary=---011000010111000001101001" } conn.request("POST", "/api/v1/messagetemplates/TEMPLATE_ID/media", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/media", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN", "content-type": "multipart/form-data; boundary=---011000010111000001101001" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n"); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media"); var request = new RestRequest(Method.POST); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); request.AddHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001"); request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, Content = new MultipartFormDataContent { new StringContent("value1") { Headers = { ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "field1", } } }, new StringContent("value2") { Headers = { ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "field2", } } }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media" payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = new FormData(); data.append("field1", "value1"); data.append("field2", "value2"); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request POST \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ --header 'content-type: multipart/form-data' \ --form field1=value1 \ --form field2=value2

Body Parameters

Click to copy
{ "file": "<binary media file>" }

Response Example

{...}
{ "message": "The request cannot be performed." }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_operation", "message": "Template has a translation that is currently under review. Revoke first before uploading media" }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "file_too_large", "message": "The uploaded file exceeds the maximum allowed size." }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Delete Draft Media (Primary Language) AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Deletes the draft media file from the template's primary language translation. Published media is unaffected. Blocked if the translation is currently under_review. Returns an error if no draft media exists.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 10 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.DELETE

Path Parameters

id
string
(Required)
Template ID.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media" type: DELETE headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media") .delete(null) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN' } }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN" } conn.request("DELETE", "/api/v1/messagetemplates/TEMPLATE_ID/media", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/media", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media"); var request = new RestRequest(Method.DELETE); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Delete, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("DELETE", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request DELETE \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/media \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response Example

{ "message": "The request cannot be performed." }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_operation", "message": "Template has a translation that is currently under review. Revoke first before deleting media" }
{ "code": "not_found", "message": "No draft media found for this template." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Sync Multiple Translations (Bulk) AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Bulk create or update translations. Keys are language codes, values are translation content objects. Creates a record if the language is new; updates existing draft if already exists. Blocked if any provided translation is currently under_review. Maximum 50 language keys. Payload maximum 50000 characters.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 50 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.CREATE

Path Parameters

id
string
(Required)
Template ID.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations") .post(body) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN", 'content-type': "application/json" } conn.request("POST", "/api/v1/messagetemplates/TEMPLATE_ID/translations", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/translations", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations"); var request = new RestRequest(Method.POST); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request POST \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "en": { "message": { "body": "Hi {{name}}, your order has been dispatched!" } }, "fr": { "message": { "body": "Bonjour {{name}}, votre commande a été expédiée!" } } }

Response Example

{...}
{ "message": "The request cannot be performed." }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_operation", "message": "Template has a translation that is currently under review. Revoke first before syncing" }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Get all Translations AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Returns full translation objects (with complete draft/published content) for all languages of this template.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 30 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.READ

Path Parameters

id
string
(Required)
Template ID.

Query Parameters

language
string
Comma-separated language codes to filter. Maximum 50.

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations") .get() .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN' } }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN" } conn.request("GET", "/api/v1/messagetemplates/TEMPLATE_ID/translations", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/translations", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations"); var request = new RestRequest(Method.GET); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request GET \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response Example

{...}
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Sync a Single Translation AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Updates a single translation's draft content (message, placeholders, buttons). Sets the translation back to draft status. Blocked if the translation is currently under_review.

lang_code format: [a-z]{2}(-[A-Z]{2})? (e.g. en, fr, en-US). Maximum 10 place_holders per translation.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 50 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.UPDATE

Arguments

message
object
Show Sub-Attributes arrow
title
string
body
string
place_holders
array
buttons
array

Path Parameters

id
string
(Required)
Template ID.
lang_code
string
(Required)
Language code. Format [a-z]{2}(-[A-Z]{2})? (e.g. en, fr, en-US).

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr" type: PATCH headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr") .patch(body) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PATCH', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN", 'content-type': "application/json" } conn.request("PATCH", "/api/v1/messagetemplates/TEMPLATE_ID/translations/fr", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PATCH", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/translations/fr", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr"); var request = new RestRequest(Method.PATCH); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Patch, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } } }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr" payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = JSON.stringify({ "field1": "value1", "field2": "value2" }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("PATCH", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
curl --request PATCH \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "message": { "body": "Bonjour {{name}}, votre commande est en route!" } }

Response Example

{...}
{ "message": "The request cannot be performed." }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_operation", "message": "Template has a translation that is currently under review. Revoke first before syncing" }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Get a Single Translation AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Returns full draft and published content for a single translation language. Returns 404 if the template or translation for that language does not exist.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 30 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.READ

Path Parameters

id
string
(Required)
Template ID.
lang_code
string
(Required)
Language code. Format [a-z]{2}(-[A-Z]{2})? (e.g. en, fr, en-US).

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/en" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/en") .get() .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN' } }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/en', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN" } conn.request("GET", "/api/v1/messagetemplates/TEMPLATE_ID/translations/en", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/translations/en", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/en"); var request = new RestRequest(Method.GET); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/en"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/en" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/en"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request GET \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/en \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response Example

{...}
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Delete a Translation AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Deletes the translation for the specified language. Use with care; primary language translations can also be deleted via this endpoint.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 30 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.DELETE

Path Parameters

id
string
(Required)
Template ID.
lang_code
string
(Required)
Language code. Format [a-z]{2}(-[A-Z]{2})? (e.g. en, fr, en-US).

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr" type: DELETE headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr") .delete(null) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN' } }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN" } conn.request("DELETE", "/api/v1/messagetemplates/TEMPLATE_ID/translations/fr", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/translations/fr", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr"); var request = new RestRequest(Method.DELETE); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Delete, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("DELETE", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request DELETE \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response Example

{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Upload Draft Media for a Translation AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Uploads a new media file (or replaces existing draft media) for a specific translation language. Only draft media is updated; published media is unaffected. Blocked if the translation is currently under_review.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 10 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.CREATE

Arguments

file
binary
(Required)
The media file to upload. See supported media types in the top-level description.

Path Parameters

id
string
(Required)
Template ID.
lang_code
string
(Required)
Language code. Format [a-z]{2}(-[A-Z]{2})? (e.g. en, fr, en-US).

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
parameters_data = Map(); parameters_data.put("field1", "value1") parameters_data.put("field2", "value2") headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media" type: POST headers: headers_data parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001"); RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n"); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media") .post(body) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001") .build(); Response response = client.newCall(request).execute();
const form = new FormData(); form.append("field1", "value1"); form.append("field2", "value2"); const options = { method: 'POST', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN', 'content-type': 'multipart/form-data; boundary=---011000010111000001101001' } }; options.body = form; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n" headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN", 'content-type': "multipart/form-data; boundary=---011000010111000001101001" } conn.request("POST", "/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN", "content-type": "multipart/form-data; boundary=---011000010111000001101001" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n"); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media"); var request = new RestRequest(Method.POST); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); request.AddHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001"); request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Post, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, Content = new MultipartFormDataContent { new StringContent("value1") { Headers = { ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "field1", } } }, new StringContent("value2") { Headers = { ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "field2", } } }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media" payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = new FormData(); data.append("field1", "value1"); data.append("field2", "value2"); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request POST \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ --header 'content-type: multipart/form-data' \ --form field1=value1 \ --form field2=value2

Body Parameters

Click to copy
{ "file": "<binary media file>" }

Response Example

{...}
{ "message": "The request cannot be performed." }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_operation", "message": "Template has a translation that is currently under review. Revoke first before uploading media" }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "file_too_large", "message": "The uploaded file exceeds the maximum allowed size." }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Delete Draft Media for a Translation AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Deletes the draft media file for a specific translation language. Published media is unaffected. Blocked if the translation is currently under_review. Returns an error if no draft media exists for this translation.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 10 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.DELETE

Path Parameters

id
string
(Required)
Template ID.
lang_code
string
(Required)
Language code. Format [a-z]{2}(-[A-Z]{2})? (e.g. en, fr, en-US).

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media" type: DELETE headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media") .delete(null) .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN' } }; fetch('https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN" } conn.request("DELETE", "/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media"); var request = new RestRequest(Method.DELETE); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Delete, RequestUri = new Uri("https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("DELETE", "https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request DELETE \ --url https://business.arattai.in/api/v1/messagetemplates/TEMPLATE_ID/translations/fr/media \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response Example

{ "message": "The request cannot be performed." }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_operation", "message": "Template has a translation that is currently under review. Revoke first before deleting media" }
{ "code": "not_found", "message": "No draft media found for this translation." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }

Get Template Summary AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Returns the total number of templates and a breakdown by category scoped to the current company.

Rate Limits

  • Threshold Limit (Number of API calls allowed within a minute) - 30 requests per minute
  • Lock Period (Wait time before consecutive API requests) - 10 minutes

OAuth Scope : ArattaiBusiness.messagetemplates.READ

Headers

Arattai-CompanyId
string
(Required)
The unique identifier of the company for this request.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Arattai-CompanyId", "SOME_STRING_VALUE"); headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN"); response = invokeUrl [ url: "https://business.arattai.in/api/v1/templatesummary" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://business.arattai.in/api/v1/templatesummary") .get() .addHeader("Arattai-CompanyId", "SOME_STRING_VALUE") .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'Arattai-CompanyId': 'SOME_STRING_VALUE', Authorization: 'Bearer REPLACE_BEARER_TOKEN' } }; fetch('https://business.arattai.in/api/v1/templatesummary', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("business.arattai.in") headers = { 'Arattai-CompanyId': "SOME_STRING_VALUE", 'Authorization': "Bearer REPLACE_BEARER_TOKEN" } conn.request("GET", "/api/v1/templatesummary", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "business.arattai.in", "port": null, "path": "/api/v1/templatesummary", "headers": { "Arattai-CompanyId": "SOME_STRING_VALUE", "Authorization": "Bearer REPLACE_BEARER_TOKEN" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
var client = new RestClient("https://business.arattai.in/api/v1/templatesummary"); var request = new RestRequest(Method.GET); request.AddHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); IRestResponse response = client.Execute(request);
var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://business.arattai.in/api/v1/templatesummary"), Headers = { { "Arattai-CompanyId", "SOME_STRING_VALUE" }, { "Authorization", "Bearer REPLACE_BEARER_TOKEN" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://business.arattai.in/api/v1/templatesummary" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Arattai-CompanyId", "SOME_STRING_VALUE") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://business.arattai.in/api/v1/templatesummary"); xhr.setRequestHeader("Arattai-CompanyId", "SOME_STRING_VALUE"); xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN"); xhr.send(data);
curl --request GET \ --url https://business.arattai.in/api/v1/templatesummary \ --header 'Arattai-CompanyId: SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response Example

{ "total": 80, "by_category": { "promotion": 30, "transaction": 40, "authentication": 10 } }
{ "code": "invalid_oauthtoken", "message": "You are not authenticated to do this operation." }
{ "code": "invalid_method", "message": "Invalid method" }
{ "code": "too_many_requests", "message": "You have reached the maximum number of requests" }