Create a client

POSThttp://localhost:4000/api/clients/create

Adds a new client. An email or phone number that already belongs to a client is rejected, unless you set throwErrorOnClientExists to false.

Your API key needs the clients.MANAGE permission.

Body Params

firstNamestringrequired

First name.

lastNamestring

Last name.

emailstringrequired

Email address. Masked or left out when the API key lacks email visibility.

languagestring

Preferred language code, for example en.

countrystring

Country name.

citystring

City.

addressstring

Street address.

campaignCodestring

Code of the marketing campaign the client came from.

brandIdinteger

ID of the brand the client belongs to.

assignedToUserIdinteger

ID of the agent who owns the client.

assignedToHierarchyIdinteger

ID of the team that owns the client.

phonestring or integerrequired

Phone number. Send it in international format, such as +35799123456, or send the national number together with phoneDialCode.

phoneDialCodeinteger

Dial code without the plus sign. Only needed when phone is not in international format.

phoneCountryCodestring

Two-letter country code. Only needed together with phoneDialCode.

phoneDefaultCountrystring

Country to assume for a phone number with no dial code, for example CY.

throwErrorOnClientExistsboolean

When false, a client who already exists is returned instead of an error. Defaults to true.

utmSourcestring

UTM source. Saved only when campaignCode is sent.

utmMediumstring

UTM medium. Saved only when campaignCode is sent.

utmCampaignstring

UTM campaign. Saved only when campaignCode is sent.

utmTermstring

UTM term. Saved only when campaignCode is sent.

utmContentstring

UTM content. Saved only when campaignCode is sent.

formobject

Any extra answers from your form. Saved only when campaignCode is sent.

Responses

200Successful response.
400The request is not valid.
401The API key is missing, invalid, expired or disabled.
403The API key does not have the permission this endpoint needs.