Skip to content

Mass action on contacts

Request

Perform a bulk action on contacts matching a filter.

Supported action types: | Type | Payload | Description | |------|---------|-------------| | contact_add_tags | {tag_uuid} | Add a tag | | contact_remove_tags | {tag_uuid} | Remove a tag | | contact_replace_tags | {tag_uuids: [...]} | Replace all tags | | contact_change_list | {list_uuid} | Move to a different list | | contact_change_pipeline_stage | {pipeline_stage_uuid} | Change pipeline stage | | contact_change_custom_field | {custom_field_uuid, value} | Set custom field value | | contact_add_to_flow | {flow_uuid} | Add to automation | | contact_cancel_from_flows | {flow_uuids: [...]} | Cancel from automations | | contact_delete | — | Delete contacts | | contact_export_csv | — | Export to CSV | | contact_mark_read | — | Mark conversations as read |

Security
bearerAuth
Bodyapplication/jsonrequired
typestringrequired

Action type.

Enum:"contact_add_tags""contact_remove_tags""contact_replace_tags""contact_change_list""contact_change_pipeline_stage""contact_change_custom_field""contact_add_to_flow""contact_cancel_from_flows""contact_delete""contact_export_csv"
Example:"contact_add_tags"
filterobjectrequired

Filter to select contacts. Use {ids: ["uuid1", "uuid2"]} for specific contacts or {all: true} for all matching contacts.

payloadobject

Action-specific payload (see table above).

PUT
/leads/api/leads/mass-action
curl -i -X PUT \
  https://leadgen.grinfi.io/leads/api/leads/mass-action \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "contact_add_tags",
    "filter": {
      "ids": [
        "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      ]
    },
    "payload": {
      "tag_uuid": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
    }
  }'

Responses

Action executed.

Response
No content