Skip to main content

Create Contact

POST /public/action/contacts/create

Creates a new contact, attached to a client by name.

Authentication: X-API-KEY header (see Authentication).

Request body

FieldTypeDescription
firststringFirst name.
laststringLast name.
emailstringEmail address.
phonestringPhone number.
notesstringFree-text notes.
clientNamestringName of the client to attach the contact to.
defaultContactbooleanMark as the client's default contact.
portalAccessbooleanGrant client-portal access.
invoiceContactbooleanInclude on invoices.

Request

curl -X POST https://api.withmoxie.com/public/action/contacts/create \
-H "X-API-KEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"first": "Jane", "last": "Doe", "email": "jane@acme.example", "clientName": "Acme Kft."}'

Response

Returns the created Contact.

{
"id": "66b0f3b2c3a9e40012ab5500",
"accountId": 10016,
"clientId": "66b0f2a1c3a9e40012ab34cd",
"firstName": "Jane",
"lastName": "Doe",
"email": "jane@acme.example",
"defaultContact": false,
"invoiceContact": false,
"portalAccess": false,
"customValues": []
}