openapi: 3.1.0
info:
  title: Revento External Integrations public contract
  version: 1.0.0
  summary: Public REST and webhook contract for Revento external integrations.
  description: |
    Machine-readable contract for the public External Integrations surface.
    This bundle covers:

    - OAuth authorize, token, and revoke
    - The v1 read API
    - Publisher-tooling endpoints for rotating secrets and sending a test webhook
    - All 27 v1 webhook event payloads

    Notes:

    - `custom_form_fields` is organizer-defined and intentionally opaque.
    - `activity_details` is keyed by `activity_type` and intentionally opaque in v1.
    - `/me/profile` does not expose email-verification state.
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
tags:
  - name: OAuth
  - name: Read API
  - name: Publisher tooling
  - name: Webhooks
paths:
  /oauth/authorize:
    servers:
      - url: https://auth.revento.app
    get:
      tags: [OAuth]
      operationId: startOAuthAuthorization
      summary: Start the OAuth 2.0 authorization code flow
      parameters:
        - in: query
          name: response_type
          required: true
          schema:
            type: string
            enum: [code]
        - in: query
          name: client_id
          required: true
          schema:
            type: string
        - in: query
          name: redirect_uri
          required: true
          schema:
            type: string
            format: uri
        - in: query
          name: scope
          required: true
          schema:
            type: string
          description: Space-separated scopes.
        - in: query
          name: event_id
          required: false
          schema:
            type: string
          description: Required for organizer connect. Omitted for Login with Revento.
        - in: query
          name: state
          required: false
          schema:
            type: string
        - in: query
          name: code_challenge
          required: true
          schema:
            type: string
        - in: query
          name: code_challenge_method
          required: true
          schema:
            type: string
            enum: [S256]
        - in: query
          name: prompt
          required: false
          schema:
            type: string
            enum: [consent]
      responses:
        "302":
          description: Redirects to Revento login, consent, or your redirect URI.
          headers:
            Location:
              description: Redirect target.
              schema:
                type: string
                format: uri
        default:
          $ref: "#/components/responses/ErrorResponse"
  /oauth/token:
    servers:
      - url: https://auth.revento.app
    post:
      tags: [OAuth]
      operationId: exchangeOAuthToken
      summary: Exchange an authorization code or refresh token
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              oneOf:
                - $ref: "#/components/schemas/AuthCodeTokenRequest"
                - $ref: "#/components/schemas/RefreshTokenRequest"
      responses:
        "200":
          description: Token response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/InstallationTokenResponse"
                  - $ref: "#/components/schemas/UserTokenResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /oauth/revoke:
    servers:
      - url: https://auth.revento.app
    post:
      tags: [OAuth]
      operationId: revokeOAuthToken
      summary: Revoke an access or refresh token
      security:
        - clientBasic: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required: [token]
              properties:
                token:
                  type: string
                token_type_hint:
                  type: string
                  enum: [access_token, refresh_token]
      responses:
        "200":
          description: Token revoked or not found. Empty body.
        default:
          $ref: "#/components/responses/ErrorResponse"
  /developer/integrations/{integration_id}/rotate-client-secret:
    servers:
      - url: https://auth.revento.app
    post:
      tags: [Publisher tooling]
      operationId: rotateClientSecret
      summary: Rotate the integration client secret
      description: Typically triggered from Revento's integration-management tools, not from integration bearer tokens.
      security:
        - publisherSession: []
      parameters:
        - $ref: "#/components/parameters/IntegrationIdPath"
      responses:
        "200":
          description: New client secret issued once.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RotateClientSecretResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /developer/integrations/{integration_id}/rotate-webhook-secret:
    servers:
      - url: https://auth.revento.app
    post:
      tags: [Publisher tooling]
      operationId: rotateWebhookSecret
      summary: Rotate the integration webhook signing secret
      description: Typically triggered from Revento's integration-management tools, not from integration bearer tokens.
      security:
        - publisherSession: []
      parameters:
        - $ref: "#/components/parameters/IntegrationIdPath"
      responses:
        "200":
          description: New webhook signing secret issued once.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RotateWebhookSecretResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /developer/integrations/{integration_id}/send-test-webhook:
    servers:
      - url: https://auth.revento.app
    post:
      tags: [Publisher tooling]
      operationId: sendTestWebhook
      summary: Send one representative webhook delivery out of band
      description: Uses the normal signing and transport pipeline, but does not enqueue a retryable delivery row.
      security:
        - publisherSession: []
      parameters:
        - $ref: "#/components/parameters/IntegrationIdPath"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SendTestWebhookRequest"
      responses:
        "200":
          description: Test delivery result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SendTestWebhookResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /api/v1/events/{event_id}:
    servers:
      - url: https://api.revento.app
    get:
      tags: [Read API]
      operationId: getEvent
      summary: Read event metadata
      security:
        - installationBearer: []
      parameters:
        - $ref: "#/components/parameters/EventIdPath"
        - $ref: "#/components/parameters/RequestIdHeader"
      responses:
        "200":
          description: Event metadata
          content:
            application/vnd.revento.v1+json:
              schema:
                $ref: "#/components/schemas/EventResource"
            application/json:
              schema:
                $ref: "#/components/schemas/EventResource"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /api/v1/events/{event_id}/participants:
    servers:
      - url: https://api.revento.app
    get:
      tags: [Read API]
      operationId: listParticipants
      summary: List participants for an event
      security:
        - installationBearer: []
      parameters:
        - $ref: "#/components/parameters/EventIdPath"
        - $ref: "#/components/parameters/RequestIdHeader"
        - $ref: "#/components/parameters/LimitQuery"
        - $ref: "#/components/parameters/CursorQuery"
      responses:
        "200":
          description: Paginated participant list
          content:
            application/vnd.revento.v1+json:
              schema:
                $ref: "#/components/schemas/PaginatedParticipantsResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/PaginatedParticipantsResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /api/v1/events/{event_id}/participants/{participant_id}:
    servers:
      - url: https://api.revento.app
    get:
      tags: [Read API]
      operationId: getParticipant
      summary: Read one participant by id
      security:
        - installationBearer: []
      parameters:
        - $ref: "#/components/parameters/EventIdPath"
        - $ref: "#/components/parameters/ParticipantIdPath"
        - $ref: "#/components/parameters/RequestIdHeader"
      responses:
        "200":
          description: Participant
          content:
            application/vnd.revento.v1+json:
              schema:
                $ref: "#/components/schemas/ParticipantResource"
            application/json:
              schema:
                $ref: "#/components/schemas/ParticipantResource"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /api/v1/events/{event_id}/program:
    servers:
      - url: https://api.revento.app
    get:
      tags: [Read API]
      operationId: getProgram
      summary: Read the event program as threads with nested activities
      security:
        - installationBearer: []
      parameters:
        - $ref: "#/components/parameters/EventIdPath"
        - $ref: "#/components/parameters/RequestIdHeader"
      responses:
        "200":
          description: Program tree
          content:
            application/vnd.revento.v1+json:
              schema:
                $ref: "#/components/schemas/ProgramResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/ProgramResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /api/v1/events/{event_id}/activities:
    servers:
      - url: https://api.revento.app
    get:
      tags: [Read API]
      operationId: listActivities
      summary: List activities for an event
      security:
        - installationBearer: []
      parameters:
        - $ref: "#/components/parameters/EventIdPath"
        - $ref: "#/components/parameters/RequestIdHeader"
        - $ref: "#/components/parameters/LimitQuery"
        - $ref: "#/components/parameters/CursorQuery"
      responses:
        "200":
          description: Paginated activity list
          content:
            application/vnd.revento.v1+json:
              schema:
                $ref: "#/components/schemas/PaginatedActivitiesResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/PaginatedActivitiesResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /api/v1/events/{event_id}/locations:
    servers:
      - url: https://api.revento.app
    get:
      tags: [Read API]
      operationId: getLocations
      summary: Read the venue graph for an event
      security:
        - installationBearer: []
      parameters:
        - $ref: "#/components/parameters/EventIdPath"
        - $ref: "#/components/parameters/RequestIdHeader"
      responses:
        "200":
          description: Venue graph
          content:
            application/vnd.revento.v1+json:
              schema:
                $ref: "#/components/schemas/LocationsResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/LocationsResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /api/v1/events/{event_id}/threads:
    servers:
      - url: https://api.revento.app
    get:
      tags: [Read API]
      operationId: listThreads
      summary: List threads for an event
      security:
        - installationBearer: []
      parameters:
        - $ref: "#/components/parameters/EventIdPath"
        - $ref: "#/components/parameters/RequestIdHeader"
      responses:
        "200":
          description: Thread list
          content:
            application/vnd.revento.v1+json:
              schema:
                $ref: "#/components/schemas/ThreadsResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/ThreadsResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /api/v1/events/{event_id}/registration-waves:
    servers:
      - url: https://api.revento.app
    get:
      tags: [Read API]
      operationId: listRegistrationWaves
      summary: List registration waves for an event
      security:
        - installationBearer: []
      parameters:
        - $ref: "#/components/parameters/EventIdPath"
        - $ref: "#/components/parameters/RequestIdHeader"
      responses:
        "200":
          description: Registration-wave list
          content:
            application/vnd.revento.v1+json:
              schema:
                $ref: "#/components/schemas/RegistrationWavesResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/RegistrationWavesResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /api/v1/events/{event_id}/roles:
    servers:
      - url: https://api.revento.app
    get:
      tags: [Read API]
      operationId: listRoles
      summary: List roles for an event
      security:
        - installationBearer: []
      parameters:
        - $ref: "#/components/parameters/EventIdPath"
        - $ref: "#/components/parameters/RequestIdHeader"
      responses:
        "200":
          description: Role list
          content:
            application/vnd.revento.v1+json:
              schema:
                $ref: "#/components/schemas/RolesResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/RolesResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
  /api/v1/me/profile:
    servers:
      - url: https://api.revento.app
    get:
      tags: [Read API]
      operationId: getMeProfile
      summary: Read the signed-in participant's profile
      security:
        - userBearer: []
      parameters:
        - $ref: "#/components/parameters/RequestIdHeader"
      responses:
        "200":
          description: User profile
          content:
            application/vnd.revento.v1+json:
              schema:
                $ref: "#/components/schemas/UserProfileResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/UserProfileResponse"
        default:
          $ref: "#/components/responses/ErrorResponse"
webhooks:
  "event.published":
    post:
      tags: [Webhooks]
      operationId: receiveEventPublished
      summary: Receive event.published
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookEventPublished"
      responses:
        "200":
          description: Delivery acknowledged
  "event.unpublished":
    post:
      tags: [Webhooks]
      operationId: receiveEventUnpublished
      summary: Receive event.unpublished
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookEventUnpublished"
      responses:
        "200":
          description: Delivery acknowledged
  "event.visibility_changed":
    post:
      tags: [Webhooks]
      operationId: receiveEventVisibilityChanged
      summary: Receive event.visibility_changed
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookEventVisibilityChanged"
      responses:
        "200":
          description: Delivery acknowledged
  "event.access_mode_changed":
    post:
      tags: [Webhooks]
      operationId: receiveEventAccessModeChanged
      summary: Receive event.access_mode_changed
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookEventAccessModeChanged"
      responses:
        "200":
          description: Delivery acknowledged
  "application.submitted":
    post:
      tags: [Webhooks]
      operationId: receiveApplicationSubmitted
      summary: Receive application.submitted
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookApplicationSubmitted"
      responses:
        "200":
          description: Delivery acknowledged
  "application.approved":
    post:
      tags: [Webhooks]
      operationId: receiveApplicationApproved
      summary: Receive application.approved
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookApplicationApproved"
      responses:
        "200":
          description: Delivery acknowledged
  "application.rejected":
    post:
      tags: [Webhooks]
      operationId: receiveApplicationRejected
      summary: Receive application.rejected
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookApplicationRejected"
      responses:
        "200":
          description: Delivery acknowledged
  "application.revision_requested":
    post:
      tags: [Webhooks]
      operationId: receiveApplicationRevisionRequested
      summary: Receive application.revision_requested
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookApplicationRevisionRequested"
      responses:
        "200":
          description: Delivery acknowledged
  "participant.registered":
    post:
      tags: [Webhooks]
      operationId: receiveParticipantRegistered
      summary: Receive participant.registered
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookParticipantRegistered"
      responses:
        "200":
          description: Delivery acknowledged
  "participant.profile_updated":
    post:
      tags: [Webhooks]
      operationId: receiveParticipantProfileUpdated
      summary: Receive participant.profile_updated
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookParticipantProfileUpdated"
      responses:
        "200":
          description: Delivery acknowledged
  "participant.removed":
    post:
      tags: [Webhooks]
      operationId: receiveParticipantRemoved
      summary: Receive participant.removed
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookParticipantRemoved"
      responses:
        "200":
          description: Delivery acknowledged
  "activity.created":
    post:
      tags: [Webhooks]
      operationId: receiveActivityCreated
      summary: Receive activity.created
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookActivityCreated"
      responses:
        "200":
          description: Delivery acknowledged
  "activity.updated":
    post:
      tags: [Webhooks]
      operationId: receiveActivityUpdated
      summary: Receive activity.updated
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookActivityUpdated"
      responses:
        "200":
          description: Delivery acknowledged
  "activity.deleted":
    post:
      tags: [Webhooks]
      operationId: receiveActivityDeleted
      summary: Receive activity.deleted
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookActivityDeleted"
      responses:
        "200":
          description: Delivery acknowledged
  "activity.capacity_state_changed":
    post:
      tags: [Webhooks]
      operationId: receiveActivityCapacityStateChanged
      summary: Receive activity.capacity_state_changed
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookActivityCapacityStateChanged"
      responses:
        "200":
          description: Delivery acknowledged
  "thread.created":
    post:
      tags: [Webhooks]
      operationId: receiveThreadCreated
      summary: Receive thread.created
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookThreadCreated"
      responses:
        "200":
          description: Delivery acknowledged
  "thread.updated":
    post:
      tags: [Webhooks]
      operationId: receiveThreadUpdated
      summary: Receive thread.updated
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookThreadUpdated"
      responses:
        "200":
          description: Delivery acknowledged
  "thread.deleted":
    post:
      tags: [Webhooks]
      operationId: receiveThreadDeleted
      summary: Receive thread.deleted
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookThreadDeleted"
      responses:
        "200":
          description: Delivery acknowledged
  "location.created":
    post:
      tags: [Webhooks]
      operationId: receiveLocationCreated
      summary: Receive location.created
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookLocationCreated"
      responses:
        "200":
          description: Delivery acknowledged
  "location.updated":
    post:
      tags: [Webhooks]
      operationId: receiveLocationUpdated
      summary: Receive location.updated
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookLocationUpdated"
      responses:
        "200":
          description: Delivery acknowledged
  "location.deleted":
    post:
      tags: [Webhooks]
      operationId: receiveLocationDeleted
      summary: Receive location.deleted
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookLocationDeleted"
      responses:
        "200":
          description: Delivery acknowledged
  "registration_wave.started":
    post:
      tags: [Webhooks]
      operationId: receiveRegistrationWaveStarted
      summary: Receive registration_wave.started
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookRegistrationWaveStarted"
      responses:
        "200":
          description: Delivery acknowledged
  "registration_wave.finished":
    post:
      tags: [Webhooks]
      operationId: receiveRegistrationWaveFinished
      summary: Receive registration_wave.finished
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookRegistrationWaveFinished"
      responses:
        "200":
          description: Delivery acknowledged
  "data.deletion_required":
    post:
      tags: [Webhooks]
      operationId: receiveDataDeletionRequired
      summary: Receive data.deletion_required
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookDataDeletionRequired"
      responses:
        "200":
          description: Delivery acknowledged
  "user.revoked_access":
    post:
      tags: [Webhooks]
      operationId: receiveUserRevokedAccess
      summary: Receive user.revoked_access
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookUserRevokedAccess"
      responses:
        "200":
          description: Delivery acknowledged
  "integration.suspended":
    post:
      tags: [Webhooks]
      operationId: receiveIntegrationSuspended
      summary: Receive integration.suspended
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookIntegrationSuspended"
      responses:
        "200":
          description: Delivery acknowledged
  "integration.unpublished":
    post:
      tags: [Webhooks]
      operationId: receiveIntegrationUnpublished
      summary: Receive integration.unpublished
      parameters:
        - $ref: "#/components/parameters/WebhookEventHeader"
        - $ref: "#/components/parameters/WebhookDeliveryIdHeader"
        - $ref: "#/components/parameters/WebhookTimestampHeader"
        - $ref: "#/components/parameters/WebhookSignatureHeader"
        - $ref: "#/components/parameters/WebhookPreviousSignatureHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookIntegrationUnpublished"
      responses:
        "200":
          description: Delivery acknowledged
components:
  parameters:
    RequestIdHeader:
      in: header
      name: X-Revento-Request-Id
      required: false
      schema:
        type: string
        format: uuid
    EventIdPath:
      in: path
      name: event_id
      required: true
      schema:
        type: string
    ParticipantIdPath:
      in: path
      name: participant_id
      required: true
      schema:
        type: string
    IntegrationIdPath:
      in: path
      name: integration_id
      required: true
      schema:
        type: string
    LimitQuery:
      in: query
      name: limit
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 50
        default: 25
    CursorQuery:
      in: query
      name: cursor
      required: false
      schema:
        type: string
    WebhookEventHeader:
      in: header
      name: X-Revento-Event
      required: true
      schema:
        type: string
    WebhookDeliveryIdHeader:
      in: header
      name: X-Revento-Delivery-Id
      required: true
      schema:
        type: string
        format: uuid
    WebhookTimestampHeader:
      in: header
      name: X-Revento-Timestamp
      required: true
      schema:
        type: integer
    WebhookSignatureHeader:
      in: header
      name: X-Revento-Signature
      required: true
      schema:
        type: string
    WebhookPreviousSignatureHeader:
      in: header
      name: X-Revento-Signature-Previous
      required: false
      schema:
        type: string
  responses:
    ErrorResponse:
      description: Structured error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
  securitySchemes:
    installationBearer:
      type: http
      scheme: bearer
      description: Installation token bound to one (event, organization, integration) tuple.
    userBearer:
      type: http
      scheme: bearer
      description: User token bound to one (user, event, integration) tuple.
    clientBasic:
      type: http
      scheme: basic
      description: HTTP Basic auth using client_id and client_secret.
    publisherSession:
      type: http
      scheme: bearer
      description: Authenticated publisher session from Revento's integration-management tools.
  schemas:
    OpaqueObject:
      type: object
      additionalProperties: true
    ErrorResponse:
      type: object
      required: [error, message, request_id]
      properties:
        error:
          type: string
        message:
          type: string
        request_id:
          type: string
          format: uuid
    AuthCodeTokenRequest:
      type: object
      required:
        - grant_type
        - code
        - redirect_uri
        - client_id
        - client_secret
        - code_verifier
      properties:
        grant_type:
          type: string
          enum: [authorization_code]
        code:
          type: string
        redirect_uri:
          type: string
          format: uri
        client_id:
          type: string
        client_secret:
          type: string
        code_verifier:
          type: string
    RefreshTokenRequest:
      type: object
      required:
        - grant_type
        - refresh_token
        - client_id
        - client_secret
      properties:
        grant_type:
          type: string
          enum: [refresh_token]
        refresh_token:
          type: string
        client_id:
          type: string
        client_secret:
          type: string
    InstallationTokenResponse:
      type: object
      required:
        - access_token
        - refresh_token
        - token_type
        - expires_in
        - scope
        - event_id
        - organization_id
      properties:
        access_token:
          type: string
        refresh_token:
          type: string
        token_type:
          type: string
          enum: [Bearer]
        expires_in:
          type: integer
          enum: [3600]
        scope:
          type: string
        event_id:
          type: string
        organization_id:
          type: string
    UserTokenResponse:
      type: object
      required:
        - access_token
        - refresh_token
        - id_token
        - token_type
        - expires_in
        - refresh_expires_in
        - scope
        - event_id
        - user_id
      properties:
        access_token:
          type: string
        refresh_token:
          type: string
        id_token:
          type: string
        token_type:
          type: string
          enum: [Bearer]
        expires_in:
          type: integer
          enum: [3600]
        refresh_expires_in:
          type: integer
        scope:
          type: string
        event_id:
          type: string
        user_id:
          type: string
    EventResource:
      type: object
      additionalProperties: true
      required:
        - id
        - title
        - start_date
        - end_date
        - min_age
        - access_mode
        - publish_status
        - visibility
        - organization_id
        - created_at
        - updated_at
      properties:
        id:
          type: string
        title:
          type: string
        description:
          type: [string, "null"]
        start_date:
          type: string
          format: date-time
        end_date:
          type: string
          format: date-time
        min_age:
          type: string
          enum: [age_all, age_18_plus]
        access_mode:
          type: string
          enum: [closed, open_approval, open_auto]
        publish_status:
          type: string
          enum: [draft, published]
        visibility:
          type: string
          enum: [private, discoverable]
        organization_id:
          type: string
        location_summary:
          type: [string, "null"]
        image_url:
          type: [string, "null"]
          format: uri
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    RoleSummary:
      type: object
      required: [id, name]
      properties:
        id:
          type: string
        name:
          type: string
    ParticipantResource:
      type: object
      additionalProperties: true
      required:
        - id
        - user_id
        - display_name
        - privacy_mode
        - application_status
        - custom_form_fields
        - created_at
        - updated_at
      properties:
        id:
          type: string
        user_id:
          type: string
        display_name:
          type: string
        nickname:
          type: [string, "null"]
        organisation:
          type: [string, "null"]
        privacy_mode:
          type: boolean
        role:
          oneOf:
            - $ref: "#/components/schemas/RoleSummary"
            - type: "null"
        application_status:
          type: string
          enum: [pending, approved, rejected, revision_requested]
        real_name:
          type: [string, "null"]
        email:
          type: [string, "null"]
        admin_notes:
          type: [string, "null"]
        custom_form_fields:
          $ref: "#/components/schemas/OpaqueObject"
        last_reviewed_at:
          type: [string, "null"]
          format: date-time
        last_reviewer_id:
          type: [string, "null"]
        last_review_action:
          type: [string, "null"]
          enum: [approved, rejected, revision_requested, null]
        registered_at:
          type: [string, "null"]
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ThreadResource:
      type: object
      additionalProperties: true
      required: [id, name, icon_name, color_hex, sort_order]
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: [string, "null"]
        icon_name:
          type: string
        color_hex:
          type: string
        sort_order:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    LocationRef:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
        name:
          type: string
        code:
          type: [string, "null"]
        building:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
        floor:
          type: object
          properties:
            id:
              type: string
            number:
              type: integer
            name:
              type: string
        venue:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            address:
              type: [string, "null"]
    ActivityResource:
      type: object
      additionalProperties: true
      required:
        - id
        - title
        - activity_type
        - activity_details
        - status
        - markers
        - registration_waves
        - created_at
        - updated_at
      properties:
        id:
          type: string
        title:
          type: string
        description:
          type: [string, "null"]
        activity_type:
          type: string
          enum: [rpg_session, lecture, workshop, competition, discussion, LARP, other, break]
        activity_details:
          $ref: "#/components/schemas/OpaqueObject"
        start_time:
          type: [string, "null"]
          format: date-time
        end_time:
          type: [string, "null"]
          format: date-time
        duration_minutes:
          type: [integer, "null"]
        status:
          type: string
          enum: [new, scheduled, canceled]
        thread:
          oneOf:
            - $ref: "#/components/schemas/ThreadResource"
            - type: "null"
        location:
          oneOf:
            - $ref: "#/components/schemas/LocationRef"
            - type: "null"
        host_id:
          type: [string, "null"]
        host_display_name:
          type: [string, "null"]
        co_host_ids:
          type: array
          items:
            type: string
        co_host_display_names:
          type: string
        markers:
          type: array
          items:
            type: object
            required: [id, name, color_hex]
            properties:
              id:
                type: string
              name:
                type: string
              color_hex:
                type: string
        capacity:
          type: [integer, "null"]
        sign_ups_enabled:
          type: boolean
        committed_signups_count:
          type: integer
        signed_up_participant_ids:
          type: array
          items:
            type: string
        registration_waves:
          type: array
          items:
            type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ProgramThreadResource:
      allOf:
        - $ref: "#/components/schemas/ThreadResource"
        - type: object
          required: [activities]
          properties:
            activities:
              type: array
              items:
                $ref: "#/components/schemas/ActivityResource"
    ProgramResponse:
      type: object
      required: [threads]
      properties:
        threads:
          type: array
          items:
            $ref: "#/components/schemas/ProgramThreadResource"
    FloorResource:
      type: object
      required: [id, number, name, sort_order]
      properties:
        id:
          type: string
        number:
          type: integer
        name:
          type: string
        sort_order:
          type: integer
    BuildingResource:
      type: object
      required: [id, name, sort_order, floors]
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: [string, "null"]
        lat:
          type: [number, "null"]
        lng:
          type: [number, "null"]
        position_x:
          type: [number, "null"]
        position_y:
          type: [number, "null"]
        sort_order:
          type: integer
        floors:
          type: array
          items:
            $ref: "#/components/schemas/FloorResource"
    LocationResource:
      type: object
      additionalProperties: true
      required:
        - id
        - name
        - scope
        - type
        - is_schedulable
        - sort_order
      properties:
        id:
          type: string
        name:
          type: string
        code:
          type: [string, "null"]
        description:
          type: [string, "null"]
        scope:
          type: string
          enum: [indoor, outdoor]
        type:
          type: string
          enum: [room, stage, expo, food, restroom, entrance, info, parking, rest_area, first_aid, smoking_area, other]
        is_schedulable:
          type: boolean
        capacity:
          type: [integer, "null"]
        amenities:
          type: array
          items:
            type: string
        position_x:
          type: [number, "null"]
        position_y:
          type: [number, "null"]
        icon_override:
          type: [string, "null"]
        color_hex:
          type: [string, "null"]
        operating_hours:
          type: [string, "null"]
        sort_order:
          type: integer
        building:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
        floor:
          type: object
          properties:
            id:
              type: string
            number:
              type: integer
            name:
              type: string
        venue:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            address:
              type: [string, "null"]
    VenueResource:
      type: object
      required: [id, name, sort_order, buildings, locations]
      properties:
        id:
          type: string
        name:
          type: string
        address:
          type: [string, "null"]
        google_maps_url:
          type: [string, "null"]
          format: uri
        center_lat:
          type: [number, "null"]
        center_lng:
          type: [number, "null"]
        sort_order:
          type: integer
        buildings:
          type: array
          items:
            $ref: "#/components/schemas/BuildingResource"
        locations:
          type: array
          items:
            $ref: "#/components/schemas/LocationResource"
    LocationsResponse:
      type: object
      required: [venues]
      properties:
        venues:
          type: array
          items:
            $ref: "#/components/schemas/VenueResource"
    ThreadsResponse:
      type: object
      required: [data]
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/ThreadResource"
    RegistrationWaveResource:
      type: object
      required: [id, name, starts_at, ends_at, status, activity_ids]
      properties:
        id:
          type: string
        name:
          type: string
        starts_at:
          type: string
          format: date-time
        ends_at:
          type: string
          format: date-time
        status:
          type: string
          enum: [scheduled, started, finished, canceled]
        activity_ids:
          type: array
          items:
            type: string
    RegistrationWavesResponse:
      type: object
      required: [data]
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/RegistrationWaveResource"
    RoleResource:
      type: object
      required: [id, name]
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: [string, "null"]
    RolesResponse:
      type: object
      required: [data]
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/RoleResource"
    UserProfileResponse:
      type: object
      required: [user_id, display_name, locale, event_id]
      properties:
        user_id:
          type: string
        display_name:
          type: string
        email:
          type: [string, "null"]
        locale:
          type: string
        event_id:
          type: string
    PaginatedParticipantsResponse:
      type: object
      required: [data, next_cursor, has_more]
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/ParticipantResource"
        next_cursor:
          type: [string, "null"]
        has_more:
          type: boolean
    PaginatedActivitiesResponse:
      type: object
      required: [data, next_cursor, has_more]
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/ActivityResource"
        next_cursor:
          type: [string, "null"]
        has_more:
          type: boolean
    RotateClientSecretResponse:
      type: object
      required: [client_secret, previous_secret_expires_at]
      properties:
        client_secret:
          type: string
        previous_secret_expires_at:
          type: string
          format: date-time
    RotateWebhookSecretResponse:
      type: object
      required: [secret, previous_secret_expires_at]
      properties:
        secret:
          type: string
        previous_secret_expires_at:
          type: string
          format: date-time
    SendTestWebhookRequest:
      type: object
      required: [event_type]
      properties:
        event_type:
          type: string
    SendTestWebhookResponse:
      type: object
      required:
        - status_code
        - response_time_ms
        - response_body_preview
        - signature_header_value
      properties:
        status_code:
          type: integer
        response_time_ms:
          type: integer
        response_body_preview:
          type: string
          maxLength: 1024
        signature_header_value:
          type: string
    StatusHistoryEntry:
      type: object
      required: [status, at]
      properties:
        status:
          type: string
        at:
          type: string
          format: date-time
    ApplicationSubmittedData:
      type: object
      additionalProperties: true
      required:
        - id
        - participant_id
        - user_id
        - status
        - submitted_at
        - is_resubmission
        - custom_form_fields
        - attachments
      properties:
        id:
          type: string
        participant_id:
          type: string
        user_id:
          type: string
        status:
          type: string
          enum: [pending, approved, rejected, revision_requested]
        submitted_at:
          type: string
          format: date-time
        is_resubmission:
          type: boolean
        custom_form_fields:
          $ref: "#/components/schemas/OpaqueObject"
        attachments:
          type: array
          items:
            $ref: "#/components/schemas/OpaqueObject"
    ApplicationApprovedData:
      allOf:
        - $ref: "#/components/schemas/ApplicationSubmittedData"
        - type: object
          required: [approved_at, approver_id, last_review_action]
          properties:
            approved_at:
              type: string
              format: date-time
            approver_id:
              type: string
            last_review_action:
              type: string
              enum: [approved]
            review_message:
              type: [string, "null"]
            status_history:
              type: array
              items:
                $ref: "#/components/schemas/StatusHistoryEntry"
    ApplicationRejectedData:
      allOf:
        - $ref: "#/components/schemas/ApplicationSubmittedData"
        - type: object
          required: [rejected_at, rejecter_id, last_review_action]
          properties:
            rejected_at:
              type: string
              format: date-time
            rejecter_id:
              type: string
            last_review_action:
              type: string
              enum: [rejected]
            review_message:
              type: [string, "null"]
            status_history:
              type: array
              items:
                $ref: "#/components/schemas/StatusHistoryEntry"
    ApplicationRevisionRequestedData:
      allOf:
        - $ref: "#/components/schemas/ApplicationSubmittedData"
        - type: object
          required: [requested_at, requester_id, last_review_action]
          properties:
            requested_at:
              type: string
              format: date-time
            requester_id:
              type: string
            last_review_action:
              type: string
              enum: [revision_requested]
            review_message:
              type: [string, "null"]
            status_history:
              type: array
              items:
                $ref: "#/components/schemas/StatusHistoryEntry"
    ParticipantRegisteredData:
      $ref: "#/components/schemas/ParticipantResource"
    ParticipantProfileUpdatedData:
      allOf:
        - $ref: "#/components/schemas/ParticipantResource"
        - type: object
          properties:
            actor:
              type: string
              enum: [self, organizer]
            actor_id:
              type: [string, "null"]
    ParticipantRemovedData:
      type: object
      required: [id, user_id, removed_at, removed_by]
      properties:
        id:
          type: string
        user_id:
          type: string
        removed_at:
          type: string
          format: date-time
        removed_by:
          type: string
    ActivityDeletedData:
      type: object
      required: [id, deleted_at]
      properties:
        id:
          type: string
        deleted_at:
          type: string
          format: date-time
    ActivityCapacityStateChangedData:
      type: object
      required:
        - activity_id
        - capacity
        - committed_signups_count
        - sign_ups_enabled
        - signed_up_participant_ids
        - snapshot_at
      properties:
        activity_id:
          type: string
        capacity:
          type: integer
        committed_signups_count:
          type: integer
        sign_ups_enabled:
          type: boolean
        signed_up_participant_ids:
          type: array
          items:
            type: string
        snapshot_at:
          type: string
          format: date-time
    ThreadDeletedData:
      type: object
      required: [id, deleted_at]
      properties:
        id:
          type: string
        deleted_at:
          type: string
          format: date-time
    LocationDeletedData:
      type: object
      required: [id, deleted_at]
      properties:
        id:
          type: string
        deleted_at:
          type: string
          format: date-time
    RegistrationWaveFinishedData:
      allOf:
        - $ref: "#/components/schemas/RegistrationWaveResource"
        - type: object
          properties:
            finished_at:
              type: string
              format: date-time
    DataDeletionRequiredData:
      type: object
      required: [event_id, organization_id, granted_scopes, deadline, reason]
      properties:
        event_id:
          type: string
        organization_id:
          type: string
        granted_scopes:
          type: array
          items:
            type: string
        deadline:
          type: string
          format: date-time
        reason:
          type: string
          enum: [organizer_revoked, org_unverified, integration_unpublished, revento_suspended]
    UserRevokedAccessData:
      type: object
      required: [user_id, event_id, integration_id, granted_scopes, revoked_at]
      properties:
        user_id:
          type: string
        event_id:
          type: string
        integration_id:
          type: string
        granted_scopes:
          type: array
          items:
            type: string
        revoked_at:
          type: string
          format: date-time
    IntegrationSuspendedData:
      type: object
      required: [integration_id, suspended_at, reason_code, reason_text]
      properties:
        integration_id:
          type: string
        suspended_at:
          type: string
          format: date-time
        reason_code:
          type: string
          enum: [security_review, terms_violation, data_handling_concern, voluntary_pause]
        reason_text:
          type: string
    IntegrationUnpublishedData:
      type: object
      required:
        - integration_id
        - unpublished_at
        - affected_event_id
        - affected_organization_id
      properties:
        integration_id:
          type: string
        unpublished_at:
          type: string
          format: date-time
        affected_event_id:
          type: string
        affected_organization_id:
          type: string
    WebhookEnvelopeBase:
      type: object
      required: [id, type, occurred_at, event_id, organization_id, data]
      properties:
        id:
          type: string
        type:
          type: string
        occurred_at:
          type: string
          format: date-time
        event_id:
          type: [string, "null"]
        organization_id:
          type: [string, "null"]
        data: {}
    WebhookEventPublished:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [event.published]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              allOf:
                - $ref: "#/components/schemas/EventResource"
                - type: object
                  properties:
                    published_at:
                      type: string
                      format: date-time
    WebhookEventUnpublished:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [event.unpublished]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              allOf:
                - $ref: "#/components/schemas/EventResource"
                - type: object
                  properties:
                    unpublished_at:
                      type: string
                      format: date-time
    WebhookEventVisibilityChanged:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [event.visibility_changed]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              allOf:
                - $ref: "#/components/schemas/EventResource"
                - type: object
                  properties:
                    previous_visibility:
                      type: string
                      enum: [private, discoverable]
                    changed_at:
                      type: string
                      format: date-time
    WebhookEventAccessModeChanged:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [event.access_mode_changed]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              allOf:
                - $ref: "#/components/schemas/EventResource"
                - type: object
                  properties:
                    previous_access_mode:
                      type: string
                      enum: [closed, open_approval, open_auto]
                    changed_at:
                      type: string
                      format: date-time
    WebhookApplicationSubmitted:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [application.submitted]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ApplicationSubmittedData"
    WebhookApplicationApproved:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [application.approved]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ApplicationApprovedData"
    WebhookApplicationRejected:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [application.rejected]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ApplicationRejectedData"
    WebhookApplicationRevisionRequested:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [application.revision_requested]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ApplicationRevisionRequestedData"
    WebhookParticipantRegistered:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [participant.registered]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ParticipantRegisteredData"
    WebhookParticipantProfileUpdated:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [participant.profile_updated]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ParticipantProfileUpdatedData"
    WebhookParticipantRemoved:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [participant.removed]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ParticipantRemovedData"
    WebhookActivityCreated:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [activity.created]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ActivityResource"
    WebhookActivityUpdated:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [activity.updated]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ActivityResource"
    WebhookActivityDeleted:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [activity.deleted]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ActivityDeletedData"
    WebhookActivityCapacityStateChanged:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [activity.capacity_state_changed]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ActivityCapacityStateChangedData"
    WebhookThreadCreated:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [thread.created]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ThreadResource"
    WebhookThreadUpdated:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [thread.updated]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ThreadResource"
    WebhookThreadDeleted:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [thread.deleted]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/ThreadDeletedData"
    WebhookLocationCreated:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [location.created]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/LocationResource"
    WebhookLocationUpdated:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [location.updated]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/LocationResource"
    WebhookLocationDeleted:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [location.deleted]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/LocationDeletedData"
    WebhookRegistrationWaveStarted:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [registration_wave.started]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/RegistrationWaveResource"
    WebhookRegistrationWaveFinished:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [registration_wave.finished]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/RegistrationWaveFinishedData"
    WebhookDataDeletionRequired:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [data.deletion_required]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/DataDeletionRequiredData"
    WebhookUserRevokedAccess:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [user.revoked_access]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/UserRevokedAccessData"
    WebhookIntegrationSuspended:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [integration.suspended]
            event_id:
              type: "null"
            organization_id:
              type: "null"
            data:
              $ref: "#/components/schemas/IntegrationSuspendedData"
    WebhookIntegrationUnpublished:
      allOf:
        - $ref: "#/components/schemas/WebhookEnvelopeBase"
        - type: object
          properties:
            type:
              type: string
              enum: [integration.unpublished]
            event_id:
              type: string
            organization_id:
              type: string
            data:
              $ref: "#/components/schemas/IntegrationUnpublishedData"
