Skip to main content
POST
/
api
/
public
/
v1
/
forms
/
{codeOrId}
/
submissions
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({values: {email: '[email protected]', message: 'Please call me'}})
};

fetch('{protocol}://{host}/api/public/v1/forms/{codeOrId}/submissions?publicKey=', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "submissionId": "01935-1111-2222-3333-444444444444",
  "status": "duplicate",
  "confirmation": null
}

Authorizations

publicKey
string
query
required

Public widget/form key (pk_live_…). Exchanged for a session token by POST /api/public/v1/chat/sessions. Public Forms operations accept the same key directly, supplied via this publicKey query param, the X-Comerix-Public-Key header (publicFormKey scheme), or in the JSON body.

Path Parameters

codeOrId
string
required

The form's stable code or its UUID.

Query Parameters

publicKey
string

Body

application/json
values
object
required

Submitted values keyed by field name.

visitorId
string | null

Anonymous visitor token, for stitching submissions to a visitor.

conversationId
string | null

Attach the submission to a chat conversation.

clientSubmissionId
string | null

Client-generated id for idempotent retries; a repeat returns the original result with status duplicate.

channel
string | null

Origin channel label (e.g. web).

locale
string | null

BCP-47 locale of the submission.

_hp
string | null

Honeypot field — must be empty; a non-empty value marks the submission as spam (rejected).

publicKey
string

Public gateway key, if not sent as a query param or header.

Response

Duplicate of an earlier submission (same clientSubmissionId).

submissionId
string
required
status
enum<string>
required
Available options:
recorded,
duplicate
confirmation
string | null

Optional confirmation message to show the visitor.