POST/users/{userId}/calendars/{calendarId}/events

대상 사용자의 캘린더 중 대상 캘린더에 일정을 생성한다.

Authorization

oauth2

OAuth 2.0 인증.
자세한 인증 방식은 인가·인증을 참고한다.

Scope

calendar

HTTP Request

POSThttps://www.worksapis.com/v1.0/users/{userId}/calendars/{calendarId}/events

Path Parameters

ParameterTypeDescription
userId string 

대상 사용자 ID


required
example : userf7da-f82c-4284-13e7-030f3b4c756x 
calendarId string 

대상 캘린더 ID


required
example : calendar-96b8-4c74-8277-7953e0b4604a 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

일정 및 반복/반복예외 일정을 배열의 요소로 입력한다.
배열 내 일정은 모두 같은 eventId로 설정한다.

PropertyTypeDescription
eventComponents array (Event) 

배열 내 일정은 모두 같은 eventId로 설정한다.

 
sendNotification boolean 

일정 알림 발송 여부


default : true
writeOnly : true 

Event

PropertyTypeDescription
eventId string 

일정의 고유 ID

  • 지정하지 않으면 자동으로 할당된다.

minLength : 1
maxLength : 255 
summary string 

일정의 내용


required 
description string 

일정의 메모


minLength : 0
maxLength : 5000 
location string 

일정의 장소

 
map object (map) 

위치 정보

 
mapUrl object (mapUrl) 

첨부된 지도의 이미지와 URL

 
categoryId string 

일정 카테고리 ID

카테고리를 설정한 일정을 조회하면 얻을 수 있다.

 
start object (start) 

일정의 시작이나 종료 시간


required 
end object (end) 

일정의 시작이나 종료 시간

 
recurrence array (Recurrence) 

반복 정보


minItems : 0
maxItems : 100 
recurringEventId string 

반복 예외 일정을 나타내는 ID
(참고: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.4)

 
transparency string 

일정의 바쁨/한가함 상태

  • OPAQUE: 바쁨
  • TRANSPARENT: 한가함

default : OPAQUE
Allowed values : OPAQUE, TRANSPARENT 
visibility string 

일정의 공개/비공개

  • PUBLIC: 공개
  • PRIVATE: 비공개

default : PUBLIC
Allowed values : PUBLIC, PRIVATE 
sequence integer 

일정에 부여된 시퀀스 번호
자세한 내용은 Sequence Number를 참고한다.


default : 0
minimum : 0
format : int32 
attendees array (Attendee) 

참가자 정보


minItems : 0
maxItems : 500 
videoMeeting object (videoMeeting) 

일정에 포함된 화상회의 정보

 
reminders array (Alarm) 

일정 알림 정보


minItems : 0
maxItems : 100 
priority integer 

일정의 중요도 0: 정의되지 않은 중요도 1: 가장 중요 2: 두 번째로 중요 .... 9: 가장 중요도가 떨어짐


default : 0
minimum : 0
maximum : 9 

map

PropertyTypeDescription
type string 

첨부된 지도의 타입

  • NAVER, Google 등
 
geo string 

첨부된 지도의 경위도

 

mapUrl

PropertyTypeDescription
mapUrl string 

지도 URL

 
imageId string 

지도 이미지

 

start

PropertyTypeDescription
date string 

종일 일정이면 존재

  • 형식: YYYY-MM-DD

start의 date는 기간에 포함되며(inclusive), end의 date는 포함되지 않는다(exclusive).

 
dateTime string 

시간 일정이면 존재

  • 형식: YYYY-MM-DDTHH:mm:ss
 
timeZone string 

dateTime의 타임존 정보(시간 일정이면 존재)

  • 타임존
 

end

PropertyTypeDescription
date string 

종일 일정이면 존재

  • 형식: YYYY-MM-DD

start의 date는 기간에 포함되며(inclusive), end의 date는 포함되지 않는다(exclusive).

 
dateTime string 

시간 일정이면 존재

  • 형식: YYYY-MM-DDTHH:mm:ss
 
timeZone string 

dateTime의 타임존 정보(시간 일정이면 존재)

  • 타임존
 

Recurrence

PropertyTypeDescription
Recurrence string 

반복 일정에서 반복 특성을 결정하는 파라미터.
자세한 내용은 아래를 참고한다.
EXDATE: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5.1
RRULE: https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10
예) 매주 목요일 반복
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TH

 

Attendee

PropertyTypeDescription
id string 

공유설비의 ID

  • 공유설비를 지정할 경우 필수
 
email string 

참석자의 메일 주소

  • 참석자를 지정할 경우 필수
 
displayName string 

사용자 또는 설비의 이름

 
partstat string 

참석 여부

  • NEEDS-ACTION: 응답 안 함
  • ACCEPTED: 참석
  • TENTATIVE: 미정
  • DECLINED: 거부

Allowed values : NEEDS-ACTION, ACCEPTED, DECLINED, TENTATIVE 
isResource boolean 

설비 여부


default : false 
isOptional boolean 

필수 참석 여부


default : false 
resourceValue string 

리소스 고윳값.

 

videoMeeting

PropertyTypeDescription
url string 

화상회의 참석 URL


format : uri 
resourceId string 

화상회의 ID

 

Alarm

PropertyTypeDescription
method string 

미리 알림 타입

  • DISPLAY: 푸시 또는 서비스 알림
  • EMAIL: 메일 알림

required
Allowed values : DISPLAY, EMAIL 
trigger string 

일정 시작 전 미리 알림 설정

  • 자세한 내용은 Trigger를 참고한다. 예)
    -PT0S: 정시
    -PT15M: 15분 전
    -PT12H: 12시간 전
    -P1D: 1일 전
    -P1W: 일주일 전
    -P6DT12H: 6일 12시간 전
 
triggerDateTime object (triggerDateTime) 

날짜 및 시간 정보

 

triggerDateTime

PropertyTypeDescription
dateTime string 

형식: YYYY-MM-DDTHH:mm:ss

 
timeZone string 

타임존

 

Request Example

example

1{2  "eventComponents": [3    {4      "eventId": "eventr8123-wehuh324-qwejqw123",5      "summary": "Meeting",6      "description": "Memo",7      "location": "CUNY Graduate Center",8      "map": {9        "type": "google",10        "geo": "40.7486484;-73.98400699999999"11      },12      "mapUrl": {13        "mapUrl": "https://mapUrl.googlemap.com",14        "imageId": "imageId123"15      },16      "categoryId": "1",17      "start": {18        "dateTime": "2021-12-13T14:00:00",19        "timeZone": "Asia/Seoul"20      },21      "end": {22        "dateTime": "2021-12-13T15:00:00",23        "timeZone": "Asia/Seoul"24      },25      "recurrence": [26        "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=SU",27        "EXDATE;TZID=Asia/Seoul:20211213T140000"28      ],29      "recurringEventId": "TZID=Asia/Seoul:20211213T140000",30      "transparency": "OPAQUE",31      "visibility": "PUBLIC",32      "sequence": 1,33      "attendees": [34        {35          "email": "attendee1@example.com",36          "displayName": "user1",37          "partstat": "NEEDS-ACTION",38          "isOptional": false,39          "isResource": false40        },41        {42          "email": "attendee2@example.com",43          "displayName": "user2",44          "partstat": "ACCEPTED",45          "isOptional": true,46          "isResource": false47        },48        {49          "id": "10000355/10029600@97d9ddb4-ae93-4469-8471-110c573d13z1",50          "partstat": "ACCEPTED",51          "resourceValue": "https://calendar.worksmobile.com/resources/resource/10000355/10029600@97d9ddb4-ae93-4469-8471-110c573d13z1",52          "isOptional": false,53          "isResource": true54        },55        {56          "email": "attendee3@example.com",57          "displayName": "user3",58          "partstat": "DECLINED",59          "isOptional": false,60          "isResource": false61        }62      ],63      "videoMeeting": {64        "url": "https://works.do/x4gOs1_call",65        "resourceId": "x4gOs1_call"66      },67      "reminders": [68        {69          "method": "DISPLAY",70          "trigger": "-PT10M"71        },72        {73          "method": "EMAIL",74          "triggerDateTime": {75            "dateTime": "2021-12-13T10:00:00",76            "timeZone": "Asia/Seoul"77          }78        }79      ],80      "priority": 081    }82  ],83  "sendNotification": false84}

Response

HTTP 201

OK

PropertyTypeDescription
eventComponents array (Event) 

일정 정보

 
organizerCalendarId string 

이벤트가 속해 있는 calendarId

 

Event

PropertyTypeDescription
eventId string 

일정의 고유 ID


required
minLength : 1
maxLength : 255 
createdTime object (createdTime) 

날짜 및 시간 정보


readOnly : true 
updatedTime object (updatedTime) 

날짜 및 시간 정보


readOnly : true 
summary string 

일정의 내용


required
minLength : 0
maxLength : 200 
description string 

일정의 메모


minLength : 0
maxLength : 5000 
location string 

일정의 장소


minLength : 0
maxLength : 100 
map object (map) 

위치 정보

 
mapUrl object (mapUrl) 

첨부된 지도의 이미지와 URL

 
categoryId string 

일정 카테고리 ID

 
organizer object (organizer) 

이벤트의 주최자
이벤트가 속해 있는 캘린더를 나타낸다.

  • 기본 캘린더: 기본 캘린더 마스터의 메일 주소(존재할 경우) 또는 로그인 ID
  • 그 외 캘린더: 캘린더 고유의 캘린더 메일 주소

readOnly : true 
start object (start) 

일정의 시작이나 종료 시간


required 
end object (end) 

일정의 시작이나 종료 시간

 
recurrence array (Recurrence) 

minItems : 0
maxItems : 100 
recurringEventId string 

반복 예외 일정을 나타내는 ID
(참고: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.4)

 
transparency string 

일정의 바쁨/한가함 상태

  • OPAQUE: 바쁨
  • TRANSPARENT: 한가함

default : OPAQUE
Allowed values : OPAQUE, TRANSPARENT 
visibility string 

일정의 공개/비공개

  • PUBLIC: 공개
  • PRIVATE: 비공개

default : PUBLIC
Allowed values : PUBLIC, PRIVATE 
sequence integer 

일정에 부여된 시퀀스 번호
자세한 내용은 Sequence Number를 참고한다.


default : 0
minimum : 0
format : int32 
attendees array (Attendee) 

참가자 정보


minItems : 0
maxItems : 500 
videoMeeting object (videoMeeting) 

일정에 포함된 화상회의 정보

 
reminders array (Alarm) 

일정 알림 정보


minItems : 0
maxItems : 100 
attachments array (File) 

첨부 파일 정보(첨부 파일 용량의 합이 100MB 이하)


readOnly : true 
viewUrl string 

일정 정보를 조회할 수 있는 URL


minLength : 0
format : uri
readOnly : true 
priority integer 

일정의 중요도 0: 정의되지 않은 중요도 1: 가장 중요 2: 두 번째로 중요 .... 9: 가장 중요도가 떨어짐


default : 0
minimum : 0
maximum : 9 

createdTime

PropertyTypeDescription
dateTime string 

형식: YYYY-MM-DDTHH:mm:ss

 
timeZone string 

타임존

 

updatedTime

PropertyTypeDescription
dateTime string 

형식: YYYY-MM-DDTHH:mm:ss

 
timeZone string 

타임존

 

map

PropertyTypeDescription
type string 

첨부된 지도의 타입

  • NAVER, Google 등
 
geo string 

첨부된 지도의 경위도

 

mapUrl

PropertyTypeDescription
mapUrl string 

지도 URL

 
imageId string 

지도 이미지

 

organizer

PropertyTypeDescription
email string 

Organizer의 메일 주소
필수


required 
displayName string 

Organizer의 이름

 

start

PropertyTypeDescription
date string 

종일 일정이면 존재

  • 형식: YYYY-MM-DD

start의 date는 기간에 포함되며(inclusive), end의 date는 포함되지 않는다(exclusive).

 
dateTime string 

시간 일정이면 존재

  • 형식: YYYY-MM-DDTHH:mm:ss
 
timeZone string 

dateTime의 타임존 정보(시간 일정이면 존재)

  • 타임존
 

end

PropertyTypeDescription
date string 

종일 일정이면 존재

  • 형식: YYYY-MM-DD

start의 date는 기간에 포함되며(inclusive), end의 date는 포함되지 않는다(exclusive).

 
dateTime string 

시간 일정이면 존재

  • 형식: YYYY-MM-DDTHH:mm:ss
 
timeZone string 

dateTime의 타임존 정보(시간 일정이면 존재)

  • 타임존
 

Recurrence

PropertyTypeDescription
Recurrence string 

반복 일정에서 반복 특성을 결정하는 파라미터.
자세한 내용은 아래를 참고한다.
EXDATE: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5.1
RRULE: https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10
예) 매주 목요일 반복
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TH

 

Attendee

PropertyTypeDescription
id string 

공유설비의 ID

  • 공유설비를 지정할 경우 필수
 
email string 

참석자의 메일 주소

  • 참석자를 지정할 경우 필수
 
displayName string 

사용자 또는 설비의 이름

 
partstat string 

참석 여부

  • NEEDS-ACTION: 응답 안 함
  • ACCEPTED: 참석
  • TENTATIVE: 미정
  • DECLINED: 거부

Allowed values : NEEDS-ACTION, ACCEPTED, DECLINED, TENTATIVE 
isResource boolean 

설비 여부


default : false 
isOptional boolean 

필수 참석 여부


default : false 
resourceValue string 

리소스 고윳값.

 

videoMeeting

PropertyTypeDescription
url string 

화상회의 참석 URL


format : uri 
resourceId string 

화상회의 ID

 

Alarm

PropertyTypeDescription
method string 

미리 알림 타입

  • DISPLAY: 푸시 또는 서비스 알림
  • EMAIL: 메일 알림

required
Allowed values : DISPLAY, EMAIL 
trigger string 

일정 시작 전 미리 알림 설정

  • 자세한 내용은 Trigger를 참고한다. 예)
    -PT0S: 정시
    -PT15M: 15분 전
    -PT12H: 12시간 전
    -P1D: 1일 전
    -P1W: 일주일 전
    -P6DT12H: 6일 12시간 전
 
triggerDateTime object (triggerDateTime) 

날짜 및 시간 정보

 

triggerDateTime

PropertyTypeDescription
dateTime string 

형식: YYYY-MM-DDTHH:mm:ss

 
timeZone string 

타임존

 

File

PropertyTypeDescription
fileUrl string 

파일 URL


readOnly : true 
fileName string 

파일 제목


readOnly : true 
fileSize integer 

파일 크기(byte)


minimum : 0
format : int64
readOnly : true 

Response Example

example

1{2  "eventComponents": [3    {4      "eventId": "eventr8123-wehuh324-qwejqw123",5      "createdTime": {6        "dateTime": "2021-12-12T22:44:59",7        "timeZone": "Asia/Seoul"8      },9      "updatedTime": {10        "dateTime": "2021-12-14T21:01:31",11        "timeZone": "Asia/Seoul"12      },13      "summary": "Meeting",14      "description": "Memo",15      "location": "CUNY Graduate Center",16      "map": {17        "type": "google",18        "geo": "40.7486484;-73.98400699999999"19      },20      "mapUrl": {21        "mapUrl": "https://mapUrl.googlemap.com",22        "imageId": "imageId123"23      },24      "categoryId": "1",25      "organizer": {26        "email": "user1@example.com",27        "displayName": "userName1"28      },29      "start": {30        "dateTime": "2021-12-13T14:00:00",31        "timeZone": "Asia/Seoul"32      },33      "end": {34        "dateTime": "2021-12-13T15:00:00",35        "timeZone": "Asia/Seoul"36      },37      "transparency": "OPAQUE",38      "visibility": "PUBLIC",39      "sequence": 1,40      "attendees": [41        {42          "email": "attendee1@example.com",43          "displayName": "user1",44          "partstat": "NEEDS-ACTION",45          "isOptional": false,46          "isResource": false47        },48        {49          "email": "attendee2@example.com",50          "displayName": "user2",51          "partstat": "ACCEPTED",52          "isOptional": true,53          "isResource": false54        },55        {56          "id": "10000355/10029600@97d9ddb4-ae93-4469-8471-110c573d13z1",57          "partstat": "ACCEPTED",58          "resourceValue": "https://calendar.worksmobile.com/resources/resource/10000355/10029600@97d9ddb4-ae93-4469-8471-110c573d13z1",59          "isOptional": false,60          "isResource": true61        },62        {63          "email": "attendee3@example.com",64          "displayName": "user3",65          "partstat": "DECLINED",66          "isOptional": false,67          "isResource": false68        }69      ],70      "videoMeeting": {71        "url": "https://works.do/x4gOs1_call",72        "resourceId": "x4gOs1_call"73      },74      "reminders": [75        {76          "method": "DISPLAY",77          "trigger": "-PT10M"78        },79        {80          "method": "EMAIL",81          "triggerDateTime": {82            "dateTime": "2021-12-13T10:00:00",83            "timeZone": "Asia/Tokyo"84          }85        }86      ],87      "attachments": [88        {89          "fileUrl": "https://calendar.worksmobile.com/file/download?scheduleId=20211212T134459Z-153@zvcweb06.wcal.nfra.io&path=21785b23-760z-4394-badf-6463c9474746.10029600",90          "fileName": "4024939274.pdf",91          "fileSize": 4850692        }93      ],94      "viewUrl": "https://calendar.worksmobile.com/permanentLink.nhn",95      "priority": 096    }97  ],98  "organizerCalendarId": "calendar-96b8-4c74-8277-7953e0b4604a"99}

HTTP 400

Bad Request

HTTP 403

Forbidden

HTTP 404

Not Found