# Create Event (v2) Creates an Event using the v2 API. Note: This is the v2 version of the Events API with enhanced features. Endpoint: POST /v2/companies/{location_id}/activities Version: 1.0.1 Security: BearerPartnerUser ## Header parameters: - `Accept` (string, required) API version header - `Content-Type` (string, required) - `Authorization` (string, required) Bearer {partner_token}, User {user_token} ## Path parameters: - `location_id` (integer, required) Location (business) ID Example: 1 ## Request fields (application/json): - `staff_id` (integer, required) Team member ID who will conduct the event. Example: 1 - `service_id` (integer, required) Service ID for this event. Example: 500 - `resource_instance_ids` (array, required) List of resource instance IDs (required, can be empty array). Example: [123,432] - `label_ids` (array, required) List of category/tag IDs (required, can be empty array). Example: [123,432] - `date` (string, required) Event date and time. Example: "2026-11-22 14:00:00" - `length` (integer, required) Event duration in seconds. Example: 3600 - `capacity` (integer, required) Number of available slots for this event. Example: 4 - `technical_break_duration` (any) Technical break duration in seconds. - If not provided: defaults to null - Value null: uses location's default setting (Settings → Timetable → Technical breaks) or keeps current value when updating - If value > 0: break duration must be included in the length parameter (length = services + break) - Accepts only multiples of 300 (5-minute intervals) - Maximum value: 3600 (1 hour) Example: 300 - `comment` (string) Event comment or description. Example: "Beginner group session" - `color` (string) Event color (hex format). Example: "#9c27b0" - `instructions` (string) Instructions for the event. Example: "Bring two balls" - `stream_link` (string) Stream link for online events. Example: "https://stream.com/some_link" - `force` (boolean) Skip resource availability check (true - skip check, false - validate). ## Response 201 fields (application/json): - `data` (object) Created event details (JSON:API format) - `data.type` (string) Example: "activity" - `data.id` (string) Example: "10126531" - `data.attributes` (object) - `data.attributes.master_id` (integer) - `data.attributes.staff_id` (integer) - `data.attributes.service_id` (integer) - `data.attributes.timestamp` (integer) - `data.attributes.length` (integer) - `data.attributes.capacity` (integer) - `data.attributes.clients_count` (integer) - `data.attributes.color` (string) - `data.attributes.instructions` (string) - `data.attributes.stream_link` (string) - `data.attributes.font_color` (string) - `data.attributes.notified` (boolean) - `data.attributes.comment` (string,null) - `data.attributes.schedule_id` (integer,null) - `data.attributes.schedule_till` (string,null) - `data.attributes.schedule_event_modified` (string,null) - `data.attributes.date` (string) - `meta` (array) ## Response 400 fields (application/json): - `success` (boolean) - `data` (null) - `meta` (object) - `meta.message` (string) Example: "The service is not available for group event booking" ## Response 401 fields (application/json): - `success` (boolean) - `data` (null) - `meta` (object) - `meta.message` (string) ## Response 403 fields (application/json): - `success` (boolean) - `data` (null) - `meta` (object) - `meta.message` (string) ## Response 404 fields (application/json): - `success` (boolean) - `data` (null) - `meta` (object) - `meta.message` (string) ## Response 422 fields (application/json): - `success` (boolean) - `data` (null) - `meta` (object) - `meta.message` (string) Example: "An error has occurred" - `meta.errors` (object) Validation errors by field Example: {"[resource_instance_ids]":["This field is missing."],"[label_ids]":["This field is missing."]}