---
title: "Import contacts from a vCard or CSV file"
method: POST
path: "/api/v1/workspaces/{workspaceId}/contacts/import"
tags: ["Contacts"]
---

# Import contacts from a vCard or CSV file

`POST /api/v1/workspaces/{workspaceId}/contacts/import`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/workspaces/{workspaceId}/contacts/import`
- Auth: HTTP bearer

## Path parameters

- `workspaceId` integer, required

## Request body

- ImportFields
  - `content` string, required: Text of the file
  - `default_country` string: Country calling code for numbers saved without it, such as 7
  - `format` 'vcard' | 'csv', required: vcard: .vcf from iPhone, Android, macOS, Google or Outlook; csv: Google or Outlook export

## Response `200`

OK

- ImportBody
  - `errors` string[], nullable, required
  - `imported` integer, required
  - `skipped` integer, required
  - `updated` integer, required

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
