curl --request POST \
--url https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"config": {},
"targeting": {
"bookingChannels": [
"<string>"
],
"sources": [
"<string>"
],
"minNights": 1,
"maxNights": 1,
"checkInDays": [],
"maxBookingLeadDays": 1,
"matchUnknownBookingLeadTime": true,
"listingIds": [
"<string>"
],
"listingGroupIds": [
"<string>"
],
"minBedrooms": 1,
"maxBedrooms": 1,
"minBathrooms": 1,
"maxBathrooms": 1,
"minGuestCount": 1,
"maxGuestCount": 1
},
"exclude_returning_guests": true,
"enabled": true
}
'import requests
url = "https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules"
payload = {
"name": "<string>",
"config": {},
"targeting": {
"bookingChannels": ["<string>"],
"sources": ["<string>"],
"minNights": 1,
"maxNights": 1,
"checkInDays": [],
"maxBookingLeadDays": 1,
"matchUnknownBookingLeadTime": True,
"listingIds": ["<string>"],
"listingGroupIds": ["<string>"],
"minBedrooms": 1,
"maxBedrooms": 1,
"minBathrooms": 1,
"maxBathrooms": 1,
"minGuestCount": 1,
"maxGuestCount": 1
},
"exclude_returning_guests": True,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
config: {},
targeting: {
bookingChannels: ['<string>'],
sources: ['<string>'],
minNights: 1,
maxNights: 1,
checkInDays: [],
maxBookingLeadDays: 1,
matchUnknownBookingLeadTime: true,
listingIds: ['<string>'],
listingGroupIds: ['<string>'],
minBedrooms: 1,
maxBedrooms: 1,
minBathrooms: 1,
maxBathrooms: 1,
minGuestCount: 1,
maxGuestCount: 1
},
exclude_returning_guests: true,
enabled: true
})
};
fetch('https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'config' => [
],
'targeting' => [
'bookingChannels' => [
'<string>'
],
'sources' => [
'<string>'
],
'minNights' => 1,
'maxNights' => 1,
'checkInDays' => [
],
'maxBookingLeadDays' => 1,
'matchUnknownBookingLeadTime' => true,
'listingIds' => [
'<string>'
],
'listingGroupIds' => [
'<string>'
],
'minBedrooms' => 1,
'maxBedrooms' => 1,
'minBathrooms' => 1,
'maxBathrooms' => 1,
'minGuestCount' => 1,
'maxGuestCount' => 1
],
'exclude_returning_guests' => true,
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"config\": {},\n \"targeting\": {\n \"bookingChannels\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"minNights\": 1,\n \"maxNights\": 1,\n \"checkInDays\": [],\n \"maxBookingLeadDays\": 1,\n \"matchUnknownBookingLeadTime\": true,\n \"listingIds\": [\n \"<string>\"\n ],\n \"listingGroupIds\": [\n \"<string>\"\n ],\n \"minBedrooms\": 1,\n \"maxBedrooms\": 1,\n \"minBathrooms\": 1,\n \"maxBathrooms\": 1,\n \"minGuestCount\": 1,\n \"maxGuestCount\": 1\n },\n \"exclude_returning_guests\": true,\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"config\": {},\n \"targeting\": {\n \"bookingChannels\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"minNights\": 1,\n \"maxNights\": 1,\n \"checkInDays\": [],\n \"maxBookingLeadDays\": 1,\n \"matchUnknownBookingLeadTime\": true,\n \"listingIds\": [\n \"<string>\"\n ],\n \"listingGroupIds\": [\n \"<string>\"\n ],\n \"minBedrooms\": 1,\n \"maxBedrooms\": 1,\n \"minBathrooms\": 1,\n \"maxBathrooms\": 1,\n \"minGuestCount\": 1,\n \"maxGuestCount\": 1\n },\n \"exclude_returning_guests\": true,\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"config\": {},\n \"targeting\": {\n \"bookingChannels\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"minNights\": 1,\n \"maxNights\": 1,\n \"checkInDays\": [],\n \"maxBookingLeadDays\": 1,\n \"matchUnknownBookingLeadTime\": true,\n \"listingIds\": [\n \"<string>\"\n ],\n \"listingGroupIds\": [\n \"<string>\"\n ],\n \"minBedrooms\": 1,\n \"maxBedrooms\": 1,\n \"minBathrooms\": 1,\n \"maxBathrooms\": 1,\n \"minGuestCount\": 1,\n \"maxGuestCount\": 1\n },\n \"exclude_returning_guests\": true,\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"enabled": true,
"order": 123,
"step_type": "id_check",
"slot": "identity",
"targeting": {
"customAttributeConditions": {
"combinator": "all",
"conditions": [
{
"attributeId": "<string>",
"operator": "has_value"
}
]
},
"bookingChannelMode": "include",
"bookingChannels": [
"<string>"
],
"sourceMode": "include",
"sources": [
"<string>"
],
"minNights": 1,
"maxNights": 1,
"checkInDays": [
"monday"
],
"bookingDate": {
"operator": "lt",
"date": "2023-12-25",
"timezone": "<string>"
},
"maxBookingLeadDays": 1,
"matchUnknownBookingLeadTime": true,
"listingIds": [
"<string>"
],
"listingGroupIds": [
"<string>"
],
"minBedrooms": 1,
"maxBedrooms": 1,
"minBathrooms": 1,
"maxBathrooms": 1,
"minGuestCount": 1,
"maxGuestCount": 1
},
"config": {
"title": "<string>",
"instructions": "<string>",
"acceptedDocuments": "<string>",
"provider": "conduit",
"requireContactPhoto": true,
"requireLiveDocumentPhoto": true,
"requireDocumentBack": true,
"autoApprove": true
},
"created_at": 123,
"updated_at": 123,
"exclude_returning_guests": true
}
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}Create Verification Rule
Create a portal verification rule for a workspace.
curl --request POST \
--url https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"config": {},
"targeting": {
"bookingChannels": [
"<string>"
],
"sources": [
"<string>"
],
"minNights": 1,
"maxNights": 1,
"checkInDays": [],
"maxBookingLeadDays": 1,
"matchUnknownBookingLeadTime": true,
"listingIds": [
"<string>"
],
"listingGroupIds": [
"<string>"
],
"minBedrooms": 1,
"maxBedrooms": 1,
"minBathrooms": 1,
"maxBathrooms": 1,
"minGuestCount": 1,
"maxGuestCount": 1
},
"exclude_returning_guests": true,
"enabled": true
}
'import requests
url = "https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules"
payload = {
"name": "<string>",
"config": {},
"targeting": {
"bookingChannels": ["<string>"],
"sources": ["<string>"],
"minNights": 1,
"maxNights": 1,
"checkInDays": [],
"maxBookingLeadDays": 1,
"matchUnknownBookingLeadTime": True,
"listingIds": ["<string>"],
"listingGroupIds": ["<string>"],
"minBedrooms": 1,
"maxBedrooms": 1,
"minBathrooms": 1,
"maxBathrooms": 1,
"minGuestCount": 1,
"maxGuestCount": 1
},
"exclude_returning_guests": True,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
config: {},
targeting: {
bookingChannels: ['<string>'],
sources: ['<string>'],
minNights: 1,
maxNights: 1,
checkInDays: [],
maxBookingLeadDays: 1,
matchUnknownBookingLeadTime: true,
listingIds: ['<string>'],
listingGroupIds: ['<string>'],
minBedrooms: 1,
maxBedrooms: 1,
minBathrooms: 1,
maxBathrooms: 1,
minGuestCount: 1,
maxGuestCount: 1
},
exclude_returning_guests: true,
enabled: true
})
};
fetch('https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'config' => [
],
'targeting' => [
'bookingChannels' => [
'<string>'
],
'sources' => [
'<string>'
],
'minNights' => 1,
'maxNights' => 1,
'checkInDays' => [
],
'maxBookingLeadDays' => 1,
'matchUnknownBookingLeadTime' => true,
'listingIds' => [
'<string>'
],
'listingGroupIds' => [
'<string>'
],
'minBedrooms' => 1,
'maxBedrooms' => 1,
'minBathrooms' => 1,
'maxBathrooms' => 1,
'minGuestCount' => 1,
'maxGuestCount' => 1
],
'exclude_returning_guests' => true,
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"config\": {},\n \"targeting\": {\n \"bookingChannels\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"minNights\": 1,\n \"maxNights\": 1,\n \"checkInDays\": [],\n \"maxBookingLeadDays\": 1,\n \"matchUnknownBookingLeadTime\": true,\n \"listingIds\": [\n \"<string>\"\n ],\n \"listingGroupIds\": [\n \"<string>\"\n ],\n \"minBedrooms\": 1,\n \"maxBedrooms\": 1,\n \"minBathrooms\": 1,\n \"maxBathrooms\": 1,\n \"minGuestCount\": 1,\n \"maxGuestCount\": 1\n },\n \"exclude_returning_guests\": true,\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"config\": {},\n \"targeting\": {\n \"bookingChannels\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"minNights\": 1,\n \"maxNights\": 1,\n \"checkInDays\": [],\n \"maxBookingLeadDays\": 1,\n \"matchUnknownBookingLeadTime\": true,\n \"listingIds\": [\n \"<string>\"\n ],\n \"listingGroupIds\": [\n \"<string>\"\n ],\n \"minBedrooms\": 1,\n \"maxBedrooms\": 1,\n \"minBathrooms\": 1,\n \"maxBathrooms\": 1,\n \"minGuestCount\": 1,\n \"maxGuestCount\": 1\n },\n \"exclude_returning_guests\": true,\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conduit.ai/v1/workspaces/{workspace_id}/verification-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"config\": {},\n \"targeting\": {\n \"bookingChannels\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"minNights\": 1,\n \"maxNights\": 1,\n \"checkInDays\": [],\n \"maxBookingLeadDays\": 1,\n \"matchUnknownBookingLeadTime\": true,\n \"listingIds\": [\n \"<string>\"\n ],\n \"listingGroupIds\": [\n \"<string>\"\n ],\n \"minBedrooms\": 1,\n \"maxBedrooms\": 1,\n \"minBathrooms\": 1,\n \"maxBathrooms\": 1,\n \"minGuestCount\": 1,\n \"maxGuestCount\": 1\n },\n \"exclude_returning_guests\": true,\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"enabled": true,
"order": 123,
"step_type": "id_check",
"slot": "identity",
"targeting": {
"customAttributeConditions": {
"combinator": "all",
"conditions": [
{
"attributeId": "<string>",
"operator": "has_value"
}
]
},
"bookingChannelMode": "include",
"bookingChannels": [
"<string>"
],
"sourceMode": "include",
"sources": [
"<string>"
],
"minNights": 1,
"maxNights": 1,
"checkInDays": [
"monday"
],
"bookingDate": {
"operator": "lt",
"date": "2023-12-25",
"timezone": "<string>"
},
"maxBookingLeadDays": 1,
"matchUnknownBookingLeadTime": true,
"listingIds": [
"<string>"
],
"listingGroupIds": [
"<string>"
],
"minBedrooms": 1,
"maxBedrooms": 1,
"minBathrooms": 1,
"maxBathrooms": 1,
"minGuestCount": 1,
"maxGuestCount": 1
},
"config": {
"title": "<string>",
"instructions": "<string>",
"acceptedDocuments": "<string>",
"provider": "conduit",
"requireContactPhoto": true,
"requireLiveDocumentPhoto": true,
"requireDocumentBack": true,
"autoApprove": true
},
"created_at": 123,
"updated_at": 123,
"exclude_returning_guests": true
}
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}Authorizations
Conduit API token. Use Authorization: Bearer <token>. Read/write endpoints require a token with write access.
Path Parameters
Workspace identifier
1Body
Operator-facing rule name
1id_check, agreement, damage_waiver, security_deposit, mandatory_fee, guest_details, additional_questions, other_guests, guest_registration, custom_field_gate Shape depends on step_type. id_check: {title, instructions, acceptedDocuments?, provider?: "conduit" | "didit" | "autohost", requireContactPhoto?, requireLiveDocumentPhoto?, requireDocumentBack?, autoApprove?}. acceptedDocuments is the ID types shown to the guest. requireContactPhoto, requireLiveDocumentPhoto and requireDocumentBack apply to the conduit provider; autohost needs a connected Autohost account. agreement: {title, body} or {title, pdf}. damage_waiver: {title, body, pricing?, optional?} or {title, pdf, pricing?, optional?}. security_deposit: {title, instructions, amountInCents, currency, releaseDelayDays?, holdDaysBeforeArrival?: 1 | 2 | 3, optional?}. optional: true lets the guest decline that step. A damage waiver and a security deposit on the same stay are offered as a choice of one. mandatory_fee: {title, instructions, amountInCents, currency}. guest_details: {title, description?, collectEmail, collectPhone, collectEta, collectEtd, requiredFields, fields?, saveContactDetails?, saveEmailToContact?, savePhoneToContact?}. saveEmailToContact and savePhoneToContact save the email or phone the guest enters to their contact; saveContactDetails is the older flag for both and applies when the specific flag is unset. additional_questions: {title, description?, questions}. other_guests: {title, description?, minGuests?, maxGuests?, fields?}. guest_registration: {title, instructions, registrationProvider: "chekin", allowDocumentScan?}. custom_field_gate: {title, instructions, conditions: {combinator: "all" | "any", conditions: [{source: "reservation_custom_field", field, operator, value?} | {source: "contact_attribute", attributeId, operator, value?} | {source: "payment_status", status: "Paid"}]}}. pdf: {uploadId, placements} uses a PDF up to 10 MB with no rotated pages, uploaded with prepare_file_upload (content_type "application/pdf"). Each upload works once. Placements position fields as fractions of the page measured from its top-left corner: {id, type: "field", fieldKind, label, required, pageIndex, x, y, width, height, options?, radio?} or {id, type: "merge", mergeKey, pageIndex, x, y, width, height}. Include at least one signature field, and keep every signature field required. On patch, omit uploadId to keep the rule's current file, and omit placements to keep its current fields.
Show child attributes
Show child attributes
Which stays this rule applies to. Omit to target every stay.
Show child attributes
Show child attributes
Defaults to true. Disabled rules never apply.
Response
Create Verification Rule
Show child attributes
Show child attributes
Was this page helpful?