Request body
{
"content": {
"application/json": {
"schema": {
"allOf": [
{
"anyOf": [
{
"required": [
"provider",
"external_reference"
]
},
{
"required": [
"account_id"
]
}
]
},
{
"anyOf": [
{
"required": [
"success_redirect_url"
]
},
{
"required": [
"webhook_id"
]
},
{
"required": [
"opener_origin"
]
}
]
}
],
"properties": {
"account_id": {
"description": "Reconnect an existing account in place (mode=reconnect); provider and external_reference are resolved from the account",
"format": "uuid",
"type": "string"
},
"allowed_success_redirect_origin": {
"format": "uri",
"type": "string"
},
"auth_mode": {
"credentials for unofficial instagram)": null,
"description": "Defaults per provider (qr for socket messaging",
"enum": [
"qr",
"phone",
"oauth",
"meta_signup",
"credentials"
],
"meta_signup for whatsapp_business": null,
"oauth for linkedin/instagram_business/google/microsoft": null
},
"capabilities": {
"description": "Productivity providers only - the capability set to request OAuth scopes for; defaults to project capability_selections",
"items": {
"maxLength": 100,
"type": "string"
},
"maxItems": 100,
"type": "array"
},
"client_state": {
"maxLength": 2048,
"type": "string"
},
"expires_in_seconds": {
"default": 900,
"maximum": 3600,
"minimum": 60,
"type": "integer"
},
"external_reference": {
"description": "Stable caller/team connection identity used for recovery instead of duplication; required unless account_id is provided",
"maxLength": 255,
"type": "string"
},
"opener_origin": {
"format": "uri",
"type": "string"
},
"provider": {
"description": "Required unless account_id is provided",
"enum": [
"whatsapp",
"telegram",
"linkedin",
"whatsapp_business",
"instagram_business",
"instagram",
"google",
"microsoft"
]
},
"success_redirect_url": {
"format": "uri",
"type": "string"
},
"webhook_id": {
"description": "Existing signed Kairos webhook; arbitrary callback URLs are rejected",
"format": "uuid",
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
}