Skip to main content
POST
Add a draft event

Authorizations

Authorization
string
header
required

A group API key, sent as Authorization: Bearer sw_live_…. Keys from staging and the demo start sw_test_ instead. A group admin creates keys in Settings → Integrations → API keys.

Scopes

events:write

Headers

Idempotency-Key
string

Unique per event: any printable text up to 255 characters. A retry with the same key and body within 24 hours answers with the first event instead of making another. Recommended.

Required string length: 1 - 255

Body

application/json

Always a draft: a leader reviews and publishes it in Scoutworks, which is when families hear of it. A field not listed here is refused with a 400.

title
string
required
Required string length: 1 - 200
type
enum<string>
required
Available options:
programme_meeting,
activity_trip,
camp_residential
startsAt
string<date-time>
required

When it starts, ISO 8601 with an offset.

sectionIds
string<uuid>[]
required

Sections from GET /sections the event is for, at least one. A PATCH replaces them.

Required array length: 1 - 20 elements
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
endsAt
string<date-time> | null

When it ends. A camp needs one. It must be after startsAt.

location
string | null
Maximum string length: 500
description
string | null

What the event is, shown to families once it is published. Free text never leaves through the API, so it is not returned.

Maximum string length: 10000
{key}
any

Response

The event an earlier request with the same Idempotency-Key made.

data
object
required
{key}
any