Get a playbook
Returns a single playbook by its playbook ID.
Authorization
ApiKeyAuth API key generated from your Vayaflow dashboard Settings page
In: header
Path Parameters
The playbook ID (e.g., "MTM1")
Response Body
application/json
application/json
application/json
package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://api.vayaflow.com/api/v1/playbooks/string" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}{
"success": true,
"data": {
"playbookId": "string",
"name": "string",
"active": true,
"managerId": "string",
"brief": "string",
"questionnaireId": "string",
"documents": [
{
"documentId": "string",
"kind": "esign",
"documentTemplateId": "string",
"staticAssetId": "string",
"type": "string",
"name": "string",
"conditions": {
"logicalOperator": "AND",
"subRules": [
{
"logicalOperator": "AND",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": [
null
],
"lookup": {
"dataSourceId": "string",
"column": "string"
},
"prompt": "string",
"maxSeverity": "disqualify"
}
]
}
],
"isActive": true,
"name": "string"
},
"fieldMappingOverrides": [
{
"id": "string",
"providerFieldName": "string",
"providerFieldId": "string",
"providerFieldLabel": "string",
"providerFieldRequired": true,
"providerFieldType": "string",
"autoFill": true,
"fallbackTemplate": "string",
"sourceType": "field_library",
"sourceValue": "string",
"sourceLabel": "string"
}
],
"description": "string",
"maxFiles": 1,
"acceptedTypes": [
"pdf"
],
"isActive": true,
"required": true,
"includeByDefault": true,
"expiresInDays": 0,
"order": 0,
"portal": {
"after": [
"string"
]
}
}
],
"fieldRequirements": [
{
"key": "string",
"requirement": "always",
"requiredWhen": [
{
"logicalOperator": "AND",
"subRules": [
{
"logicalOperator": "AND",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": [
null
],
"lookup": {
"dataSourceId": "string",
"column": "string"
},
"prompt": "string",
"maxSeverity": "disqualify"
}
]
}
],
"isActive": true,
"name": "string"
}
]
}
],
"brandId": "string",
"knowledgeBaseIds": [
"string"
],
"agents": {
"rep": {
"agentId": "string"
},
"repTest": {
"agentId": "string"
},
"overlay": {
"persona": {
"mode": "inline",
"value": "string"
},
"mission": {
"mode": "inline",
"value": "string"
},
"tone": {
"mode": "inline",
"value": "string"
},
"additionalRules": [
{
"id": "string",
"type": "guardrail",
"text": "string",
"blockId": "string",
"order": 0,
"enabled": true
}
]
},
"historyScope": "contact"
},
"goals": [
{
"goalId": "string",
"order": 0,
"start": {
"kind": "on_join"
},
"deliver": {
"deliveryEndpointId": "string",
"workflowId": "string",
"deliveryLimits": [
{
"active": true,
"cap": 0,
"type": "daily",
"startDate": "string",
"endDate": "string"
}
],
"whenFull": {
"action": "queue",
"routeToPlaybookId": "string"
},
"deliverySchedule": {
"timezone": "string",
"action": "queue",
"specificDays": [
{
"active": true,
"day": "Monday",
"startTime": "string",
"endTime": "string"
}
],
"routeToPlaybookId": "string"
},
"revenueMilestones": [
{
"contactStatus": "delivered",
"amount": 0,
"currency": "USD",
"validFrom": "string",
"validTo": "string",
"conditions": {
"logicalOperator": "AND",
"subRules": [
{
"logicalOperator": "AND",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": [
null
],
"lookup": {
"dataSourceId": "string",
"column": "string"
},
"prompt": "string",
"maxSeverity": "disqualify"
}
]
}
],
"isActive": true,
"name": "string"
},
"notes": "string",
"active": true
}
],
"discrepancyHold": "off",
"requireConsent": true
}
}
],
"eligibility": {
"rules": [
{
"logicalOperator": "AND",
"subRules": [
{
"logicalOperator": "AND",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": [
null
],
"lookup": {
"dataSourceId": "string",
"column": "string"
},
"prompt": "string",
"maxSeverity": "disqualify"
}
]
}
],
"isActive": true,
"name": "string"
}
]
},
"enrollment": {
"sources": [
{
"sourceId": "string",
"kind": "partner",
"name": "string",
"supplierId": "string",
"postingSpecId": "string",
"mode": "direct_post",
"apiKey": "string",
"apiKeyEncrypted": {
"ciphertext": "string",
"encryptedDataKey": "string",
"iv": "string",
"authTag": "string",
"kmsKeyId": "string"
},
"keyPrefix": "string",
"specShareHash": "string",
"caps": [
{
"active": true,
"cap": 0,
"type": "daily",
"startDate": "string",
"endDate": "string"
}
],
"costMilestones": [
{
"contactStatus": "contact_ingested",
"amount": 0,
"currency": "USD",
"validFrom": "string",
"validTo": "string",
"conditions": {
"logicalOperator": "AND",
"subRules": [
{
"logicalOperator": "AND",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": [
null
],
"lookup": {
"dataSourceId": "string",
"column": "string"
},
"prompt": "string",
"maxSeverity": "disqualify"
}
]
}
],
"isActive": true,
"name": "string"
},
"notes": "string",
"active": true
}
],
"shortCircuitSyncEvaluation": true,
"placement": {
"applyRoutingRules": true,
"applyFallbackPlaybooks": true
},
"active": true,
"createdAt": "string",
"updatedAt": "string"
}
],
"routingRules": [
{
"routeName": "string",
"active": true,
"priority": 0,
"logicalOperator": "AND",
"subRules": [
{
"logicalOperator": "AND",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": [
null
],
"lookup": {
"dataSourceId": "string",
"column": "string"
},
"prompt": "string",
"maxSeverity": "disqualify"
}
]
}
],
"routeTo": {
"playbookId": "string"
}
}
],
"fallbackPlaybookIds": [
"string"
],
"autoRoutingEnabled": true,
"dedupeOverride": {
"enabled": true,
"window": 3650,
"matchFields": {
"email": true,
"phone": true,
"matchLogic": "AND"
}
}
},
"notes": "string",
"tags": [
"string"
],
"createdAt": "string",
"updatedAt": "string",
"archivedAt": "string"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}List playbooks
Returns all playbooks for the authenticated tenant. Supports pagination and filtering.
Initiate an AI voice call
Triggers an outbound AI voice call to a contact. The call is placed asynchronously and the response returns immediately with an interaction ID for tracking. Pre-flight validation checks that the contact exists with a valid E.164 phone number, the playbook is active with a voice agent configured, the contact is not on the Do Not Call list, and auto-dialer rules are satisfied (operating hours, min gap, max attempts). Use webhooks to receive call completion events, or poll the interaction for status updates.