API Reference
The JustContact API lets you incorporate the contact form submission, validation and protection function into your own website or application.
The API is pretty straight forward and easy to use. Right at the moment the API is only used to implement form submissions.
This reference guide explains how to use and implement our API into your contact form. The guide is organized by implementation type. A resource represents a type of item that comprises part of the YouTube experience, such as a video, a playlist, or a subscription. For each resource type, the guide lists one or more data representations, and resources are represented as JSON objects. The guide also lists one or more supported methods (LIST, POST, DELETE, etc.) for each resource type and explains how to use those methods in your application.
API-URL
https://forms.justcontact.io/{project_key}
Method | POST |
---|---|
{project_key} | You can find the project key in the settings of your contact form. |
Calling the API
The following requirements apply to the JustContact submission API:
-
Every request must specify a project key. Your project keys are available in the access pane, located inside each of your projects.
-
You will need to send all the form fields and in addition to a captcha response field in the body of your
POST
request. -
The request is able to take a few special parameters (values after the
?
). Read it here in more detail.
Contact Form Fields
Field Name | Required | Validation Pattern | Description |
---|---|---|---|
name | ✔️ | .{(, 255} | This field is supposed to contain the name of the sender. |
company | (.{(, 255})? | Here you can submit the sender’s company or employer name. | |
email | ✔️ | See stackoverflow | The sender’s e-mail address. This will be the reply-to address in your notification and if activated, he will receive a confirmation mail. |
phone | (.{(, 255})? | This field can conta | |
subject | (.{(, 255})? | This field can conta | |
message | ✔️ | .+ | This field can conta |
Captcha Submission
You can use various captcha providers with our API. You can adjust your preferred provider for each contact form individually in the project settings.
So in the end our API will be either expecting the response in a field based on the provider you chose:
Captcha Provider | Response Field |
---|---|
Google reCAPTCHA | g-recaptcha-response |
Or if you are programmatically sending the request you can always put the captcha response into the default field called captcha_response
.
Request Parameters
The contact submission request can take a few special parameters that modify certain behavior.
These parameters come after the question mark in the URL like so:
https://forms.justcontact.io/{project_key}?{parameter1_name}={parameter1_value}&{parameter2_name}={parameter2_value}
type
Parameter
The type
parameter modifies the output type of the response for a contact form submission. The parameter supports 4 different values:
Value | |
---|---|
text | Plain text response. |
url | The response will be URL-encoded. |
json | Response will be JSON formatted. |
redirect | User will be immediately redirected to configured site. |
redirect
Parameter
The redirect parameter takes a URL where you want to guide the user after the form submission to.
Important: The domain has to match the domain in the project settings!