POST /api/v1/forms/{form_id}/submit
Submit a form response. If Customer.io does not recognize the form_id
we create a new form connection (found on the Data & Integrations > Integrations > Forms page). Form submissions with the same ID are treated as submissions from the same form.
The data
object must contain at least one of id
or email
(depending on the identifiers supported in your workspace)—or a field that is mapped to one of these identifiers—to identify the form respondent. If the person who submitted the form does not already exist, we create them (like an identify request).
Additional keys in the data
object represent form fields and values from the form that a person submitted. By default, we map form fields in your request directly to attributes, e.g. if you have a form field called first_name
, we map that field to the first_name
attribute.
NOTES:
- You cannot disable fields that you send to this API. If you send a field (as
data
) to this API, we'll include it in the form submission. - If an identifier in your form is called something like
email_address
rather thanemail
in your initial request, you'll receive a400
, but we'll still add your form on the Data & Integrations > Integrations > Forms page. You can then re-map youremail_address
field toemail
, and your form will begin working normally. - Customer.io reserves
form_id
,form_name
,form_type
,form_url
, andform_url_param
keys. If your request includes these keys, Customer.io ignores them.
Servers
- https://track.customer.io
Path parameters
Name | Type | Required | Description |
---|---|---|---|
form_id |
String | Yes |
The identifier for a form. If Customer.io does not recognize the |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
data |
Yes |
Represents your form data. By default, we assume that form fields map directly to attributes (e.g. if your form field is called Values for form fields must be formatted as strings. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.