Duplicate a Calendar item
const url = 'https://example.com/api/v1/calendar/items/duplicate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"date":"example","id":"example","kind":"log"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/calendar/items/duplicate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "date": "example", "id": "example", "kind": "log" }'Requires a signed-in User. It copies a Log entry, Task or Event to the requested date and returns its new identity. It returns 400 for invalid input, 404 when the source is missing, or 409 when the copy cannot be saved. Route: /api/v1/calendar/items/duplicate. Inputs: . Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The Calendar-local day that displays the source item.
Stable Journal block ID, Event identity, or Task identity.
Responses
Section titled “Responses”object
Stable ID of the newly created copy.
Home-relative source path for Task Undo. Other kinds do not use a file.
Example
{ "kind": "log"}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}