---
title: "Export contacts"
method: POST
path: "/v1/contacts/export"
tags: ["Contacts"]
---

# Export contacts

`POST /v1/contacts/export`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/contacts/export`
- Auth: API key in header `x-api-key`

Exports contacts as JSON or CSV, returning the serialized data and a count of exported records.

## Request body

- object
  - `ids` ContactId[], nullable
  - `format` 'json' | 'csv', nullable
  - `filters` object, nullable
    - `status` 'active' | 'paused' | 'blocked' | 'archived', nullable
    - `tags` string[], nullable
  - `fields` string[], nullable

## Response `200`

Success

- object
  - `data` string, required
  - `format` 'json' | 'csv', required
  - `count` integer, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

[API](https://skmtc.dev/samva/apis/samva-api.md) · [All operations](https://skmtc.dev/samva/apis/samva-api/llms.txt) · [OpenAPI document](https://skmtc.dev/samva/apis/samva-api/revisions/a99408542cc3?raw)
