Replace Routing Form Routes
Replace the routes of a routing form with the Zeeg API, sending each answer to a scheduling page, a team, a URL or a message, with an optional fallback.
curl --request PUT \
--url https://api.zeeg.me/v2/routing-forms/{id}/routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"routes": [
{
"type": "EVENT_TYPE",
"eventTypeId": "80f46bf5-eb01-4c07-960e-a9a3e18aae5e",
"rules": {
"all": [
{
"inputId": "f7c82298-6dd9-43bd-98e4-c437b5c0ae47",
"operator": "is_any_of",
"values": [
"50-200 employees"
]
}
]
}
}
]
}
'{
"success": true,
"status": 200,
"routingForm": {
"id": "f1cbafc4-b646-4cf9-af29-193491b555d9",
"name": "Inbound Lead Qualification",
"slug": "inbound-lead-qual",
"url": "https://zeeg.me/RF/inbound-lead-qual",
"isActive": true,
"headline": "Tell us about your team",
"body": null,
"submitBtnText": "Continue",
"styleSettings": {
"bgColor": "#ffffff",
"buttonBgColor": "#1f2937",
"buttonTextColor": "#ffffff"
},
"createdAt": "2026-04-01T09:12:44+00:00",
"updatedAt": "2026-04-11T11:31:07+00:00",
"inputs": [],
"routes": [
{
"id": "c4a1e0d2-5f39-4a7b-8f11-2b6d0c9e7a84",
"type": "EVENT_TYPE",
"isFallback": false,
"order": 0,
"customUrl": null,
"headline": null,
"body": null,
"eventType": {
"id": "80f46bf5-eb01-4c07-960e-a9a3e18aae5e",
"title": "30-Minute Discovery Call",
"slug": "30min-discovery-call",
"uri": "https://api.zeeg.me/v2/event-types/80f46bf5-eb01-4c07-960e-a9a3e18aae5e"
},
"team": null,
"rules": {
"all": [
{
"inputId": "f7c82298-6dd9-43bd-98e4-c437b5c0ae47",
"operator": "is_any_of",
"values": [
"50-200 employees"
]
}
]
}
},
{
"id": "2e7f4b90-8a13-4c6d-b5e2-7f0a9c3d1e64",
"type": "CUSTOM_PAGE",
"isFallback": true,
"order": 1,
"customUrl": null,
"headline": "Thank you",
"body": "A member of the team contacts you within one working day.",
"eventType": null,
"team": null,
"rules": []
}
]
}
}The write covers the whole list
routes holds the complete route list. This endpoint is not an append and not a patch.
- An entry that carries an
idupdates that stored route in place. - An entry without an
idcreates a route. - A stored route that the body leaves out is deleted.
routes must be present. A body without it answers 422, so a mistyped key never deletes every route.
Array position sets the route order. The routing form reads the routes in that order and takes the first route whose conditions hold.
The fallback
fallback is optional. It is the destination that takes every submission that matches no route.
If the body names no fallback, the routing form keeps its stored fallback destination. Replacing the route list never moves where an unmatched submission goes.
fallback out unless you mean to change it.The rule tree
A route carriesrules, the condition tree that selects it. A group holds child nodes under all for AND, or under any for OR. A child is a group or a condition.
{
"all": [
{
"inputId": "f7c82298-6dd9-43bd-98e4-c437b5c0ae47",
"operator": "is_any_of",
"values": ["50-200 employees"]
}
]
}
inputId, the same key that the read endpoints return.
The operator is one of equals, does_not_equal, is_any_of, is_not_any_of, contains, does_not_contain, starts_with, ends_with, greater_than, greater_than_or_equal, less_than, less_than_or_equal, is_empty or is_not_empty. equals and does_not_equal take exactly one value. The list operators take 1 to 500 values. The ordering operators take exactly one numeric value and match only a numeric answer. is_empty and is_not_empty take none.
Destinations
type takes EVENT_TYPE, TEAM_PAGE, URL or CUSTOM_PAGE. Each type reads its own fields: eventTypeId, teamId, customUrl with submissionParamsForwarding, or headline with body.
400, and the whole write is refused. A rule that names a question of another routing form answers 400 as well.404, not 422. A routing form outside your workspace answers 404 as well.Authorizations
Path Parameters
UUID of the routing form.
Body
The body that replaces the routes of a routing form.
The complete route list. Array position sets the route order, and the routing form takes the first route whose conditions hold.
Hide child attributes
Hide child attributes
The kind of destination. EVENT_TYPE opens a scheduling page, TEAM_PAGE opens the page of a team, URL redirects to an external address, and CUSTOM_PAGE shows a message inside the routing form.
EVENT_TYPE, URL, CUSTOM_PAGE, TEAM_PAGE "EVENT_TYPE"
A node of the condition tree that selects a route. A group holds child nodes under all for AND, or under any for OR. A child is a group or a condition. The tree nests at most 10 levels deep.
Hide child attributes
Hide child attributes
Every child node must hold.
One condition of a rule tree. It names a question of the same routing form with inputId.
Hide child attributes
Hide child attributes
Id of the question that the condition reads. The question belongs to the same routing form.
"f7c82298-6dd9-43bd-98e4-c437b5c0ae47"
The comparison. equals and does_not_equal take exactly one value. The list operators take 1 to 500 values. The ordering operators greater_than, greater_than_or_equal, less_than and less_than_or_equal take exactly one numeric value and match only a numeric answer. is_empty and is_not_empty take none.
equals, does_not_equal, is_any_of, is_not_any_of, contains, does_not_contain, starts_with, ends_with, greater_than, greater_than_or_equal, less_than, less_than_or_equal, is_empty, is_not_empty "is_any_of"
The values that the operator compares the answer against. Each value is a non-empty string or an integer.
["50-200 employees"]
One child node must hold.
One condition of a rule tree. It names a question of the same routing form with inputId.
Hide child attributes
Hide child attributes
Id of the question that the condition reads. The question belongs to the same routing form.
"f7c82298-6dd9-43bd-98e4-c437b5c0ae47"
The comparison. equals and does_not_equal take exactly one value. The list operators take 1 to 500 values. The ordering operators greater_than, greater_than_or_equal, less_than and less_than_or_equal take exactly one numeric value and match only a numeric answer. is_empty and is_not_empty take none.
equals, does_not_equal, is_any_of, is_not_any_of, contains, does_not_contain, starts_with, ends_with, greater_than, greater_than_or_equal, less_than, less_than_or_equal, is_empty, is_not_empty "is_any_of"
The values that the operator compares the answer against. Each value is a non-empty string or an integer.
["50-200 employees"]
{
"all": [
{
"inputId": "f7c82298-6dd9-43bd-98e4-c437b5c0ae47",
"operator": "is_any_of",
"values": ["50-200 employees"]
}
]
}
The id of a stored route, which the write then updates in place. Leave the id out to create a route.
"c4a1e0d2-5f39-4a7b-8f11-2b6d0c9e7a84"
Id of the event type that an EVENT_TYPE route opens. The event type must sit in your own organization.
40"80f46bf5-eb01-4c07-960e-a9a3e18aae5e"
Id of the team that a TEAM_PAGE route opens. The team must sit in your own organization.
40"3d9b1a77-2c58-4e6a-9f30-8b1c5d4e2f6a"
Destination address of a URL route.
500"https://example.com/enterprise"
A URL route needs this field. Set it to true to append the answers to the destination as query parameters.
true
Headline of a CUSTOM_PAGE route. It holds rich text of at most 200 visible characters.
"Thank you"
Body text of a CUSTOM_PAGE route. It holds rich text of at most 2000 visible characters.
"A member of the team contacts you within one working day."
The fallback destination of a routing form. It takes every submission that matches no route, so it carries no rules.
Hide child attributes
Hide child attributes
The kind of destination.
EVENT_TYPE, URL, CUSTOM_PAGE, TEAM_PAGE "CUSTOM_PAGE"
Id of the event type that an EVENT_TYPE fallback opens. The event type must sit in your own organization.
40null
Id of the team that a TEAM_PAGE fallback opens. The team must sit in your own organization.
40null
Destination address of a URL fallback. It must be a valid URL.
null
Set it to true to append the answers to a URL destination as query parameters.
false
Headline of a CUSTOM_PAGE fallback. It holds rich text of at most 200 visible characters.
"Thank you"
Body text of a CUSTOM_PAGE fallback. It holds rich text of at most 2000 visible characters.
"A member of the team contacts you within one working day."
Response
OK
true
200
A routing form with its questions and its routes, as returned when you fetch one routing form.
Hide child attributes
Hide child attributes
"f1cbafc4-b646-4cf9-af29-193491b555d9"
The internal name of the routing form.
"Inbound Lead Qualification"
The slug that addresses the routing form in its public URL.
"inbound-lead-qual"
The public address at which an invitee opens the routing form.
"https://zeeg.me/RF/inbound-lead-qual"
An inactive routing form accepts no submission.
true
The headline that the routing form shows above the questions.
"Tell us about your team"
The body text that the routing form shows below the headline.
null
The label on the submit button of the routing form.
"Continue"
The colours of the public routing form page. Each value is a CSS colour of at most 20 characters, or null when the routing form sets no colour. A response always carries the object with all three keys. The write endpoints accept the same shape, so a routing form that you read goes straight back to PATCH /routing-forms/{id} without reshaping.
Hide child attributes
Hide child attributes
Background colour of the page.
20"#ffffff"
Background colour of the submit button.
20"#1f2937"
Text colour of the submit button.
20"#ffffff"
Time at which the routing form was created, in UTC.
"2026-04-01T09:12:44+00:00"
Time of the last change to the routing form, in UTC.
"2026-04-10T08:30:00+00:00"
The questions of the routing form, which the invitee answers in the given order.
Hide child attributes
Hide child attributes
"f7c82298-6dd9-43bd-98e4-c437b5c0ae47"
The question text that the invitee reads.
"What is your company size?"
The answer control that the routing form shows for this question.
TEXT_INPUT, TEXTAREA, SELECT, RADIO_INPUT, EMAIL, PHONE_NUMBER, NUMBER_INPUT, CRM_ATTRIBUTE "SELECT"
Position of the question in the routing form. The first question carries 0.
0
True when the invitee must answer the question.
true
The routing form hides the question when this is false.
true
The selectable values of the question. A SELECT or RADIO_INPUT question carries plain strings. A CRM_ATTRIBUTE question carries the option objects of the CRM attribute. Every other type carries an empty array.
["1-10 employees", "50-200 employees"]
The CRM attribute that a question maps onto. It is null when the question maps onto no attribute.
The routes of the routing form. Exactly one route is the fallback.
Hide child attributes
Hide child attributes
"c4a1e0d2-5f39-4a7b-8f11-2b6d0c9e7a84"
The kind of destination. EVENT_TYPE opens a scheduling page, TEAM_PAGE opens the page of a team, URL redirects to an external address, and CUSTOM_PAGE shows a message inside the routing form.
EVENT_TYPE, URL, CUSTOM_PAGE, TEAM_PAGE "EVENT_TYPE"
The fallback route takes every submission that matches no other route.
false
Position of the route in the routing form. The first route carries 0. The routing form takes the first route whose conditions hold.
0
Destination address of a URL route. It is null for every other type.
null
Headline of a CUSTOM_PAGE route.
"Thank you"
Body text of a CUSTOM_PAGE route.
"A member of the team contacts you within one working day."
The event type that a route or a submission points at. It is null when no event type is set.
Hide child attributes
Hide child attributes
"80f46bf5-eb01-4c07-960e-a9a3e18aae5e"
"30-Minute Discovery Call"
"30min-discovery-call"
Address of the event type in this API.
"https://api.zeeg.me/v2/event-types/80f46bf5-eb01-4c07-960e-a9a3e18aae5e"
The condition tree that selects this route. A node is either a group or a condition. A group holds child nodes under any for OR, or under all for AND. A condition holds inputId, operator and values. The operator is one of equals, does_not_equal, is_any_of, is_not_any_of, contains, does_not_contain, starts_with, ends_with, greater_than, greater_than_or_equal, less_than, less_than_or_equal, is_empty or is_not_empty. The fallback route carries an empty array, because it needs no condition.
{
"all": [
{
"inputId": "f7c82298-6dd9-43bd-98e4-c437b5c0ae47",
"operator": "is_any_of",
"values": ["50-200 employees"]
}
]
}
curl --request PUT \
--url https://api.zeeg.me/v2/routing-forms/{id}/routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"routes": [
{
"type": "EVENT_TYPE",
"eventTypeId": "80f46bf5-eb01-4c07-960e-a9a3e18aae5e",
"rules": {
"all": [
{
"inputId": "f7c82298-6dd9-43bd-98e4-c437b5c0ae47",
"operator": "is_any_of",
"values": [
"50-200 employees"
]
}
]
}
}
]
}
'{
"success": true,
"status": 200,
"routingForm": {
"id": "f1cbafc4-b646-4cf9-af29-193491b555d9",
"name": "Inbound Lead Qualification",
"slug": "inbound-lead-qual",
"url": "https://zeeg.me/RF/inbound-lead-qual",
"isActive": true,
"headline": "Tell us about your team",
"body": null,
"submitBtnText": "Continue",
"styleSettings": {
"bgColor": "#ffffff",
"buttonBgColor": "#1f2937",
"buttonTextColor": "#ffffff"
},
"createdAt": "2026-04-01T09:12:44+00:00",
"updatedAt": "2026-04-11T11:31:07+00:00",
"inputs": [],
"routes": [
{
"id": "c4a1e0d2-5f39-4a7b-8f11-2b6d0c9e7a84",
"type": "EVENT_TYPE",
"isFallback": false,
"order": 0,
"customUrl": null,
"headline": null,
"body": null,
"eventType": {
"id": "80f46bf5-eb01-4c07-960e-a9a3e18aae5e",
"title": "30-Minute Discovery Call",
"slug": "30min-discovery-call",
"uri": "https://api.zeeg.me/v2/event-types/80f46bf5-eb01-4c07-960e-a9a3e18aae5e"
},
"team": null,
"rules": {
"all": [
{
"inputId": "f7c82298-6dd9-43bd-98e4-c437b5c0ae47",
"operator": "is_any_of",
"values": [
"50-200 employees"
]
}
]
}
},
{
"id": "2e7f4b90-8a13-4c6d-b5e2-7f0a9c3d1e64",
"type": "CUSTOM_PAGE",
"isFallback": true,
"order": 1,
"customUrl": null,
"headline": "Thank you",
"body": "A member of the team contacts you within one working day.",
"eventType": null,
"team": null,
"rules": []
}
]
}
}