Create allow/block rule
POST
/workspaces/{workspaceId}/conversation-allowblock-rules
Allow/Block rules are an abuse prevention mechanism that allows you to define an allow-list and a block-list indicating whether a conversation can be start for a given contact.
Verzoek-payload
category
string
verplicht
The category of the AllowBlockRule.
Possible values: all, domain, domain_suffix, email
type
string
verplicht
The type of the AllowBlockRule.
Possible values: allow, reject, suspend
value
string
verplicht
Antwoord-payload
category
string
verplicht
The category of the AllowBlockRule.
Possible values: all, domain, domain_suffix, email
createdAt
string
verplicht
createdBy
string
verplicht
id
string
verplicht
type
string
verplicht
The type of the AllowBlockRule.
Possible values: allow, reject, suspend
updatedAt
string
verplicht
updatedBy
string
verplicht
value
string
verplicht
workspaceId
string
verplicht
Codevoorbeeld
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/conversation-allowblock-rules' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'Examples
Codevoorbeeld
curl -X POST "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversation-allowblock-rules" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
"category": "domain",
"value": "test.com",
"type": "reject"
}'Codevoorbeeld
{
"id": "01937888-e7c4-79dd-af1f-c00d91a0f3a6",
"workspaceId": "6b1908bd-2bc7-409e-bab4-ccfcd3ec69b9",
"category": "domain",
"value": "test.com",
"type": "reject",
"createdBy": "00000000-0000-0000-0000-000000000000",
"createdAt": "2024-11-29T15:27:38.436082756Z",
"updatedBy": "00000000-0000-0000-0000-000000000000",
"updatedAt": "2024-11-29T15:27:38.436082756Z"
}