---
updatedAt: 2026-09-18T15:16:34.000Z
agentTools:
  projectIndex: https://developers.burodeingresos.com/llms.txt
---

# Create Export

Requests an asynchronous CSV export of a **completed** verification bulk. One file is generated per entity. The company is always taken from the API key, never from the request body.

Requests are **idempotent**: the same `bulk_id` with the same `entities` returns `202` with the same `export_id` instead of generating a duplicate. A `failed` or `expired` export can be requested again.

When the files are ready, the `export.completed` webhook event is sent (no download links in the event). Webhooks created before this feature launched must subscribe to the event via `PATCH /webhooks/{webhook_id}`.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Buró de Ingresos API",
    "version": "v1.2.25",
    "description": "Verify income and employment data with just a CURP. Made with ❤️ in Mexico 🇲🇽"
  },
  "servers": [
    {
      "url": "https://api.burodeingresos.com",
      "description": "Production server"
    }
  ],
  "tags": [
    {
      "name": "Exports",
      "description": "Asynchronous CSV exports of a completed bulk's results. One file per entity; download links are re-issued on every read and the export is available for 7 days after completion."
    }
  ],
  "paths": {
    "/exports": {
      "post": {
        "tags": [
          "Exports"
        ],
        "summary": "Create Export",
        "operationId": "createExport",
        "x-readme": {
          "slug": "create-export"
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Requests an asynchronous CSV export of a **completed** verification bulk. One file is generated per entity. The company is always taken from the API key, never from the request body.\n\nRequests are **idempotent**: the same `bulk_id` with the same `entities` returns `202` with the same `export_id` instead of generating a duplicate. A `failed` or `expired` export can be requested again.\n\nWhen the files are ready, the `export.completed` webhook event is sent (no download links in the event). Webhooks created before this feature launched must subscribe to the event via `PATCH /webhooks/{webhook_id}`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExportRequest"
              },
              "examples": {
                "request": {
                  "value": {
                    "bulk_id": "136d551e-5293-438e-ad79-5831c43a71b1",
                    "entities": [
                      "profile",
                      "invoices"
                    ]
                  }
                },
                "with payment info (include_payment_info=true)": {
                  "value": {
                    "bulk_id": "136d551e-5293-438e-ad79-5831c43a71b1",
                    "entities": [
                      "invoices"
                    ],
                    "include_payment_info": true
                  }
                },
                "with estimates": {
                  "value": {
                    "bulk_id": "136d551e-5293-438e-ad79-5831c43a71b1",
                    "entities": [
                      "profile",
                      "estimates"
                    ],
                    "estimates": {
                      "window_months": 12,
                      "sources": "all",
                      "history": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Export accepted — or already requested with the same scope, in which case the same export_id is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportResponse"
                },
                "examples": {
                  "queued": {
                    "value": {
                      "export_id": "7f2c8a90-1b2c-4d3e-9f4a-5b6c7d8e9f0a",
                      "bulk_id": "136d551e-5293-438e-ad79-5831c43a71b1",
                      "status": "queued",
                      "requested_at": "2026-09-18T14:44:23Z",
                      "files": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "validation_error": {
                    "value": {
                      "error": {
                        "code": "validation_error",
                        "message": "Invalid input.",
                        "details": "bulk_id is required"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The bulk_id does not exist on your account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "bulk_not_found": {
                    "value": {
                      "error": {
                        "code": "bulk_not_found",
                        "message": "No bulk found with the specified ID.",
                        "details": "The bulk_id 136d551e-5293-438e-ad79-5831c43a71b1 does not correspond to an existing bulk."
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The bulk is still being processed. Wait until it finishes and request the export again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "bulk_not_ready": {
                    "value": {
                      "error": {
                        "code": "bulk_not_ready",
                        "message": "The bulk is still being processed.",
                        "details": "12 verification(s) are still in progress. Wait until the bulk finishes and request the export again."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        }
      },
      "ErrorDetail": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "A machine-readable error code."
          },
          "message": {
            "type": "string",
            "description": "A human-readable message providing a summary of the error."
          },
          "details": {
            "type": "string",
            "description": "Additional details about the error, which can help in debugging."
          }
        }
      },
      "CreateExportRequest": {
        "type": "object",
        "required": [
          "bulk_id",
          "entities"
        ],
        "properties": {
          "bulk_id": {
            "type": "string",
            "format": "uuid",
            "description": "A completed verification bulk that belongs to your account."
          },
          "entities": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "profile",
                "invoices",
                "estimates"
              ]
            },
            "description": "Entities to export; one CSV file is generated per entity. Order and duplicates are ignored."
          },
          "include_payment_info": {
            "type": "boolean",
            "default": false,
            "description": "Optional. When true, `invoices.csv` includes a `payment_info` column with the payment details of each invoice, with the same fields as `GET /invoices?include_payment_info=true`. Invoices with no associated payments carry an empty array `[]`. The flag is part of the idempotency key: the same `bulk_id` and `entities` with a different `include_payment_info` value is a new export. Defaults to false."
          },
          "estimates": {
            "type": "object",
            "description": "Optional. Options for `estimates.csv`, with the same values, defaults and validation as `GET /estimates/{identifier}`. Only allowed when `entities` includes `estimates`; otherwise the request fails with 400. An invalid value fails with 400 `invalid_parameter`. The resolved options are part of the idempotency key: the same `bulk_id` and `entities` with different estimates options is a new export.",
            "properties": {
              "window_months": {
                "type": "integer",
                "enum": [
                  3,
                  6,
                  9,
                  12,
                  24
                ],
                "default": 12,
                "description": "Months of history used. See `GET /estimates/{identifier}`."
              },
              "sources": {
                "type": "string",
                "enum": [
                  "all",
                  "invoices",
                  "employments"
                ],
                "default": "all",
                "description": "Data used for the estimates. See `GET /estimates/{identifier}`."
              },
              "as_of": {
                "type": "string",
                "format": "date",
                "description": "Computes the estimates as of this date (`YYYY-MM-DD`, Mexico City time). Defaults to the day the export is requested, and that date is kept for the life of the export. Cannot be in the future, and `as_of` minus `window_months` must be within the last 24 months."
              },
              "history": {
                "type": "boolean",
                "default": false,
                "description": "When `true`, `estimates.csv` has one row per person per month, going back from the month of `as_of`, up to 18 months. When `false`, one row per person."
              }
            }
          }
        }
      },
      "ExportFile": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "invoices.csv"
          },
          "rows": {
            "type": "integer",
            "example": 812000
          },
          "bytes": {
            "type": "integer",
            "example": 410000000
          },
          "url": {
            "type": "string",
            "description": "Signed download link, valid for about 1 hour. Re-issued fresh on every read of GET /exports/{export_id}. Only present while the export is completed and not expired."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration of this download link."
          }
        }
      },
      "ExportResponse": {
        "type": "object",
        "properties": {
          "export_id": {
            "type": "string",
            "format": "uuid"
          },
          "bulk_id": {
            "type": "string",
            "format": "uuid"
          },
          "estimates": {
            "type": "object",
            "description": "Present only when `estimates` was requested. The options `estimates.csv` is computed with, defaults included.",
            "properties": {
              "window_months": {
                "type": "integer"
              },
              "sources": {
                "type": "string"
              },
              "as_of": {
                "type": "string",
                "format": "date"
              },
              "history": {
                "type": "boolean"
              }
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "completed",
              "failed",
              "expired"
            ]
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "The export is available for 7 days after completion. After this moment the files are purged."
          },
          "error_code": {
            "type": "string",
            "description": "Present only when status is failed."
          },
          "error_message": {
            "type": "string",
            "description": "Present only when status is failed."
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportFile"
            },
            "description": "Empty until the export completes, and empty again once it expires."
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "API Key for authenticating requests."
      }
    }
  }
}
```