forms

Create a form token

post/v1/workspaces/{workspaceId}/forms

Request

  • Base URL: https://api.dispatchtickets.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.dispatchtickets.com/v1/workspaces/{workspaceId}/forms
  • Auth: HTTP bearer

Request body

namestring required

Name for this form

successUrlstring

URL to redirect to after successful submission

errorUrlstring

URL to redirect to on error

thankYouMessagestring

Custom thank-you message (shown when no successUrl is set)

fieldMappingobject

Custom field mapping from form fields to ticket fields

honeypotFieldstring

Hidden field name for honeypot spam protection

allowedOriginsstring[]

Allowed origins for CORS (empty = allow all)

Example request

{
  "name": "Contact Form",
  "successUrl": "https://example.com/thank-you",
  "errorUrl": "https://example.com/error",
  "thankYouMessage": "Thanks for reaching out! We will get back to you within 24 hours.",
  "fieldMapping": {
    "email": "customFields.requesterEmail",
    "subject": "title"
  },
  "honeypotField": "_gotcha",
  "allowedOrigins": [
    "https://example.com",
    "https://www.example.com"
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.