Skip to main content
POST
/
v1
/
channel-blacklists
Block a customer on a channel
curl --request POST \
  --url https://dev.flextell.ai/api/v1/channel-blacklists \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Tenant: <x-tenant>' \
  --data '
{
  "channel_id": 123,
  "customer_id": 123,
  "ttl_seconds": 2,
  "note": "<string>",
  "metadata": [
    "<string>"
  ]
}
'
{
  "success": "<string>",
  "data": {
    "id": 123,
    "tenant_id": 123,
    "reason": "<string>",
    "reason_label": "<string>",
    "note": "<string>",
    "blocked_at": "2023-11-07T05:31:56Z",
    "expires_at": "2023-11-07T05:31:56Z",
    "is_active": true,
    "is_permanent": true,
    "is_expired": true,
    "remaining_time": "<string>",
    "metadata": [
      "<unknown>"
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": "2023-11-07T05:31:56Z",
    "channel": {
      "id": 123,
      "name": "<string>",
      "address": "<string>"
    },
    "customer": {
      "id": 123,
      "first_name": "<string>",
      "last_name": "<string>",
      "phone_number": "<string>",
      "email": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Tenant
number
required

Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.

Body

application/json
channel_id
integer
required

The channel identifier the customer is being blocked on.

customer_id
integer
required

The customer identifier to block.

reason
enum<string>
required

The reason of the blacklist entry.

Available options:
rate_limit,
llm_spam,
manual,
security_threat,
abusive_language
ttl_seconds
integer | null

Block duration in seconds. Omit or pass null to block permanently.

Required range: x >= 1
note
string | null

Optional note to attach to the blacklist entry.

Maximum string length: 1000
metadata
string[] | null

Optional metadata to attach to the blacklist entry.

Response

success
string
required
data
ChannelBlacklistResource · object
required