Create inquiry
Submits a contact-form message to the merchant. Two payload shapes are accepted. The modern one is formKey plus a fields object keyed by the field keys returned by GET /contact-forms/{formKey} — every value is re-validated against that schema server-side and unknown keys are stripped. The legacy flat shape (name, email, subject, message, phone) is still accepted for older storefronts. A request may send both; fields wins and the flat fields fill in whatever it omits.
No authentication. Include the honeypot field in your markup as a hidden, empty input — any non-empty value rejects the request. Rate limited to 3 submissions per minute, which is deliberately tight: this route mails the merchant.
For /api/vc/{connectionId}/* routes the connectionId (vc_*) is in the URL path — not a header. Live-mode requests must also send a matching Origin header.
In: header
Path Parameters
Sales channel ID (vc_*), the canonical salesChannelId. connectionId is the deprecated name of the same value and is still the literal path segment.
Header Parameters
Origin of the storefront page making the call, for example https://shop.example.com. Required: a request with no Origin header is refused with 403. On a LIVE channel its host must equal the channel's registered domain (or one of its subdomains) or match an allowed origin. A TEST channel with no domain accepts any origin; once a domain is set it is matched as on LIVE.
Version of the calling SDK (the Brainerce SDK sends it automatically). Informational: it is recorded on the channel and never changes the response.
Sender name. Legacy flat shape — prefer fields keyed by the form schema. Mirrored onto the same column fields.name writes, so sending both is redundant, not additive.
1 <= length <= 120Sender email, so the merchant can reply. Legacy flat shape — prefer fields.
length <= 254Subject line. Legacy flat shape — prefer fields.
1 <= length <= 200Message body. Legacy flat shape — prefer fields.
1 <= length <= 10000Sender phone number, when the form collects one. Legacy flat shape.
length <= 40Which contact form this submission belongs to, as listed by GET /contact-forms. Defaults to main. Lowercase letters, digits, _ and -; must start with a letter.
^[a-z][a-z0-9_-]{0,39}$The submitted values, keyed by the field keys from GET /contact-forms/{formKey}. Every value is re-validated against that form's schema server-side and any key the schema does not declare is STRIPPED SILENTLY — a form built from a stale schema loses those values without an error. This is the preferred shape; the flat fields above exist only for older storefronts.
Storefront locale at submission time (e.g. "he"). Sets the language of the confirmation email and how the inquiry is displayed to the merchant. Falls back to the store language.
length <= 10Free-form JSON object of your own choosing: referrer, UTM parameters, the page the form sat on. Stored as JSON for your own reporting, never interpreted.
Logged-in customer this inquiry belongs to, when the storefront knows one. Optional — contact forms are open to guests.
length <= 120Free-form JSON object of your own choosing, stored alongside the inquiry and never interpreted.
Anti-bot honeypot. Render it hidden and leave it empty; a filled value rejects the request. Bots complete every text input, humans never see this one.
curl -X POST "https://api.brainerce.com/api/vc/string/inquiries" \ -H "origin: string" \ -H "X-SDK-Version: string" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "clinq_abc123",
"status": "NEW",
"createdAt": "2026-01-15T10:30:00.000Z"
}{
"statusCode": 400,
"code": "VALIDATION_FAILED",
"message": "name should not be empty, price must be a positive number",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/vc/{connectionId}/inquiries"
}{
"statusCode": 403,
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope: products:write",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/vc/{connectionId}/inquiries"
}{
"statusCode": 404,
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/vc/{connectionId}/inquiries"
}{
"statusCode": 429,
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": {
"retryAfterSeconds": 12
},
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/vc/{connectionId}/inquiries"
}Get contact form schema
Returns the full field schema for one contact form: every field's key, type, label, placeholder, whether it is required, and its validation bounds.
Subscribe to marketing email
Signs an address up for the store's marketing email — the newsletter popup, the footer capture bar, an exit-intent modal.