Create a reply template
Creates a saved reply template. No conversation is needed, so templates can be set up before the first message ever arrives - the platform composer cannot do this today, it only opens its template dialog from inside an open thread.
Templates created here appear in the platform inbox picker straight away, shortcut included.
curl -X POST "https://api.sendkit.ai/v1/reply-templates" \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY" \
-d '{
"name": "Pricing question",
"content": "<p>Happy to share pricing - what team size are you looking at?</p>",
"shortcut": "P"
}'
import requests
import json
url = "https://api.sendkit.ai/v1/reply-templates"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
data = {
"name": "Pricing question",
"content": "<p>Happy to share pricing - what team size are you looking at?</p>",
"shortcut": "P"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.sendkit.ai/v1/reply-templates", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"name": "Pricing question",
"content": "<p>Happy to share pricing - what team size are you looking at?</p>",
"shortcut": "P"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "Pricing question",
"content": "<p>Happy to share pricing - what team size are you looking at?</p>",
"shortcut": "P"
}`)
req, err := http.NewRequest("POST", "https://api.sendkit.ai/v1/reply-templates", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.sendkit.ai/v1/reply-templates')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-Api-Key'] = 'YOUR_API_KEY'
request.body = '{
"name": "Pricing question",
"content": "<p>Happy to share pricing - what team size are you looking at?</p>",
"shortcut": "P"
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"_id": "example_string",
"id": "example_string",
"workspaceId": "example_string",
"name": "John Doe",
"content": "example_string",
"shortcut": "P",
"isActive": true,
"usageCount": 25,
"lastUsedAt": "2024-12-25T10:00:00Z",
"createdBy": "example_string",
"createdAt": "2024-12-25T10:00:00Z",
"updatedAt": "2024-12-25T10:00:00Z"
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Conflict",
"message": "The request conflicts with the current state of the resource",
"code": 409,
"details": "Resource already exists"
}
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please try again later",
"code": 429,
"retryAfter": 3600
}
/v1/reply-templates
Target server for requests. Edit to use your own host.
Platform API key (sk_user_...) or Workspace API key (sk_...)
The media type of the request body
HTML allowed. Markup that renders empty (for example "<p><br></p>") is rejected.
Optional single letter, uppercased on save. Must not be used by another active template.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)
Body
Pricing questionHTML allowed. Markup that renders empty (for example "<p><br></p>") is rejected.
<p>Happy to share pricing - what team size are you looking at?</p>Optional single letter, uppercased on save. Must not be used by another active template.
P