AI
Apply AI migration from legacy setup
POST
/
v1
/
ai
/
agents
/
{agentID}
/
migrations
/
apply
Apply AI migration from legacy setup
curl --request POST \
--url https://api.wazapin.com/v1/ai/agents/{agentID}/migrations/apply \
--header 'Content-Type: application/json' \
--data '
{
"import_automation_rules": true,
"import_saved_replies": true,
"import_templates": true
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
import_automation_rules: true,
import_saved_replies: true,
import_templates: true
})
};
fetch('https://api.wazapin.com/v1/ai/agents/{agentID}/migrations/apply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/ai/agents/{agentID}/migrations/apply"
payload = {
"import_automation_rules": True,
"import_saved_replies": True,
"import_templates": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"imported_sources": [
"<string>"
],
"knowledge_sources_created": 123,
"playbooks_created": 123,
"summary": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}Path Parameters
Body
application/json
⌘I
Apply AI migration from legacy setup
curl --request POST \
--url https://api.wazapin.com/v1/ai/agents/{agentID}/migrations/apply \
--header 'Content-Type: application/json' \
--data '
{
"import_automation_rules": true,
"import_saved_replies": true,
"import_templates": true
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
import_automation_rules: true,
import_saved_replies: true,
import_templates: true
})
};
fetch('https://api.wazapin.com/v1/ai/agents/{agentID}/migrations/apply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/ai/agents/{agentID}/migrations/apply"
payload = {
"import_automation_rules": True,
"import_saved_replies": True,
"import_templates": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"imported_sources": [
"<string>"
],
"knowledge_sources_created": 123,
"playbooks_created": 123,
"summary": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}