Skip to content

A contact form as websites show it

GET
/f/{publicKey}
curl --request GET \
--url https://api.threadkite.app/f/example

Its 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.

publicKey
required
string

The form’s public key

Media typeapplication/json
object
publicKey
required
string
organisationName
required

The business the form belongs to

string
fields
required
Array<object>
object
name
required

The name to post the answer under

string
label
required
string
input
required
string
Allowed values: text email tel textarea select checkbox
required
required
boolean
help
required
string
nullable
options
required
Array<object>
object
value
required
string
label
required
string
maxLength
required

Longest answer accepted

number
consentText
required
string
nullable
consent
required
Array<object>
object
key
required

Post ticked ones as consent

string
label
required
string
required
required
boolean
successMessage
required

Shown after sending

string
redirectUrl
required

Where to go after sending, if set

string
nullable
token
required

Post back as _tk_token: shows the form was on screen long enough to be filled in

string
honeypot
required

Leave this field empty (spam trap)

string
action
required

Where to post the form

string
robotCheck
required

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

boolean

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

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}
Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}

The form is archived

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}