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

organizations.id

string

This object provides the unique ID of the organization.

organizations.name

string

This object provides the name of the organization.

Here, we’ll call the API to retrieve the organization details:

Press + to interact
import requests
import json
url = '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

event.name.html

string

required

This object indicates the name of the event in HTML format.

event.description.html

string

required

This object provides the description of the event  in HTML format.

event.start.timezone

string

required

This object indicates the timezone of start date.

event.start.utc

string

required

This object uses the UTC standard to provide the date and time.

event.end.timezone

string

required

This object indicates the timezone of the end date.

event.end.utc

string

required

This object uses the UTC standard to provide the date and time.

event.currency

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

response.id

string

This object indicates a unique id of the event.

response.url

string

This object provides the URL of the event to preview the event page after publication.

response.status

string

This object indicates the event's status can be draft, started, ended, completed, canceled, or live.

Let’s call an API to create an event:

Press + to interact
import requests
import json
url = '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.

Press + to interact
import requests
import json
url = '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

name

multipart-text

optional

This object indicates the name of the event that is to be updated.

summary

string

optional

This object updates the event’s summary.

description

multipart-text

optional

This object provides the description of the event that is to be updated.

url

string

optional

This object indicates the new URL to be updated.

start

datetime-tz

optional

This object indicates the new start date and time of the event.

end

datetime-tz

optional

This object indicates the new end date and time of the event.

currency

string

optional

This object indicates the new currency type.

online_event

boolean

optional

This object indicates whether the event is online or not. Its possible values are true or false.

listed

boolean

optional

This object indicates whether the event is publicly searchable or not. Its possible values true or false.

shareable

boolean

optional

This object indicates whether the event is shareable or not on social websites. Its possible values are true or false.

invite_only

boolean

optional

This object ensures that only invitees of the event will be able to see the event page. The values are set as true or false.

show_remaining

boolean

optional

This object indicates whether to show the remaining tickets or not. Its possible values are true or false.

password

string

optional

This object sets the event password to access the details of the event.

capacity

integer

optional

This object indicates the new value of capacity allowed in the event.

venue_id

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.

Press + to interact
import requests
import json
url = '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))