SendSeven GmbH Contact Bulk Actions API

Perform bulk operations on contacts such as batch tagging, deletion, and export.

GitHub OpenAPI

Operations 5

POST /api/v1/contacts/bulk-actions/preview Preview Bulk Action #
POST /api/v1/contacts/bulk-actions/execute Execute Bulk Action #
GET /api/v1/contacts/bulk-actions List Bulk Actions #
GET /api/v1/contacts/bulk-actions/{bulk_action_id} Get Bulk Action #
POST /api/v1/contacts/bulk-actions/{bulk_action_id}/undo Undo Bulk Action #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sendseven-com:sendseven-com-contact-bulk-actions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sendseven-com-contact-bulk-actions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SendSeven Contact Bulk Actions API
  description: Unified messaging API for WhatsApp, Telegram, SMS, and more
  version: '20261124.1227'
servers:
- url: https://api.sendseven.com
  description: Production
tags:
- name: Contact Bulk Actions
  description: Perform bulk operations on contacts such as batch tagging, deletion, and export.
paths:
  /api/v1/contacts/bulk-actions/preview:
    post:
      tags:
      - Contact Bulk Actions
      summary: Preview Bulk Action
      description: 'Preview a contact bulk action (mass edit) — no changes are made.


        **Required Scopes:** `contacts:update`


        Validates the selection and every action against the tenant (tags/list/

        custom field existence + value/type checks, `set_field` allowlist),

        computes how many contacts the selection currently matches and returns a

        signed `confirmation_token`. Submit the IDENTICAL `selection` + `actions`

        together with that token to `/contacts/bulk-actions/execute` within

        `expires_in_seconds` (~10 minutes).


        Selection modes:

        - `{"mode": "ids", "ids": [...]}` — explicit contact ids (max 10000).

        - `{"mode": "filter", "filter": {...}}` — same params as `GET /contacts`

        (`search`, `include_live_chat`, `custom_field_id/value/value_to/op`,

        `list_id` + `list_subscription_status`/`list_subscription_channel`,

        `is_blocked`, `owner_user_id` = user id | `me` | `none`); `{}` targets

        ALL contacts.


        Contacts hidden from the caller by their contact visibility level are

        silently skipped in both modes (treated like unknown ids): they are not

        counted, sampled or changed.


        Without `contacts:read`, `sample` is an empty list (no contact names),

        and a filter using `search` or any `custom_field_*` parameter is rejected

        with 403 `FILTER_REQUIRES_CONTACTS_READ`. Selecting by `ids` and filtering

        by `list_id`, `list_subscription_status`, `list_subscription_channel`,

        `is_blocked` and `include_live_chat` still work without it.


        Action types (executed in order per contact): `set_field`,

        `set_custom_field`, `add_tags`, `remove_tags`, `add_to_list`,

        `set_blocked` (`{"type": "set_blocked", "blocked": true|false}` — blocks or

        unblocks the contact and all of its identifiers on every channel; can be

        mixed with the other actions), `set_owner`

        (`{"type": "set_owner", "owner_user_id": ""|null, "propagate": true}`

        — sets/clears the contact owner; with `propagate` the new owner also gets

        the contact''s open unassigned conversations they can access; a run made

        only of `set_owner` actions can be undone via

        `POST /contacts/bulk-actions/{id}/undo`).'
      operationId: preview_bulk_action_api_v1_contacts_bulk_actions_preview_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkActionPreviewRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionPreviewResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/v1/contacts/bulk-actions/execute:
    post:
      tags:
      - Contact Bulk Actions
      summary: Execute Bulk Action
      description: 'Execute a previously previewed contact bulk action (202 Accepted).


        **Required Scopes:** `contacts:update`


        Requires the `confirmation_token` from `/contacts/bulk-actions/preview`

        together with the IDENTICAL `selection` + `actions`. Errors:


        - **403** `{"detail": {"code": "FILTER_REQUIRES_CONTACTS_READ", ...}}` —

        the filter uses `search` or a `custom_field_*` parameter and the caller

        lacks `contacts:read`.

        - **400** `{"detail": {"code": "TOKEN_INVALID" | "TOKEN_EXPIRED", ...}}` —

        malformed/forged/expired token, or token minted for another tenant/user.

        - **409** `{"detail": {"code": "PAYLOAD_MISMATCH", ...}}` — the submitted

        selection/actions differ from what was previewed.

        - **409** `{"detail": {"code": "AFFECTED_COUNT_DRIFT", "affected_count": N,

        ...}}` — the match count changed since preview (any difference when the

        previewed count was < 100, otherwise more than ±2%). Re-preview and

        confirm again with the new count.


        On success the run is recorded as a `BulkActionLog` audit row and executed

        as a chunked background job; poll `poll_url` until `status` is

        `completed`/`failed`. `affected_count` on the poll response is the running

        total of actually-changed contacts.'
      operationId: execute_bulk_action_api_v1_contacts_bulk_actions_execute_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkActionExecuteRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionExecuteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/v1/contacts/bulk-actions:
    get:
      tags:
      - Contact Bulk Actions
      summary: List Bulk Actions
      description: 'List this tenant''s contact bulk action runs, newest first (audit history).


        **Required Scopes:** `contacts:update`


        Returns the standard `{"items": [...], "pagination": {...}}` envelope;

        each item has the same shape as `GET /contacts/bulk-actions/{id}`.'
      operationId: list_bulk_actions_api_v1_contacts_bulk_actions_get
      security:
      - HTTPBearer: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Page number (1-indexed)
          default: 1
          title: Page
        description: Page number (1-indexed)
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: Items per page (max 100)
          default: 20
          title: Page Size
        description: Items per page (max 100)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/contacts/bulk-actions/{bulk_action_id}:
    get:
      tags:
      - Contact Bulk Actions
      summary: Get Bulk Action
      description: 'Poll one contact bulk action run (status + audit detail).


        **Required Scopes:** `contacts:update`


        `status`: `pending` → `processing` → `completed` | `failed`.

        `affected_count` is the running total of actually-changed contacts

        (committed per chunk) and the final total once completed. `error` carries

        the failure reason (`failed`) or a truncated summary of individually

        skipped contacts (`completed`).'
      operationId: get_bulk_action_api_v1_contacts_bulk_actions__bulk_action_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: bulk_action_id
        in: path
        required: true
        schema:
          type: string
          title: Bulk Action Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/contacts/bulk-actions/{bulk_action_id}/undo:
    post:
      tags:
      - Contact Bulk Actions
      summary: Undo Bulk Action
      description: 'Undo a completed contact bulk action that only set the contact owner.


        **Required Scopes:** `contacts:update`


        Restores each contact''s previous owner, but only where the owner is still

        the one the bulk action set (a later change wins) and the previous owner

        is still an active member. Conversations already handed to the new owner

        stay assigned. 404 unknown run; 422 `not_undoable` for runs that contain

        other action types, are not completed or were already undone. Members

        limited to Custom Inboxes only undo contacts they can edit; the others

        are counted as skipped. The owner-change history names the user who

        undid it.'
      operationId: undo_bulk_action_api_v1_contacts_bulk_actions__bulk_action_id__undo_post
      security:
      - HTTPBearer: []
      parameters:
      - name: bulk_action_id
        in: path
        required: true
        schema:
          type: string
          title: Bulk Action Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionUndoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SetOwnerAction:
      properties:
        type:
          type: string
          const: set_owner
          title: Type
        owner_user_id:
          anyOf:
          - type: string
            maxLength: 36
          - type: 'null'
          title: Owner User Id
          description: Active team member to own the contacts; null clears the owner
        propagate:
          type: boolean
          title: Propagate
          description: Also assign each contact's open UNASSIGNED conversations to the new owner (inbox access permitting). Ignored when clearing.
          default: true
      type: object
      required:
      - type
      title: SetOwnerAction
      description: Set (or clear) the contact owner of every selected contact.
    SubscriptionChannelType:
      type: string
      enum:
      - email
      - sms
      - whatsapp
      - telegram
      - messenger
      - instagram
      - browser_push
      - rcs
      title: SubscriptionChannelType
      description: Channels a contact can hold a list subscription on.
    BulkActionExecuteRequest:
      properties:
        selection:
          $ref: '#/components/schemas/BulkActionSelection'
        actions:
          items:
            anyOf:
            - $ref: '#/components/schemas/SetFieldAction'
            - $ref: '#/components/schemas/SetCustomFieldAction'
            - $ref: '#/components/schemas/AddTagsAction'
            - $ref: '#/components/schemas/RemoveTagsAction'
            - $ref: '#/components/schemas/AddToListAction'
            - $ref: '#/components/schemas/SetBlockedAction'
            - $ref: '#/components/schemas/SetOwnerAction'
          type: array
          maxItems: 20
          minItems: 1
          title: Actions
          description: Ordered list of actions, executed in order per contact
        confirmation_token:
          type: string
          title: Confirmation Token
          description: Signed token from POST /contacts/bulk-actions/preview
      type: object
      required:
      - selection
      - actions
      - confirmation_token
      title: BulkActionExecuteRequest
    SetCustomFieldAction:
      properties:
        type:
          type: string
          const: set_custom_field
          title: Type
        key:
          type: string
          title: Key
          description: Custom field key (custom_field_definitions.key)
        value:
          title: Value
          description: New value, validated against the field's type (select/multiselect options, number, boolean, date/datetime ISO). null clears the value.
      type: object
      required:
      - type
      - key
      title: SetCustomFieldAction
      description: Create-or-update a custom field value for every selected contact.
    SetFieldAction:
      properties:
        type:
          type: string
          const: set_field
          title: Type
        field:
          type: string
          title: Field
          description: 'Editable standard contact column. Allowed: name (alias: display_name), first_name, last_name, language, languages, birthday. Anything else is rejected with 400.'
        value:
          title: Value
          description: New value (null clears the field)
      type: object
      required:
      - type
      - field
      title: SetFieldAction
      description: Set a standard Contact column (allowlisted editable fields only).
    BulkActionExecuteResponse:
      properties:
        bulk_action_id:
          type: string
          title: Bulk Action Id
        status:
          type: string
          title: Status
          description: pending|processing|completed|failed
        poll_url:
          type: string
          title: Poll Url
          description: GET this URL to poll job status
      type: object
      required:
      - bulk_action_id
      - status
      - poll_url
      title: BulkActionExecuteResponse
    BulkActionPreviewRequest:
      properties:
        selection:
          $ref: '#/components/schemas/BulkActionSelection'
        actions:
          items:
            anyOf:
            - $ref: '#/components/schemas/SetFieldAction'
            - $ref: '#/components/schemas/SetCustomFieldAction'
            - $ref: '#/components/schemas/AddTagsAction'
            - $ref: '#/components/schemas/RemoveTagsAction'
            - $ref: '#/components/schemas/AddToListAction'
            - $ref: '#/components/schemas/SetBlockedAction'
            - $ref: '#/components/schemas/SetOwnerAction'
          type: array
          maxItems: 20
          minItems: 1
          title: Actions
          description: Ordered list of actions, executed in order per contact
      type: object
      required:
      - selection
      - actions
      title: BulkActionPreviewRequest
    ContactFilterParams:
      properties:
        search:
          anyOf:
          - type: string
          - type: 'null'
          title: Search
          description: Search by name, phone, email, or IDs (same as GET /contacts)
        include_live_chat:
          type: boolean
          title: Include Live Chat
          description: Include live chat contacts (same as GET /contacts)
          default: false
        custom_field_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Custom Field Id
          description: custom_field_definitions.id used for filtering (same as GET /contacts)
        custom_field_value:
          anyOf:
          - type: string
          - type: 'null'
          title: Custom Field Value
          description: Custom-field filter value (same semantics as GET /contacts)
        custom_field_value_to:
          anyOf:
          - type: string
          - type: 'null'
          title: Custom Field Value To
          description: Upper bound for custom_field_op='between' (same as GET /contacts)
        custom_field_op:
          anyOf:
          - type: string
            enum:
            - eq
            - contains
            - not_contains
            - gt
            - lt
            - gte
            - lte
            - between
          - type: 'null'
          title: Custom Field Op
          description: Custom-field comparison operator (same as GET /contacts)
        list_id:
          anyOf:
          - type: string
          - type: 'null'
          title: List Id
          description: lists.id — filter by list subscription (same as GET /contacts). Must belong to the tenant (422 if not).
        list_subscription_status:
          anyOf:
          - type: string
            enum:
            - subscribed
            - pending
            - unsubscribed
            - bounced
            - complained
            - any
            - not_subscribed
          - type: 'null'
          title: List Subscription Status
          description: Subscription status to match for list_id; defaults to 'subscribed'. 'any' = a row in ANY status, 'not_subscribed' = no 'subscribed' row (includes contacts with no row at all). Requires list_id (422).
        list_subscription_channel:
          anyOf:
          - $ref: '#/components/schemas/SubscriptionChannelType'
          - type: 'null'
          description: Optionally narrow the list filter to one subscription channel (same as GET /contacts). Requires list_id (422).
        is_blocked:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Blocked
          description: 'Blocked-state filter (same as GET /contacts): true = only blocked contacts, false = only unblocked, null = all.'
        owner_user_id:
          anyOf:
          - type: string
            maxLength: 36
          - type: 'null'
          title: Owner User Id
          description: 'Contact-owner filter (same as GET /contacts): a team member''s user id, `me` (the acting user) or `none` (contacts without an owner).'
      type: object
      title: ContactFilterParams
      description: 'Filter selection — EXACTLY the filter parameters of ``GET /contacts``.


        Semantics (search across name/phone/email/id/contact-method values,

        live-chat visibility, server-side custom-field operator resolution,

        list-subscription EXISTS/NOT EXISTS) are shared with ``GET /contacts`` via

        ``_resolve_custom_field_filter`` + ``_resolve_list_subscription_filter`` +

        ``ContactService.list_contacts_paginated``.'
    BulkActionUndoResponse:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        bulk_action_id:
          type: string
          title: Bulk Action Id
        restored:
          type: integer
          title: Restored
          description: Contacts whose previous owner was restored
        skipped:
          type: integer
          title: Skipped
          description: Contacts left alone because their owner changed again after the bulk action (or the previous owner is no longer an active member)
      type: object
      required:
      - bulk_action_id
      - restored
      - skipped
      title: BulkActionUndoResponse
    BulkActionStatusResponse:
      properties:
        id:
          type: string
          title: Id
        tenant_id:
          type: string
          title: Tenant Id
        user_id:
          type: string
          title: User Id
        status:
          type: string
          title: Status
          description: pending|processing|completed|failed
        affected_count:
          type: integer
          title: Affected Count
          description: Contacts actually CHANGED so far (running total while processing; final total when completed)
        selection:
          additionalProperties: true
          type: object
          title: Selection
        actions:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Actions
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
        created_at:
          type: string
          title: Created At
        started_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Started At
        completed_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Completed At
      type: object
      required:
      - id
      - tenant_id
      - user_id
      - status
      - affected_count
      - selection
      - actions
      - created_at
      title: BulkActionStatusResponse
      description: One bulk action run (poll endpoint + history items).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    AddToListAction:
      properties:
        type:
          type: string
          const: add_to_list
          title: Type
        list_id:
          type: string
          title: List Id
          description: List ID to subscribe the contacts to (tenant-owned)
        channel_type:
          type: string
          enum:
          - email
          - sms
          - whatsapp
          title: Channel Type
          description: Subscription channel type for the list membership (default email). Contacts with an existing subscription row for this list+channel (any status, including unsubscribed) are skipped — a bulk action never resurrects an opt-out.
          default: email
      type: object
      required:
      - type
      - list_id
      title: AddToListAction
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BulkActionSelection:
      properties:
        mode:
          type: string
          enum:
          - ids
          - filter
          title: Mode
        ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Ids
          description: Contact ids (mode='ids')
        filter:
          anyOf:
          - $ref: '#/components/schemas/ContactFilterParams'
          - type: 'null'
          description: GET /contacts filter params (mode='filter')
      type: object
      required:
      - mode
      title: BulkActionSelection
      description: "How the target contacts are selected.\n\n- ``mode='ids'``     → explicit list of contact UUIDs (``ids`` required).\n- ``mode='filter'``  → all contacts matching ``filter`` (GET /contacts\n  semantics). ``filter`` may be ``{}`` to target ALL contacts."
    SetBlockedAction:
      properties:
        type:
          type: string
          const: set_blocked
          title: Type
        blocked:
          type: boolean
          title: Blocked
          description: true = block, false = unblock
      type: object
      required:
      - type
      - blocked
      title: SetBlockedAction
      description: 'Block or unblock every selected contact (all channels, all of the

        contact''s identifiers). Contacts already in the requested state are not

        counted as changed.'
    BulkActionPreviewResponse:
      properties:
        affected_count:
          type: integer
          title: Affected Count
          description: Contacts currently matching the selection
        sample:
          items:
            $ref: '#/components/schemas/BulkActionSampleContact'
          type: array
          title: Sample
          description: Up to 5 matching contacts for the confirmation dialog
        confirmation_token:
          type: string
          title: Confirmation Token
          description: Pass back verbatim to /execute together with the SAME selection+actions
        expires_in_seconds:
          type: integer
          title: Expires In Seconds
          description: Token TTL (seconds)
      type: object
      required:
      - affected_count
      - sample
      - confirmation_token
      - expires_in_seconds
      title: BulkActionPreviewResponse
    AddTagsAction:
      properties:
        type:
          type: string
          const: add_tags
          title: Type
        tags:
          items:
            type: string
          type: array
          minItems: 1
          title: Tags
          description: Tag IDs to add (tenant-owned)
      type: object
      required:
      - type
      - tags
      title: AddTagsAction
    BulkActionSampleContact:
      properties:
        id:
          type: string
          title: Id
        display_name:
          type: string
          title: Display Name
      type: object
      required:
      - id
      - display_name
      title: BulkActionSampleContact
    RemoveTagsAction:
      properties:
        type:
          type: string
          const: remove_tags
          title: Type
        tags:
          items:
            type: string
          type: array
          minItems: 1
          title: Tags
          description: Tag IDs to remove (tenant-owned)
      type: object
      required:
      - type
      - tags
      title: RemoveTagsAction
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer