BizKitHub
DocsAPI ReferenceContact/bff/contact/email-upsert
postContactAdmin BFF

/bff/contact/email-upsert

Idempotent on (contact, lower(email)). When the same email already exists on the contact, the row is updated; otherwise a new row is inserted. Position auto-fills as "max + 1" when omitted.

ContactpostBffContactEmail-upsert

Parameters

JSON body

Request body

application/json
customerIdstringRequired

Contact external ID.

Exampleabc123def456ghij
idnumberOptional

Existing row id — provide to update; omit to insert (or upsert by email).

emailstringRequired

Email address.

labelstringOptional

Role label.

ExamplesÚčetníPMBilling
sendInvoicesbooleanOptional

Receive invoices? Default true.

sendRemindersbooleanOptional

Receive overdue reminders? Default true.

sendMarketingbooleanOptional

Receive marketing? Default false.

positionnumberOptional

Display order; auto-assigned to "max + 1" when omitted.

Response schema

1 status code documented

200Success
idnumberRequired

Row id of the inserted or updated record.

insertedbooleanRequired

True for new rows, false when an existing row was updated.

Response example

application/json
{
  "id": 0,
  "inserted": false
}

Request example

POST /bff/contact/email-upsert

post
curl -X POST "https://api.bizkithub.com/bff/contact/email-upsert" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "customerId": "abc123def456ghij",
  "id": 0,
  "email": "[email protected]",
  "label": "Účetní",
  "sendInvoices": false,
  "sendReminders": false,
  "sendMarketing": false,
  "position": 0
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key