Skip to Content
HelvetlyDocs
API referenceClients

Create 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.

POST
/api/v1/clients

Creates a client with the next client number. Only name is required.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body

Fields of a client. Blank text or null clears a field; unknown fields are refused (400).

name?string
Lengthlength <= 200
preferred_name?|
Lengthlength <= 200
is_company?boolean
is_active?boolean
email?|
Formatemail
Lengthlength <= 254
billing_email?|
Formatemail
Lengthlength <= 254
phone?|

Normalised to E.164.

Lengthlength <= 30
website?|
Lengthlength <= 255
street?|
Lengthlength <= 200
street_number?|
Lengthlength <= 20
apt?|
Lengthlength <= 50
zip?|
Lengthlength <= 20
city?|
Lengthlength <= 100
country?|

ISO 3166 alpha-2, e.g. CH.

vat_number?|

Swiss UID (CHE-123.456.789) or an EU VAT number.

Lengthlength <= 30
registration_number?|
Lengthlength <= 100
language?|
Value in"de""fr""it""en"null
currency?|

ISO 4217, e.g. CHF.

payment_terms_days?|
Range0 <= value <= 365
internal_id?|
Lengthlength <= 100
note?|
Lengthlength <= 1000
tags?array<>|
Itemsitems <= 10
dunning_enabled?boolean
einvoice_format?string
Value in"none""xrechnung_ubl""xrechnung_cii""peppol"

Response Body

Created

application/json
  1. response
data*
Example Request
curl -X POST 'https://app.helvetly.com/api/v1/clients' \  -H 'Content-Type: application/json' \  -d '{  "name": "Muster AG",  "is_company": true,  "email": "info@muster.example",  "city": "Zurich",  "country": "CH",  "language": "de",  "currency": "CHF",  "payment_terms_days": 30,  "tags": [    "vip"  ]}'
Example Response
{  "data": {    "id": "string",    "number": 0,    "name": "string",    "preferred_name": "string",    "is_company": true,    "is_active": true,    "email": "string",    "billing_email": "string",    "phone": "string",    "website": "string",    "street": "string",    "street_number": "string",    "apt": "string",    "zip": "string",    "city": "string",    "country": "string",    "vat_number": "string",    "electronic_address": {      "scheme": "string",      "id": "string"    },    "registration_number": "string",    "region": "string",    "language": "de",    "currency": "string",    "payment_terms_days": 0,    "internal_id": "string",    "note": "string",    "tags": [      "string"    ],    "dunning_enabled": true,    "einvoice_format": "none",    "leitweg_id": "string",    "portal_enabled": true,    "portal_invited_at": "2019-08-24T14:15:22Z",    "portal_signed_in_at": "2019-08-24T14:15:22Z",    "contacts": [      {        "id": "string",        "name": "string",        "role": "string",        "email": "string",        "phone": "string",        "is_primary": true      }    ],    "is_draft": true,    "missing_fields": [      "string"    ],    "files_count": 0,    "pending_change_request": true,    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}