Create allow/block rule
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.
Authorizations
Path parameters
workspaceIdstring · uuidRequiredExample:
The workspace ID
b4e02c85-c6d2-4b15-8885-e09671799c61
Body
categorystring · enumRequiredPossible values:
The category of the AllowBlockRule.
valuestringRequired
typestring · enumRequiredPossible values:
The type of the AllowBlockRule.
Responses
201
The Allow/Block rule.
application/json
409
The resource already exists
application/json
422
The request body did not pass validation
application/json
post
POST /workspaces/{workspaceId}/conversation-allowblock-rules HTTP/1.1
Host: api.bird.com
Authorization: AccessKey YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"category": "all",
"value": "text",
"type": "allow"
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"workspaceId": "123e4567-e89b-12d3-a456-426614174000",
"category": "all",
"value": "text",
"type": "allow",
"createdBy": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-08-13T15:50:23.530Z",
"updatedBy": "123e4567-e89b-12d3-a456-426614174000",
"updatedAt": "2025-08-13T15:50:23.530Z"
}
Examples
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"
}'
Last updated
Was this helpful?