{
 "openapi": "3.1.0",
 "info": {
  "title": "Connected Channels (CRM)",
  "version": "20261030b",
  "description": "Teams, Zoom, Twilio, a contact centre, an email provider — what this company can actually reach a customer through, and what each one is capable of. Microsoft Teams calls, meetings and presence are set up here: register an app in Microsoft Entra, grant it the Graph application permissions Calls.Initiate.All, OnlineMeetings.ReadWrite.All, Presence.Read.All and CallRecords.Read.All with admin consent, enter its tenant id and client id below, save its client secret with \"Set the credential\", then press \"Test it\" — the test names anything still missing. TRANXACT starts the call or meeting and logs it; the conversation itself happens in Teams."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "channel-connections": {
    "type": "object",
    "required": [
     "platform_code",
     "code",
     "name"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "platform_code": {
      "type": "string",
      "description": "Platform"
     },
     "code": {
      "type": "string",
      "description": "Code"
     },
     "name": {
      "type": "string",
      "description": "Name"
     },
     "name_local": {
      "type": "string",
      "description": "Local name"
     },
     "external_tenant": {
      "type": "string",
      "description": "Tenant id"
     },
     "external_account": {
      "type": "string",
      "description": "Account or audience id"
     },
     "from_number": {
      "type": "string",
      "description": "Outbound number"
     },
     "from_email": {
      "type": "string",
      "description": "From address"
     },
     "from_name": {
      "type": "string",
      "description": "From name"
     },
     "reply_to": {
      "type": "string",
      "description": "Reply to"
     },
     "base_url": {
      "type": "string",
      "description": "Base address"
     },
     "auth_type": {
      "type": "string",
      "description": "Authentication"
     },
     "client_id": {
      "type": "string",
      "description": "Client id"
     },
     "credential_cipher": {
      "type": "string",
      "description": "Credential cipher",
      "readOnly": true
     },
     "credential_last4": {
      "type": "string",
      "description": "Credential last4",
      "readOnly": true
     },
     "token_expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Token expires at",
      "readOnly": true
     },
     "scopes": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "Scopes"
     },
     "webhook_path": {
      "type": "string",
      "description": "Webhook path"
     },
     "webhook_secret_cipher": {
      "type": "string",
      "description": "Webhook secret cipher",
      "readOnly": true
     },
     "recording_enabled": {
      "type": "boolean",
      "description": "Record calls"
     },
     "recording_announcement": {
      "type": "string",
      "description": "What the caller is told"
     },
     "transcription_enabled": {
      "type": "boolean",
      "description": "Transcribe"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "enum": [
       "draft",
       "testing",
       "active",
       "suspended",
       "error",
       "expired"
      ]
     },
     "last_checked_at": {
      "type": "string",
      "format": "date-time",
      "description": "Last checked at",
      "readOnly": true
     },
     "last_error": {
      "type": "string",
      "description": "Last error",
      "readOnly": true
     },
     "daily_send_cap": {
      "type": "integer",
      "description": "Most sends a day"
     },
     "rate_per_minute": {
      "type": "integer",
      "description": "Most a minute"
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "is_active": {
      "type": "boolean",
      "description": "Active"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/crm/channel-connections": {
   "get": {
    "summary": "list channel-connections",
    "operationId": "list_channel_connections_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create channel-connections",
    "operationId": "create_channel_connections_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/crm/channel-connections/{id}": {
   "get": {
    "summary": "get channel-connections",
    "operationId": "get_channel_connections_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change channel-connections",
    "operationId": "change_channel_connections_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete channel-connections",
    "operationId": "delete_channel_connections_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/crm/channel-connections/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_channel_connections_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}