---
title: "Create a form token"
method: POST
path: "/v1/brands/{brandId}/forms"
tags: ["forms"]
---

# Create a form token

`POST /v1/brands/{brandId}/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/brands/{brandId}/forms`
- Auth: HTTP bearer

## Request body

- CreateFormTokenDto
  - `name` string, required: Name for this form
  - `successUrl` string: URL to redirect to after successful submission
  - `errorUrl` string: URL to redirect to on error
  - `thankYouMessage` string: Custom thank-you message (shown when no successUrl is set)
  - `fieldMapping` object: Custom field mapping from form fields to ticket fields
  - `honeypotField` string: Hidden field name for honeypot spam protection
  - `allowedOrigins` string[]: Allowed origins for CORS (empty = allow all)

## Response `201`

---

[API](https://skmtc.dev/dispatchtickets/apis/dispatch-tickets-api.md) · [All operations](https://skmtc.dev/dispatchtickets/apis/dispatch-tickets-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dispatchtickets/apis/dispatch-tickets-api/revisions/82fc25ab859b?raw)
