Create a contact form widget
POST /api/workspaces/{workspaceId}/widgets/contact
Creates a new contact form widget linked to a specific channel. Submissions are routed into oHallo as new conversations on the linked channel.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The workspace to create the widget in.
Request Body
Section titled “Request Body ”object
Display name for the widget.
Example
Website Contact FormChannel that form submissions are routed to.
Example
d4e5f6a7-b8c9-4123-8567-890abcdef012Freeform label for the type of form.
Example
general_inquiryForm field definitions.
object
Visual style: outlined, filled, or minimal.
Example
outlinedCSS colour value for the primary accent.
Example
#000000Additional CSS injected into the widget iframe.
Colour theme.
Message displayed after successful submission.
URL to redirect to after submission.
Whether the widget is active.
Example
trueResponses
Section titled “ Responses ”The widget was created.
A contact form widget that can be embedded on external websites. Submissions are routed into oHallo as new conversations on the linked channel.
object
Unique identifier for the widget.
Example
wgt_aabbccdd-eeff-0011-2233-445566778899The workspace this widget belongs to.
Example
w1a2b3c4-5678-9abc-def0-1234567890abDisplay name for the widget.
Example
Website Contact FormChannel that form submissions are routed to.
Example
d4e5f6a7-b8c9-0123-4567-890abcdef012Freeform label for the type of form.
Example
general_inquiryForm field definitions.
object
Unique identifier for the field within the form.
Field type: text, email, phone, textarea, number, select, checkbox, date, time, start-time, end-time, file, captcha, or hidden. A hidden field is never rendered; its value is supplied by the embedding page.
Label displayed above the field.
Placeholder text inside the field.
Whether the field must be filled before submission.
Layout width: full or half.
Available choices for select fields.
Maps the field value to a CRM property.
Visual style: outlined, filled, or minimal.
Example
outlinedCSS colour value for the primary accent.
Example
#000000Additional CSS injected into the widget iframe.
Colour theme for the widget.
Example
lightMessage displayed after successful submission.
Example
Thank you for reaching out. We will get back to you within one business day.URL to redirect to after submission instead of showing the success message.
Whether the widget is currently active.
Example
truePublic key used to authenticate the widget.
Example
pk_wgt_f1e2d3c4b5a6Timestamp when the widget was created.
Example
2026-02-20T12:00:00.000ZTimestamp when the widget was last updated.
Example
2026-03-05T09:15:00.000ZThe workspace is not one of your account’s (Workspace not found), or the channel is not a channel of that workspace (Channel not found). Nothing is created.
Standard error response returned by all endpoints on failure.
object
A human-readable error message describing what went wrong.
Example
Conversation not foundA machine-readable reason on some refusals, for example ‘key_lock’ when an API key’s brand or workspace restriction does not cover the action.
Example
key_lockOn a 403 for an API key without a scope the endpoint requires: the scopes the key lacks.
Example
[ "mcp:write"]On a 409 with code duplicate_question or duplicate_rule_text: the knowledge base entry or policy that already holds the question or rule text.
Example
11223344-5566-4788-99aa-bbccddeeff00On a 422 about one MCP connection a request names, from an assignment or an agent create or update (a connection that does not exist, one listed twice, or one that does not declare a tool named): the connection, as the request named it.
On the same 422: the tool names the connection does not declare.
Example
[ "get_orders"]On the same 422: the tools the connection declares.
Example
[ "get_order", "search_orders"]Validation error.
Standard error response returned by all endpoints on failure.
object
A human-readable error message describing what went wrong.
Example
Conversation not foundA machine-readable reason on some refusals, for example ‘key_lock’ when an API key’s brand or workspace restriction does not cover the action.
Example
key_lockOn a 403 for an API key without a scope the endpoint requires: the scopes the key lacks.
Example
[ "mcp:write"]On a 409 with code duplicate_question or duplicate_rule_text: the knowledge base entry or policy that already holds the question or rule text.
Example
11223344-5566-4788-99aa-bbccddeeff00On a 422 about one MCP connection a request names, from an assignment or an agent create or update (a connection that does not exist, one listed twice, or one that does not declare a tool named): the connection, as the request named it.
On the same 422: the tool names the connection does not declare.
Example
[ "get_orders"]On the same 422: the tools the connection declares.
Example
[ "get_order", "search_orders"]