Create AI playbook
POST
/v1/ai/agents/{agentID}/playbooksAuthorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredPath parameters
agentIDstringrequiredRequest body
requiredapplication/jsondescriptionstringinput_schemaobjectinstructionsstringnamestringrequiredResponses
200OK
agent_idstringrequiredcreated_atstringrequiredcurrent_versioninteger<int32>requiredcurrent_version_idstringdescriptionstringidstringrequiredlatest_draftPlaybookVersionShow propertiesHide properties
agent_idstringrequiredcreated_atstringrequiredidstringrequiredinput_schemaobjectrequiredinstructionsstringrequiredplaybook_idstringrequiredpublished_atstringversioninteger<int32>requirednamestringrequiredstatusstringrequiredsuccessRatenumber<double>requiredsummarystringrequiredtriggerstringrequiredupdatedAtstringrequiredupdated_atstringrequired400Bad Request
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring401Unauthorized
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring403Forbidden
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring404Not Found
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring409Conflict
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring422Unprocessable Entity
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring500Internal Server Error
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X POST "/v1/ai/agents/string/playbooks" \
-H "Content-Type: application/json" \
-d '{
"description": "string",
"input_schema": {},
"instructions": "string",
"name": "string"
}'const response = await fetch("/v1/ai/agents/string/playbooks", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"description": "string",
"input_schema": {},
"instructions": "string",
"name": "string"
})
});import requests
response = requests.post(
"/v1/ai/agents/string/playbooks",
headers={
"Content-Type": "application/json"
},
json={
"description": "string",
"input_schema": {},
"instructions": "string",
"name": "string"
},
)Response
{
"agent_id": "string",
"created_at": "string",
"current_version": 0,
"current_version_id": "string",
"description": "string",
"id": "string",
"latest_draft": {
"agent_id": "string",
"created_at": "string",
"id": "string",
"input_schema": {},
"instructions": "string",
"playbook_id": "string",
"published_at": "string",
"version": 0
},
"name": "string",
"status": "string",
"successRate": 0,
"summary": "string",
"trigger": "string",
"updatedAt": "string",
"updated_at": "string"
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}