Create Contact
Creates a new contact, attached to a client by name.
Authentication: X-API-KEY header (see Authentication).
Request body
| Field | Type | Description |
|---|---|---|
| first | string | First name. |
| last | string | Last name. |
| string | Email address. | |
| phone | string | Phone number. |
| notes | string | Free-text notes. |
| clientName | string | Name of the client to attach the contact to. |
| defaultContact | boolean | Mark as the client's default contact. |
| portalAccess | boolean | Grant client-portal access. |
| invoiceContact | boolean | Include 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": []
}