Skip to Content
HelvetlyDocs
API referenceClients

Update a contact

Needs a token with the write:clients scope. Authentication

Try in Playground sends a real request to app.helvetly.com with a token you paste. It stays in this browser tab only (session storage) and goes to no one else.

PATCH
/api/v1/clients/{id}/contacts/{contact_id}

Changes only the fields sent; null or blank clears role, email or phone (not name). is_primary true makes this contact primary and unsets the others; is_primary false on the current primary is refused with 422 (make another contact primary instead). Safe to retry.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token, hvt_…, with scopes such as read:* or write:invoices

Path Parameters

id*string

The client's id.

contact_id*string

The contact's id.

Request Body

application/json
  1. body

Fields of a contact. name is required on create. Unknown fields are refused (400).

name?string
Lengthlength <= 200
role?|
Lengthlength <= 100
email?|
Formatemail
Lengthlength <= 254
phone?|

Normalised to E.164.

Lengthlength <= 30
is_primary?boolean

true makes this the primary contact and unsets the others. false on the current primary is refused (422); make another contact primary instead.

Response Body

OK

application/json
  1. response
data*
Example Request
curl -X PATCH 'https://app.helvetly.com/api/v1/clients/string/contacts/string' \  -H 'Content-Type: application/json' \  -d '{  "name": "Anna Keller",  "role": "Accounts payable",  "email": "anna.keller@example.com",  "phone": "+41 44 123 45 67",  "is_primary": true}'
Example Response
{  "data": {    "id": "string",    "name": "string",    "role": "string",    "email": "string",    "phone": "string",    "is_primary": true  }}