The block catalog

​

Every block you can place in a diagram: its params and rules, outputs, defaults, the plan tier it needs and the channels it runs on.

A block whose behaviour changes with a param is described as variants; selector says which params pick each.

The catalogue grows a family at a time, so a diagram may hold blocks it does not cover.

Query Parameters

  • Restrict to blocks available on a channel family. Not served yet: it is accepted and ignored, and the whole catalog comes back.

    values
    landbotwhatsappfacebookapichat

Responses

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/blocks
curl https://api.landbot.io/v0-alpha/blocks \
  --header 'Authorization: Token YOUR_AGENT_TOKEN'
{
  "data": [
    {
      "name": "ask_email",
      "title": "string",
      "description": "string",
      "can_be_welcome": true,
      "variants": [
        {
          "selector": [
            {
              "param": "string",
              "match": "equals",
              "matches_null": true,
              "value": null,
              "field": null
            }
          ],
          "params": [
            {
              "name": "string",
              "type": "string",
              "required": true,
              "has_default": true,
              "title": "string",
              "description": "string",
              "default": null,
              "rules": [
                {
                  "name": "non_empty",
                  "constraint": "^[a-z]+$",
                  "field": null
                }
              ],
              "item": {
                "type": "string",
                "rules": [
                  {
                    "name": "non_empty",
                    "constraint": "^[a-z]+$",
                    "field": null
                  }
                ],
                "fields": [
                  {
                    "name": "string",
                    "type": "string",
                    "required": true,
                    "has_default": true,
                    "title": "string",
                    "description": "string",
                    "default": "[Max Depth Exceeded]",
                    "rules": [],
                    "fields": [],
                    "one_of": [],
                    "read_when": []
                  }
                ],
                "item": {
                  "type": "string",
                  "rules": [],
                  "fields": [],
                  "one_of": []
                },
                "one_of": [
                  {
                    "name": "string",
                    "type": "string",
                    "required": true,
                    "has_default": true,
                    "title": "string",
                    "description": "string",
                    "default": "[Max Depth Exceeded]",
                    "rules": [],
                    "fields": [],
                    "one_of": [],
                    "read_when": []
                  }
                ]
              },
              "fields": [
                {
                  "name": "string",
                  "type": "string",
                  "required": true,
                  "has_default": true,
                  "title": "string",
                  "description": "string",
                  "default": null,
                  "rules": [
                    {
                      "name": "non_empty",
                      "constraint": "^[a-z]+$",
                      "field": null
                    }
                  ],
                  "item": {
                    "type": "string",
                    "rules": [],
                    "fields": [],
                    "item": {},
                    "one_of": []
                  },
                  "one_of": [
                    {
                      "name": "string",
                      "type": "string",
                      "required": true,
                      "has_default": true,
                      "title": "string",
                      "description": "string",
                      "default": "[Max Depth Exceeded]",
                      "rules": [],
                      "item": {},
                      "read_when": []
                    }
                  ],
                  "read_when": [
                    {
                      "param": "string",
                      "match": "equals",
                      "matches_null": true,
                      "value": "[Max Depth Exceeded]",
                      "field": null
                    }
                  ]
                }
              ],
              "one_of": [
                {
                  "name": "string",
                  "type": "string",
                  "required": true,
                  "has_default": true,
                  "title": "string",
                  "description": "string",
                  "default": null,
                  "rules": [
                    {
                      "name": "non_empty",
                      "constraint": "^[a-z]+$",
                      "field": null
                    }
                  ],
                  "item": {
                    "type": "string",
                    "rules": [],
                    "fields": [],
                    "item": {},
                    "one_of": []
                  },
                  "fields": [
                    {
                      "name": "string",
                      "type": "string",
                      "required": true,
                      "has_default": true,
                      "title": "string",
                      "description": "string",
                      "default": "[Max Depth Exceeded]",
                      "rules": [],
                      "item": {},
                      "read_when": []
                    }
                  ],
                  "read_when": [
                    {
                      "param": "string",
                      "match": "equals",
                      "matches_null": true,
                      "value": "[Max Depth Exceeded]",
                      "field": null
                    }
                  ]
                }
              ],
              "read_when": [
                {
                  "param": "string",
                  "match": "equals",
                  "matches_null": true,
                  "value": null,
                  "field": null
                }
              ]
            }
          ],
          "outputs": [
            {
              "id": "$success",
              "title": "string"
            }
          ],
          "output_derivations": [
            {
              "param": "string",
              "id_field": "string",
              "id_prefix": "string",
              "title_field": "string",
              "heading_field": "string"
            }
          ],
          "param_derivations": [
            {
              "kind": "compiled_formula",
              "param": "string",
              "source": "string",
              "until": "string"
            }
          ],
          "required_tier": "sandbox",
          "channel_restriction": [
            "landbot"
          ],
          "answer": "email",
          "interaction": "waits_for_input",
          "nests_a_diagram": true
        }
      ]
    }
  ]
}