Skip to main content
POST
https://api-zangtable.com
/
projects
/
{project}
/
export
/
database
POST /projects/{project}/export/database
curl --request POST \
  --url https://api-zangtable.com/projects/{project}/export/database \
  --header 'Authorization: <authorization>'
{
  "ok": true,
  "data": {},
  "error": {},
  "request_id": "<string>"
}
Creates a database export for selected tables.

Endpoint details

Authorization
string
required
Bearer pat_... (Project API Token). Keep this token on your backend/server.
project
string
required
Project slug. This acts as the Project ID in API paths.
ok
boolean
required
true for a successful response and false for an error response.
data
object | null
Endpoint-specific response data when ok is true; null on errors.
error
object | null
Error code and message when ok is false; null on success.
request_id
string
required
Request identifier you can use when troubleshooting a specific API call.

Authentication

Project API Token.

Parameters

Body optional: format zip, zip-csv, or json, default zip; include_tables optional array; exclude_tables optional array; table_options optional object keyed by table name; file_name optional.

Request examples

Basic request:
curl -X POST "$BASE_URL/projects/{project}/export/database" \
  -H 'Authorization: Bearer pat_PROJECT_TOKEN' \
  -H 'Content-Type: application/json' \
  --data '{}'
Full request:
curl -X POST "$BASE_URL/projects/{project}/export/database" \
  -H 'Authorization: Bearer pat_PROJECT_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'X-Operation-Key: edit-profile-email' \
  -H 'X-Operation-Run-Id: oprun_client_20260602_001' \
  --data '{"format":"json","include_tables":["contacts","companies"],"exclude_tables":[],"table_options":{"contacts":{"columns":["id","email"],"filters":{"status":"active"},"sort":"id","order":"asc","limit":1000,"offset":0}},"file_name":"crm_database"}'

Response examples

Success:
{
  "ok": true,
  "data": {
    "export": {
      "id": "exp_20260601_182345_a1b2c3d4e5",
      "kind": "database_export",
      "scope": "project",
      "project": "example_project",
      "table": null,
      "format": "zip",
      "download_name": "example_project_database_export.zip",
      "download_url": "/projects/example_project/export/download/exp_20260601_182345_a1b2c3d4e5",
      "storage_backend": "local",
      "content_type": "application/zip",
      "row_count": null,
      "table_count": 2,
      "size_bytes": 2048,
      "status": "ready",
      "status_reason": null,
      "missing_at": null,
      "created_at": "2026-06-02T01:23:45Z",
      "expires_at": null
    }
  },
  "error": null,
  "request_id": "req_20260602T012345_123456Z_abc123def456",
  "operation_key": "edit-profile-email",
  "operation_run_id": "oprun_20260602T012300_000000Z_a1b2c3d4e5f6",
  "operation_grouping_status": "accepted_provided_run",
  "meta": {
    "generated_at": "2026-06-02T01:23:45Z"
  }
}
Error or alternate response:
{
  "ok": false,
  "data": null,
  "error": {
    "code": "no_tables_selected",
    "message": "No tables were selected for export."
  },
  "request_id": "req_20260602T012345_123456Z_abc123def456",
  "meta": {
    "generated_at": "2026-06-02T01:23:45Z"
  }
}