{
    "openapi": "3.0.3",
    "info": {
        "title": "ONCORR API",
        "version": "1.0.0",
        "description": "Read events, registrations, check-ins, flight status and reports, and create registrations and invitations.\n\nAuthenticate with a personal access token (created under **API & webhooks** in the admin panel or organizer portal): `Authorization: Bearer onc_\u2026`. Tokens only see the events their owner can see. Card, passport and frequent-flyer data are never exposed."
    },
    "servers": [
        {
            "url": "https://oncorr.info/api/v1"
        }
    ],
    "tags": [
        {
            "name": "Account",
            "description": "The token you are using."
        },
        {
            "name": "Events",
            "description": "Events you can access."
        },
        {
            "name": "Registrations",
            "description": "Guests registered for an event, their check-in and travel status."
        },
        {
            "name": "Invitations",
            "description": "Invitation list of invitation-only events."
        },
        {
            "name": "Reports",
            "description": "Summary numbers of an event."
        },
        {
            "name": "Webhooks",
            "description": "Subscribe an https:// address to events (REST hooks for Zapier / Make instant triggers)."
        }
    ],
    "paths": {
        "/me": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "Who am I",
                "description": "Shows the token name, owner, scopes and rate limit. Works with any scope.\n\nRequired scope: `events:read`.",
                "x-scope": "events:read",
                "security": [
                    {
                        "bearerAuth": [
                            "events:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Token details."
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        },
        "/events": {
            "get": {
                "tags": [
                    "Events"
                ],
                "summary": "List events",
                "description": "Required scope: `events:read`.",
                "x-scope": "events:read",
                "security": [
                    {
                        "bearerAuth": [
                            "events:read"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "requested",
                                "approved",
                                "activated",
                                "published",
                                "closed",
                                "archived",
                                "postponed"
                            ]
                        },
                        "description": "Filter by status."
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Search name, client or event code."
                    },
                    {
                        "name": "starts_after",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "Start date on or after (YYYY-MM-DD)."
                    },
                    {
                        "name": "starts_before",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "Start date on or before (YYYY-MM-DD)."
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "start_date"
                            ]
                        },
                        "description": "Sort field."
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        },
                        "description": "Sort direction."
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        },
                        "description": "Page number."
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 25
                        },
                        "description": "Items per page (max 100)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of results.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Event"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        },
                                        "links": {
                                            "$ref": "#/components/schemas/PageLinks"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        },
        "/events/{event}": {
            "get": {
                "tags": [
                    "Events"
                ],
                "summary": "Get an event",
                "description": "Required scope: `events:read`.",
                "x-scope": "events:read",
                "security": [
                    {
                        "bearerAuth": [
                            "events:read"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Event ID."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Event"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        },
        "/events/{event}/registrations": {
            "get": {
                "tags": [
                    "Registrations"
                ],
                "summary": "List registrations",
                "description": "Required scope: `registrations:read`.",
                "x-scope": "registrations:read",
                "security": [
                    {
                        "bearerAuth": [
                            "registrations:read"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Event ID."
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "registered",
                                "incomplete",
                                "cancelled",
                                "deleted"
                            ]
                        },
                        "description": "Filter by status."
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Exact e-mail address."
                    },
                    {
                        "name": "registered_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Registered on or after this date/time."
                    },
                    {
                        "name": "checked_in",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "Only guests who have (true) or have not (false) checked in."
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        },
                        "description": "Order by ID."
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        },
                        "description": "Page number."
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 25
                        },
                        "description": "Items per page (max 100)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of results.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Registration"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        },
                                        "links": {
                                            "$ref": "#/components/schemas/PageLinks"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            },
            "post": {
                "tags": [
                    "Registrations"
                ],
                "summary": "Create a registration",
                "description": "Finds the person by e-mail (or creates their profile) and registers them. Fires the `registration.created` webhook when the status is `registered`.\n\nRequired scope: `registrations:write`.",
                "x-scope": "registrations:write",
                "security": [
                    {
                        "bearerAuth": [
                            "registrations:write"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Event ID."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RegistrationCreate"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Created.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Registration"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "This person is already registered."
                    },
                    "422": {
                        "$ref": "#/components/responses/Invalid"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        },
        "/registrations/{registration}": {
            "get": {
                "tags": [
                    "Registrations"
                ],
                "summary": "Get a registration",
                "description": "Required scope: `registrations:read`.",
                "x-scope": "registrations:read",
                "security": [
                    {
                        "bearerAuth": [
                            "registrations:read"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "registration",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Registration ID."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Registration"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            },
            "patch": {
                "tags": [
                    "Registrations"
                ],
                "summary": "Update or cancel a registration",
                "description": "Send only the fields you want to change. `status: cancelled` cancels the registration.\n\nRequired scope: `registrations:write`.",
                "x-scope": "registrations:write",
                "security": [
                    {
                        "bearerAuth": [
                            "registrations:write"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "registration",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Registration ID."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RegistrationUpdate"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Registration"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/Invalid"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        },
        "/events/{event}/checkins": {
            "get": {
                "tags": [
                    "Registrations"
                ],
                "summary": "List check-ins",
                "description": "Required scope: `registrations:read`.",
                "x-scope": "registrations:read",
                "security": [
                    {
                        "bearerAuth": [
                            "registrations:read"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Event ID."
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Checked in on or after."
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        },
                        "description": "Page number."
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 25
                        },
                        "description": "Items per page (max 100)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of results.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Checkin"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        },
                                        "links": {
                                            "$ref": "#/components/schemas/PageLinks"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        },
        "/events/{event}/flights": {
            "get": {
                "tags": [
                    "Registrations"
                ],
                "summary": "Flight status of guests",
                "description": "Live (or simulated) status of the guests' tracked flights.\n\nRequired scope: `registrations:read`.",
                "x-scope": "registrations:read",
                "security": [
                    {
                        "bearerAuth": [
                            "registrations:read"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Event ID."
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        },
                        "description": "Page number."
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 25
                        },
                        "description": "Items per page (max 100)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of results.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Flight"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        },
                                        "links": {
                                            "$ref": "#/components/schemas/PageLinks"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        },
        "/events/{event}/invitations": {
            "get": {
                "tags": [
                    "Invitations"
                ],
                "summary": "List invitations",
                "description": "Required scope: `invitations:write`.",
                "x-scope": "invitations:write",
                "security": [
                    {
                        "bearerAuth": [
                            "invitations:write"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Event ID."
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "new",
                                "sent",
                                "registered",
                                "declined"
                            ]
                        },
                        "description": "Filter by status."
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Exact e-mail address."
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        },
                        "description": "Page number."
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 25
                        },
                        "description": "Items per page (max 100)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of results.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Invitation"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        },
                                        "links": {
                                            "$ref": "#/components/schemas/PageLinks"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            },
            "post": {
                "tags": [
                    "Invitations"
                ],
                "summary": "Invite a person",
                "description": "Adds the person to the invitation list with a personal invitation code. The invitation e-mail is sent from ONCORR's invitation screens.\n\nRequired scope: `invitations:write`.",
                "x-scope": "invitations:write",
                "security": [
                    {
                        "bearerAuth": [
                            "invitations:write"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Event ID."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/InvitationCreate"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Created.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Invitation"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Already invited.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Invitation"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        },
        "/events/{event}/reports/summary": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Event summary",
                "description": "Required scope: `reports:read`.",
                "x-scope": "reports:read",
                "security": [
                    {
                        "bearerAuth": [
                            "reports:read"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Event ID."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Counts by registration status, attendee type, invitation status and check-in."
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        },
        "/webhooks": {
            "get": {
                "tags": [
                    "Webhooks"
                ],
                "summary": "List webhook subscriptions",
                "description": "Required scope: `webhooks:manage`.",
                "x-scope": "webhooks:manage",
                "security": [
                    {
                        "bearerAuth": [
                            "webhooks:manage"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        },
                        "description": "Page number."
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 25
                        },
                        "description": "Items per page (max 100)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The token owner's webhook endpoints."
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            },
            "post": {
                "tags": [
                    "Webhooks"
                ],
                "summary": "Subscribe a webhook",
                "description": "Delivers the chosen events to `url` as signed JSON (see X-Oncorr-Signature). The receiving host must be allowed by an ONCORR administrator. Sandbox keys must send the `event_id` of a [DEMO] event.\n\nRequired scope: `webhooks:manage`.",
                "x-scope": "webhooks:manage",
                "security": [
                    {
                        "bearerAuth": [
                            "webhooks:manage"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookCreate"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Created. The response includes the signing `secret` (shown once)."
                    },
                    "422": {
                        "$ref": "#/components/responses/Invalid"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        },
        "/webhooks/{webhook}": {
            "delete": {
                "tags": [
                    "Webhooks"
                ],
                "summary": "Unsubscribe a webhook",
                "description": "Required scope: `webhooks:manage`.",
                "x-scope": "webhooks:manage",
                "security": [
                    {
                        "bearerAuth": [
                            "webhooks:manage"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Removed."
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "onc_ personal access token",
                "description": "Scopes: events:read, registrations:read, registrations:write, invitations:write, reports:read, webhooks:manage."
            }
        },
        "responses": {
            "Unauthenticated": {
                "description": "Missing, invalid, revoked or expired token.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "Forbidden": {
                "description": "The token lacks the scope, or the IP is not allowed.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "NotFound": {
                "description": "Not found (or not visible to this token).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "RateLimited": {
                "description": "Too many requests \u2014 see Retry-After.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "Invalid": {
                "description": "Validation failed.",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string"
                                },
                                "errors": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string",
                                "example": "insufficient_scope"
                            },
                            "message": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "PageMeta": {
                "type": "object",
                "properties": {
                    "page": {
                        "type": "integer"
                    },
                    "per_page": {
                        "type": "integer"
                    },
                    "total": {
                        "type": "integer"
                    },
                    "last_page": {
                        "type": "integer"
                    }
                }
            },
            "PageLinks": {
                "type": "object",
                "properties": {
                    "next": {
                        "type": "string",
                        "nullable": true
                    },
                    "prev": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "Event": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 1234
                    },
                    "object": {
                        "type": "string",
                        "example": "event"
                    },
                    "name": {
                        "type": "string",
                        "example": "Investigator Meeting 2027"
                    },
                    "code": {
                        "type": "string",
                        "example": "IM27"
                    },
                    "client": {
                        "type": "string",
                        "example": "Acme Pharma"
                    },
                    "status": {
                        "type": "string",
                        "example": "published"
                    },
                    "start_date": {
                        "type": "string",
                        "format": "date"
                    },
                    "end_date": {
                        "type": "string",
                        "format": "date"
                    },
                    "registration_deadline": {
                        "type": "string",
                        "format": "date",
                        "nullable": true
                    },
                    "registration_closed": {
                        "type": "boolean"
                    },
                    "by_invitation": {
                        "type": "boolean"
                    },
                    "venue": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "city": {
                                "type": "string"
                            },
                            "state": {
                                "type": "string"
                            },
                            "country": {
                                "type": "string"
                            }
                        }
                    },
                    "website_url": {
                        "type": "string",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    }
                }
            },
            "Registration": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "object": {
                        "type": "string",
                        "example": "registration"
                    },
                    "event_id": {
                        "type": "integer"
                    },
                    "participant_id": {
                        "type": "integer"
                    },
                    "code": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "registered",
                            "incomplete",
                            "cancelled",
                            "deleted"
                        ]
                    },
                    "first_name": {
                        "type": "string"
                    },
                    "last_name": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string",
                        "nullable": true
                    },
                    "degree": {
                        "type": "string",
                        "nullable": true
                    },
                    "email": {
                        "type": "string"
                    },
                    "phone": {
                        "type": "string",
                        "nullable": true
                    },
                    "mobile": {
                        "type": "string",
                        "nullable": true
                    },
                    "company": {
                        "type": "string",
                        "nullable": true
                    },
                    "city": {
                        "type": "string",
                        "nullable": true
                    },
                    "state": {
                        "type": "string",
                        "nullable": true
                    },
                    "country": {
                        "type": "string",
                        "nullable": true
                    },
                    "attendee_type": {
                        "type": "string",
                        "nullable": true,
                        "example": "Investigator"
                    },
                    "registered_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "hotel": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                            "arrival": {
                                "type": "string",
                                "format": "date"
                            },
                            "departure": {
                                "type": "string",
                                "format": "date"
                            },
                            "room_type": {
                                "type": "string"
                            }
                        }
                    },
                    "flights": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                            "arrival": {
                                "type": "object"
                            },
                            "departure": {
                                "type": "object"
                            }
                        }
                    },
                    "check_in": {
                        "type": "object",
                        "properties": {
                            "checked_in": {
                                "type": "boolean"
                            },
                            "checked_in_at": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true
                            },
                            "method": {
                                "type": "string",
                                "nullable": true
                            }
                        }
                    }
                }
            },
            "RegistrationCreate": {
                "type": "object",
                "required": [
                    "first_name",
                    "last_name",
                    "email"
                ],
                "properties": {
                    "first_name": {
                        "type": "string",
                        "maxLength": 50
                    },
                    "last_name": {
                        "type": "string",
                        "maxLength": 50
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "title": {
                        "type": "string"
                    },
                    "company": {
                        "type": "string"
                    },
                    "phone": {
                        "type": "string"
                    },
                    "mobile": {
                        "type": "string",
                        "maxLength": 15
                    },
                    "city": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string"
                    },
                    "attendee_type": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "registered",
                            "incomplete"
                        ],
                        "default": "registered"
                    }
                }
            },
            "RegistrationUpdate": {
                "type": "object",
                "properties": {
                    "first_name": {
                        "type": "string"
                    },
                    "last_name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "title": {
                        "type": "string"
                    },
                    "company": {
                        "type": "string"
                    },
                    "phone": {
                        "type": "string"
                    },
                    "mobile": {
                        "type": "string"
                    },
                    "attendee_type": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "registered",
                            "cancelled"
                        ]
                    }
                }
            },
            "Checkin": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "object": {
                        "type": "string",
                        "example": "checkin"
                    },
                    "event_id": {
                        "type": "integer"
                    },
                    "registration_id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "session": {
                        "type": "string",
                        "nullable": true
                    },
                    "guests": {
                        "type": "integer"
                    },
                    "method": {
                        "type": "string"
                    },
                    "checked_in_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "Flight": {
                "type": "object",
                "properties": {
                    "registration_id": {
                        "type": "integer"
                    },
                    "direction": {
                        "type": "string",
                        "enum": [
                            "arrival",
                            "departure"
                        ]
                    },
                    "airline": {
                        "type": "string"
                    },
                    "flight_number": {
                        "type": "string"
                    },
                    "date": {
                        "type": "string",
                        "format": "date"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "scheduled",
                            "delayed",
                            "boarding",
                            "departed",
                            "landed",
                            "cancelled",
                            "diverted",
                            "unknown"
                        ]
                    },
                    "delay_minutes": {
                        "type": "integer"
                    },
                    "estimated_arrival": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "simulated": {
                        "type": "boolean"
                    }
                }
            },
            "Invitation": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "object": {
                        "type": "string",
                        "example": "invitation"
                    },
                    "event_id": {
                        "type": "integer"
                    },
                    "participant_id": {
                        "type": "integer"
                    },
                    "registration_id": {
                        "type": "integer",
                        "nullable": true
                    },
                    "code": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "new",
                            "sent",
                            "registered",
                            "declined"
                        ]
                    },
                    "first_name": {
                        "type": "string"
                    },
                    "last_name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "invited_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "InvitationCreate": {
                "type": "object",
                "required": [
                    "first_name",
                    "last_name",
                    "email"
                ],
                "properties": {
                    "first_name": {
                        "type": "string"
                    },
                    "last_name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "company": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "new",
                            "sent"
                        ],
                        "default": "new"
                    }
                }
            },
            "WebhookCreate": {
                "type": "object",
                "required": [
                    "url",
                    "events"
                ],
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "example": "https://hooks.zapier.com/hooks/standard/123/abc"
                    },
                    "events": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "registration.created",
                                "registration.updated",
                                "registration.cancelled",
                                "checkin.created",
                                "flight.changed",
                                "payment.succeeded",
                                "invitation.responded"
                            ]
                        }
                    },
                    "event_id": {
                        "type": "integer",
                        "nullable": true
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "WebhookEvent": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "evt_01j\u2026"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "registration.created",
                            "registration.updated",
                            "registration.cancelled",
                            "checkin.created",
                            "flight.changed",
                            "payment.succeeded",
                            "invitation.responded"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "data": {
                        "type": "object"
                    }
                }
            }
        }
    },
    "x-webhooks": {
        "registration.created": {
            "description": "A registration was created"
        },
        "registration.updated": {
            "description": "A registration was changed"
        },
        "registration.cancelled": {
            "description": "A registration was cancelled"
        },
        "checkin.created": {
            "description": "A guest checked in"
        },
        "flight.changed": {
            "description": "A tracked flight changed (delay, gate, landing\u2026)"
        },
        "payment.succeeded": {
            "description": "A payment was received"
        },
        "invitation.responded": {
            "description": "An invitee registered or declined"
        }
    },
    "x-mcp": {
        "endpoint": "https://oncorr.info/mcp",
        "transport": "streamable-http",
        "protocolVersions": [
            "2025-11-25",
            "2025-06-18",
            "2025-03-26",
            "2024-11-05"
        ],
        "tools": {
            "whoami": {
                "scope": null,
                "confirm": false,
                "description": "The ONCORR account behind this connection: name, permissions (scopes) and how many events it can see."
            },
            "list_events": {
                "scope": "events:read",
                "confirm": false,
                "description": "Events this account can see, newest first. Filter by name / client / event code, status or start date."
            },
            "get_event": {
                "scope": "events:read",
                "confirm": false,
                "description": "Name, dates, status, client, venue and registration deadline of one event."
            },
            "event_summary": {
                "scope": "reports:read",
                "confirm": false,
                "description": "Counts of registrations by status and attendee type, invitations by status and the check-in rate."
            },
            "search_registrations": {
                "scope": "registrations:read",
                "confirm": false,
                "description": "Registrations of an event. Search by name, e-mail, company or registration code, or filter by status / check-in."
            },
            "get_registration": {
                "scope": "registrations:read",
                "confirm": false,
                "description": "One registration: contact details, status, hotel dates, flights and check-in."
            },
            "checkin_stats": {
                "scope": "registrations:read",
                "confirm": false,
                "description": "Live check-in numbers of an event (or one agenda session): arrived, expected, by attendee type, latest arrivals."
            },
            "flight_status_board": {
                "scope": "registrations:read",
                "confirm": false,
                "description": "Tracked arrival and departure flights of the guests with live (or simulated) status, delays and gates."
            },
            "list_invitations": {
                "scope": "invitations:write",
                "confirm": false,
                "description": "Invitation list of an event with each person's status (new, sent, registered, declined)."
            },
            "create_registration": {
                "scope": "registrations:write",
                "confirm": true,
                "description": "Registers a person for an event (finds or creates their profile by e-mail). Without confirm: true it only shows a preview."
            },
            "update_registration": {
                "scope": "registrations:write",
                "confirm": true,
                "description": "Changes names, contact details or attendee type of a registration. Send only the fields to change. Without confirm: true it only shows a preview."
            },
            "cancel_registration": {
                "scope": "registrations:write",
                "confirm": true,
                "description": "Cancels a registration (the person is marked as not attending). Without confirm: true it only shows a preview."
            },
            "check_in_guest": {
                "scope": "registrations:write",
                "confirm": true,
                "description": "Checks a registered guest in at the event (or an agenda session). Without confirm: true it only shows a preview."
            },
            "invite_person": {
                "scope": "invitations:write",
                "confirm": true,
                "description": "Adds a person to an event's invitation list with a personal invitation code (the e-mail is sent from ONCORR's invitation screens). Without confirm: true it only shows a preview."
            }
        }
    },
    "x-actions": {
        "endpoint": "https://oncorr.info/api/integrations/actions/{action}",
        "signature": "X-Oncorr-Signature: t={unix},v1={HMAC-SHA256 hex of \"t.body\"}",
        "actions": {
            "registration.create": "Create a registration (finds or creates the person by e-mail)",
            "invitation.create": "Add a person to an event's invitation list"
        }
    }
}