Create and Update Event
Learn how to create and update an event on the Eventbrite platform using its API.
Retrieve an organization’s ID
We can create an event from scratch using the API call. To do this, we’ll first need an organization ID. Every event is associated with an organization, and we need to specify the organization for an event. A default organization is created when we create the Eventbrite account. Click here to see the organization profile. We can upload the “Organization Logo”, update the “Organization Name” and set “Preferred Country.”
The following URL uses the GET
method to fetch the details of the organization:
https://www.eventbriteapi.com/v3/users/me/organizations/
This API call doesn’t take any input parameters and returns a JSON object with organization details. Let’s see some important response parameters:
Object | Type | Description |
| string | This object provides the unique ID of the organization. |
| string | This object provides the name of the organization. |
Here, we’ll call the API to retrieve the organization details:
import requestsimport jsonurl = 'https://www.eventbriteapi.com/v3/users/me/organizations/'headers = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}','Content-Type': 'application/json'}response = requests.request("GET", url, headers=headers).json()print(json.dumps(response, indent=4))
The above API call will return the JSON object, and the id
attribute inside organizations
is the organization’s ID.
Create an event
Let’s use the retrieved organization’s ID to create an event within the organization.
The following URL uses the POST
method to create an event within the organization:
https://www.eventbriteapi.com/v3/organizations/{organization_id}/events/
Request parameters
The table below provides some important input parameters:
Object | Type | Category | Description |
| string | required | This object indicates the name of the event in HTML format. |
| string | required | This object provides the description of the event in HTML format. |
| string | required | This object indicates the timezone of start date. |
| string | required | This object uses the UTC standard to provide the date and time. |
| string | required | This object indicates the timezone of the end date. |
| string | required | This object uses the UTC standard to provide the date and time. |
| string | required | This object indicates the ISO 4217 currency code for this event. |
Note: Start and end dates must be in the future.
Response parameters
The above API call returns a JSON object. The table below explains some important attributes of the response object. This response object includes all the provided input parameters and the optional parameters, and their values are set to default.
Object | Type | Description |
| string | This object indicates a unique id of the event. |
| string | This object provides the URL of the event to preview the event page after publication. |
| string | This object indicates the event's status can be |
Let’s call an API to create an event:
import requestsimport jsonurl = 'https://www.eventbriteapi.com/v3/organizations/{{ORGANIZATION_ID}}/events/'headers = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}','Content-Type': 'application/json'}values=json.dumps({"event": {"name": {"html": "My event name"},"description": {"html": "Long description of the event."},"start":{"timezone": "America/Los_Angeles","utc": "2022-12-01T02:00:00Z"},"end":{"timezone": "America/Los_Angeles","utc": "2022-12-01T05:00:00Z"},"currency": "USD"}})response = requests.request("POST", url, headers=headers, data=values).json()print(json.dumps(response, indent=4))
Retrieve an event
If we want to retrieve a specific event, we’ll use the event_id
to retrieve the event’s details. The following URL uses the GET
method to retrieve the event:
https://www.eventbriteapi.com/v3/events/{event_id}/
The {event_id}
is the required input parameter, which returns a JSON object with the event details.
import requestsimport jsonurl = 'https://www.eventbriteapi.com/v3/events/{{EVENT_ID}}/'headers = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}','Content-Type': 'application/json'}response = requests.request("Get", url, headers=headers).json()print(json.dumps(response, indent=4))
Update an event
We can update an event by providing event_id
and valid attributes that are to update by the API call.
The following URL uses the POST
method to update an event:
https://www.eventbriteapi.com/v3/events/{event_id}/
Request parameters
Some important input parameters are as follows:
Object | Type | Category | Description |
| multipart-text | optional | This object indicates the name of the event that is to be updated. |
| string | optional | This object updates the event’s summary. |
| multipart-text | optional | This object provides the description of the event that is to be updated. |
| string | optional | This object indicates the new URL to be updated. |
| datetime-tz | optional | This object indicates the new start date and time of the event. |
| datetime-tz | optional | This object indicates the new end date and time of the event. |
| string | optional | This object indicates the new currency type. |
| boolean | optional | This object indicates whether the event is online or not. Its possible values are |
| boolean | optional | This object indicates whether the event is publicly searchable or not. Its possible values |
| boolean | optional | This object indicates whether the event is shareable or not on social websites. Its possible values are |
| boolean | optional | This object ensures that only invitees of the event will be able to see the event page. The values are set as |
| boolean | optional | This object indicates whether to show the remaining tickets or not. Its possible values are |
| string | optional | This object sets the event password to access the details of the event. |
| integer | optional | This object indicates the new value of capacity allowed in the event. |
| string | optional | This object indicates the new venue id of the event. |
To update an event, we must provide at least one parameter. The response will be an object of the event with the updated values.
Let’s try to update the capacity
and name
of the event we’ve created.
import requestsimport jsonurl = 'https://www.eventbriteapi.com/v3/events/{{EVENT_ID}}/'headers = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}','Content-Type': 'application/json'}values = json.dumps({"event": {"name": {"html": "Updated name of the Event"},"capacity": 100}})response = requests.request("POST", url, headers=headers, data=values).json()print(json.dumps(response, indent=4))