v1

latestOpenAPI 3.1.0MIT2026-07-243952451019.0 KB
Communities::Memberships::BanAction

Create Membership Ban Action

Enqueue an async background job to ban one or more community members. The action record is returned immediately with status: queued. Poll GET /communities/memberships/ban_actions/{id} until status is completed.

post/communities/{community_id}/memberships/ban_actions

Path parameters

community_idinteger required

Request body

Example request

{
  "communities_memberships_ban_action": {
    "communities_memberships_ban_action": {
      "target_all": false,
      "target_ids": [
        "AbCdEf",
        "GhIjKl"
      ],
      "reason": "Violated community guidelines"
    }
  }
}

Response

Created

idinteger

Action ID

public_idstring nullable

Action public ID

community_idinteger

ID of the Community this action belongs to

target_allboolean

When true the action targets all eligible records in the community rather than the explicit target_ids list

target_idsinteger[]

Integer IDs of the targeted records (memberships or bans)

failed_idsinteger[]

Integer IDs of records that could not be processed

target_countinteger nullable

Total number of records that will be processed

performed_countinteger nullable

Number of records processed so far

started_atstring date-time nullable

Timestamp when the background job began processing

completed_atstring date-time nullable

Timestamp when the background job finished

created_atstring date-time

Created at

updated_atstring date-time

Updated at

status'queued' | 'processing' | 'completed'

Current status of the async action. Progresses: queued → processing → completed.

reasonstring nullable

Optional reason applied to each ban created by this action

Example response

{
  "id": 501,
  "public_id": "BnAcT1",
  "community_id": 1,
  "target_all": false,
  "target_ids": [
    101,
    102
  ],
  "failed_ids": [],
  "target_count": 2,
  "performed_count": 2,
  "started_at": "2025-01-01T00:01:00.000Z",
  "completed_at": "2025-01-01T00:01:05.000Z",
  "created_at": "2025-01-01T00:00:00.000Z",
  "updated_at": "2025-01-01T00:01:05.000Z",
  "status": "completed",
  "reason": "Violated community guidelines"
}