Exports

Create a new data export

post/exports

Request

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

Request body

collectionsExportCollection[] required

The collections of objects to export.

parametersobject nullable

Parameters to pass to the exporter. These are specific to the collection and format, and constrain the export.

format'csv' | 'json'

An enumeration.

columnsstring[] nullable

If provided, the export will only include these columns.

Example request

{
  "collections": [
    "subscribers"
  ],
  "parameters": {
    "status": "active"
  },
  "columns": [
    "id",
    "email"
  ]
}

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.

collectionsExportCollection[] required

The collections of objects to export.

parametersobject nullable

Parameters to pass to the exporter. These are specific to the collection and format, and constrain the export.

format'csv' | 'json'

An enumeration.

columnsstring[] nullable

If provided, the export will only include these columns.

urlstring nullable

The URL of the export file. This is only available after the export has completed.

completion_datestring date-time nullable

The date and time the export completed.

status'error' | 'in_progress' | 'not_started' | 'ready' required

Represents the status of an export.

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.

Example response

{
  "collections": [
    "subscribers"
  ],
  "parameters": {
    "status": "active"
  },
  "columns": [
    "id",
    "email"
  ]
}

Changes

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • breaking

      the response property became optional for the status

    • breaking

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

    • breaking

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

    • breaking

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

    • breaking

      response property url 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 string to no type for status

    • breaking

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

    • warning

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

    • warning

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

    • warning

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

    • warning

      added the new ready 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 PermissionAuthenticationRequirement was removed from the API

    • info

      api tag Exports added

    • info

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

    • info

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

    • info

      added the non-success response with the status

    • info

      added to the response property allOf list for the response status

    • info

      removed from the response property allOf list for the response status

    • info

      removed the collection_empty_invalid enum value from the response property for the response status

    • info

      removed the columns_empty_invalid enum value from the response property for the response status

    • info

      removed the columns_invalid enum value from the response property for the response status