Update antispam setting

Update antispam settings

Update antispam settings

PATCHhttps://api.bird.com/workspaces/{workspaceId}/conversations-antispam-settings
Path parameters
workspaceId*string (uuid)

The workspace ID

Example: "b4e02c85-c6d2-4b15-8885-e09671799c61"
Body
enabled*boolean

Whether antispam is enabled. This uses AI to scan messages for spam and flag it as such.

Response

Antispam settings were updated

Request
const response = await fetch('https://api.bird.com/workspaces/{workspaceId}/conversations-antispam-settings', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "enabled": false
    }),
});
const data = await response.json();
Response
{
  "code": "InvalidPayload",
  "message": "One or more fields provided in the request body are malformed",
  "details": {
    ".name": [
      "Property 'name' is missing"
    ],
    ".description": [
      "Maximum string length is 250"
    ]
  }
}

Examples

curl -X PATCH "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversations-antispam-settings" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "enabled": true
}'

Last updated