Copy event

Create a new event as a copy of an existing one. The body provides the new event's name, calendar, visibility, and dates, and optionally campuses and primaryCampus: omitted, the copy keeps the source event's campuses and primary; sent, the copy is created at that set (an empty list means every campus). While multi-campus is off the copy keeps the source event's campuses. While multi-campus is on or an organization limit binds, a caller a campus limit or restricting override narrows at the permission gets a copy only where it holds: the campuses or organizations they name, or naming none, the source's campuses they hold, else the source's organizations they hold whole or the part they hold, else where a create naming no campus lands. The rest of the source drops. A group's event with no campus of its own, copied naming none, still lands at the group's campuses. All other content (description, settings, categories, custom fields, check-in sessions, labels, and organizers) is copied from the source event. Returns the new event's id and name. Returns 400 with the message organization_archived_record_desc when the source event belongs only to archived organizations: it is that organization's read-only history. While multi-org is on, returns 400 with the message record_merchant_other_org_desc when the source event's merchant account is outside the copy's organizations.

Required permission: Full Write Events

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
int32
required
≥ 1

The id of the event to copy.

Body Params

Details for the new event.

string | null
required

The name of the event.

date-time | null

When the event starts, as a UTC instant. When the event has time slots, this is the start of the earliest one. On writes, an event that carries start or end is read as instant-based and startDate and endDate are ignored. On writes, required unless startDate is sent.

date-time | null

When the event ends, as a UTC instant. On writes, an event that carries start or end is read as instant-based and startDate and endDate are ignored.

date | null

The first calendar date of the event in the event's time zone (yyyy-MM-dd). On writes, used when the event is sent without UTC instants; an event that carries any instant is read as instant-based and this field is ignored. On writes, required unless start is sent.

date | null

The last calendar date of the event in the event's time zone (yyyy-MM-dd), inclusive. Equals startDate for a single-day event. On writes, used when the event is sent without UTC instants; an event that carries any instant is read as instant-based and this field is ignored.

boolean | null

Whether the event runs all day rather than at specific times.

schedules
array of objects | null

The repeating schedule definitions for the event.

schedules
times
array of objects | null

The event's time slots. Each carries UTC instants and wall-clock twins in the event's time zone.

times
boolean

Whether the event is visible to the public (inherited from its calendar).

calendar
object | null

The calendar the event belongs to. The event endpoints populate the id, code, name, color, and flags; the remaining statistics fields come from the calendars endpoints. On writes, provide the calendar's id or code (required unless the event belongs to a group); values come from /api/calendars.

exceptions
object | null

For repeating events, dates added to or removed from the generated schedule (UTC).

campuses
array of objects | null

The campuses the copy is created at. Omit the property to keep the source event's campuses; send the ids to
copy to that set (an empty list means every campus). A caller a campus limit or restricting override narrows at
the permission gets a copy only where it holds: what they name of the source outside their access drops, and with
nothing left the copy lands at what they hold of the source. A campus they name that the source does not hold, outside
their access, answers 400. Only each campus's id is used. Values come from /api/locations.
Ignored while multi-campus is off; the copy then keeps the source event's campuses.

campuses
organizations
array of objects | null

The organizations this record is scoped to, all their campuses now and in the future, in name order; empty
unless the record is organization-scoped (then campuses is empty). Honoured only while multi-org is
on. Omit to keep the current organizations.

organizations
primaryCampus
object | null

The campus whose time zone the copy's times are entered and shown in; one of campuses. Read as on create: it
may be omitted, and the copy then takes the only selected campus, else the caller's own campus when selected,
else the first sent. Ignored while multi-campus is off (the copy then keeps the source event's primary campus) or when campuses is omitted.

primaryOrganization
object | null

The organization whose time zone the copy's times are entered and shown in when its organizations are in
different time zones; one of organizations. Read as on create: taken only while the organizations are in
different time zones (a value that is not one of them is refused), and when omitted the organization with the
lowest id gives the zone. Used only when organizations names at least one; with organizations omitted the copy
keeps the source event's organizations, and its primary organization only while those are still in different
time zones. With campuses named it has none. Honoured only while multi-org is on.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json