Contact.Create
Endpoint
- Method:
POST - Route:
Contact/Create - Authentication:
Authorize
Creates a contact. Account administrators can create on their own account, or on bill-to
accounts listed in AdditionalWebAccess when customerCode is supplied. Master contacts
(configured MasterContactCode for the tenant, with API key) can create under any account by
supplying customerCode. The new contact's code is assigned by the database and returned in
the response. When webAccess is omitted, the contact is created as Administrator. The
contact is also granted Payments API permission (APIUserPermissions PermissionId 4) so
Payments/GetAll and Payments/AddCreditCard succeed for that contact on their own account.
Request Schema
Headers
| Header | Required | Notes |
|---|---|---|
X-Api-Key |
Required when tenant is not resolved by subdomain | Resolves the tenant/customer database. Also required for master-contact elevation. |
Authorization: Bearer {token} |
Required for authorized endpoints | Get a token from Auth/Token or Session/Create. |
JSON Body
Body type: ContactWriteRequestDto
| Field | Type | Required | Notes |
|---|---|---|---|
customerCode |
string |
No | Target account. When omitted, uses the caller's CustomerCode claim. A different account requires master contact access, or an account administrator whose allowed set includes that code. |
contact |
string |
Yes | Contact display name. |
email |
string |
No | Must be a valid email address when supplied. |
phone |
string |
No | |
fax |
string |
No | |
defaultCourtState |
string |
No | |
defaultCourtCounty |
string |
No | |
webAccess |
string |
No | One of None, CopyService, AttorneyService, Both, Administrator. Defaults to Administrator when omitted. |
limitSearchToMyOrders |
bool |
No | Restrict the contact to their own orders/contacts. Administrator-only. |
Login credentials (password) are not managed through this endpoint.
Request Sample
{
"customerCode": "8888",
"contact": "Maria Contact",
"email": "maria.contact@example.com",
"phone": "2135550100",
"fax": "2135550101",
"defaultCourtState": "CA",
"defaultCourtCounty": "Los Angeles",
"webAccess": "AttorneyService",
"limitSearchToMyOrders": false
}
Expected Response Schema
Status Codes
| Status | Notes |
|---|---|
200 OK |
Contact created; the created contact is returned. |
400 Bad Request |
Validation failed (for example an invalid webAccess value or unknown customerCode). |
403 Forbidden |
Caller is not an account administrator / master contact, or cannot create for the target account. |
Success Body
Response type: ContactLookupDto (see GetAll for fields).
The response includes customerCode so callers can confirm which account the contact was created under.