Skip to Content
Events

Update an event

Change the fields you send. Set `status` to `cancelled` to cancel the event and notify guests. Requires the `events:write` scope.

PATCH
/v1/events/{id}

Change the fields you send. Set status to cancelled to cancel the event and notify guests.

Requires the events:write scope.

Authorization

secretKey
headerAuthorizationBearer <token>

A secret key: wc_live_... or wc_test_.... Keep it on your server.

Path Parameters

id*string
Match^evt_[0-9A-Za-z]{6,64}$

Request Body

application/json
  1. body

Only the fields you send are changed.

title?string
Length1 <= length <= 200
starts_at?string

ISO 8601. The offset is optional: without one, the time is read in the event's timezone.

Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:?\d{2})?$
ends_at?|

ISO 8601. The offset is optional: without one, the time is read in the event's timezone.

Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:?\d{2})?$
timezone?string

IANA timezone name.

Length1 <= length <= 64
slug?string
Match^[a-z0-9]+(?:-[a-z0-9]+)*$
Length1 <= length <= 100
status?string

Set cancelled to cancel the event and notify its guests.

Value in"draft""published""cancelled"
description?|
Lengthlength <= 10000
location_name?|
Lengthlength <= 200
location_address?|
Lengthlength <= 500
online_url?|

Link for an online event. https:// only.

Match^https:\/\/
Formaturi
Lengthlength <= 2048
capacity?|

Seats. null means no limit.

Range1 <= value <= 1000000
max_guests?integer

Extra guests (plus-ones) each RSVP may bring.

Range0 <= value <= 100
waitlist_enabled?boolean
visibility?string

public events are listed and indexed. unlisted events work by link and embed but are not listed. private events are only visible through this API and the dashboard.

Value in"public""unlisted""private"
price_note?|
Lengthlength <= 200
cover_image_url?|

Image shown on the hosted page and in search results. https:// only.

Match^https:\/\/
Formaturi
Lengthlength <= 2048
fields?array<>

Custom questions, in display order. At most 100, or fewer on your plan. Each key must be unique.

Itemsitems <= 100

Response Body

The updated event.

application/json
  1. response
id*string
Match^evt_[0-9A-Za-z]{6,64}$
mode*string

live or test. Always the mode of the API key that made the request.

Value in"live""test"
series_id*|

Set when the event is an occurrence of a series.

slug*string
title*string
description*string|null
starts_at*string

ISO 8601 with a UTC offset.

Formatdate-time
ends_at*|

ISO 8601 with a UTC offset.

Formatdate-time
timezone*string
location_name*string|null
location_address*string|null
online_url*string|null
capacity*integer|null
max_guests*integer
waitlist_enabled*boolean
visibility*string

public events are listed and indexed. unlisted events work by link and embed but are not listed. private events are only visible through this API and the dashboard.

Value in"public""unlisted""private"
status*string
Value in"draft""published""cancelled"
price_note*string|null
cover_image_url*string|null
fields*array<>
counts*
url*string

Hosted event page.

created_at*string

ISO 8601 with a UTC offset.

Formatdate-time
updated_at*string

ISO 8601 with a UTC offset.

Formatdate-time
Example Request
curl -X PATCH 'https://api.whocoming.com/v1/events/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "mode": "live",  "series_id": "string",  "slug": "string",  "title": "string",  "description": "string",  "starts_at": "2019-08-24T14:15:22Z",  "ends_at": "2019-08-24T14:15:22Z",  "timezone": "string",  "location_name": "string",  "location_address": "string",  "online_url": "string",  "capacity": 0,  "max_guests": 0,  "waitlist_enabled": true,  "visibility": "public",  "status": "draft",  "price_note": "string",  "cover_image_url": "string",  "fields": [    {      "key": "string",      "label": "string",      "type": "text",      "required": true,      "options": [        "string"      ]    }  ],  "counts": {    "going": 0,    "waitlisted": 0,    "spots_left": 0  },  "url": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}