AI
Create executable Playbook with mutable Draft
POST
/
v1
/
ai
/
agents
/
{agentID}
/
playbooks
/
executable
Create executable Playbook with mutable Draft
curl --request POST \
--url https://api.wazapin.com/v1/ai/agents/{agentID}/playbooks/executable \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"authoring_source": "<unknown>",
"description": "<string>",
"template_key": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
authoring_source: '<unknown>',
description: '<string>',
template_key: '<string>'
})
};
fetch('https://api.wazapin.com/v1/ai/agents/{agentID}/playbooks/executable', 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}/playbooks/executable"
payload = {
"name": "<string>",
"authoring_source": "<unknown>",
"description": "<string>",
"template_key": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"draft": {
"agent_id": "<string>",
"authoring_source": {
"document": {
"type": "<string>",
"json": "<unknown>",
"text": "<string>"
},
"execution_mode": "<string>",
"outcome": {
"goal": "<string>",
"terminal_outcomes": [
"<string>"
]
},
"schema_version": 123,
"settings": {
"max_playbook_call_depth": 123,
"max_retries_per_step": 123,
"max_steps": 123
},
"trigger": {
"conditions": [
{}
],
"examples": [
"<string>"
]
},
"guardrails": [
"<unknown>"
],
"legacy": {},
"success_checks": [
"<unknown>"
]
},
"created_at": "<string>",
"organization_id": "<string>",
"plain_instructions": "<string>",
"playbook_id": "<string>",
"revision": 123,
"schema_version": 123,
"source_hash": "<string>",
"updated_at": "<string>",
"description": "<string>",
"last_validation": "<unknown>",
"name": "<string>",
"status": "<string>"
},
"playbook": {
"AgentID": "<string>",
"CreatedAt": "<string>",
"CurrentVersionID": "<string>",
"Description": "<string>",
"ID": "<string>",
"LatestPublishedVersionID": "<string>",
"Name": "<string>",
"Status": "<string>",
"UpdatedAt": "<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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}⌘I
Create executable Playbook with mutable Draft
curl --request POST \
--url https://api.wazapin.com/v1/ai/agents/{agentID}/playbooks/executable \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"authoring_source": "<unknown>",
"description": "<string>",
"template_key": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
authoring_source: '<unknown>',
description: '<string>',
template_key: '<string>'
})
};
fetch('https://api.wazapin.com/v1/ai/agents/{agentID}/playbooks/executable', 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}/playbooks/executable"
payload = {
"name": "<string>",
"authoring_source": "<unknown>",
"description": "<string>",
"template_key": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"draft": {
"agent_id": "<string>",
"authoring_source": {
"document": {
"type": "<string>",
"json": "<unknown>",
"text": "<string>"
},
"execution_mode": "<string>",
"outcome": {
"goal": "<string>",
"terminal_outcomes": [
"<string>"
]
},
"schema_version": 123,
"settings": {
"max_playbook_call_depth": 123,
"max_retries_per_step": 123,
"max_steps": 123
},
"trigger": {
"conditions": [
{}
],
"examples": [
"<string>"
]
},
"guardrails": [
"<unknown>"
],
"legacy": {},
"success_checks": [
"<unknown>"
]
},
"created_at": "<string>",
"organization_id": "<string>",
"plain_instructions": "<string>",
"playbook_id": "<string>",
"revision": 123,
"schema_version": 123,
"source_hash": "<string>",
"updated_at": "<string>",
"description": "<string>",
"last_validation": "<unknown>",
"name": "<string>",
"status": "<string>"
},
"playbook": {
"AgentID": "<string>",
"CreatedAt": "<string>",
"CurrentVersionID": "<string>",
"Description": "<string>",
"ID": "<string>",
"LatestPublishedVersionID": "<string>",
"Name": "<string>",
"Status": "<string>",
"UpdatedAt": "<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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}