Add a contact
const url = 'https://example.kwickbooking.com/public/v1/contacts';const options = { method: 'POST', headers: { 'X-KB-Publishable-Key': '<X-KB-Publishable-Key>', 'Content-Type': 'application/json' }, body: '{"guestId":"01920000-0000-7000-8000-000000000011","fullName":"Jo Patel","email":"jo@example.com","phone":null,"role":"Events manager"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.kwickbooking.com/public/v1/contacts \ --header 'Content-Type: application/json' \ --header 'X-KB-Publishable-Key: <X-KB-Publishable-Key>' \ --data '{ "guestId": "01920000-0000-7000-8000-000000000011", "fullName": "Jo Patel", "email": "jo@example.com", "phone": null, "role": "Events manager" }'Adds another contact to a guest, such as a company’s events manager. Send an Idempotency-Key header.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Request to create a contact under a guest.
object
Example
{ "guestId": "01920000-0000-7000-8000-000000000011", "fullName": "Jo Patel", "email": "jo@example.com", "phone": null, "role": "Events manager"}Responses
Section titled “Responses”Created
An embedded contact on a guest resource.
object
Example
{ "id": "01920000-0000-7000-8000-000000000012", "guestId": "01920000-0000-7000-8000-000000000011", "fullName": "Jo Patel", "email": "jo@example.com", "phone": null, "role": "Events manager"}Validation failed (https://developers.kwickblocks.ai/problems/validation-failed); Idempotency-Key required (https://developers.kwickblocks.ai/problems/idempotency-key-required)
RFC 9457 problem details. type is a URI with a page describing the problem.
object
Safe to read to a guest.
A machine-readable code on the widget’s routes.
Examples
Validation failed
{ "type": "https://developers.kwickblocks.ai/problems/validation-failed", "title": "Validation failed", "status": 400, "detail": "Some of the details weren't valid. Please check them and try again."}Idempotency-Key required
{ "type": "https://developers.kwickblocks.ai/problems/idempotency-key-required", "title": "Idempotency-Key required", "status": 400, "detail": "This request needs an Idempotency-Key header."}Invalid or missing integration key (https://developers.kwickblocks.ai/problems/invalid-key)
RFC 9457 problem details. type is a URI with a page describing the problem.
object
Safe to read to a guest.
A machine-readable code on the widget’s routes.
Examples
Invalid or missing integration key
{ "type": "https://developers.kwickblocks.ai/problems/invalid-key", "title": "Invalid or missing integration key", "status": 401, "detail": "This integration key isn't valid. Ask the venue's admin for a new one."}RFC 9457 problem details. type is a URI with a page describing the problem.
object
Safe to read to a guest.
A machine-readable code on the widget’s routes.
Examples
Not found
{ "type": "https://developers.kwickblocks.ai/problems/not-found", "title": "Not found", "status": 404, "detail": "I couldn't find that."}Idempotency-Key conflict (https://developers.kwickblocks.ai/problems/idempotency-conflict)
RFC 9457 problem details. type is a URI with a page describing the problem.
object
Safe to read to a guest.
A machine-readable code on the widget’s routes.
Examples
Idempotency-Key conflict
{ "type": "https://developers.kwickblocks.ai/problems/idempotency-conflict", "title": "Idempotency-Key conflict", "status": 409, "detail": "That Idempotency-Key was already used for a different request."}Too many requests (https://developers.kwickblocks.ai/problems/rate-limited)
RFC 9457 problem details. type is a URI with a page describing the problem.
object
Safe to read to a guest.
A machine-readable code on the widget’s routes.
Examples
Too many requests
{ "type": "https://developers.kwickblocks.ai/problems/rate-limited", "title": "Too many requests", "status": 429, "detail": "There have been too many requests. Please try again in a minute."}