Search code examples
curl

Can't update and delete teamup calender event using api request


I tried to update and delete an event in the Teamup calendar as described in this document https://apidocs.teamup.com/docs/api/8b5d0d1556103-update-an-event. I tried different combinations in data but could not delete and update events.

Below you can see code snippet to update event

curl --location --request PUT 'https://teamup.com/<calender-key>/events/<event-id>?tz=Asia%2FKatmandu' \
--header 'Accept: application/json' \
--header 'Teamup-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "id":<event-id>,
  "subcalendar_ids": [
            <subcalender-id>
  ],
  "subcalendar_remote_ids": [
    "123"
  ],
  "creation_dt":"2024-06-21T12:00:00+05:45",
  "start_dt": "2024-06-21T12:00:00+05:45",
  "end_dt": "2024-06-21T15:15:00+05:45",
  "all_day": false,
  "rrule": "",
  "notes": "string",
  "version": "string",
  "remote_id": "string",
  "redit": "single",
  "ristart_dt": null,
  "title": "string",
  "location": "string",
  "who": "string",
  "signup_enabled": true,
  "signup_deadline": "2024-06-21T15:15:00+05:45",
  "signup_visibility": "all_users",
  "signup_limit": 1,
  "comments_enabled": true,
  "comments_visibility": "all_users"
}'

I didn't update event but still gets below error

{"error":{"id":"event_validation_conflict","title":"Conflict with another user","message":"The event was changed by another user while you were editing. Please close the event editor, refresh the calendar and edit again."}}%   

Can anybody give insight whats the problem with above request


Solution

  • I think you are requesting the wrong API host. try https://api.teamup.com instead of https://teamup.com