Skip to content

Submit a form (from an allowed website, or from your server)

POST
/v1/public/forms/{formId}/submissions
curl --request POST \
--url https://api.copilot.launchwing.io/v1/public/forms/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/submissions \
--header 'Content-Type: application/json' \
--header 'X-Launchwing-Key: <X-Launchwing-Key>' \
--data '{ "fields": { "additionalProperty": "example" }, "pageUrl": "example", "turnstileToken": "example", "_gotcha": "example" }'

JSON (fetch): 201 with the confirmation message. Plain HTML form (urlencoded): 303 to the form’s redirect URL or a hosted thank-you page. Limits: 64 KB; 10 per minute per visitor per form; 600 per minute per form. Honeypot field _gotcha; Cloudflare Turnstile when the form has it.

From your own server, send a secret key with Forms permission as Authorization: Bearer sk_… (or in X-Launchwing-Key) and no Origin: there is no allowed-websites check, and Turnstile is skipped because the key is the proof. A secret key is never read from the query string or a form field.

formId
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
key
string
<= 200 characters
idempotency-key
string

Makes a write safe to retry: the same key and body replay the original response for 24 hours.

Media type application/json
Any of:
object
fields
required
object
key
additional properties
pageUrl
string
<= 4000 characters
turnstileToken
string
<= 4000 characters
_gotcha

Example generated

{
"fields": {
"additionalProperty": "example"
},
"pageUrl": "example",
"turnstileToken": "example",
"_gotcha": "example"
}

Default Response

Media type application/json
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
message
required
string
redirectUrl
required
string | null

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"message": "example",
"redirectUrl": "example"
}

Redirect after a plain HTML form post

Default Response

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error rate_limit_error api_error
code
required
string
Allowed values: validation_failed captcha_failed invalid_cursor invalid_idempotency_key idempotency_key_required unauthorized forbidden insufficient_role insufficient_permission origin_not_allowed submission_limit_reached flow_not_ready sending_paused template_not_published domain_taken daily_send_limit_reached form_not_active tool_not_enabled project_admin_exists project_admin_client project_client_member project_admin_unset_first project_last_member project_client_exists project_invitation_exists project_invitation_not_pending not_found conflict plan_limit_reached key_limit_reached key_not_active share_limit_reached tool_not_available idempotency_in_progress insufficient_credits payload_too_large unsupported_media_type idempotency_mismatch rate_limited internal_error service_unavailable
message
required
string
requestId
required
string
fields
Array<object>
object
path
required
string
message
required
string

Example

{
"error": {
"type": "invalid_request_error",
"code": "validation_failed"
}
}

Default Response

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error rate_limit_error api_error
code
required
string
Allowed values: validation_failed captcha_failed invalid_cursor invalid_idempotency_key idempotency_key_required unauthorized forbidden insufficient_role insufficient_permission origin_not_allowed submission_limit_reached flow_not_ready sending_paused template_not_published domain_taken daily_send_limit_reached form_not_active tool_not_enabled project_admin_exists project_admin_client project_client_member project_admin_unset_first project_last_member project_client_exists project_invitation_exists project_invitation_not_pending not_found conflict plan_limit_reached key_limit_reached key_not_active share_limit_reached tool_not_available idempotency_in_progress insufficient_credits payload_too_large unsupported_media_type idempotency_mismatch rate_limited internal_error service_unavailable
message
required
string
requestId
required
string
fields
Array<object>
object
path
required
string
message
required
string

Example

{
"error": {
"type": "invalid_request_error",
"code": "validation_failed"
}
}

Default Response

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error rate_limit_error api_error
code
required
string
Allowed values: validation_failed captcha_failed invalid_cursor invalid_idempotency_key idempotency_key_required unauthorized forbidden insufficient_role insufficient_permission origin_not_allowed submission_limit_reached flow_not_ready sending_paused template_not_published domain_taken daily_send_limit_reached form_not_active tool_not_enabled project_admin_exists project_admin_client project_client_member project_admin_unset_first project_last_member project_client_exists project_invitation_exists project_invitation_not_pending not_found conflict plan_limit_reached key_limit_reached key_not_active share_limit_reached tool_not_available idempotency_in_progress insufficient_credits payload_too_large unsupported_media_type idempotency_mismatch rate_limited internal_error service_unavailable
message
required
string
requestId
required
string
fields
Array<object>
object
path
required
string
message
required
string

Example

{
"error": {
"type": "invalid_request_error",
"code": "validation_failed"
}
}

Default Response

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error rate_limit_error api_error
code
required
string
Allowed values: validation_failed captcha_failed invalid_cursor invalid_idempotency_key idempotency_key_required unauthorized forbidden insufficient_role insufficient_permission origin_not_allowed submission_limit_reached flow_not_ready sending_paused template_not_published domain_taken daily_send_limit_reached form_not_active tool_not_enabled project_admin_exists project_admin_client project_client_member project_admin_unset_first project_last_member project_client_exists project_invitation_exists project_invitation_not_pending not_found conflict plan_limit_reached key_limit_reached key_not_active share_limit_reached tool_not_available idempotency_in_progress insufficient_credits payload_too_large unsupported_media_type idempotency_mismatch rate_limited internal_error service_unavailable
message
required
string
requestId
required
string
fields
Array<object>
object
path
required
string
message
required
string

Example

{
"error": {
"type": "invalid_request_error",
"code": "validation_failed"
}
}

Default Response

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error rate_limit_error api_error
code
required
string
Allowed values: validation_failed captcha_failed invalid_cursor invalid_idempotency_key idempotency_key_required unauthorized forbidden insufficient_role insufficient_permission origin_not_allowed submission_limit_reached flow_not_ready sending_paused template_not_published domain_taken daily_send_limit_reached form_not_active tool_not_enabled project_admin_exists project_admin_client project_client_member project_admin_unset_first project_last_member project_client_exists project_invitation_exists project_invitation_not_pending not_found conflict plan_limit_reached key_limit_reached key_not_active share_limit_reached tool_not_available idempotency_in_progress insufficient_credits payload_too_large unsupported_media_type idempotency_mismatch rate_limited internal_error service_unavailable
message
required
string
requestId
required
string
fields
Array<object>
object
path
required
string
message
required
string

Example

{
"error": {
"type": "invalid_request_error",
"code": "validation_failed"
}
}

Default Response

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error rate_limit_error api_error
code
required
string
Allowed values: validation_failed captcha_failed invalid_cursor invalid_idempotency_key idempotency_key_required unauthorized forbidden insufficient_role insufficient_permission origin_not_allowed submission_limit_reached flow_not_ready sending_paused template_not_published domain_taken daily_send_limit_reached form_not_active tool_not_enabled project_admin_exists project_admin_client project_client_member project_admin_unset_first project_last_member project_client_exists project_invitation_exists project_invitation_not_pending not_found conflict plan_limit_reached key_limit_reached key_not_active share_limit_reached tool_not_available idempotency_in_progress insufficient_credits payload_too_large unsupported_media_type idempotency_mismatch rate_limited internal_error service_unavailable
message
required
string
requestId
required
string
fields
Array<object>
object
path
required
string
message
required
string

Example

{
"error": {
"type": "invalid_request_error",
"code": "validation_failed"
}
}

Default Response

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error rate_limit_error api_error
code
required
string
Allowed values: validation_failed captcha_failed invalid_cursor invalid_idempotency_key idempotency_key_required unauthorized forbidden insufficient_role insufficient_permission origin_not_allowed submission_limit_reached flow_not_ready sending_paused template_not_published domain_taken daily_send_limit_reached form_not_active tool_not_enabled project_admin_exists project_admin_client project_client_member project_admin_unset_first project_last_member project_client_exists project_invitation_exists project_invitation_not_pending not_found conflict plan_limit_reached key_limit_reached key_not_active share_limit_reached tool_not_available idempotency_in_progress insufficient_credits payload_too_large unsupported_media_type idempotency_mismatch rate_limited internal_error service_unavailable
message
required
string
requestId
required
string
fields
Array<object>
object
path
required
string
message
required
string

Example

{
"error": {
"type": "invalid_request_error",
"code": "validation_failed"
}
}

Default Response

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error rate_limit_error api_error
code
required
string
Allowed values: validation_failed captcha_failed invalid_cursor invalid_idempotency_key idempotency_key_required unauthorized forbidden insufficient_role insufficient_permission origin_not_allowed submission_limit_reached flow_not_ready sending_paused template_not_published domain_taken daily_send_limit_reached form_not_active tool_not_enabled project_admin_exists project_admin_client project_client_member project_admin_unset_first project_last_member project_client_exists project_invitation_exists project_invitation_not_pending not_found conflict plan_limit_reached key_limit_reached key_not_active share_limit_reached tool_not_available idempotency_in_progress insufficient_credits payload_too_large unsupported_media_type idempotency_mismatch rate_limited internal_error service_unavailable
message
required
string
requestId
required
string
fields
Array<object>
object
path
required
string
message
required
string

Example

{
"error": {
"type": "invalid_request_error",
"code": "validation_failed"
}
}

Default Response

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error rate_limit_error api_error
code
required
string
Allowed values: validation_failed captcha_failed invalid_cursor invalid_idempotency_key idempotency_key_required unauthorized forbidden insufficient_role insufficient_permission origin_not_allowed submission_limit_reached flow_not_ready sending_paused template_not_published domain_taken daily_send_limit_reached form_not_active tool_not_enabled project_admin_exists project_admin_client project_client_member project_admin_unset_first project_last_member project_client_exists project_invitation_exists project_invitation_not_pending not_found conflict plan_limit_reached key_limit_reached key_not_active share_limit_reached tool_not_available idempotency_in_progress insufficient_credits payload_too_large unsupported_media_type idempotency_mismatch rate_limited internal_error service_unavailable
message
required
string
requestId
required
string
fields
Array<object>
object
path
required
string
message
required
string

Example

{
"error": {
"type": "invalid_request_error",
"code": "validation_failed"
}
}

Default Response

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error rate_limit_error api_error
code
required
string
Allowed values: validation_failed captcha_failed invalid_cursor invalid_idempotency_key idempotency_key_required unauthorized forbidden insufficient_role insufficient_permission origin_not_allowed submission_limit_reached flow_not_ready sending_paused template_not_published domain_taken daily_send_limit_reached form_not_active tool_not_enabled project_admin_exists project_admin_client project_client_member project_admin_unset_first project_last_member project_client_exists project_invitation_exists project_invitation_not_pending not_found conflict plan_limit_reached key_limit_reached key_not_active share_limit_reached tool_not_available idempotency_in_progress insufficient_credits payload_too_large unsupported_media_type idempotency_mismatch rate_limited internal_error service_unavailable
message
required
string
requestId
required
string
fields
Array<object>
object
path
required
string
message
required
string

Example

{
"error": {
"type": "invalid_request_error",
"code": "validation_failed"
}
}