Events

Events happening in a municipality

Things are happening in any city or town, and this API is a way to have them managed in apps and websites.

The Event object

  {
    "id": "ev_c9988dea",
    "department_id": 4,
    "person_id": 7,
    "categories": ["ec_hsjh4445", "ec_1545pphh"],
    "name": "Town board meeting", 
    "description": "Town board meeting description",
    "status": "public", 
    "starts_at": "2022-07-08T10:00:00.000Z", // UTC datetime 
    "ends_at": "2022-07-08T14:00:00.000Z", // UTC datetime
    "starts_at_local": "2022-07-08T10:00:00.000Z", // jurisdiction timezone date 
    "ends_at_local": "2022-07-08T14:00:00.000Z", // jurisdiction timezone date
    "type": "recurrent", 
    "recurrence": {
      "frequency": "monthly",
      "interval": 1,
      "ends_on": "2024-07-06T08:22:57.000Z",
      "ends_after": 5,
      "on_different_date": true, 
      "every": "first", 
      "day_in_week": 3,
    }, 
    "metadata": null, 
    "source_event": null, 
    "image_url":"https://files.heygov.com/heyville.org/events/ev_c9988dea/image.jpg", 
    "venues": ["vn_abc123", "vn_knksd544"], 
    "source": "me_abc123",
    "location": {
      "lat": 44.8341639,
      "lng": -87.3770419,
      "address": "Sturgeon Bay, WI 54235, USA",
      "state": "WI",
      "country": "US"
    },  
    "created_at": "2022-07-06T08:22:57.000Z", 
    "updated_at": "2022-07-06T08:22:57.000Z" 
  }

Endpoints

List events for a municipality

GET https://api.heygov.com/{jurisdiction_id}/events

Path Parameters

Name
Type
Description

jurisdiction_id*

String

The ID for the municipality

Query Parameters

Name
Type
Description

limit

Number

How many events to return. Default: 50

month

String

Query for events happening in this month, prev month & next month, in YYYY-MM format (2023-05)

date_start

String

Query for events starting from this date (inclusive), in YYYY-MM-DD format

date_end

Sring

Query for events ending before this date (inclusive), in YYYY-MM-DD format

date_start_utc

String

Query for events starting from this date (inclusive), in YYYY-MM-DD format, UTC time

date_end_utc

String

Query for events ending before this date (inclusive), in YYYY-MM-DD format, UTC time

q

String

Search query for event name

page

Number

What page of results query to return Default: 1

type

String

Query events for their type, available types: single - one-off event recurrent - source recurrent event recurrence - sub-events created by a recurrent event

expand

String

Expand object data in returned list of events, options: parent - expand event type recurrence with source recurrent parent event, department person

category_id

String

Query events for category id

status

String

Query events for status, options: public private deleted

day

String

Query for events happening on this day, in YYYY-MM-DD format

Get single event

GET https://api.heygov.com/{jurisdiction_id}/events/{id}

Get detailed event

Path Parameters

Name
Type
Description

jurisdiction_id

String

The ID for the municipality

id

String

The event ID

Create event

POST https://api.heygov.com/{jurisdiction_id}/events

Create new event

Request Body

Name
Type
Description

name*

String

Event name

starts_at*

Datetime

UTC datetime in format "YYYY-MM-DD HH:mm:ss"

ends_at*

Datetime

UTC datetime in format "YYYY-MM-DD HH:mm:ss"

starts_at_local

Datetime

Jurisdiction timezone datetime in format "YYYY-MM-DD HH:mm:ss"

ends_at_local

Datetime

Jurisdiction timezone datetime in format "YYYY-MM-DD HH:mm:ss"

status

String

Default: public

categories

Object

Default: null

venues

Object

Default: null

recurrence

Object

Update single event

PUT https://api.heygov.com/{jurisdiction_id}/events/{id}

Update existing event data

Path Parameters

Name
Type
Description

jurisdiction_id

String

The ID for the municipality

id

String

The event ID

Request Body

Name
Type
Description

name

String

The event name

description

String

The event description

Delete event

DELETE https://api.heygov.com/{jurisdiction_id}/events/{id}

Fully and irreversibly delete a event with connected image _url

Path Parameters

Name
Type
Description

jurisidction_id

String

The ID of municipality

id

String

The event ID

Upload image

POST https://api.heygov.com/{jurisdiction_id}/events/{id}/image

Upload event image

Path Parameters

Name
Type
Description

jurisdiction_id

String

The municipality ID

id

String

The event ID

Request Body

Name
Type
Description

file*

Binary

Delete image

DELETE https://api.heygov.com/{jurisdiction_id}/events/id

Delete image from event

Path Parameters

Name
Type
Description

jurisidction_id

String

The municipality ID

id

String

The event ID

Last updated