← Back to listing
POST/api/v1/calendar-events

Create calendar event

Create a new calendar event

Authentication

Send your API key in the x-api-key header.

x-api-keybearer

Request body

required

Calendar event data

PublicApiCreateCalendarEventDto

calendarIdrequired

string

Calendar ID this event belongs to

titlerequired

string

Title of the calendar event

description

string

Description of the calendar event

startDateTimerequired

string (date-time)

Date and time when the event starts

endDateTimerequired

string (date-time)

Date and time when the event ends

location

string

Location of the event

status

string

Status of the calendar event

completedconfirmedtentativecancelled
visibility

string

Visibility of the calendar event

defaultpublicprivate
organizerEmail

string

Email of the event organizer

organizerName

string

Name of the event organizer

busy

boolean

Whether the event is marked as busy

readOnly

boolean

Whether the event is read-only

hideParticipants

boolean

Whether to hide participants

duration

number

Duration of the event in seconds

recurrence

array<string>

Recurrence rules for the event

participants

array<PublicApiCalendarEventParticipantDto>

Event participants

meetingUrl

string

Meeting URL

metadata

object

Additional metadata for the event

Example request

json
{
  "calendarId": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
  "title": "Team Meeting",
  "description": "Weekly team standup meeting",
  "startDateTime": "2024-07-15T10:00:00.000Z",
  "endDateTime": "2024-07-15T11:00:00.000Z",
  "location": "Conference Room A",
  "status": "confirmed",
  "visibility": "default",
  "organizerEmail": "organizer@example.com",
  "organizerName": "John Doe",
  "busy": true,
  "readOnly": false,
  "hideParticipants": false,
  "duration": 3600,
  "recurrence": [
    "FREQ=WEEKLY;BYDAY=MO"
  ],
  "participants": [
    {
      "email": "john.doe@example.com",
      "name": "John Doe",
      "status": "yes"
    }
  ],
  "meetingUrl": "https://zoom.us/j/91288944390?pwd=1234567890",
  "metadata": {
    "customField": "value"
  }
}

Responses

201Calendar event created successfully

PublicApiCreateCalendarEventResponseDto

statusCoderequired

number

countrequired

number

errorrequired

string

datarequired

PublicApiCalendarEventDto

Example response

json
{
  "statusCode": 200,
  "count": 0,
  "error": null,
  "data": {
    "id": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
    "calendarId": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
    "title": "Team Meeting",
    "description": "Weekly team standup meeting",
    "startDateTime": "2024-07-15T10:00:00.000Z",
    "endDateTime": "2024-07-15T11:00:00.000Z",
    "location": "Conference Room A",
    "status": "confirmed",
    "visibility": "default",
    "organizerEmail": "organizer@example.com",
    "organizerName": "John Doe",
    "busy": true,
    "readOnly": false,
    "hideParticipants": false,
    "htmlLink": "https://calendar.google.com/event?eid=...",
    "iCalUID": "event123@google.com",
    "nylasId": "nylas_event_123",
    "masterEventId": "master_event_123",
    "duration": 3600,
    "recurrence": [
      "FREQ=WEEKLY;BYDAY=MO"
    ],
    "participants": [
      {
        "email": "john.doe@example.com",
        "name": "John Doe",
        "status": "yes"
      }
    ],
    "conferencing": {
      "provider": "Zoom Meeting",
      "details": {
        "url": "https://meet.google.com/abc123def456"
      }
    },
    "metadata": {
      "customField": "value"
    },
    "createdAt": "2024-07-15T09:00:00.000Z",
    "updatedAt": "2024-07-15T09:30:00.000Z"
  }
}
401Unauthorized - missing or invalid API key or Bearer token