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 pass0).event_idandnameare required -
Update: Pass the
idof the existing category.event_idis not required
Body Parameters
Content-Type: multipart/form-data
|
Parameter |
Type |
Required |
Accepted Values / Format |
Description |
|---|---|---|---|---|
|
|
integer |
Required for update |
Valid category ID |
The ID of the category to update. When provided and non-zero, the existing category is updated |
|
|
integer |
Required on create |
Valid event ID |
The event to create the category under. Not required when updating by |
|
|
string |
Required on create |
Any string |
The display name of the category |
|
|
boolean |
No |
|
Whether this is a buyer category. Defaults to |
Response
Success Response (HTTP 200)
{
"code": 200,
"errors": null,
"data": {
"id": 42,
"status": "created"
},
"response_id": "1700000000.12345"
}
|
Field |
Type |
Description |
|---|---|---|
|
|
integer |
The ID of the created or updated category |
|
|
string |
|
Error Responses
|
HTTP Code |
Condition |
Error Message |
|---|---|---|
|
400 |
|
|
|
400 |
|
|
|
400 |
|
|
|
400 |
|
|
|
400 |
|
|
|
403 |
Missing or invalid API key |
|
Example Request — Create
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
{
"code": 200,
"errors": null,
"data": {
"id": 42,
"status": "created"
},
"response_id": "1700000000.12345"
}
Example Request — Update
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
{
"code": 200,
"errors": null,
"data": {
"id": 42,
"status": "updated"
},
"response_id": "1700000000.12346"
}