Add a New Canned Response
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/canned_responses \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"content": "Hello, {{contact.name}}! Welcome to our service.",
"short_code": "welcome"
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: 'Hello, {{contact.name}}! Welcome to our service.',
short_code: 'welcome'
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/canned_responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/canned_responses"
payload = {
"content": "Hello, {{contact.name}}! Welcome to our service.",
"short_code": "welcome"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"account_id": 123,
"short_code": "<string>",
"content": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Canned Responses
Add a New Canned Response
Add a new Canned Response to Account
POST
/
api
/
v1
/
accounts
/
{account_id}
/
canned_responses
Add a New Canned Response
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/canned_responses \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"content": "Hello, {{contact.name}}! Welcome to our service.",
"short_code": "welcome"
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: 'Hello, {{contact.name}}! Welcome to our service.',
short_code: 'welcome'
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/canned_responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/canned_responses"
payload = {
"content": "Hello, {{contact.name}}! Welcome to our service.",
"short_code": "welcome"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"account_id": 123,
"short_code": "<string>",
"content": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
Token de usuario. Envía el valor en el header api_access_token. Lo obtienes en el perfil (GET /api/v1/profile) o al regenerarlo.
Path Parameters
The numeric ID of the account
Body
application/json
Response
Success
ID of the canned response
Account Id
Short Code for quick access of the canned response
Message content for canned response
The date and time when the canned response was created
The date and time when the canned response was updated