Browse the docs

Agent channels

Agent channels in Allpage: its screens, what you can do there and its operations.

Availability. Works when the business has it turned on and its plan includes it. Otherwise its tools answer needs (kind module) with how to turn it on: business.useTool, or a plan that includes it.

Screens

  • Channels (/channels)

What you can do

  • Answer texts, WhatsApp and email with your assistant: the assistant asks you first
  • Stop answering texts, WhatsApp or email: the assistant asks you first
  • Connect WhatsApp: only you can do it, on its screen
  • Connect your number or email: only you can do it, on its screen
  • Enter your code: only you can do it, on its screen
  • Disconnect your number or email: only you can do it, on its screen
  • Choose what your assistant does by text, WhatsApp and email: only you can do it, on its screen

For apps

Tools

  • channels_turnOn (Answer texts, WhatsApp and email with your assistant): customers see it: waits for the owner’s approval unless they chose Just do it for your app
  • channels_turnOff (Stop answering texts, WhatsApp or email): customers see it: waits for the owner’s approval unless they chose Just do it for your app

Reads

  • channels_status (Your assistant by text, WhatsApp and email)
  • channels_summary (What’s going on)

Only the owner, in Allpage

  • Connect WhatsApp
  • Connect your number or email
  • Enter your code
  • Disconnect your number or email
  • Choose what your assistant does by text, WhatsApp and email

The owner’s screens

  • Channels (/channels)

Operations

Each one's input and output, as JSON Schema. Ids are typed (typed ids).

channels.status

Your assistant by text, WhatsApp and email

Kind
Read
Tool
channels_status
Scope
channels:read
Reached by
API, MCP, ChatGPT

Read-only.

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
Output
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {
          "type": "object",
          "properties": {
            "channels": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "enum": [
                      "sms",
                      "whatsapp",
                      "email",
                      "instagram",
                      "messenger"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "active",
                      "off",
                      "not_set_up"
                    ],
                    "description": "`not_set_up` until the owner turns it on."
                  },
                  "address": {
                    "description": "The number, email address, Instagram account or Facebook Page people write to.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "reason": {
                    "description": "Why it’s waiting or off, in the owner’s words.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "autonomy": {
                    "type": "string",
                    "enum": [
                      "same",
                      "auto",
                      "ask",
                      "never"
                    ],
                    "description": "`same` follows the assistant’s settings in the app."
                  }
                },
                "required": [
                  "id",
                  "status",
                  "address",
                  "reason",
                  "autonomy"
                ],
                "additionalProperties": false
              }
            },
            "number": {
              "description": "The business’s texting number, which WhatsApp uses too.",
              "type": [
                "string",
                "null"
              ]
            },
            "whatsapp": {
              "type": "object",
              "properties": {
                "available": {
                  "type": "boolean",
                  "description": "Whether Meta’s signup is set up on this deployment."
                },
                "appId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "configId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "state": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "pending",
                        "active",
                        "failed"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "available",
                "appId",
                "configId",
                "state",
                "reason"
              ],
              "additionalProperties": false
            },
            "emailAvailable": {
              "type": "boolean"
            },
            "directMessages": {
              "type": "object",
              "properties": {
                "instagram": {
                  "type": "boolean"
                },
                "messenger": {
                  "type": "boolean"
                }
              },
              "required": [
                "instagram",
                "messenger"
              ],
              "additionalProperties": false,
              "description": "Whether Instagram and Messenger can be connected on this deployment (Integrations)."
            },
            "mine": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^chc_[0-9a-hjkmnp-tv-z]{26}$",
                    "description": "A channel contact id: chc_ and 26 letters and digits."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "phone",
                      "email"
                    ]
                  },
                  "value": {
                    "type": "string"
                  },
                  "verified": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "value",
                  "verified"
                ],
                "additionalProperties": false
              },
              "description": "Your own numbers and emails that reach the assistant as you."
            },
            "version": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991,
              "description": "Send it back with setAutonomy."
            }
          },
          "required": [
            "channels",
            "number",
            "whatsapp",
            "emailAvailable",
            "directMessages",
            "mine",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "result"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "refused"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "needs"
        },
        "kind": {
          "type": "string",
          "enum": [
            "module",
            "portal",
            "business",
            "limit",
            "paused",
            "reauth"
          ]
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "kind",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": {}
    }
  ]
}

channels.summary

What’s going on

Kind
Read
Tool
channels_summary
Scope
channels:read
Reached by
API, MCP

Read-only.

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
Output
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "facts": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "One-line facts, e.g. \"3 bookings today\"."
            },
            "attention": {
              "description": "Things that need the owner, each with a plain reason.",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  },
                  "href": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "text"
                ],
                "additionalProperties": false
              }
            },
            "happening": {
              "description": "What’s on today, each at its time.",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "at": {
                    "type": "number",
                    "description": "Epoch milliseconds."
                  },
                  "text": {
                    "type": "string"
                  },
                  "href": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "at",
                  "text"
                ],
                "additionalProperties": false
              }
            },
            "metrics": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "value": {
                    "type": "number"
                  },
                  "prior": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "count",
                      "money"
                    ]
                  },
                  "href": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "label",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "title",
            "facts"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "result"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "refused"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "needs"
        },
        "kind": {
          "type": "string",
          "enum": [
            "module",
            "portal",
            "business",
            "limit",
            "paused",
            "reauth"
          ]
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "kind",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": {}
    }
  ]
}

channels.turnOff

Stop answering texts, WhatsApp or email

Kind
Change
Tool
channels_turnOff
Scope
channels:write
Reached by
API, MCP

customers see it: waits for the owner’s approval unless they chose Just do it for your app

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "channel": {
      "type": "string",
      "enum": [
        "sms",
        "whatsapp",
        "email",
        "instagram",
        "messenger"
      ]
    }
  },
  "required": [
    "channel"
  ],
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

channels.turnOn

Answer texts, WhatsApp and email with your assistant

Kind
Change
Tool
channels_turnOn
Scope
channels:write
Reached by
API, MCP, ChatGPT

customers see it: waits for the owner’s approval unless they chose Just do it for your app

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "channels": {
      "minItems": 1,
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "sms",
          "whatsapp",
          "email",
          "instagram",
          "messenger"
        ]
      }
    }
  },
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}