Creates an enrollment session for 1-50 existing or new clients against a published offer version and returns one owner approval link per new client. Requires an agency owner, admin or operator with access to each existing client, and an idempotency key; a replay returns the session without the links. It sends no email and installs nothing.
View input schema
{
"type": "object",
"properties": {
"partnerId": {
"type": "string",
"format": "uuid",
"description": "The agency (partner) workspace ID."
},
"offerVersionId": {
"type": "string",
"format": "uuid",
"description": "The published offer version to enroll clients in."
},
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"businessId": {
"type": "string",
"format": "uuid"
},
"newClient": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"externalRef": {
"type": "string",
"minLength": 1,
"maxLength": 150
},
"ownerEmail": {
"type": "string",
"format": "email",
"maxLength": 254
}
},
"required": [
"name",
"externalRef",
"ownerEmail"
],
"additionalProperties": false
},
"expectedRevision": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
{
"type": "null"
}
]
},
"facts": {
"type": "object",
"properties": {
"schemaVersion": {
"const": 1,
"type": "number"
},
"profile": {
"type": "object",
"properties": {
"timezone": {
"type": "string",
"maxLength": 100
},
"services": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"maxItems": 20
},
"serviceArea": {
"type": "string",
"maxLength": 500
},
"hours": {
"type": "string",
"maxLength": 1000
},
"instructions": {
"type": "string",
"maxLength": 3000
},
"website": {
"anyOf": [
{
"const": "",
"type": "string"
},
{
"type": "string",
"format": "uri",
"maxLength": 1000
}
]
},
"reviewUrl": {
"anyOf": [
{
"const": "",
"type": "string"
},
{
"type": "string",
"format": "uri",
"maxLength": 1000
}
]
}
},
"required": [
"timezone",
"services",
"serviceArea",
"hours",
"instructions",
"website",
"reviewUrl"
],
"additionalProperties": false
},
"discovery": {
"type": "object",
"properties": {
"observations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 3000
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string",
"maxLength": 500
},
"maxItems": 30
}
]
},
"sourceRef": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"observedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"state": {
"type": "string",
"enum": [
"unknown",
"suggestion",
"conflict",
"owner_confirmed"
]
},
"revision": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"ownerRole": {
"type": "string",
"enum": [
"client_owner",
"agency_operator",
"provider"
]
}
},
"required": [
"field",
"value",
"sourceRef",
"observedAt",
"state",
"revision",
"ownerRole"
],
"additionalProperties": false
},
"maxItems": 150
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"serviceArea": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"languages": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"minItems": 1,
"maxItems": 10
},
"timezone": {
"type": "string",
"maxLength": 100
},
"reviewUrl": {
"anyOf": [
{
"type": "string",
"format": "uri",
"maxLength": 1000
},
{
"const": "",
"type": "string"
}
]
}
},
"required": [
"id",
"label",
"serviceArea",
"languages",
"timezone",
"reviewUrl"
],
"additionalProperties": false
},
"maxItems": 20
},
"primaryLocationId": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
},
"tools": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"purpose": {
"type": "string",
"enum": [
"voice",
"recovery",
"reviews",
"email",
"crm",
"booking",
"reporting"
]
},
"decision": {
"type": "string",
"enum": [
"unknown",
"retain",
"integrate",
"coexist",
"replace"
]
},
"executor": {
"type": "string",
"enum": [
"unknown",
"kai",
"existing",
"human"
]
},
"connectionRef": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"name",
"purpose",
"decision",
"executor",
"connectionRef"
],
"additionalProperties": false
},
"maxItems": 30
}
},
"required": [
"observations",
"locations",
"primaryLocationId",
"tools"
],
"additionalProperties": false
},
"intakeCoverage": {
"type": "object",
"properties": {
"timezone": {
"type": "string",
"maxLength": 100
},
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"day": {
"type": "integer",
"minimum": 0,
"maximum": 6
},
"start": {
"type": "string",
"pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
},
"end": {
"type": "string",
"pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
}
},
"required": [
"day",
"start",
"end"
],
"additionalProperties": false
},
"maxItems": 21
},
"afterHours": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"timezone",
"schedule",
"afterHours"
],
"additionalProperties": false
},
"qualification": {
"type": "array",
"items": {
"type": "object",
"properties": {
"question": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"instruction": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"question",
"instruction"
],
"additionalProperties": false
},
"maxItems": 20
},
"routing": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"owner_notification",
"crm"
]
},
"destination": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"destinationPhone": {
"type": "string",
"pattern": "^\\+[1-9][0-9]{7,14}$"
},
"connectionRef": {
"type": "string",
"maxLength": 200
},
"instruction": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"kind",
"destination",
"instruction"
],
"additionalProperties": false
},
"fallback": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"callback",
"transfer"
]
},
"instruction": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"phone": {
"type": "string",
"pattern": "^\\+[1-9][0-9]{7,14}$"
}
},
"required": [
"mode",
"instruction"
],
"additionalProperties": false
},
"booking": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"instruction": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"enabled",
"instruction"
],
"additionalProperties": false
},
"faqs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"question": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"answer": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"question",
"answer"
],
"additionalProperties": false
},
"maxItems": 30
},
"reporting": {
"type": "object",
"properties": {
"timezone": {
"type": "string",
"maxLength": 100
},
"recipientUserIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"maxItems": 20
}
},
"required": [
"timezone",
"recipientUserIds"
],
"additionalProperties": false
}
},
"required": [
"schemaVersion",
"profile"
],
"additionalProperties": false
}
},
"required": [
"expectedRevision",
"facts"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 50,
"description": "One entry per client: either businessId (existing client) or newClient (name, externalRef, ownerEmail), plus expectedRevision and intake facts."
},
"ownerEmail": {
"type": "string",
"format": "email",
"maxLength": 254,
"description": "Optional default owner email."
},
"idempotencyKey": {
"type": "string",
"maxLength": 150,
"description": "Stable key for this request; reuse it when retrying the same request."
}
},
"required": [
"partnerId",
"offerVersionId",
"entries"
],
"additionalProperties": false
}