Skip to main content

Update an Event

ENDPOINT
PUT https://api.codecoogs.com/v1/events?id=
REQUEST BODY
{
"id": 123,
"type": 1,
"start_time": "2023-02-10",
"end_time": "2023-02-10",
"location": "PGH 563,
"name": "Intro to React.js",
"description": "We will cover the basics of the React.js library",
"points": 40,
"leaderboard": "c4e11505-5555-42f9-9f48-678a0abf55c6"
}

URL Parameters


id Required

A unique integer for the object.

Body Parameters


id integer

A unique integer for the object.


type integer

The event's enum type.


start_time string

The event's start time.


end_time string

The event's end time.


location string

The location where the event will be held.


name string

The event's name.


description string

The event's name description.


points integer

The number of points the event provides.


leaderboard string Optional

A UUID that references the Leaderboard of the event.

Updating Event Attributes

When updating an event's information, if you prefer to keep certain attributes unchanged, simply include their current values in the request body. This ensures that only the desired attributes are modified, while retaining the existing values for those you wish to remain unchanged.

Returns

Returns a success status after successful event update. This call returns a success status and an error message if something goes wrong.