API reference
POST/v1/eventsv2.4 · current

Create event

Create a new event on the authenticated organization's calendar. Returns the created event with a server-assigned id.

OAuth 2.0 · Bearer token
events:writecalendar:read
Content-Typeapplication/json

Request body

Parameters
  • titlestringrequired

    Human-readable event title.

  • starts_atstringrequired

    When the event starts.

  • ends_atstringrequired

    Must be after starts_at.

  • visibilityenumrequired

    Who can see the event.

    Allowed
    privategrouppublic
    Defaultprivate
  • locationobjectnullable

    Optional physical or virtual event location.

  • inviteesobject[]

    Up to 100 invitees.

  • recurrenceobjectnullabledeprecated

    Recurrence rule (RFC 5545).

Responses

201CreatedEvent created.
Response fields
  • idstringrequired

    Server-assigned event ID.

  • created_atstring

    ISO 8601 creation timestamp.

  • …(all request body fields)

    Echoes the request body, validated and normalized.

response.jsonjson
{
  "id": "evt_8x2k4ndp",
  "created_at": "2026-04-25T10:14:22Z",
  "title": "Q2 retro",
  "starts_at": "2026-04-28T14:00:00Z",
  "ends_at":   "2026-04-28T15:30:00Z",
  "visibility": "group"
}
400Bad requestValidation failed.
401UnauthorizedMissing or invalid bearer token.
404Not foundCalendar does not exist.

Examples

cURL

terminalbash
curl -X POST https://api.amesio.com/v1/events \
  -H "Authorization: Bearer $AMESIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title":      "Q2 retro",
    "starts_at":  "2026-04-28T14:00:00Z",
    "ends_at":    "2026-04-28T15:30:00Z",
    "visibility": "group"
  }'

TypeScript

src/create-event.tstypescript
const event = await amesio.events.create({
  title:      "Q2 retro",
  starts_at:  "2026-04-28T14:00:00Z",
  ends_at:    "2026-04-28T15:30:00Z",
  visibility: "group",
});

console.log(event.id);