Sign inGet started

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.
请求载荷
category
string
必填
The category of the AllowBlockRule.
Possible values: all, domain, domain_suffix, email
type
string
必填
The type of the AllowBlockRule.
Possible values: allow, reject, suspend
value
string
必填
响应载荷
category
string
必填
The category of the AllowBlockRule.
Possible values: all, domain, domain_suffix, email
createdAt
string
必填
createdBy
string
必填
id
string
必填
type
string
必填
The type of the AllowBlockRule.
Possible values: allow, reject, suspend
updatedAt
string
必填
updatedBy
string
必填
value
string
必填
workspaceId
string
必填
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/conversation-allowblock-rules' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'

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"
}'