Add allow/block rules in bulk

Add allow/block rules to bulk process via a csv file.

Add allow/block to bulk process via a csv file.

POSThttps://api.bird.com/workspaces/{workspaceId}/conversation-allowblock-rules-bulk
Body
string
Response

The Allow/Block rule bulk insert progress.

Body
workspaceIdstring (uuid)
bulkIdstring (uuid)
currentIndexinteger
totalinteger
statusenum
pendingin_progresscompletedfailed
errorsnullable array of string
updatedAtstring (date-time)
Request
const response = await fetch('https://api.bird.com/workspaces/{workspaceId}/conversation-allowblock-rules-bulk', {
    method: 'POST',
    headers: {
      "Content-Type": "text/csv"
    },
    body: JSON.stringify("text"),
});
const data = await response.json();
Response
{
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "bulkId": "123e4567-e89b-12d3-a456-426614174000",
  "currentIndex": 0,
  "total": 0,
  "status": "pending",
  "errors": [
    "text"
  ],
  "updatedAt": "2024-12-21T16:01:56.743Z"
}

Examples

curl -X POST "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversation-allowblock-rules-bulk" \
-H "Content-Type: text/csv" \
-H "Authorization: AccessKey abcd" \
-d 'test@example.com,allow'

Last updated