---
title: "Save a contact; for a phone already saved the name is updated and aliases are added"
method: POST
path: "/v1/contacts"
tags: ["Public API"]
---

# Save a contact; for a phone already saved the name is updated and aliases are added

`POST /v1/contacts`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/v1/contacts`
- Auth: HTTP bearer

## Request body

- ContactFields
  - `aliases` string[], nullable: Other names, such as wife, mom, accountant
  - `default_country` string: Country calling code for local numbers, such as 7
  - `name` string, required
  - `note` string
  - `phone` string, required: International number; local formats work with default_country

## Response `200`

OK

- ContactBody
  - `aliases` string[], nullable, required: Other names the contact goes by, such as wife or mom
  - `id` integer, required
  - `name` string, required
  - `note` string, required
  - `on_whatsapp` boolean, nullable, required: null until the number was checked
  - `phone` string, required
  - `saved_at` string, date-time, required
  - `source` 'manual' | 'api' | 'whatsapp' | 'vcard' | 'csv', required
  - `updated_at` string, date-time, required

## Other responses

- `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)
