Skip to Content
Events

Create an event

Create a one-off event. Accepts `Idempotency-Key`. Requires the `events:write` scope.

POST
/v1/events

Create a one-off event. Accepts Idempotency-Key.

Requires the events:write scope.

Authorization

secretKey
headerAuthorizationBearer <token>

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

Header Parameters

idempotency-key?string

Send a unique value (a UUID works) to make retries safe. A replay within 24 hours returns the first response; the same key with a different body is a 409 idempotency_conflict.

Length1 <= length <= 255

Request Body

application/json
  1. body
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

Generated from the title when omitted.

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

Defaults to published, so the event can take RSVPs right away.

Value in"draft""published"
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 event was created.

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 POST 'https://api.whocoming.com/v1/events' \  -H 'Content-Type: application/json' \  -d '{  "title": "string",  "starts_at": "string",  "timezone": "string"}'
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"}