Add a contact to a client
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.
Adds a person to the client. The first contact becomes primary; with is_primary true a later one takes over and the others are unset. A client has exactly one primary contact while it has any. 422 validation_failed with details.fields for a missing name or a bad email or phone; 404 for an unknown client. Not idempotent: a retry adds a second contact.
bearerAuthAuthorizationBearer <token>A personal API token, hvt_…, with scopes such as read:* or write:invoices
id*stringThe client's id.
application/json- body
Fields of a contact. name is required on create. Unknown fields are refused (400).
name?stringlength <= 200role?|length <= 100email?|emaillength <= 254phone?|Normalised to E.164.
length <= 30is_primary?booleantrue makes this the primary contact and unsets the others. false on the current primary is refused (422); make another contact primary instead.
Created
application/json- response
data*curl -X POST 'https://app.helvetly.com/api/v1/clients/string/contacts' \ -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}'{ "data": { "id": "string", "name": "string", "role": "string", "email": "string", "phone": "string", "is_primary": true }}