> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc.client.fo/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk action on contacts

> Applies one action to up to 500 contacts: up to 50 inline, more queued (202, `queued: true`). Actions: delete, add_tag, remove_tag, set_stage. `value` is the tag NAME for add_tag/remove_tag and the stage id for set_stage. Per-contact webhooks still fire; contact-event automation triggers are suppressed so a bulk change cannot stampede the flow engine. `delete` also needs the key creator to hold the bulk-delete permission.

**Required permission:** `salesbot:contacts:write`



## OpenAPI

````yaml /api-reference/messaging.openapi.json post /contacts/bulk
openapi: 3.1.0
info:
  title: Messaging API
  version: 1.0.0
  description: >-
    Contacts, conversations, messages, broadcasts, automations and media for one
    workspace. The workspace is selected by the API key, so no workspace ID
    appears in any URL.
servers:
  - url: https://{domain}/api/v1
    description: Your platform domain
    variables:
      domain:
        default: app.example.com
        description: The domain you sign in to, without https://
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Account
    description: >-
      The workspace is selected by the API key, so no workspace id appears in
      any /api/v1 URL.
  - name: Automations
    description: >-
      Read + activate/pause only. Authoring a node graph stays in the builder,
      which owns its own validation.
  - name: Broadcasts
    description: >-
      The send pipeline is never invoked directly: marking a broadcast scheduled
      is what lets the sweep's single Scheduled→Sending claim keep it
      un-double-sendable.
  - name: Channels
    description: >-
      Read-only: connecting a channel is an OAuth flow that must happen in the
      dashboard.
  - name: Contacts
    description: >-
      custom_fields is a flat {key: value} map. An empty map is returned as {}
      so client-side property access is always safe.
  - name: Conversations & Messages
    description: >-
      There is no Conversation model: a conversation is a Contact with messages,
      and the rollup fields are denormalised columns on it.
  - name: Media
    description: >-
      Upload requests are multipart, not JSON — do not set Content-Type:
      application/json on media.store.
  - name: Segments
    description: Segments are the audience type broadcasts target.
  - name: Tags
    description: >-
      Contacts are tagged by NAME (see contacts.tags.add), so tag names stay
      unique.
paths:
  /contacts/bulk:
    post:
      tags:
        - Contacts
      summary: Bulk action on contacts
      description: >-
        Applies one action to up to 500 contacts: up to 50 inline, more queued
        (202, `queued: true`). Actions: delete, add_tag, remove_tag, set_stage.
        `value` is the tag NAME for add_tag/remove_tag and the stage id for
        set_stage. Per-contact webhooks still fire; contact-event automation
        triggers are suppressed so a bulk change cannot stampede the flow
        engine. `delete` also needs the key creator to hold the bulk-delete
        permission.


        **Required permission:** `salesbot:contacts:write`
      operationId: contacts.bulk
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: add_tag
                ids:
                  type: array
                  items:
                    type: string
                    format: uuid
                value:
                  type: string
                  example: VIP
      responses:
        '201':
          description: Created
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'A workspace API key: `Authorization: Bearer osk_...`'
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: The same workspace API key in the `x-api-key` header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.