A contact form as websites show it
const url = 'https://api.threadkite.app/f/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.threadkite.app/f/exampleIts fields, consent tick boxes and thank-you message, with a fresh token to post back as _tk_token. No sign-in; only the websites the form allows can read it from a browser.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The form’s public key
Responses
Section titled “Responses”object
The business the form belongs to
object
The name to post the answer under
object
Longest answer accepted
object
Post ticked ones as consent
Shown after sending
Where to go after sending, if set
Post back as _tk_token: shows the form was on screen long enough to be filled in
Leave this field empty (spam trap)
Where to post the form
Solve the robot check (POST {action}/challenge, then POST {action}/redeem) and post its proof as _tk_proof; without it the message goes to the Spam folder
Example
{ "organisationName": "Smith Motors", "fields": [ { "name": "email", "label": "Email address", "input": "text", "options": [ { "value": "morning", "label": "Morning" } ] } ], "consent": [ { "key": "marketing_email" } ], "honeypot": "company_website"}Not from an allowed website
object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}The form is archived
object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}