---
title: "Update a contact"
method: PUT
path: "/api/v1/workspaces/{workspaceId}/contacts/{contactId}"
tags: ["Contacts"]
---

# Update a contact

`PUT /api/v1/workspaces/{workspaceId}/contacts/{contactId}`

## Request

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

## Path parameters

- `workspaceId` integer, required
- `contactId` integer, required

## 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

- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `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)
