openapi: 3.1.0 info: title: Ngrok Abuse Reports Event Subscriptions API description: The ngrok API provides programmatic access to all of ngrok's resources. The API is REST-ish. It follows most of the conventions of a REST API but diverges slightly when the REST model does not fit well. The API listens only on port 443 to help avoid any accidental unencrypted requests. All API access requires an API key. version: 2.0.0 contact: name: Ngrok url: https://ngrok.com license: name: Proprietary url: https://ngrok.com/tos servers: - url: https://api.ngrok.com description: Ngrok API Production Server security: - bearerAuth: [] - apiKeyAuth: [] tags: - name: Event Subscriptions description: Event Subscriptions define which events trigger notifications. paths: /event_subscriptions: post: operationId: createEventSubscription summary: Ngrok Create Event Subscription description: Create an Event Subscription. tags: - Event Subscriptions requestBody: required: true content: application/json: schema: type: object properties: description: type: string metadata: type: string sources: type: array items: type: object properties: type: type: string description: Sources that will publish events to this subscription. destination_ids: type: array items: type: string description: IDs of destinations that will receive events. responses: '201': description: Event subscription created. content: application/json: schema: $ref: '#/components/schemas/EventSubscription' get: operationId: listEventSubscriptions summary: Ngrok List Event Subscriptions description: List all Event Subscriptions on this account. tags: - Event Subscriptions parameters: - $ref: '#/components/parameters/BeforeId' - $ref: '#/components/parameters/Limit' responses: '200': description: List of event subscriptions. content: application/json: schema: $ref: '#/components/schemas/EventSubscriptionList' /event_subscriptions/{id}: get: operationId: getEventSubscription summary: Ngrok Get Event Subscription description: Get an Event Subscription by ID. tags: - Event Subscriptions parameters: - $ref: '#/components/parameters/Id' responses: '200': description: Event subscription details. content: application/json: schema: $ref: '#/components/schemas/EventSubscription' patch: operationId: updateEventSubscription summary: Ngrok Update Event Subscription description: Update an Event Subscription by ID. tags: - Event Subscriptions parameters: - $ref: '#/components/parameters/Id' requestBody: required: true content: application/json: schema: type: object properties: description: type: string metadata: type: string sources: type: array items: type: object properties: type: type: string destination_ids: type: array items: type: string responses: '200': description: Event subscription updated. content: application/json: schema: $ref: '#/components/schemas/EventSubscription' delete: operationId: deleteEventSubscription summary: Ngrok Delete Event Subscription description: Delete an Event Subscription by ID. tags: - Event Subscriptions parameters: - $ref: '#/components/parameters/Id' responses: '204': description: Event subscription deleted. components: parameters: Id: name: id in: path required: true schema: type: string description: A unique identifier for the resource. BeforeId: name: before_id in: query required: false schema: type: string description: An ID to use for pagination. Results returned will be before this ID. Limit: name: limit in: query required: false schema: type: string description: The maximum number of results to return. Maximum is 100. schemas: EventSubscriptionList: type: object properties: event_subscriptions: type: array items: $ref: '#/components/schemas/EventSubscription' uri: type: string next_page_uri: type: string EventSubscription: type: object properties: id: type: string uri: type: string created_at: type: string format: date-time metadata: type: string description: type: string sources: type: array items: type: object properties: type: type: string uri: type: string destinations: type: array items: $ref: '#/components/schemas/Ref' Ref: type: object properties: id: type: string description: A resource identifier. uri: type: string description: A URI for locating a resource. securitySchemes: bearerAuth: type: http scheme: bearer description: Use an ngrok API key as a Bearer token. Create API keys from the ngrok dashboard or via the API Keys endpoints. apiKeyAuth: type: apiKey in: header name: Authorization description: Pass the API key in the Authorization header prefixed with 'Bearer '.