Skip to main content
POST
/
events
/
{event}
/
registration-fields
Criar campo de inscrição
curl --request POST \
  --url http://localhost/api/v1/events/{event}/registration-fields \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "<string>",
  "key": "<string>",
  "validation_rules": [
    "<string>"
  ],
  "help_text": "<string>",
  "is_required": true,
  "show_only_with_kit": true,
  "is_active": true,
  "options": [
    {
      "value": "<string>",
      "label": "<string>"
    }
  ]
}
'
{
  "data": {
    "id": 123,
    "event_id": 123,
    "key": "<string>",
    "label": "<string>",
    "type": "<string>",
    "options": [
      "<unknown>"
    ],
    "validation_rules": [
      "<unknown>"
    ],
    "help_text": "<string>",
    "is_required": true,
    "show_only_with_kit": true,
    "is_active": true,
    "sort_order": 123,
    "created_at": "<string>",
    "updated_at": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API key do hub com escopo manage. Header: Authorization: Bearer <api_key>.

Path Parameters

event
string
required

Body

application/json

POST /api/v1/events/{event}/registration-fields — cria campo customizado. Espelha EventSales::saveField. key é único por evento (checado no controller); options exigido para select/multiselect.

label
string
required
Maximum string length: 120
type
enum<string>
required
Available options:
text,
textarea,
select,
multiselect,
checkbox,
file
key
string | null
Maximum string length: 60
validation_rules
string[] | null
help_text
string | null
Maximum string length: 500
is_required
boolean
show_only_with_kit
boolean
is_active
boolean
options
object[] | null

Response

JsonResource

data
RegistrationFieldResource · object
required