Skip to content

Endpoints ​

Endpoints define the structured data your application can submit to Convosite and the actions Convosite should run after that data has been accepted.

Use an endpoint when a conversational experience needs to do something rather than only display a Block. Typical examples include contact forms, lead capture, quote requests, bookings, CRM updates, and calls to your own APIs.

The basic model ​

An endpoint has two parts:

  1. Props describe and validate the input your application may submit.
  2. Actions describe what Convosite should do with a valid submission.
text
Your application
      │
      │ endpoint input
      ▼
Convosite Endpoint
      │
      ├── validate props
      │
      └── queue active actions
                 │
                 ▼
              Webhook

Endpoint definitions live in your project alongside your Blocks and are pushed to Convosite with the CLI.

A minimal endpoint ​

json
{
  "key": "contact",
  "name": "Contact form",
  "active": true,
  "props": [
    {
      "key": "name",
      "label": "Name",
      "type": "text",
      "required": true
    },
    {
      "key": "email",
      "label": "Email",
      "type": "email",
      "required": true
    }
  ],
  "actions": []
}

This endpoint accepts a name and email address, but it does not yet perform an external action.

Endpoints use the same field system as Blocks ​

The props array uses the same field definitions and validation rules as Blocks. This means you can use types such as text, email, select, group, and repeater without learning a second schema format.

See Field Types and Validation for the complete field system.

Actions run asynchronously ​

After valid endpoint input is received, Convosite queues each active action in its configured order. The request does not wait for an external webhook to finish before returning successfully.

This keeps your application's submission flow independent from the response time of third-party services.

TIP

An endpoint can contain more than one action. For example, one submission could be sent to your CRM and to an internal API.

Next steps ​

Convosite developer documentation