Skip to main content
POST
/
router
/
create
/
{instance}
Create a routing rule
curl --request POST \
  --url https://api.zapthinker.com/router/create/{instance} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "name": "<string>",
  "conditions": {
    "textMatch": {
      "type": "contains",
      "value": "<string>",
      "caseInsensitive": true
    },
    "timeRange": {
      "start": "<string>",
      "end": "<string>",
      "timezone": "<string>"
    },
    "daysOfWeek": {
      "days": [
        3
      ]
    },
    "jidType": "contact",
    "fromMe": true,
    "triggerOverride": true,
    "specificJids": [
      "<string>"
    ],
    "excludeJids": [
      "<string>"
    ]
  },
  "description": "<string>",
  "enabled": true,
  "priority": 500,
  "targetBotId": "<string>",
  "fallbackChain": [
    "<string>"
  ]
}
'
{}

Documentation Index

Fetch the complete documentation index at: https://docs.zapthinker.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

apikey
string
header
required

Your authorization key header

Path Parameters

instance
string
required

Nome da instância

Body

application/json
name
string
required

Nome da regra

conditions
object
required

Condições de roteamento

description
string
enabled
boolean
default:true
priority
integer

Prioridade (maior = avaliada primeiro)

Required range: 0 <= x <= 1000
targetBotId
string

ID do bot alvo

fallbackChain
string[]

Chain de fallback de integrações

Response

Regra criada com sucesso

The response is of type object.