POST account/setCategory

POST /api/v2/account/setCategory

Creates a new participant category for an event, or updates the name or buyer flag of an existing one.


Authentication

Authorization: Bearer <your_api_key>

Endpoint

POST /api/v2/account/setCategory

Create vs Update

  • Create: Omit id (or pass 0). event_id and name are required

  • Update: Pass the id of the existing category. event_id is not required


Body Parameters

Content-Type: multipart/form-data

Parameter

Type

Required

Accepted Values / Format

Description

id

integer

Required for update

Valid category ID

The ID of the category to update. When provided and non-zero, the existing category is updated

event_id

integer

Required on create

Valid event ID

The event to create the category under. Not required when updating by id

name

string

Required on create

Any string

The display name of the category

is_buyer

boolean

No

true / false

Whether this is a buyer category. Defaults to false


Response

Success Response (HTTP 200)

JSON
{
  "code": 200,
  "errors": null,
  "data": {
    "id": 42,
    "status": "created"
  },
  "response_id": "1700000000.12345"
}

Field

Type

Description

id

integer

The ID of the created or updated category

status

string

"created" for new categories, "updated" for existing ones


Error Responses

HTTP Code

Condition

Error Message

400

name or event_id missing on create

Missing required parameter: {param}

400

id is not a valid integer

Param must be a integer: id

400

id provided but no matching category found

Invalid Participant Category ID

400

event_id is not a valid integer

Param must be a integer: event_id

400

event_id references a non-existent event

Could not find an event with id = {id}

403

Missing or invalid API key

Forbidden


Example Request — Create

Bash
curl -X POST "https://your-event-domain.com/api/v2/account/setCategory" \
  -H "Authorization: Bearer your_api_key_here" \
  -F "event_id=7" \
  -F "name=VIP Guest" \
  -F "is_buyer=false"

Example Response — Create

JSON
{
  "code": 200,
  "errors": null,
  "data": {
    "id": 42,
    "status": "created"
  },
  "response_id": "1700000000.12345"
}

Example Request — Update

Bash
curl -X POST "https://your-event-domain.com/api/v2/account/setCategory" \
  -H "Authorization: Bearer your_api_key_here" \
  -F "id=42" \
  -F "name=VIP Guest - Updated" \
  -F "is_buyer=true"

Example Response — Update

JSON
{
  "code": 200,
  "errors": null,
  "data": {
    "id": 42,
    "status": "updated"
  },
  "response_id": "1700000000.12346"
}