{"openapi":"3.1.0","info":{"title":"oyehello API","version":"1","description":"Voice and chat AI agents: place and schedule calls, manage agents, contacts, campaigns and knowledge bases, and receive webhooks. Authenticate with a secret key: `Authorization: Bearer ohk_live_…`. Guides: https://oyehello.ai/docs/api/guides/getting-started/"},"servers":[{"url":"http://api.oyehello.ai"}],"tags":[{"name":"Account"},{"name":"Calls"},{"name":"Nudges"},{"name":"Agents"},{"name":"Outcome boards"},{"name":"Contacts"},{"name":"Campaigns"},{"name":"Phone numbers"},{"name":"Knowledge bases"},{"name":"Chat"},{"name":"WhatsApp"},{"name":"WhatsApp templates"},{"name":"Compliance"},{"name":"Wallet"},{"name":"Data streams"},{"name":"Webhooks"}],"paths":{"/v1/me":{"get":{"operationId":"getV1Me","tags":["Account"],"summary":"The calling key and its workspace","description":"Any valid key. Reference: https://oyehello.ai/docs/api/reference/scopes#check-your-key","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/scopes#check-your-key"},"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/calls":{"post":{"operationId":"postV1Calls","tags":["Calls"],"summary":"Place a call","description":"Scope: `calls:write`. Reference: https://oyehello.ai/docs/api/reference/calls#place-a-call","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/calls#place-a-call"},"security":[{"apiKey":["calls:write"]}],"x-scope":"calls:write","parameters":[{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","maxLength":255},"description":"A retry with the same key and body returns the first response instead of acting twice (24 h, per workspace)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"toNumber":{"type":"string","minLength":8,"maxLength":20},"fromNumber":{"type":"string"},"externalRef":{"type":"string","minLength":1,"maxLength":120},"variables":{"description":"Values for the agent's {variables}. Limits (enforced in a future release; today over-limit values are truncated and reported in `warnings`): up to 50 variables, names of letters, digits and _ (at most 64), values up to 120 characters, 16 KB in all.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"metadata":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["agentId","toNumber"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacedCall"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getV1Calls","tags":["Calls"],"summary":"List calls","description":"Scope: `calls:read`. Reference: https://oyehello.ai/docs/api/reference/calls#list-calls","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/calls#list-calls"},"security":[{"apiKey":["calls:read"]}],"x-scope":"calls:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The nextCursor from the previous page."},{"name":"state","in":"query","required":false,"schema":{"enum":["ringing","in_progress","ended","blocked"]}},{"name":"agentId","in":"query","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","required":false,"schema":{"type":"string"}},{"name":"contactId","in":"query","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"enum":["outbound","inbound"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/calls/{id}":{"get":{"operationId":"getV1CallsId","tags":["Calls"],"summary":"Get a call","description":"Scope: `calls:read`. Reference: https://oyehello.ai/docs/api/reference/calls#get-a-call","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/calls#get-a-call"},"security":[{"apiKey":["calls:read"]}],"x-scope":"calls:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/calls/{id}/hangup":{"post":{"operationId":"postV1CallsIdHangup","tags":["Calls"],"summary":"Hang up a live call","description":"Scope: `calls:write`. Reference: https://oyehello.ai/docs/api/reference/calls#hang-up-a-call","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/calls#hang-up-a-call"},"security":[{"apiKey":["calls:write"]}],"x-scope":"calls:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/calls":{"get":{"operationId":"getV1AnalyticsCalls","tags":["Calls"],"summary":"Call analytics","description":"Scope: `calls:read`. Reference: https://oyehello.ai/docs/api/reference/calls#call-analytics","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/calls#call-analytics"},"security":[{"apiKey":["calls:read"]}],"x-scope":"calls:read","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"agentId","in":"query","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduled-calls":{"post":{"operationId":"postV1ScheduledCalls","tags":["Calls"],"summary":"Schedule a call","description":"Scope: `calls:write`. Reference: https://oyehello.ai/docs/api/reference/calls#schedule-a-call","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/calls#schedule-a-call"},"security":[{"apiKey":["calls:write"]}],"x-scope":"calls:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"toNumber":{"type":"string","minLength":8,"maxLength":20},"fromNumber":{"type":"string"},"externalRef":{"type":"string","minLength":1,"maxLength":120},"variables":{"description":"Values for the agent's {variables}. Limits (enforced in a future release; today over-limit values are truncated and reported in `warnings`): up to 50 variables, names of letters, digits and _ (at most 64), values up to 120 characters, 16 KB in all.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"metadata":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"scheduledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["agentId","toNumber","scheduledAt"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getV1ScheduledCalls","tags":["Calls"],"summary":"List scheduled calls","description":"Scope: `calls:read`. Reference: https://oyehello.ai/docs/api/reference/calls#list-scheduled-calls","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/calls#list-scheduled-calls"},"security":[{"apiKey":["calls:read"]}],"x-scope":"calls:read","parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["scheduled","placed","failed","cancelled"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduled-calls/{id}":{"get":{"operationId":"getV1ScheduledCallsId","tags":["Calls"],"summary":"Get a scheduled call","description":"Scope: `calls:read`. Reference: https://oyehello.ai/docs/api/reference/calls#get-a-scheduled-call","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/calls#get-a-scheduled-call"},"security":[{"apiKey":["calls:read"]}],"x-scope":"calls:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteV1ScheduledCallsId","tags":["Calls"],"summary":"Cancel a scheduled call","description":"Scope: `calls:write`. Reference: https://oyehello.ai/docs/api/reference/calls#cancel-a-scheduled-call","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/calls#cancel-a-scheduled-call"},"security":[{"apiKey":["calls:write"]}],"x-scope":"calls:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/nudges":{"post":{"operationId":"postV1Nudges","tags":["Nudges"],"summary":"Create a nudge","description":"Scope: `nudges:write`. Reference: https://oyehello.ai/docs/api/reference/nudges#create-a-nudge","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/nudges#create-a-nudge"},"security":[{"apiKey":["nudges:write"]}],"x-scope":"nudges:write","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":255},"description":"A retry with the same key and body returns the first response instead of acting twice (24 h, per workspace)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"toNumber":{"type":"string","minLength":8,"maxLength":20},"fromNumber":{"type":"string"},"externalRef":{"type":"string","minLength":1,"maxLength":120},"variables":{"maxProperties":50,"description":"Up to 50 variables, values up to 120 characters (numbers/booleans become text), 16 KB in all.","type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":120},{"type":"number"},{"type":"boolean"}]}},"metadata":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"scheduledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"outsideWindow":{"default":"queue","type":"string","enum":["queue","reject"]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"retry":{"default":{"maxRetries":0,"on":["no_answer","busy"],"delayMinutes":30},"type":"object","properties":{"maxRetries":{"default":0,"type":"integer","minimum":0,"maximum":2},"on":{"default":["no_answer","busy"],"minItems":1,"type":"array","items":{"type":"string","enum":["no_answer","busy"]}},"delayMinutes":{"default":30,"type":"integer","minimum":10,"maximum":240}},"additionalProperties":false}},"required":["agentId","toNumber"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Nudge"}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getV1Nudges","tags":["Nudges"],"summary":"List nudges","description":"Scope: `nudges:read`. Reference: https://oyehello.ai/docs/api/reference/nudges#list-nudges","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/nudges#list-nudges"},"security":[{"apiKey":["nudges:read"]}],"x-scope":"nudges:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The nextCursor from the previous page."},{"name":"status","in":"query","required":false,"schema":{"enum":["queued","scheduled","dialing","in_progress","finished"]}},{"name":"result","in":"query","required":false,"schema":{"enum":["connected","voicemail","opted_out","no_answer","busy","failed","blocked","expired","cancelled"]}},{"name":"agentId","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalRef","in":"query","required":false,"schema":{"type":"string"}},{"name":"toNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"createdAfter","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"createdBefore","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Nudge"}},"nextCursor":{"type":["string","null"]}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/nudges/{id}":{"get":{"operationId":"getV1NudgesId","tags":["Nudges"],"summary":"Get a nudge","description":"Scope: `nudges:read`. Reference: https://oyehello.ai/docs/api/reference/nudges#get-a-nudge","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/nudges#get-a-nudge"},"security":[{"apiKey":["nudges:read"]}],"x-scope":"nudges:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Nudge"},{"type":"object","properties":{"attemptsList":{"type":"array","items":{"$ref":"#/components/schemas/NudgeAttempt"}},"recordingUrl":{"type":["string","null"],"description":"null unless the key also holds calls:read."}},"required":[],"additionalProperties":false}]}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/nudges/{id}/cancel":{"post":{"operationId":"postV1NudgesIdCancel","tags":["Nudges"],"summary":"Cancel a nudge","description":"Scope: `nudges:write`. Reference: https://oyehello.ai/docs/api/reference/nudges#cancel-a-nudge","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/nudges#cancel-a-nudge"},"security":[{"apiKey":["nudges:write"]}],"x-scope":"nudges:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Nudge"}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/nudges/cancel":{"post":{"operationId":"postV1NudgesCancel","tags":["Nudges"],"summary":"Cancel many nudges","description":"Scope: `nudges:write`. Reference: https://oyehello.ai/docs/api/reference/nudges#cancel-many-nudges","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/nudges#cancel-many-nudges"},"security":[{"apiKey":["nudges:write"]}],"x-scope":"nudges:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"all":{"type":"boolean","const":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"cancelled":{"type":"integer"},"ids":{"type":"array","items":{"type":"string"}}},"required":["cancelled","ids"],"additionalProperties":false}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/nudges/preflight":{"post":{"operationId":"postV1NudgesPreflight","tags":["Nudges"],"summary":"Check whether a nudge would be blocked","description":"Scope: `nudges:read`. Reference: https://oyehello.ai/docs/api/reference/nudges#preflight","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/nudges#preflight"},"security":[{"apiKey":["nudges:read"]}],"x-scope":"nudges:read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"},"toNumber":{"type":"string"}},"required":["agentId","toNumber"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents":{"get":{"operationId":"getV1Agents","tags":["Agents"],"summary":"List agents","description":"Scope: `agents:read`. Reference: https://oyehello.ai/docs/api/reference/agents#list-agents","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/agents#list-agents"},"security":[{"apiKey":["agents:read"]}],"x-scope":"agents:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postV1Agents","tags":["Agents"],"summary":"Create an agent","description":"Scope: `agents:write`. Reference: https://oyehello.ai/docs/api/reference/agents#create-an-agent","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/agents#create-an-agent"},"security":[{"apiKey":["agents:write"]}],"x-scope":"agents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"systemPrompt":{"default":"","type":"string","maxLength":16000},"voice":{"default":"","type":"string","maxLength":80},"language":{"default":"en","type":"string","enum":["en","hi","bn","gu","kn","ml","mr","or","pa","ta","te"]},"workflowTemplate":{"default":"prompt-driven","type":"string","enum":["collections","onboarding","prompt-driven"]},"vertical":{"default":"general","type":"string","enum":["general","collections","lending","financial_services","debt_recovery"]},"policyRef":{"default":"generic-safe@1","type":"string","minLength":1,"maxLength":120},"toolIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"allowedTransferNumbers":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":20}},"extractionSchema":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["text","boolean","number"]}},"required":["key","label","type"]}},"knowledgeBaseId":{"default":null,"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"channel":{"type":"string","enum":["call","chat","whatsapp"]},"direction":{"type":"string","enum":["inbound","outbound"]}},"required":["name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}":{"get":{"operationId":"getV1AgentsId","tags":["Agents"],"summary":"Get an agent","description":"Scope: `agents:read`. Reference: https://oyehello.ai/docs/api/reference/agents#get-an-agent","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/agents#get-an-agent"},"security":[{"apiKey":["agents:read"]}],"x-scope":"agents:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putV1AgentsId","tags":["Agents"],"summary":"Update an agent","description":"Scope: `agents:write`. Reference: https://oyehello.ai/docs/api/reference/agents#update-an-agent","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/agents#update-an-agent"},"security":[{"apiKey":["agents:write"]}],"x-scope":"agents:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"systemPrompt":{"type":"string","maxLength":16000},"voice":{"type":"string","maxLength":80},"language":{"type":"string","enum":["en","hi","bn","gu","kn","ml","mr","or","pa","ta","te"]},"workflowTemplate":{"type":"string","enum":["collections","onboarding","prompt-driven"]},"vertical":{"type":"string","enum":["general","collections","lending","financial_services","debt_recovery"]},"policyRef":{"type":"string","minLength":1,"maxLength":120},"toolIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"allowedTransferNumbers":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":20}},"extractionSchema":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["text","boolean","number"]}},"required":["key","label","type"]}},"knowledgeBaseId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"channel":{"type":"string","enum":["call","chat","whatsapp"]},"direction":{"type":"string","enum":["inbound","outbound"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteV1AgentsId","tags":["Agents"],"summary":"Delete an agent","description":"Scope: `agents:write`. Reference: https://oyehello.ai/docs/api/reference/agents#delete-an-agent","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/agents#delete-an-agent"},"security":[{"apiKey":["agents:write"]}],"x-scope":"agents:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/status":{"post":{"operationId":"postV1AgentsIdStatus","tags":["Agents"],"summary":"Publish or unpublish an agent","description":"Scope: `agents:write`. Reference: https://oyehello.ai/docs/api/reference/agents#publish-or-unpublish","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/agents#publish-or-unpublish"},"security":[{"apiKey":["agents:write"]}],"x-scope":"agents:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["draft","active"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/voices":{"get":{"operationId":"getV1Voices","tags":["Agents"],"summary":"Voices and languages","description":"Scope: `agents:read`. Reference: https://oyehello.ai/docs/api/reference/agents#voices-and-languages","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/agents#voices-and-languages"},"security":[{"apiKey":["agents:read"]}],"x-scope":"agents:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tools":{"get":{"operationId":"getV1Tools","tags":["Agents"],"summary":"The workspace's tools","description":"Scope: `agents:read`. Reference: https://oyehello.ai/docs/api/reference/agents#tools","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/agents#tools"},"security":[{"apiKey":["agents:read"]}],"x-scope":"agents:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/flow":{"get":{"operationId":"getV1AgentsIdFlow","tags":["Agents"],"summary":"Read an agent's call flow","description":"Scope: `agents:read`. Reference: https://oyehello.ai/docs/api/reference/agents#read-the-flow","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/agents#read-the-flow"},"security":[{"apiKey":["agents:read"]}],"x-scope":"agents:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putV1AgentsIdFlow","tags":["Agents"],"summary":"Save the flow draft","description":"Scope: `agents:write`. Reference: https://oyehello.ai/docs/api/reference/agents#save-the-draft","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/agents#save-the-draft"},"security":[{"apiKey":["agents:write"]}],"x-scope":"agents:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"graph":{"type":"object","properties":{"startNodeId":{"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"goal":{"type":"string"},"prompt":{"type":"string"},"model":{"type":"string"},"knowledgeBaseId":{"type":"string"},"tools":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string","const":"inherit"}]},"toolItems":{"type":"object","properties":{"smsTemplateIds":{"type":"array","items":{"type":"string"}},"whatsappTemplateIds":{"type":"array","items":{"type":"string"}},"fetchEndpoints":{"type":"array","items":{"type":"string"}}}},"transferNumbers":{"type":"array","items":{"type":"string"}},"integrationTools":{"type":"array","items":{"type":"string"}},"outputVars":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string"},"var":{"type":"string"},"path":{"type":"string"}},"required":["tool","var"]}},"collectVar":{"type":"string"},"collectType":{"type":"string","enum":["text","date","number","phone","email","boolean","enum","document"]},"collectOptions":{"type":"array","items":{"type":"string"}},"collectRetries":{"type":"number"},"collectDocument":{"type":"object","properties":{"label":{"type":"string","maxLength":120},"description":{"type":"string","maxLength":500},"parts":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"fields":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":60},"hint":{"type":"string","maxLength":200},"var":{"type":"string","maxLength":64}},"required":["name","var"]}},"rules":{"maxItems":5,"type":"array","items":{"type":"string","maxLength":300}}},"required":["label"]},"silence":{"type":"object","properties":{"ms":{"type":"number"},"targetNodeId":{"type":"string"},"reprompt":{"type":"boolean"}},"required":["ms","targetNodeId"]},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]},"transitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"cond":{"type":"string"},"targetNodeId":{"type":"string"},"retriesN":{"type":"number"},"schedule":{"type":"object","properties":{"tz":{"type":"string"},"days":{"type":"array","items":{"type":"number"}},"start":{"type":"string"},"end":{"type":"string"},"negate":{"type":"boolean"}},"required":["start","end"]},"handoffAgentId":{"type":"string"}},"required":["id","kind","cond","targetNodeId"]}}},"required":["id","name","kind","goal","prompt","model","knowledgeBaseId","tools","position","transitions"]}},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"origin":{"type":"string","enum":["csv","in_call","output"]},"required":{"type":"boolean"},"type":{"type":"string","enum":["text","date","number","phone","email","boolean","enum"]},"description":{"type":"string"}},"required":["name","origin"]}},"distressNodeId":{"type":"string"},"globalRules":{"type":"string","maxLength":2000},"globalIntents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"cond":{"type":"string","maxLength":500},"targetNodeId":{"type":"string"}},"required":["id","cond","targetNodeId"]}}},"required":["startNodeId","nodes","variables"]},"baseVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["graph"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/flow/publish":{"post":{"operationId":"postV1AgentsIdFlowPublish","tags":["Agents"],"summary":"Publish the flow draft","description":"Scope: `agents:write`. Reference: https://oyehello.ai/docs/api/reference/agents#publish-the-draft","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/agents#publish-the-draft"},"security":[{"apiKey":["agents:write"]}],"x-scope":"agents:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/board":{"get":{"operationId":"getV1AgentsIdBoard","tags":["Outcome boards"],"summary":"Get an inbound agent's board","description":"Scope: `agents:read`. Reference: https://oyehello.ai/docs/api/reference/boards#get-a-board","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/boards#get-a-board"},"security":[{"apiKey":["agents:read"]}],"x-scope":"agents:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/board/cards":{"get":{"operationId":"getV1AgentsIdBoardCards","tags":["Outcome boards"],"summary":"List a column's cards","description":"Scope: `agents:read`. Reference: https://oyehello.ai/docs/api/reference/boards#list-a-columns-cards","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/boards#list-a-columns-cards"},"security":[{"apiKey":["agents:read"]}],"x-scope":"agents:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"column","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The nextCursor from the previous page."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/board/cards/{cardId}":{"patch":{"operationId":"patchV1AgentsIdBoardCardsCardId","tags":["Outcome boards"],"summary":"Move a card","description":"Scope: `agents:write`. Reference: https://oyehello.ai/docs/api/reference/boards#move-a-card","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/boards#move-a-card"},"security":[{"apiKey":["agents:write"]}],"x-scope":"agents:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cardId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"columnId":{"type":"string"}},"required":["columnId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/contacts":{"get":{"operationId":"getV1Contacts","tags":["Contacts"],"summary":"List contacts","description":"Scope: `contacts:read`. Reference: https://oyehello.ai/docs/api/reference/contacts#list-contacts","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/contacts#list-contacts"},"security":[{"apiKey":["contacts:read"]}],"x-scope":"contacts:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The nextCursor from the previous page."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postV1Contacts","tags":["Contacts"],"summary":"Create or update a contact","description":"Scope: `contacts:write`. Reference: https://oyehello.ai/docs/api/reference/contacts#create-or-update-upsert","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/contacts#create-or-update-upsert"},"security":[{"apiKey":["contacts:write"]}],"x-scope":"contacts:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"externalRef":{"type":"string","minLength":1,"maxLength":120},"phone":{"type":"string","minLength":8,"maxLength":20},"preferredLanguage":{"type":"string","enum":["en","hi"]},"timezone":{"type":"string"},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"optOut":{"type":"boolean"}},"required":["externalRef","phone"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/contacts/{id}":{"get":{"operationId":"getV1ContactsId","tags":["Contacts"],"summary":"Get a contact","description":"Scope: `contacts:read`. Reference: https://oyehello.ai/docs/api/reference/contacts#get-a-contact","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/contacts#get-a-contact"},"security":[{"apiKey":["contacts:read"]}],"x-scope":"contacts:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putV1ContactsId","tags":["Contacts"],"summary":"Update a contact","description":"Scope: `contacts:write`. Reference: https://oyehello.ai/docs/api/reference/contacts#update-a-contact","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/contacts#update-a-contact"},"security":[{"apiKey":["contacts:write"]}],"x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":8,"maxLength":20},"preferredLanguage":{"type":"string","enum":["en","hi"]},"timezone":{"type":"string"},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"optOut":{"type":"boolean"}},"required":["phone"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteV1ContactsId","tags":["Contacts"],"summary":"Delete a contact","description":"Scope: `contacts:write`. Reference: https://oyehello.ai/docs/api/reference/contacts#delete-a-contact","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/contacts#delete-a-contact"},"security":[{"apiKey":["contacts:write"]}],"x-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/contacts/batch":{"post":{"operationId":"postV1ContactsBatch","tags":["Contacts"],"summary":"Create or update up to 500 contacts","description":"Scope: `contacts:write`. Reference: https://oyehello.ai/docs/api/reference/contacts#batch-upsert","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/contacts#batch-upsert"},"security":[{"apiKey":["contacts:write"]}],"x-scope":"contacts:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"type":"array","items":{"type":"object","properties":{"externalRef":{"type":"string","minLength":1,"maxLength":120},"phone":{"type":"string","minLength":8,"maxLength":20},"preferredLanguage":{"type":"string","enum":["en","hi"]},"timezone":{"type":"string"},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"optOut":{"type":"boolean"}},"required":["externalRef","phone"]},"minItems":1,"maxItems":500}},"required":["contacts"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/contacts/{id}/erase":{"post":{"operationId":"postV1ContactsIdErase","tags":["Contacts"],"summary":"Erase a contact's personal data (DPDP)","description":"Scope: `contacts:erase`. Reference: https://oyehello.ai/docs/api/reference/contacts#erase-a-contact-dpdp","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/contacts#erase-a-contact-dpdp"},"security":[{"apiKey":["contacts:erase"]}],"x-scope":"contacts:erase","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/dnc":{"get":{"operationId":"getV1Dnc","tags":["Contacts"],"summary":"List the do-not-call list","description":"Scope: `contacts:read`. Reference: https://oyehello.ai/docs/api/reference/contacts#do-not-call-list","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/contacts#do-not-call-list"},"security":[{"apiKey":["contacts:read"]}],"x-scope":"contacts:read","parameters":[{"name":"phone","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postV1Dnc","tags":["Contacts"],"summary":"Add numbers to the do-not-call list","description":"Scope: `contacts:write`. Reference: https://oyehello.ai/docs/api/reference/contacts#do-not-call-list","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/contacts#do-not-call-list"},"security":[{"apiKey":["contacts:write"]}],"x-scope":"contacts:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phones":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":1000},"reason":{"type":"string","maxLength":200}},"required":["phones"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns":{"get":{"operationId":"getV1Campaigns","tags":["Campaigns"],"summary":"List campaigns","description":"Scope: `campaigns:read`. Reference: https://oyehello.ai/docs/api/reference/campaigns#list-campaigns","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#list-campaigns"},"security":[{"apiKey":["campaigns:read"]}],"x-scope":"campaigns:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postV1Campaigns","tags":["Campaigns"],"summary":"Create a campaign","description":"Scope: `campaigns:write`. Reference: https://oyehello.ai/docs/api/reference/campaigns#create-a-campaign","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#create-a-campaign"},"security":[{"apiKey":["campaigns:write"]}],"x-scope":"campaigns:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"default":"","type":"string","maxLength":120},"channel":{"default":"voice","type":"string","enum":["voice","sms","whatsapp","email","ivr","chat"]},"workflowType":{"default":"collections","type":"string","enum":["collections","onboarding"]},"agentId":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"dltTemplateRef":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object","properties":{"fromNumber":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"endAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"dailyFrom":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"dailyTo":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"retryCount":{"default":0,"type":"integer","minimum":0,"maximum":10},"cooldownMinutes":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"emailNotifications":{"default":[],"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}}},"whatsapp":{"type":"object","properties":{"templateId":{"type":"string","pattern":"^watpl_"},"paramMapping":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^(header|header_media|body\\.[a-z0-9_]{1,64}|button\\.\\d)$"},"additionalProperties":{"type":"object","properties":{"source":{"type":"string","enum":["column","contact","static"]},"value":{"type":"string","minLength":1,"maxLength":2000}},"required":["source","value"]}},"phoneNumberId":{"type":"string","pattern":"^\\d{5,20}$"},"ratePerMinute":{"type":"integer","minimum":1,"maximum":6000},"optInPolicy":{"type":"string","enum":["require","skip_check"]}},"required":["templateId"],"additionalProperties":false}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}":{"get":{"operationId":"getV1CampaignsId","tags":["Campaigns"],"summary":"Get a campaign","description":"Scope: `campaigns:read`. Reference: https://oyehello.ai/docs/api/reference/campaigns#get-a-campaign","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#get-a-campaign"},"security":[{"apiKey":["campaigns:read"]}],"x-scope":"campaigns:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putV1CampaignsId","tags":["Campaigns"],"summary":"Update a campaign","description":"Scope: `campaigns:write`. Reference: https://oyehello.ai/docs/api/reference/campaigns#update-a-campaign","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#update-a-campaign"},"security":[{"apiKey":["campaigns:write"]}],"x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dltTemplateRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object","properties":{"fromNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"endAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dailyFrom":{"anyOf":[{"type":"string"},{"type":"null"}]},"dailyTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryCount":{"type":"integer","minimum":0,"maximum":10},"cooldownMinutes":{"type":"integer","minimum":0,"maximum":9007199254740991},"emailNotifications":{"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}}},"whatsapp":{"type":"object","properties":{"templateId":{"type":"string","pattern":"^watpl_"},"paramMapping":{"type":"object","propertyNames":{"type":"string","pattern":"^(header|header_media|body\\.[a-z0-9_]{1,64}|button\\.\\d)$"},"additionalProperties":{"type":"object","properties":{"source":{"type":"string","enum":["column","contact","static"]},"value":{"type":"string","minLength":1,"maxLength":2000}},"required":["source","value"]}},"ratePerMinute":{"type":"integer","minimum":1,"maximum":6000},"optInPolicy":{"type":"string","enum":["require","skip_check"]}},"additionalProperties":false}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteV1CampaignsId","tags":["Campaigns"],"summary":"Delete a campaign","description":"Scope: `campaigns:write`. Reference: https://oyehello.ai/docs/api/reference/campaigns#delete-a-campaign","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#delete-a-campaign"},"security":[{"apiKey":["campaigns:write"]}],"x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/contacts":{"post":{"operationId":"postV1CampaignsIdContacts","tags":["Campaigns"],"summary":"Set the calling list","description":"Scope: `campaigns:write`. Reference: https://oyehello.ai/docs/api/reference/campaigns#set-the-calling-list","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#set-the-calling-list"},"security":[{"apiKey":["campaigns:write"]}],"x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"minItems":1,"maxItems":50000,"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","minLength":8,"maxLength":20},"name":{"type":"string"},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["phone"]}}},"required":["contacts"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getV1CampaignsIdContacts","tags":["Campaigns"],"summary":"Calling-list progress","description":"Scope: `campaigns:read`. Reference: https://oyehello.ai/docs/api/reference/campaigns#calling-list-progress","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#calling-list-progress"},"security":[{"apiKey":["campaigns:read"]}],"x-scope":"campaigns:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"enum":["all","reached","in_progress","unreached","held","queued","invalid","dnc"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/status":{"post":{"operationId":"postV1CampaignsIdStatus","tags":["Campaigns"],"summary":"Publish or pause a campaign","description":"Scope: `campaigns:write`. Reference: https://oyehello.ai/docs/api/reference/campaigns#publish--pause","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#publish--pause"},"security":[{"apiKey":["campaigns:write"]}],"x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["draft","active","paused"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/run":{"post":{"operationId":"postV1CampaignsIdRun","tags":["Campaigns"],"summary":"Start a run","description":"Scope: `campaigns:write`. Reference: https://oyehello.ai/docs/api/reference/campaigns#start-a-run","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#start-a-run"},"security":[{"apiKey":["campaigns:write"]}],"x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/runs":{"get":{"operationId":"getV1CampaignsIdRuns","tags":["Campaigns"],"summary":"List a campaign's runs","description":"Scope: `campaigns:read`. Reference: https://oyehello.ai/docs/api/reference/campaigns#runs","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#runs"},"security":[{"apiKey":["campaigns:read"]}],"x-scope":"campaigns:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaign-runs/{runId}":{"get":{"operationId":"getV1CampaignRunsRunId","tags":["Campaigns"],"summary":"Get a run","description":"Scope: `campaigns:read`. Reference: https://oyehello.ai/docs/api/reference/campaigns#runs","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#runs"},"security":[{"apiKey":["campaigns:read"]}],"x-scope":"campaigns:read","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/summary":{"get":{"operationId":"getV1CampaignsIdSummary","tags":["Campaigns"],"summary":"Progress summary","description":"Scope: `campaigns:read`. Reference: https://oyehello.ai/docs/api/reference/campaigns#progress-summary","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/campaigns#progress-summary"},"security":[{"apiKey":["campaigns:read"]}],"x-scope":"campaigns:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/board":{"get":{"operationId":"getV1CampaignsIdBoard","tags":["Outcome boards"],"summary":"Get a campaign's board","description":"Scope: `campaigns:read`. Reference: https://oyehello.ai/docs/api/reference/boards#get-a-board","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/boards#get-a-board"},"security":[{"apiKey":["campaigns:read"]}],"x-scope":"campaigns:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/board/cards":{"get":{"operationId":"getV1CampaignsIdBoardCards","tags":["Outcome boards"],"summary":"List a column's cards","description":"Scope: `campaigns:read`. Reference: https://oyehello.ai/docs/api/reference/boards#list-a-columns-cards","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/boards#list-a-columns-cards"},"security":[{"apiKey":["campaigns:read"]}],"x-scope":"campaigns:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"column","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The nextCursor from the previous page."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/board/cards/{cardId}":{"patch":{"operationId":"patchV1CampaignsIdBoardCardsCardId","tags":["Outcome boards"],"summary":"Move a card","description":"Scope: `campaigns:write`. Reference: https://oyehello.ai/docs/api/reference/boards#move-a-card","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/boards#move-a-card"},"security":[{"apiKey":["campaigns:write"]}],"x-scope":"campaigns:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cardId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"columnId":{"type":"string"}},"required":["columnId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/numbers":{"get":{"operationId":"getV1Numbers","tags":["Phone numbers"],"summary":"List numbers","description":"Scope: `numbers:read`. Reference: https://oyehello.ai/docs/api/reference/numbers#list-numbers","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/numbers#list-numbers"},"security":[{"apiKey":["numbers:read"]}],"x-scope":"numbers:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/numbers/{id}/inbound-agent":{"put":{"operationId":"putV1NumbersIdInboundAgent","tags":["Phone numbers"],"summary":"Choose who answers a number","description":"Scope: `numbers:write`. Reference: https://oyehello.ai/docs/api/reference/numbers#choose-who-answers-a-number","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/numbers#choose-who-answers-a-number"},"security":[{"apiKey":["numbers:write"]}],"x-scope":"numbers:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":["string","null"]}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/knowledge-bases":{"get":{"operationId":"getV1KnowledgeBases","tags":["Knowledge bases"],"summary":"List knowledge bases","description":"Scope: `knowledge:read`. Reference: https://oyehello.ai/docs/api/reference/knowledge-bases#list-knowledge-bases","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/knowledge-bases#list-knowledge-bases"},"security":[{"apiKey":["knowledge:read"]}],"x-scope":"knowledge:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postV1KnowledgeBases","tags":["Knowledge bases"],"summary":"Create a knowledge base","description":"Scope: `knowledge:write`. Reference: https://oyehello.ai/docs/api/reference/knowledge-bases#create-a-knowledge-base","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/knowledge-bases#create-a-knowledge-base"},"security":[{"apiKey":["knowledge:write"]}],"x-scope":"knowledge:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/knowledge-bases/{id}":{"get":{"operationId":"getV1KnowledgeBasesId","tags":["Knowledge bases"],"summary":"Get a knowledge base","description":"Scope: `knowledge:read`. Reference: https://oyehello.ai/docs/api/reference/knowledge-bases#get-a-knowledge-base","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/knowledge-bases#get-a-knowledge-base"},"security":[{"apiKey":["knowledge:read"]}],"x-scope":"knowledge:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteV1KnowledgeBasesId","tags":["Knowledge bases"],"summary":"Delete a knowledge base","description":"Scope: `knowledge:write`. Reference: https://oyehello.ai/docs/api/reference/knowledge-bases#delete-a-knowledge-base","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/knowledge-bases#delete-a-knowledge-base"},"security":[{"apiKey":["knowledge:write"]}],"x-scope":"knowledge:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/knowledge-bases/{id}/documents":{"post":{"operationId":"postV1KnowledgeBasesIdDocuments","tags":["Knowledge bases"],"summary":"Add a text document","description":"Scope: `knowledge:write`. Reference: https://oyehello.ai/docs/api/reference/knowledge-bases#add-a-text-document","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/knowledge-bases#add-a-text-document"},"security":[{"apiKey":["knowledge:write"]}],"x-scope":"knowledge:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100000},"title":{"type":"string","maxLength":200}},"required":["text"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteV1KnowledgeBasesIdDocuments","tags":["Knowledge bases"],"summary":"Remove a document","description":"Scope: `knowledge:write`. Reference: https://oyehello.ai/docs/api/reference/knowledge-bases#remove-a-document","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/knowledge-bases#remove-a-document"},"security":[{"apiKey":["knowledge:write"]}],"x-scope":"knowledge:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"enum":["text","file","link"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/knowledge-bases/{id}/links":{"post":{"operationId":"postV1KnowledgeBasesIdLinks","tags":["Knowledge bases"],"summary":"Add a web page","description":"Scope: `knowledge:write`. Reference: https://oyehello.ai/docs/api/reference/knowledge-bases#add-a-web-page","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/knowledge-bases#add-a-web-page"},"security":[{"apiKey":["knowledge:write"]}],"x-scope":"knowledge:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","maxLength":2048}},"required":["url"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/knowledge-bases/{id}/search":{"get":{"operationId":"getV1KnowledgeBasesIdSearch","tags":["Knowledge bases"],"summary":"Search a knowledge base","description":"Scope: `knowledge:read`. Reference: https://oyehello.ai/docs/api/reference/knowledge-bases#search","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/knowledge-bases#search"},"security":[{"apiKey":["knowledge:read"]}],"x-scope":"knowledge:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/chat/sessions":{"post":{"operationId":"postV1ChatSessions","tags":["Chat"],"summary":"Open a chat session","description":"Scope: `chat:write`. Reference: https://oyehello.ai/docs/api/reference/chat#open-a-session","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/chat#open-a-session"},"security":[{"apiKey":["chat:write"]}],"x-scope":"chat:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/chat/sessions/{id}/messages":{"post":{"operationId":"postV1ChatSessionsIdMessages","tags":["Chat"],"summary":"Send a message","description":"Scope: `chat:write`. Reference: https://oyehello.ai/docs/api/reference/chat#send-a-message","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/chat#send-a-message"},"security":[{"apiKey":["chat:write"]}],"x-scope":"chat:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000}},"required":["text"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/chat/sessions/{id}":{"get":{"operationId":"getV1ChatSessionsId","tags":["Chat"],"summary":"Get a chat session","description":"Scope: `chat:read`. Reference: https://oyehello.ai/docs/api/reference/chat#get-a-session","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/chat#get-a-session"},"security":[{"apiKey":["chat:read"]}],"x-scope":"chat:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/chat/sessions/{id}/end":{"post":{"operationId":"postV1ChatSessionsIdEnd","tags":["Chat"],"summary":"End a chat session","description":"Scope: `chat:write`. Reference: https://oyehello.ai/docs/api/reference/chat#end-a-session","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/chat#end-a-session"},"security":[{"apiKey":["chat:write"]}],"x-scope":"chat:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/conversations":{"post":{"operationId":"postV1WhatsappConversations","tags":["WhatsApp"],"summary":"Start a conversation with a template","description":"Scope: `whatsapp:write`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#start-a-conversation","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#start-a-conversation"},"security":[{"apiKey":["whatsapp:write"]}],"x-scope":"whatsapp:write","parameters":[{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","maxLength":255},"description":"A retry with the same key and body returns the first response instead of acting twice (24 h, per workspace)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1,"maxLength":64},"to":{"type":"string","minLength":6,"maxLength":20},"from":{"type":"string","maxLength":40},"template":{"type":"object","properties":{"id":{"type":"string","pattern":"^watpl_[A-Za-z0-9_-]{1,64}$"},"name":{"type":"string","maxLength":512,"pattern":"^[a-z0-9_]+$"},"language":{"type":"string","minLength":2,"maxLength":15},"params":{"type":"object","properties":{"header":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":60}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["image","video","document"]},"url":{"type":"string","maxLength":2000,"format":"uri"},"filename":{"type":"string","maxLength":240}},"required":["type","url"],"additionalProperties":false}]},"body":{"anyOf":[{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9_]{1,64}$"},"additionalProperties":{"type":"string","maxLength":1024}},{"maxItems":100,"type":"array","items":{"type":"string","maxLength":1024}}]},"buttons":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9},"text":{"type":"string","maxLength":2000},"payload":{"type":"string","maxLength":256},"code":{"type":"string","maxLength":15}},"required":["index"],"additionalProperties":false}},"components":{"description":"Only for templates that header / body / buttons cannot fill (carousel, catalog, flow buttons): Meta's template components in its send format (header, body, button, carousel with cards). At most 20 components and 16 KB.","minItems":1,"maxItems":20,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":false,"description":"Values for the template. body: an object for named templates ({{customer_name}}), an array for numbered ones ({{1}}, {{2}}). components: raw Meta components for carousel-type templates."}},"additionalProperties":false},"variables":{"maxProperties":50,"description":"Up to 50 variables, values up to 120 characters (numbers/booleans become text), 16 KB in all.","type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":120},{"type":"number"},{"type":"boolean"}]}},"contact":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"externalRef":{"type":"string","maxLength":120}},"additionalProperties":false},"optIn":{"type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":60},"capturedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["source"],"additionalProperties":false},"onActiveSession":{"default":"reject","type":"string","enum":["reject","send_in_session"]},"priorMessages":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["customer","agent","bot"]},"text":{"type":"string","minLength":1,"maxLength":4096},"agentName":{"type":"string","maxLength":80},"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"wamid":{"type":"string","maxLength":200}},"required":["role","text"],"additionalProperties":false}},"handoverNote":{"type":"string","minLength":1,"maxLength":1000},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["agentId","to","template"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WhatsAppStart"}},"required":["data"]}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WhatsAppStart"}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getV1WhatsappConversations","tags":["WhatsApp"],"summary":"List conversations","description":"Scope: `whatsapp:read`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#list-conversations","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#list-conversations"},"security":[{"apiKey":["whatsapp:read"]}],"x-scope":"whatsapp:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The nextCursor from the previous page."},{"name":"agentId","in":"query","required":false,"schema":{"type":"string"}},{"name":"phoneNumberId","in":"query","required":false,"schema":{"type":"string"}},{"name":"contactId","in":"query","required":false,"schema":{"type":"string"}},{"name":"endCause","in":"query","required":false,"schema":{"type":"string"}},{"name":"customer","in":"query","required":false,"schema":{"type":"string"},"description":"The customer number in E.164 (+91…) or their WhatsApp user id (IN.1349…)."},{"name":"origin","in":"query","required":false,"schema":{"enum":["inbound","template_start","call_followup","campaign","ai_unavailable"]}},{"name":"status","in":"query","required":false,"schema":{"enum":["active","ended"]}},{"name":"startedAfter","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"startedBefore","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"includeTest","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppConversation"}},"nextCursor":{"type":["string","null"]}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/conversations/{id}/end":{"post":{"operationId":"postV1WhatsappConversationsIdEnd","tags":["WhatsApp"],"summary":"End a conversation","description":"Scope: `whatsapp:write`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#end-a-conversation","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#end-a-conversation"},"security":[{"apiKey":["whatsapp:write"]}],"x-scope":"whatsapp:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","ended"]},"endCause":{"type":["string","null"]}},"required":["id","status"],"additionalProperties":false}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/conversations/{id}/takeover":{"post":{"operationId":"postV1WhatsappConversationsIdTakeover","tags":["WhatsApp"],"summary":"Take a conversation over from the agent (helpdesk)","description":"Scope: `whatsapp:write`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#take-over-a-conversation","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#take-over-a-conversation"},"security":[{"apiKey":["whatsapp:write"]}],"x-scope":"whatsapp:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentName":{"type":"string","minLength":1,"maxLength":80},"note":{"type":"string","minLength":1,"maxLength":1000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["taken_over"]},"alreadyTakenOver":{"type":"boolean"},"livemode":{"type":"boolean"}},"required":["id","status"],"additionalProperties":false}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/conversations/{id}/handback":{"post":{"operationId":"postV1WhatsappConversationsIdHandback","tags":["WhatsApp"],"summary":"Hand a conversation back to the agent","description":"Scope: `whatsapp:write`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#hand-a-conversation-back","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#hand-a-conversation-back"},"security":[{"apiKey":["whatsapp:write"]}],"x-scope":"whatsapp:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","minLength":1,"maxLength":1000},"messages":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4096},"agentName":{"type":"string","maxLength":80},"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["text"],"additionalProperties":false}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["with_agent"]},"alreadyWithAgent":{"type":"boolean"},"livemode":{"type":"boolean"}},"required":["id","status"],"additionalProperties":false}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/conversations/{id}/assign":{"post":{"operationId":"postV1WhatsappConversationsIdAssign","tags":["WhatsApp"],"summary":"Assign a conversation to a teammate","description":"Scope: `whatsapp:write`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#assign-a-conversation","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#assign-a-conversation"},"security":[{"apiKey":["whatsapp:write"]}],"x-scope":"whatsapp:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"description":"The teammate's user id (from GET /v1/whatsapp/assignees).","type":"string","minLength":1,"maxLength":80},"email":{"description":"Or the teammate's login email.","type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"assignedTo":{"type":"string"}},"required":["id","assignedTo"],"additionalProperties":false}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/assignees":{"get":{"operationId":"getV1WhatsappAssignees","tags":["WhatsApp"],"summary":"List teammates a conversation can be assigned to","description":"Scope: `whatsapp:read`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#assign-a-conversation","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#assign-a-conversation"},"security":[{"apiKey":["whatsapp:read"]}],"x-scope":"whatsapp:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":"string"}},"required":["userId","email"],"additionalProperties":false}}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/messages":{"post":{"operationId":"postV1WhatsappMessages","tags":["WhatsApp"],"summary":"Send a message without an agent","description":"Scope: `whatsapp:write`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#send-a-message","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#send-a-message"},"security":[{"apiKey":["whatsapp:write"]}],"x-scope":"whatsapp:write","parameters":[{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","maxLength":255},"description":"A retry with the same key and body returns the first response instead of acting twice (24 h, per workspace)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"description":"The live business number to send from (its id, phone_number_id or E.164). Default: the workspace default number.","type":"string","maxLength":40},"to":{"type":"string","minLength":6,"maxLength":140,"description":"The customer: an international phone number (+919876543210) or a WhatsApp user id (IN.13491208655302741918) for a customer who hides their number."},"template":{"type":"object","properties":{"id":{"type":"string","pattern":"^watpl_[A-Za-z0-9_-]{1,64}$"},"name":{"type":"string","maxLength":512,"pattern":"^[a-z0-9_]+$"},"language":{"type":"string","minLength":2,"maxLength":15},"params":{"type":"object","properties":{"header":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":60}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["image","video","document"]},"url":{"type":"string","maxLength":2000,"format":"uri"},"filename":{"type":"string","maxLength":240}},"required":["type","url"],"additionalProperties":false}]},"body":{"anyOf":[{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9_]{1,64}$"},"additionalProperties":{"type":"string","maxLength":1024}},{"maxItems":100,"type":"array","items":{"type":"string","maxLength":1024}}]},"buttons":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9},"text":{"type":"string","maxLength":2000},"payload":{"type":"string","maxLength":256},"code":{"type":"string","maxLength":15}},"required":["index"],"additionalProperties":false}},"components":{"description":"Only for templates that header / body / buttons cannot fill (carousel, catalog, flow buttons): Meta's template components in its send format (header, body, button, carousel with cards). At most 20 components and 16 KB.","minItems":1,"maxItems":20,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":false,"description":"Values for the template. body: an object for named templates ({{customer_name}}), an array for numbered ones ({{1}}, {{2}}). components: raw Meta components for carousel-type templates."}},"additionalProperties":false},"text":{"type":"string","minLength":1,"maxLength":4096},"media":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","document","audio"]},"url":{"type":"string","maxLength":2000,"format":"uri"},"caption":{"type":"string","maxLength":1024},"filename":{"type":"string","maxLength":240}},"required":["type","url"],"additionalProperties":false},"interactive":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"buttons"},"body":{"type":"string","minLength":1,"maxLength":1024},"header":{"type":"string","minLength":1,"maxLength":60},"footer":{"type":"string","minLength":1,"maxLength":60},"buttons":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"title":{"type":"string","minLength":1,"maxLength":20}},"required":["id","title"],"additionalProperties":false}}},"required":["type","body","buttons"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"list"},"body":{"type":"string","minLength":1,"maxLength":4096},"header":{"type":"string","minLength":1,"maxLength":60},"footer":{"type":"string","minLength":1,"maxLength":60},"button":{"type":"string","minLength":1,"maxLength":20},"sections":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":24},"rows":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":24},"description":{"type":"string","maxLength":72}},"required":["id","title"],"additionalProperties":false}}},"required":["title","rows"],"additionalProperties":false}}},"required":["type","body","button","sections"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"cta_url"},"body":{"type":"string","minLength":1,"maxLength":1024},"header":{"type":"string","minLength":1,"maxLength":60},"footer":{"type":"string","minLength":1,"maxLength":60},"displayText":{"type":"string","minLength":1,"maxLength":20},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["type","body","displayText","url"],"additionalProperties":false}],"description":"An interactive message: reply buttons, a list, or a link button (cta_url). Meta's limits are checked before sending."},"location":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"type":"string","minLength":1,"maxLength":1000},"address":{"type":"string","minLength":1,"maxLength":1000}},"required":["latitude","longitude"],"additionalProperties":false}},"required":["to"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WhatsAppMessage"}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getV1WhatsappMessages","tags":["WhatsApp"],"summary":"List messages","description":"Scope: `whatsapp:read`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#list-messages","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#list-messages"},"security":[{"apiKey":["whatsapp:read"]}],"x-scope":"whatsapp:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The nextCursor from the previous page."},{"name":"chatId","in":"query","required":false,"schema":{"type":"string"}},{"name":"threadId","in":"query","required":false,"schema":{"type":"string"}},{"name":"contactId","in":"query","required":false,"schema":{"type":"string"}},{"name":"templateName","in":"query","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"enum":["inbound","outbound"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"after","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppMessage"}},"nextCursor":{"type":["string","null"]}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/conversations/{id}":{"get":{"operationId":"getV1WhatsappConversationsId","tags":["WhatsApp"],"summary":"Get a conversation","description":"Scope: `whatsapp:read`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#get-a-conversation","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#get-a-conversation"},"security":[{"apiKey":["whatsapp:read"]}],"x-scope":"whatsapp:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"include","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated: messages, analysis"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WhatsAppConversation"}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/messages/{id}":{"get":{"operationId":"getV1WhatsappMessagesId","tags":["WhatsApp"],"summary":"Get a message","description":"Scope: `whatsapp:read`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#get-a-message","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#get-a-message"},"security":[{"apiKey":["whatsapp:read"]}],"x-scope":"whatsapp:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WhatsAppMessage"}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/media/{messageId}":{"get":{"operationId":"getV1WhatsappMediaMessageId","tags":["WhatsApp"],"summary":"Download inbound media (302 to a short-lived link)","description":"Scope: `whatsapp:read`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#download-media","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#download-media"},"security":[{"apiKey":["whatsapp:read"]}],"x-scope":"whatsapp:read","parameters":[{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/numbers":{"get":{"operationId":"getV1WhatsappNumbers","tags":["WhatsApp"],"summary":"List WhatsApp numbers","description":"Scope: `whatsapp:read`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#list-numbers","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#list-numbers"},"security":[{"apiKey":["whatsapp:read"]}],"x-scope":"whatsapp:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppNumber"}}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/templates":{"get":{"operationId":"getV1WhatsappTemplates","tags":["WhatsApp templates"],"summary":"List templates","description":"Scope: `whatsapp:read`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#list-templates","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#list-templates"},"security":[{"apiKey":["whatsapp:read"]}],"x-scope":"whatsapp:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The nextCursor from the previous page."},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"enum":["MARKETING","UTILITY","AUTHENTICATION"]}},{"name":"language","in":"query","required":false,"schema":{"type":"string"}},{"name":"quality","in":"query","required":false,"schema":{"enum":["GREEN","YELLOW","RED","UNKNOWN"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplate"}},"nextCursor":{"type":["string","null"]}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postV1WhatsappTemplates","tags":["WhatsApp templates"],"summary":"Create a template","description":"Scope: `whatsapp:write`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#create-a-template","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#create-a-template"},"security":[{"apiKey":["whatsapp:write"]}],"x-scope":"whatsapp:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spec":{"type":"object","properties":{"name":{"type":"string"},"language":{"type":"string"},"category":{"type":"string","enum":["MARKETING","UTILITY","AUTHENTICATION"]},"parameterFormat":{"default":"positional","type":"string","enum":["positional","named"]},"header":{"default":{"format":"none"},"oneOf":[{"type":"object","properties":{"format":{"type":"string","const":"none"}},"required":["format"]},{"type":"object","properties":{"format":{"type":"string","const":"text"},"text":{"type":"string"},"example":{"type":"string"}},"required":["format","text"]},{"type":"object","properties":{"format":{"type":"string","enum":["image","video","document"]},"handle":{"type":"string","maxLength":4096}},"required":["format"]}]},"body":{"type":"object","properties":{"text":{"type":"string","maxLength":4096},"examples":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":1024}}},"required":["text"]},"footer":{"type":"object","properties":{"text":{"type":"string","maxLength":240}},"required":["text"]},"buttons":{"default":[],"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"QUICK_REPLY"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","const":"URL"},"text":{"type":"string"},"url":{"type":"string"},"example":{"type":"string"}},"required":["type","text","url"]},{"type":"object","properties":{"type":{"type":"string","const":"PHONE_NUMBER"},"text":{"type":"string"},"phoneNumber":{"type":"string"}},"required":["type","text","phoneNumber"]},{"type":"object","properties":{"type":{"type":"string","const":"COPY_CODE"},"example":{"type":"string"}},"required":["type","example"]},{"type":"object","properties":{"type":{"type":"string","const":"OTP"},"otpType":{"type":"string","enum":["COPY_CODE","ONE_TAP"]},"text":{"type":"string"},"autofillText":{"type":"string"},"packageName":{"type":"string"},"signatureHash":{"type":"string"}},"required":["type","otpType"]}]}},"auth":{"type":"object","properties":{"addSecurityRecommendation":{"type":"boolean"},"codeExpirationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["addSecurityRecommendation"]}},"required":["name","language","category","body"]},"submit":{"default":true,"type":"boolean"}},"required":["spec"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WhatsAppTemplate"}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/templates/{id}":{"get":{"operationId":"getV1WhatsappTemplatesId","tags":["WhatsApp templates"],"summary":"Get a template","description":"Scope: `whatsapp:read`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#get-a-template","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#get-a-template"},"security":[{"apiKey":["whatsapp:read"]}],"x-scope":"whatsapp:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WhatsAppTemplate"}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchV1WhatsappTemplatesId","tags":["WhatsApp templates"],"summary":"Edit a template","description":"Scope: `whatsapp:write`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#edit-a-template","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#edit-a-template"},"security":[{"apiKey":["whatsapp:write"]}],"x-scope":"whatsapp:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spec":{"type":"object","properties":{"name":{"type":"string"},"language":{"type":"string"},"category":{"type":"string","enum":["MARKETING","UTILITY","AUTHENTICATION"]},"parameterFormat":{"default":"positional","type":"string","enum":["positional","named"]},"header":{"default":{"format":"none"},"oneOf":[{"type":"object","properties":{"format":{"type":"string","const":"none"}},"required":["format"]},{"type":"object","properties":{"format":{"type":"string","const":"text"},"text":{"type":"string"},"example":{"type":"string"}},"required":["format","text"]},{"type":"object","properties":{"format":{"type":"string","enum":["image","video","document"]},"handle":{"type":"string","maxLength":4096}},"required":["format"]}]},"body":{"type":"object","properties":{"text":{"type":"string","maxLength":4096},"examples":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":1024}}},"required":["text"]},"footer":{"type":"object","properties":{"text":{"type":"string","maxLength":240}},"required":["text"]},"buttons":{"default":[],"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"QUICK_REPLY"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","const":"URL"},"text":{"type":"string"},"url":{"type":"string"},"example":{"type":"string"}},"required":["type","text","url"]},{"type":"object","properties":{"type":{"type":"string","const":"PHONE_NUMBER"},"text":{"type":"string"},"phoneNumber":{"type":"string"}},"required":["type","text","phoneNumber"]},{"type":"object","properties":{"type":{"type":"string","const":"COPY_CODE"},"example":{"type":"string"}},"required":["type","example"]},{"type":"object","properties":{"type":{"type":"string","const":"OTP"},"otpType":{"type":"string","enum":["COPY_CODE","ONE_TAP"]},"text":{"type":"string"},"autofillText":{"type":"string"},"packageName":{"type":"string"},"signatureHash":{"type":"string"}},"required":["type","otpType"]}]}},"auth":{"type":"object","properties":{"addSecurityRecommendation":{"type":"boolean"},"codeExpirationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["addSecurityRecommendation"]}},"required":["name","language","category","body"]}},"required":["spec"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WhatsAppTemplate"}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteV1WhatsappTemplatesId","tags":["WhatsApp templates"],"summary":"Delete a template","description":"Scope: `whatsapp:write`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#delete-a-template","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#delete-a-template"},"security":[{"apiKey":["whatsapp:write"]}],"x-scope":"whatsapp:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"allLanguages","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"string"},"description":"The watpl_… ids deleted."}},"required":["deleted"],"additionalProperties":false}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/templates/sync":{"post":{"operationId":"postV1WhatsappTemplatesSync","tags":["WhatsApp templates"],"summary":"Sync templates from Meta","description":"Scope: `whatsapp:write`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#sync-templates","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#sync-templates"},"security":[{"apiKey":["whatsapp:write"]}],"x-scope":"whatsapp:write","responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"synced":{"type":"integer"},"changed":{"type":"integer"},"deleted":{"type":"integer"}},"required":["synced","changed","deleted"],"additionalProperties":false}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/whatsapp/templates/media":{"post":{"operationId":"postV1WhatsappTemplatesMedia","tags":["WhatsApp templates"],"summary":"Upload a media header sample (multipart field \"file\")","description":"Scope: `whatsapp:write`. Reference: https://oyehello.ai/docs/api/reference/whatsapp#upload-a-header-sample","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/whatsapp#upload-a-header-sample"},"security":[{"apiKey":["whatsapp:write"]}],"x-scope":"whatsapp:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"handle":{"type":"string","description":"Put it in spec.header.handle."},"mimeType":{"type":"string"},"size":{"type":"integer"}},"required":["handle","mimeType","size"],"additionalProperties":false}},"required":["data"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/audit/verify":{"get":{"operationId":"getV1AuditVerify","tags":["Compliance"],"summary":"Verify the compliance records","description":"Scope: `compliance:read`. Reference: https://oyehello.ai/docs/api/reference/compliance#verify-the-records","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/compliance#verify-the-records"},"security":[{"apiKey":["compliance:read"]}],"x-scope":"compliance:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/audit/export":{"get":{"operationId":"getV1AuditExport","tags":["Compliance"],"summary":"Export the compliance decision log","description":"Scope: `compliance:read`. Reference: https://oyehello.ai/docs/api/reference/compliance#export-the-decision-log","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/compliance#export-the-decision-log"},"security":[{"apiKey":["compliance:read"]}],"x-scope":"compliance:read","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"format","in":"query","required":false,"schema":{"enum":["csv","pdf"],"default":"csv"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/audit/stats":{"get":{"operationId":"getV1AuditStats","tags":["Compliance"],"summary":"Blocked-call statistics","description":"Scope: `compliance:read`. Reference: https://oyehello.ai/docs/api/reference/compliance#blocked-call-statistics","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/compliance#blocked-call-statistics"},"security":[{"apiKey":["compliance:read"]}],"x-scope":"compliance:read","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/wallet":{"get":{"operationId":"getV1Wallet","tags":["Wallet"],"summary":"Get the wallet","description":"Scope: `billing:read`. Reference: https://oyehello.ai/docs/api/reference/wallet#get-the-wallet","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/wallet#get-the-wallet"},"security":[{"apiKey":["billing:read"]}],"x-scope":"billing:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/wallet/transactions":{"get":{"operationId":"getV1WalletTransactions","tags":["Wallet"],"summary":"List transactions","description":"Scope: `billing:read`. Reference: https://oyehello.ai/docs/api/reference/wallet#list-transactions","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/wallet#list-transactions"},"security":[{"apiKey":["billing:read"]}],"x-scope":"billing:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data-streams":{"get":{"operationId":"getV1DataStreams","tags":["Data streams"],"summary":"List data streams","description":"Scope: `streams:read`. Reference: https://oyehello.ai/docs/api/reference/data-streams#get-v1data-streams","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/data-streams#get-v1data-streams"},"security":[{"apiKey":["streams:read"]}],"x-scope":"streams:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postV1DataStreams","tags":["Data streams"],"summary":"Create a data stream","description":"Scope: `streams:write`. Reference: https://oyehello.ai/docs/api/reference/data-streams#post-v1data-streams","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/data-streams#post-v1data-streams"},"security":[{"apiKey":["streams:write"]}],"x-scope":"streams:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["webhook","api","google_sheet","hubspot","salesforce","zoho","shopify"]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"fieldMap":{"type":"object","properties":{"phone":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"externalId":{"type":"string","minLength":1,"maxLength":200}}}},"required":["name","kind"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data-streams/{id}":{"get":{"operationId":"getV1DataStreamsId","tags":["Data streams"],"summary":"Get a data stream","description":"Scope: `streams:read`. Reference: https://oyehello.ai/docs/api/reference/data-streams#get-v1data-streamsid","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/data-streams#get-v1data-streamsid"},"security":[{"apiKey":["streams:read"]}],"x-scope":"streams:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchV1DataStreamsId","tags":["Data streams"],"summary":"Update a data stream","description":"Scope: `streams:write`. Reference: https://oyehello.ai/docs/api/reference/data-streams#patch-v1data-streamsid","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/data-streams#patch-v1data-streamsid"},"security":[{"apiKey":["streams:write"]}],"x-scope":"streams:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"status":{"type":"string","enum":["active","paused"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"fieldMap":{"type":"object","properties":{"phone":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"externalId":{"type":"string","minLength":1,"maxLength":200}}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteV1DataStreamsId","tags":["Data streams"],"summary":"Delete a data stream","description":"Scope: `streams:write`. Reference: https://oyehello.ai/docs/api/reference/data-streams#delete-v1data-streamsid","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/data-streams#delete-v1data-streamsid"},"security":[{"apiKey":["streams:write"]}],"x-scope":"streams:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data-streams/{id}/records":{"post":{"operationId":"postV1DataStreamsIdRecords","tags":["Data streams"],"summary":"Push records into a stream","description":"Scope: `streams:write`. Reference: https://oyehello.ai/docs/api/reference/data-streams#post-v1data-streamsidrecords","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/data-streams#post-v1data-streamsidrecords"},"security":[{"apiKey":["streams:write"]}],"x-scope":"streams:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object"},{"type":"array","items":{"type":"object"},"maxItems":500},{"type":"object","properties":{"records":{"type":"array","items":{"type":"object"},"maxItems":500}},"required":["records"],"additionalProperties":false}]}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getV1DataStreamsIdRecords","tags":["Data streams"],"summary":"List received records","description":"Scope: `streams:read`. Reference: https://oyehello.ai/docs/api/reference/data-streams#get-v1data-streamsidrecords","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/data-streams#get-v1data-streamsidrecords"},"security":[{"apiKey":["streams:read"]}],"x-scope":"streams:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"before","in":"query","required":false,"schema":{"type":"string"},"description":"nextBefore from the previous page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/streams":{"get":{"operationId":"getV1CampaignsIdStreams","tags":["Data streams"],"summary":"List a campaign's data streams","description":"Scope: `streams:read`. Reference: https://oyehello.ai/docs/api/reference/data-streams#get-v1campaignsidstreams","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/data-streams#get-v1campaignsidstreams"},"security":[{"apiKey":["streams:read"]}],"x-scope":"streams:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/streams/{streamId}":{"put":{"operationId":"putV1CampaignsIdStreamsStreamId","tags":["Data streams"],"summary":"Attach a data stream to a campaign","description":"Scope: `streams:write`. Reference: https://oyehello.ai/docs/api/reference/data-streams#put-v1campaignsidstreamsstreamid","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/data-streams#put-v1campaignsidstreamsstreamid"},"security":[{"apiKey":["streams:write"]}],"x-scope":"streams:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"streamId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variableMapping":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}},"backfillDays":{"default":0,"type":"integer","minimum":0,"maximum":90},"transliterate":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteV1CampaignsIdStreamsStreamId","tags":["Data streams"],"summary":"Detach a data stream from a campaign","description":"Scope: `streams:write`. Reference: https://oyehello.ai/docs/api/reference/data-streams#delete-v1campaignsidstreamsstreamid","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/data-streams#delete-v1campaignsidstreamsstreamid"},"security":[{"apiKey":["streams:write"]}],"x-scope":"streams:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"streamId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks":{"get":{"operationId":"getV1Webhooks","tags":["Webhooks"],"summary":"List webhook endpoints","description":"Scope: `webhooks:read`. Reference: https://oyehello.ai/docs/api/reference/webhooks#get-v1webhooks","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/webhooks#get-v1webhooks"},"security":[{"apiKey":["webhooks:read"]}],"x-scope":"webhooks:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postV1Webhooks","tags":["Webhooks"],"summary":"Create a webhook endpoint","description":"Scope: `webhooks:write`. Reference: https://oyehello.ai/docs/api/reference/webhooks#post-v1webhooks","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/webhooks#post-v1webhooks"},"security":[{"apiKey":["webhooks:write"]}],"x-scope":"webhooks:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"description":{"type":"string","maxLength":200},"events":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}},"agentIds":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}}},"required":["url"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}":{"get":{"operationId":"getV1WebhooksId","tags":["Webhooks"],"summary":"Get a webhook endpoint","description":"Scope: `webhooks:read`. Reference: https://oyehello.ai/docs/api/reference/webhooks#get-v1webhooksid","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/webhooks#get-v1webhooksid"},"security":[{"apiKey":["webhooks:read"]}],"x-scope":"webhooks:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchV1WebhooksId","tags":["Webhooks"],"summary":"Update a webhook endpoint","description":"Scope: `webhooks:write`. Reference: https://oyehello.ai/docs/api/reference/webhooks#patch-v1webhooksid","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/webhooks#patch-v1webhooksid"},"security":[{"apiKey":["webhooks:write"]}],"x-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"description":{"type":"string","maxLength":200},"events":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}},"agentIds":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}},"status":{"type":"string","enum":["active","disabled"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteV1WebhooksId","tags":["Webhooks"],"summary":"Delete a webhook endpoint","description":"Scope: `webhooks:write`. Reference: https://oyehello.ai/docs/api/reference/webhooks#delete-v1webhooksid","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/webhooks#delete-v1webhooksid"},"security":[{"apiKey":["webhooks:write"]}],"x-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}/rotate-secret":{"post":{"operationId":"postV1WebhooksIdRotateSecret","tags":["Webhooks"],"summary":"Rotate the signing secret","description":"Scope: `webhooks:write`. Reference: https://oyehello.ai/docs/api/reference/webhooks#post-v1webhooksidrotate-secret","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/webhooks#post-v1webhooksidrotate-secret"},"security":[{"apiKey":["webhooks:write"]}],"x-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}/test":{"post":{"operationId":"postV1WebhooksIdTest","tags":["Webhooks"],"summary":"Send a test event","description":"Scope: `webhooks:write`. Reference: https://oyehello.ai/docs/api/reference/webhooks#post-v1webhooksidtest","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/webhooks#post-v1webhooksidtest"},"security":[{"apiKey":["webhooks:write"]}],"x-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}/deliveries":{"get":{"operationId":"getV1WebhooksIdDeliveries","tags":["Webhooks"],"summary":"List deliveries","description":"Scope: `webhooks:read`. Reference: https://oyehello.ai/docs/api/reference/webhooks#get-v1webhooksiddeliveries","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/webhooks#get-v1webhooksiddeliveries"},"security":[{"apiKey":["webhooks:read"]}],"x-scope":"webhooks:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"status","in":"query","required":false,"schema":{"enum":["pending","succeeded","failed"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook-deliveries/{id}/replay":{"post":{"operationId":"postV1WebhookDeliveriesIdReplay","tags":["Webhooks"],"summary":"Replay a delivery","description":"Scope: `webhooks:write`. Reference: https://oyehello.ai/docs/api/reference/webhooks#post-v1webhook-deliveriesidreplay","externalDocs":{"url":"https://oyehello.ai/docs/api/reference/webhooks#post-v1webhook-deliveriesidreplay"},"security":[{"apiKey":["webhooks:write"]}],"x-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Secret API key. Scopes: agents:read, agents:write, calls:read, calls:write, campaigns:read, campaigns:write, contacts:read, contacts:write, contacts:erase, numbers:read, numbers:write, webhooks:read, webhooks:write, billing:read, knowledge:read, knowledge:write, chat:read, chat:write, compliance:read, streams:read, streams:write, nudges:read, nudges:write, whatsapp:read, whatsapp:write."}},"schemas":{"DataEnvelope":{"type":"object","properties":{"data":{},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/Warning"}}},"description":"Successful responses wrap their result in `data`; `warnings` appears only when something in the request went over a limit (POST /v1/scheduled-calls)."},"PlacedCall":{"type":"object","properties":{"placed":{"const":true},"interactionId":{"type":"string"},"providerCallId":{"type":["string","null"]},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/Warning"},"description":"Present only when something in the request went over a limit (see Warning)."}},"required":["placed","interactionId"],"additionalProperties":false},"Warning":{"type":"object","properties":{"code":{"enum":["variable_truncated","variables_over_limit"]},"field":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"meta":{"type":"object","description":"Details for some codes (e.g. nudge_in_flight: nudgeId)."}},"required":["error"]},"Nudge":{"type":"object","properties":{"id":{"type":"string","description":"ndg_…"},"agentId":{"type":"string"},"status":{"enum":["queued","scheduled","dialing","in_progress","finished"]},"result":{"enum":["connected","voicemail","opted_out","no_answer","busy","failed","blocked","expired","cancelled",null]},"statusReason":{"type":["string","null"],"description":"A stable snake_case code."},"blockReason":{"type":["string","null"]},"toNumber":{"type":"string"},"fromNumber":{"type":["string","null"]},"externalRef":{"type":["string","null"]},"variables":{"type":"object","additionalProperties":{"type":"string"}},"metadata":{"type":"object"},"outsideWindow":{"enum":["queue","reject"]},"scheduledAt":{"type":["string","null"],"format":"date-time"},"nextAttemptAt":{"type":["string","null"],"format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"retry":{"type":"object","properties":{"maxRetries":{"type":"integer"},"on":{"type":"array","items":{"enum":["no_answer","busy"]}},"delayMinutes":{"type":"integer"}},"required":[],"additionalProperties":false},"attempts":{"type":"integer"},"callId":{"type":["string","null"],"description":"intr_… - the call of the attempt being dialled, or of the last attempt once finished; null while queued or scheduled (also between retries)."},"livemode":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","agentId","status","result","toNumber","expiresAt","attempts","livemode","createdAt"],"additionalProperties":false},"NudgeAttempt":{"type":"object","properties":{"callId":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"answeredAt":{"type":["string","null"],"format":"date-time"},"endedAt":{"type":["string","null"],"format":"date-time"},"endCause":{"type":["string","null"]},"durationSeconds":{"type":["integer","null"]},"outcome":{"type":["string","null"]},"summary":{"type":["string","null"],"description":"null unless the key also holds calls:read."},"extracted":{"type":["object","null"],"description":"null unless the key also holds calls:read."}},"required":["callId","startedAt"],"additionalProperties":false},"WhatsAppMessage":{"type":"object","properties":{"messageId":{"type":["string","null"],"description":"wamsg_…"},"wamid":{"type":["string","null"]},"chatId":{"type":["string","null"],"description":"chatsess_… - the conversation, null for agent-less sends"},"threadId":{"type":"string"},"agentId":{"type":["string","null"]},"contactId":{"type":["string","null"]},"externalRef":{"type":["string","null"]},"direction":{"enum":["inbound","outbound"]},"source":{"type":"string"},"type":{"type":"string"},"text":{"type":["string","null"]},"template":{"type":["object","null"],"properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"language":{"type":["string","null"]},"category":{"type":["string","null"]}}},"media":{"type":["object","null"],"properties":{"type":{"type":"string"},"mimeType":{"type":["string","null"]},"messageId":{"type":"string"},"available":{"type":"boolean","description":"Inbound media stored by us: GET /v1/whatsapp/media/{messageId}."}}},"from":{"type":["string","null"]},"to":{"type":["string","null"]},"phoneNumberId":{"type":"string"},"customerUserId":{"type":["string","null"],"description":"The customer's WhatsApp user id (set when Meta identifies them by it; their number may be hidden)."},"customerUsername":{"type":["string","null"]},"status":{"enum":["queued","delivery_unknown","sent","delivered","read","failed","received","deleted"]},"timestamp":{"type":["string","null"],"format":"date-time"},"statuses":{"type":"object","properties":{"sentAt":{"type":["string","null"],"format":"date-time"},"deliveredAt":{"type":["string","null"],"format":"date-time"},"readAt":{"type":["string","null"],"format":"date-time"},"failedAt":{"type":["string","null"],"format":"date-time"}},"required":[],"additionalProperties":false},"error":{"type":"object","properties":{"code":{"type":["integer","null"]},"title":{"type":["string","null"]},"detail":{"type":["string","null"]}},"required":[],"additionalProperties":false},"livemode":{"type":"boolean","description":"Only on POST /v1/whatsapp/messages: false for a test key (simulated, nothing sent)."}},"required":["messageId","direction","type","status"],"additionalProperties":false},"WhatsAppStart":{"type":"object","properties":{"livemode":{"type":"boolean"},"chatId":{"type":["string","null"]},"threadId":{"type":["string","null"]},"contactId":{"type":["string","null"]},"sentInSession":{"type":"boolean","description":"true when onActiveSession was send_in_session and the template went into the open conversation (200)."},"metadata":{"type":"object","description":"Your metadata for the conversation (an open conversation keeps the metadata it was started with)."},"message":{"type":"object","properties":{"id":{"type":["string","null"]},"wamid":{"type":"string"},"status":{"const":"sent"}},"required":[],"additionalProperties":false}},"required":["livemode","chatId","sentInSession","message"],"additionalProperties":false},"WhatsAppConversation":{"type":"object","properties":{"id":{"type":"string","description":"chatsess_…"},"agentId":{"type":"string"},"contactId":{"type":["string","null"]},"externalRef":{"type":["string","null"]},"customer":{"type":"object","properties":{"phone":{"type":["string","null"]},"name":{"type":["string","null"]},"userId":{"type":["string","null"]},"username":{"type":["string","null"]}},"required":[],"additionalProperties":false},"business":{"type":"object","properties":{"phone":{"type":["string","null"]},"phoneNumberId":{"type":["string","null"]}},"required":[],"additionalProperties":false},"status":{"enum":["active","ended"]},"endCause":{"type":["string","null"]},"origin":{"type":["string","null"]},"messageCount":{"type":"integer"},"isTest":{"type":"boolean"},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":["string","null"],"format":"date-time"},"metadata":{"type":"object","description":"Your metadata from the start request."},"outcome":{"type":["object","null"],"properties":{"disposition":{"type":["string","null"]},"boardColumn":{"type":["string","null"]}}},"adReferral":{"type":["object","null"],"description":"The click-to-WhatsApp ad that started the conversation: sourceId, sourceType (ad or post), sourceUrl, headline, body, mediaType, imageUrl, videoUrl, thumbnailUrl, ctwaClid."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppMessage"},"description":"With ?include=messages (detail only)."},"analysis":{"type":"object","properties":{"summary":{"type":["string","null"]},"extracted":{"type":["object","null"]},"disposition":{"type":["string","null"]}},"required":[],"additionalProperties":false}},"required":["id","agentId","status","startedAt"],"additionalProperties":false},"WhatsAppTemplate":{"type":"object","properties":{"id":{"type":"string","description":"watpl_…"},"metaTemplateId":{"type":["string","null"]},"name":{"type":"string"},"language":{"type":"string"},"category":{"enum":["MARKETING","UTILITY","AUTHENTICATION"]},"parameterFormat":{"enum":["positional","named"]},"status":{"type":"string"},"rejectedReason":{"type":["string","null"]},"rejectionInfo":{"type":["object","null"]},"qualityScore":{"type":["string","null"]},"previousCategory":{"type":["string","null"]},"pendingCategory":{"type":["string","null"]},"categoryChangeAt":{"type":["string","null"],"format":"date-time"},"components":{"type":"array"},"variables":{"type":"array"},"editable":{"type":"boolean"},"allowance":{"type":"object","description":"Meta's edit allowance for an approved template (1 per 24 h, 10 per 30 days)."},"createdVia":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","language","category","status"],"additionalProperties":false},"WhatsAppNumber":{"type":"object","properties":{"id":{"type":"string"},"phoneNumberId":{"type":"string"},"phone":{"type":["string","null"],"description":"E.164"},"verifiedName":{"type":["string","null"]},"status":{"type":"string"},"qualityRating":{"type":["string","null"],"description":"GREEN, YELLOW, RED or UNKNOWN"},"tier":{"type":["string","null"],"description":"The business portfolio's messaging limit, shared by all its numbers (TIER_50, TIER_250, TIER_2K, TIER_10K, TIER_100K, TIER_UNLIMITED)."},"agentId":{"type":["string","null"],"description":"The WhatsApp agent answering this number."},"isDefault":{"type":"boolean","description":"The number POST /v1/whatsapp/messages sends from when `from` is omitted."}},"required":["id","phoneNumberId","status"],"additionalProperties":false}}}}