# Get invitation from email message

Extracts and parses the iCalendar (.ics) meeting invitation from an email message with filing status and RSVP options.

## `GET /api/v1/mailboxes/{mailboxId}/messages/{messageId}/invitation`

### Path parameters

- `mailboxId` (string, required) — Mailbox ULID identifier
- `messageId` (string, required) — Message ULID identifier

### Responses

**200** — Parsed meeting invitation details and RSVP options

`application/json` → MessageInvitation

- `allDay` (boolean, required) — True when DTSTART is a DATE; render the start as a UTC calendar date without a time
- `attendeeCount` (integer, required) — Total number of attendees
- `attendees` (PimAttendee[], required) — List of parsed attendees
  - `email` (string, required) — Attendee email address
  - `cn` (string) — Attendee display name
  - `partstat` (string) — Participation status (NEEDS-ACTION, ACCEPTED, DECLINED, TENTATIVE)
  - `role` (string) — Attendee role (REQ-PARTICIPANT, OPT-PARTICIPANT, CHAIR)
  - `rsvp` (boolean) — True if attendee requested an RSVP reply
- `calendarId` (string | null, required) — Calendar ID holding the stored copy, or null
- `canRespond` (boolean, required) — True if the caller can submit an RSVP response
- `component` ("VEVENT" | "VTODO" | "VJOURNAL", required) — iCalendar component type
- `dtend` (integer | null, required) — End timestamp in epoch seconds, or null
- `dtstart` (integer | null, required) — Start timestamp in epoch seconds, or null
- `found` (boolean, required) — True if this event is already stored in a calendar
- `href` (string | null, required) — DAV resource path of the stored copy, or null
- `isOrganizer` (boolean, required) — True if this mailbox is the organizer of the event
- `location` (string | null, required) — Event location
- `method` (string | null, required) — iTIP method (REQUEST, CANCEL, REPLY), or null
- `myAddress` (string | null, required) — Recipient address matching an attendee on this invite
- `myPartstat` (string | null, required) — Caller's current reply status (ACCEPTED, DECLINED, TENTATIVE, NEEDS-ACTION)
- `organizer` (string | null, required) — Organizer email address, or null
- `rrule` (string | null, required) — Recurrence rule (RRULE), or null
- `section` (string, required) — MIME section of the text/calendar part
- `summary` (string | null, required) — Event title or summary
- `uid` (string | null, required) — Calendar event UID, or null

**401** — unauthorized: the bearer credential is missing, malformed, expired, or revoked. Carries a `WWW-Authenticate: Bearer` challenge

`application/json` → ErrorBody

**404** — not_found or no_invitation (message has no calendar invitation part)

`application/json` → ErrorBody

**413** — message_too_large or invitation_too_large

`application/json` → ErrorBody

**422** — unparseable_message

`application/json` → ErrorBody

**500** — blob_missing

`application/json` → ErrorBody

**503** — temporary_failure: the platform's storage could not answer just now; retry after the Retry-After window. Any operation can answer this. A write that got it may have been applied, so retry it with the same idempotency key where it takes one, or read the state back first (see Transient failures in the API description)

`application/json` → ErrorBody

### Example request

```bash
curl -X GET 'https://api.open.email/api/v1/mailboxes/{mailboxId}/messages/{messageId}/invitation' \
  -H 'Authorization: Bearer oek_…'
```

## TypeScript SDK

[`openemail.messages.getInvitation`](/docs/sdks/typescript/messages/get-invitation)

```ts
const messageInvitation = await openemail.messages.getInvitation(mailboxId, messageId)
```
