Update Canned Response in Account
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/canned_responses/{id} \
--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: 'PATCH',
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/{id}', 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/{id}"
payload = {
"content": "Hello, {{contact.name}}! Welcome to our service.",
"short_code": "welcome"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Canned Responses
Update Canned Response in Account
Update a Canned Response in Account
PATCH
/
api
/
v1
/
accounts
/
{account_id}
/
canned_responses
/
{id}
Update Canned Response in Account
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/canned_responses/{id} \
--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: 'PATCH',
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/{id}', 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/{id}"
payload = {
"content": "Hello, {{contact.name}}! Welcome to our service.",
"short_code": "welcome"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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>"
}
]
}{
"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 ID of the canned response to be updated.
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