Bulk Actions

Create Bulk Action

Changed on

Create a new bulk action

post/bulk_actions

Request

  • Base URL
    https://api.buttondown.com/v1
  • URL
    https://api.buttondown.com/v1/bulk_actions
  • Auth
    API key in header Authorization

Request body

type'add_notes' | 'apply_tags' | 'apply_metadata' | 'rename_metadata' | 'ban_subscribers' | 'delete_subscribers' | 'gift_subscribers' | 'ungift_subscribers' | 'reactivate_subscribers' | 'mark_subscribers_as_not_spammy' | 'resubscribe_subscribers' | 'send_emails' | 'unban_subscribers' | 'send_reminders' | 'unsubscribe_subscribers' | 'delete_attachments' | 'delete_emails' | 'delete_images' | 'update_email_types' | 'update_archival_modes' | 'update_commenting_modes' | 'mark_inbox_items_read' | 'delete_inbox_items' | 'change_tags_colors' | 'delete_comments' | 'delete_surveys' | 'delete_survey_responses' | 'delete_tags' | 'mark_comments_as_active' | 'mark_comments_as_spammy' | 'replay_events' | 'update_survey_statuses' | 'cancel_stripe_subscriptions' | 'modify_stripe_subscriptions' | 'pause_stripe_subscriptions' required

Represents the action being performed on a bulk of objects.

(Not to be coy, but these names should be self-explanatory.)

metadataobject required

Parameters for the bulk action. The exact shape depends on type — typically an ids list of object IDs to act on.

Example request

{
  "metadata": {
    "ids": [
      "611c8825-6f21-4544-bb47-9f50453e9cb0",
      "418c701a-efe3-4e3d-a404-e635a2f28775"
    ]
  }
}

Response

Created

idstring required

A unique TypeID associated with the object.

creation_datestring date-time required

The date and time at which the object was first created.

type'add_notes' | 'apply_tags' | 'apply_metadata' | 'rename_metadata' | 'ban_subscribers' | 'delete_subscribers' | 'gift_subscribers' | 'ungift_subscribers' | 'reactivate_subscribers' | 'mark_subscribers_as_not_spammy' | 'resubscribe_subscribers' | 'send_emails' | 'unban_subscribers' | 'send_reminders' | 'unsubscribe_subscribers' | 'delete_attachments' | 'delete_emails' | 'delete_images' | 'update_email_types' | 'update_archival_modes' | 'update_commenting_modes' | 'mark_inbox_items_read' | 'delete_inbox_items' | 'change_tags_colors' | 'delete_comments' | 'delete_surveys' | 'delete_survey_responses' | 'delete_tags' | 'mark_comments_as_active' | 'mark_comments_as_spammy' | 'replay_events' | 'update_survey_statuses' | 'cancel_stripe_subscriptions' | 'modify_stripe_subscriptions' | 'pause_stripe_subscriptions' required

Represents the action being performed on a bulk of objects.

(Not to be coy, but these names should be self-explanatory.)

metadataobject required

Parameters for the bulk action. The exact shape depends on type — typically an ids list of object IDs to act on.

status'not_started' | 'in_progress' | 'processed' | 'failed' required

Represents the status of a bulk action.

No action is required to move from one state or another; Buttondown internally handles the transitions, and exposing the status is for observability purposes only.

completion_datestring date-time nullable

The date and time at which the bulk action was completed.

Example response

{
  "metadata": {
    "ids": [
      "611c8825-6f21-4544-bb47-9f50453e9cb0",
      "418c701a-efe3-4e3d-a404-e635a2f28775"
    ]
  }
}

Changes

    • info

      added the non-success response with the status

    • breaking

      request property was restricted to a list of enum values

    • breaking

      the request property type changed from no type to string

    • breaking

      response property completion_date list-of-types was widened by adding types null to media type application/json of response 201

    • breaking

      the response's property type changed from no type to string for status

    • breaking

      the response's property type changed from no type to string for status

    • breaking

      the response's property format changed from uuid to no format for status

    • breaking

      the response's property type changed from no type to string for status

    • warning

      removed from the request property allOf list

    • warning

      added the new add_notes enum value to the response property for the response status

    • warning

      added the new apply_metadata enum value to the response property for the response status

    • warning

      added the new apply_tags enum value to the response property for the response status

    • warning

      added the new ban_subscribers enum value to the response property for the response status

    • warning

      added the new cancel_stripe_subscriptions enum value to the response property for the response status

    • warning

      added the new change_tags_colors enum value to the response property for the response status

    • warning

      added the new delete_attachments enum value to the response property for the response status

    • warning

      added the new delete_comments enum value to the response property for the response status

    • warning

      added the new delete_emails enum value to the response property for the response status

    • warning

      added the new delete_images enum value to the response property for the response status

    • warning

      added the new delete_inbox_items enum value to the response property for the response status

    • warning

      added the new delete_subscribers enum value to the response property for the response status

    • warning

      added the new delete_survey_responses enum value to the response property for the response status

    • warning

      added the new delete_surveys enum value to the response property for the response status

    • warning

      added the new delete_tags enum value to the response property for the response status

    • warning

      added the new gift_subscribers enum value to the response property for the response status

    • warning

      added the new mark_comments_as_active enum value to the response property for the response status

    • warning

      added the new mark_comments_as_spammy enum value to the response property for the response status

    • warning

      added the new mark_inbox_items_read enum value to the response property for the response status

    • warning

      added the new mark_subscribers_as_not_spammy enum value to the response property for the response status

    • warning

      added the new modify_stripe_subscriptions enum value to the response property for the response status

    • warning

      added the new pause_stripe_subscriptions enum value to the response property for the response status

    • warning

      added the new reactivate_subscribers enum value to the response property for the response status

    • warning

      added the new rename_metadata enum value to the response property for the response status

    • warning

      added the new replay_events enum value to the response property for the response status

    • warning

      added the new resubscribe_subscribers enum value to the response property for the response status

    • warning

      added the new send_emails enum value to the response property for the response status

    • warning

      added the new send_reminders enum value to the response property for the response status

    • warning

      added the new unban_subscribers enum value to the response property for the response status

    • warning

      added the new ungift_subscribers enum value to the response property for the response status

    • warning

      added the new unsubscribe_subscribers enum value to the response property for the response status

    • warning

      added the new update_archival_modes enum value to the response property for the response status

    • warning

      added the new update_commenting_modes enum value to the response property for the response status

    • warning

      added the new update_email_types enum value to the response property for the response status

    • warning

      added the new update_survey_statuses enum value to the response property for the response status

    • info

      the endpoint scheme security ApiKeyAuth was added to the API

    • info

      the endpoint scheme security BulkActionAuth was removed from the API

    • info

      api tag Bulk Actions added

    • info

      added the new add_notes enum value to the request property

    • info

      added the new apply_metadata enum value to the request property

    • info

      added the new apply_tags enum value to the request property

    • info

      added the new ban_subscribers enum value to the request property

    • info

      added the new cancel_stripe_subscriptions enum value to the request property

    • info

      added the new change_tags_colors enum value to the request property

    • info

      added the new delete_attachments enum value to the request property

    • info

      added the new delete_comments enum value to the request property

    • info

      added the new delete_emails enum value to the request property

    • info

      added the new delete_images enum value to the request property

    • info

      added the new delete_inbox_items enum value to the request property

    • info

      added the new delete_subscribers enum value to the request property

    • info

      added the new delete_survey_responses enum value to the request property

    • info

      added the new delete_surveys enum value to the request property

    • info

      added the new delete_tags enum value to the request property

    • info

      added the new gift_subscribers enum value to the request property

    • info

      added the new mark_comments_as_active enum value to the request property

    • info

      added the new mark_comments_as_spammy enum value to the request property

    • info

      added the new mark_inbox_items_read enum value to the request property

    • info

      added the new mark_subscribers_as_not_spammy enum value to the request property

    • info

      added the new modify_stripe_subscriptions enum value to the request property

    • info

      added the new pause_stripe_subscriptions enum value to the request property

    • info

      added the new reactivate_subscribers enum value to the request property

    • info

      added the new rename_metadata enum value to the request property

    • info

      added the new replay_events enum value to the request property

    • info

      added the new resubscribe_subscribers enum value to the request property

    • info

      added the new send_emails enum value to the request property

    • info

      added the new send_reminders enum value to the request property

    • info

      added the new unban_subscribers enum value to the request property

    • info

      added the new ungift_subscribers enum value to the request property

    • info

      added the new unsubscribe_subscribers enum value to the request property

    • info

      added the new update_archival_modes enum value to the request property

    • info

      added the new update_commenting_modes enum value to the request property

    • info

      added the new update_email_types enum value to the request property

    • info

      added the new update_survey_statuses enum value to the request property

    • info

      added the non-success response with the status

    • info

      removed from the response property allOf list for the response status