---
openapi: 3.0.1
info:
  title: Control API v1
  version: 1.1.0
  description: |
    Use the Control API to manage your applications, namespaces, keys, queues, rules, and more.
    </br></br>
    Detailed information on using this API can be found in the Ably <a href="https://ably.com/docs/platform/account/control-api">Control API docs</a>.
    </br></br>
    The <a href="https://swagger.io/specification/">OpenAPI specification</a> file used to generate this REST API is available to view <a href="https://ably.com/docs/open-specs/control-v1.yaml">here</a>.
servers:
- url: https://control.ably.net/v1
paths:
  "/accounts/{id}/stats":
    get:
      summary: Retrieve account statistics
      description: Retrieves the <a href="https://ably.com/docs/metadata-stats/stats">account-level statistics</a> for your account.
      tags:
      - accounts
      parameters:
      - name: id
        in: path
        required: true
        description: The ID of the account to retrieve statistics from. You can find your account ID in the <a href="https://ably.com/accounts/any/edit">Ably dashboard</a> under <strong>Account > Settings</strong>.
        schema:
          type: string
      - name: start
        in: query
        required: false
        description: Start time from which statistics are retrieved, specified as milliseconds since the Unix epoch.
        schema:
          type: integer
      - name: end
        in: query
        required: false
        description: The time until statistics are retrieved from, specified as milliseconds since the Unix epoch.
        schema:
          type: integer
      - name: unit
        in: query
        required: false
        description: Based on the `unit` selected, the given start or end times are rounded down to the start of the relevant interval.
        schema:
          type: string
          enum: [minute, hour, day, month]
          default: minute
      - name: direction
        in: query
        required: false
        description: The order that statistics are returned in. `backwards` orders from most recent to oldest, whilst `forwards` orders from oldest to most recent.
        schema:
          type: string
          enum: [forwards, backwards]
          default: backwards
      - name: limit
        in: query
        required: false
        description: The maximum number of statistics records to retrieve.
        schema:
          type: integer
          default: 100
          maximum: 1000
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Returns account statistics
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/account_stats_response'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  "/accounts/{account_id}/apps":
    get:
      summary: Lists account apps
      description: List all Ably applications for the specified account ID.
      tags:
      - apps
      parameters:
      - name: account_id
        in: path
        required: true
        description: The account ID for which to retrieve the associated applications.
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: List of apps for the specified account are returned
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/app_response"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
    post:
      summary: Creates an app
      description: Creates an application with the specified properties.
      tags:
      - apps
      parameters:
      - name: account_id
        description: The account ID of the account in which to create the application.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '201':
          description: App created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/app_response"
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/app_post"
  "/apps/{id}":
    patch:
      summary: Updates an app
      description: Updates the application with the specified application ID.
      tags:
      - apps
      parameters:
      - name: id
        description: The ID of application to be updated.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: App updated
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/app_response"
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '422':
          description: Invalid resource
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/app_patch"
    delete:
      summary: Deletes an app
      description: Deletes the application with the specified application ID.
      tags:
      - apps
      parameters:
      - name: id
        description: The ID of the application to be deleted.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '204':
          description: App deleted
          content: {}
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
  "/apps/{id}/pkcs12":
    post:
      summary: Updates app's APNs info from a `.p12` file
      description: Updates the application's Apple Push Notification service (APNs) information.
      tags:
      - apps
      parameters:
      - name: id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: App updated
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/app_response"
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
      requestBody:
        content:
          multipart/form-data:
            schema:
              "$ref": "#/components/schemas/app_pkcs12"
  "/apps/{id}/stats":
    get:
      summary: Retrieve app statistics
      description: Retrieves <a href="https://ably.com/docs/metadata-stats/stats#app">application-level statistics</a> for an app.
      tags:
      - apps
      parameters:
      - name: id
        in: path
        required: true
        description: The ID of the application to retrieve statistics from. You can find the ID of an application in the <a href="https://ably.com/accounts/any">Ably dashboard</a> when you select an app and view its <strong>Settings</strong>.
        schema:
          type: string
      - name: start
        in: query
        required: false
        description: Start time from which statistics are retrieved, specified as milliseconds since the Unix epoch.
        schema:
          type: integer
      - name: end
        in: query
        required: false
        description: The time until statistics are retrieved from, specified as milliseconds since the Unix epoch.
        schema:
          type: integer
      - name: unit
        in: query
        required: false
        description: Based on the `unit` selected, the given start or end times are rounded down to the start of the relevant interval.
        schema:
          type: string
          enum: [minute, hour, day, month]
          default: minute
      - name: direction
        in: query
        required: false
        description: The order that statistics are returned in. `backwards` orders from most recent to oldest, whilst `forwards` orders from oldest to most recent.
        schema:
          type: string
          enum: [forwards, backwards]
          default: backwards
      - name: limit
        in: query
        required: false
        description: The maximum number of statistics records to retrieve.
        schema:
          type: integer
          default: 100
          maximum: 1000
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Returns account statistics
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/app_stats_response'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  "/apps/{app_id}/keys":
    get:
      summary: Lists app keys
      description: Lists the API keys associated with the application ID.
      tags:
      - keys
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Key list
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/key_response"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
    post:
      summary: Creates a key
      description: Creates an API key for the application specified.
      tags:
      - keys
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '201':
          description: Key created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/key_response"
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/key_post"
  "/apps/{app_id}/keys/{key_id}":
    patch:
      summary: Updates a key
      description: Update the API key with the specified key ID, for the application with the specified application ID.
      tags:
      - keys
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      - name: key_id
        description: The API key ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Key updated
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/key_response"
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/key_patch"
  "/apps/{app_id}/keys/{key_id}/revoke":
    post:
      summary: Revokes a key
      description: Revokes the API key with the specified ID, with the Application ID. This deletes the key.
      tags:
      - keys
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      - name: key_id
        description: The key ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Key revoked
          content: {}
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: Not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
  "/apps/{app_id}/namespaces":
    get:
      summary: Lists namespaces
      description: List the <a href="https://ably.com/docs/channels#namespaces">namespaces</a> for the specified application ID.
      tags:
      - namespaces
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Namespace list
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/namespace_response"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
    post:
      summary: Creates a namespace
      description: Creates a <a href="https://ably.com/docs/channels#namespaces">namespace</a> for the specified application ID.
      tags:
      - namespaces
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '201':
          description: Namespace created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/namespace_response"
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/namespace_post"
  "/apps/{app_id}/namespaces/{namespace_id}":
    patch:
      summary: Updates a namespace
      description: Updates the <a href="https://ably.com/docs/channels#namespaces">namespace</a> with the specified ID, for the application with the specified application ID.
      tags:
      - namespaces
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      - name: namespace_id
        description: The namespace ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Namespace updated
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/namespace_response"
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: Not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/namespace_patch"
    delete:
      summary: Deletes a namespace
      description: Deletes the <a href="https://ably.com/docs/channels#namespaces">namespace</a> with the specified ID, for the specified application ID.
      tags:
      - namespaces
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      - name: namespace_id
        description: The namespace ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '204':
          description: Namespace deleted
          content: {}
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: Not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
  "/apps/{app_id}/queues":
    get:
      summary: Lists queues
      description: Lists the <a href="https://ably.com/docs/general/queues">queues</a> associated with the specified application ID.
      tags:
      - queues
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Queue list
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/queue_response"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '503':
          description: 503 Service unavailable
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
    post:
      summary: Creates a queue
      description: Creates a <a href="https://ably.com/docs/general/queues">queue</a> for the application specified by application ID. The properties for the queue to be created are specified in the request body.
      tags:
      - queues
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '201':
          description: Queue created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/queue_response"
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/queue"
  "/apps/{app_id}/queues/{queue_id}":
    delete:
      summary: Deletes a queue
      description: Delete the <a href="https://ably.com/docs/general/queues">queue</a> with the specified queue name, from the application with the specified application ID.
      tags:
      - queues
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      - name: queue_id
        description: The queue ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '204':
          description: Queue deleted
          content: {}
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '503':
          description: 503 Service unavailable
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
  "/apps/{app_id}/rules":
    get:
      summary: Lists rules
      description: Lists the <a href="https://ably.com/docs/general/webhooks">rules</a> for the application specified by the application ID.
      tags:
      - rules
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Rule list
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/rule_response"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
    post:
      summary: Creates a rule
      description: Creates a <a href="https://ably.com/docs/general/webhooks">rule</a> for the application with the specified application ID.
      tags:
      - rules
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '201':
          description: Rule created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/rule_response"
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
      requestBody:
        description: The rule properties.
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/rule_post"
  "/apps/{app_id}/rules/{rule_id}":
    get:
      summary: Gets a rule using a rule ID
      description: Returns the <a href="https://ably.com/docs/general/webhooks">rule</a> specified by the rule ID, for the application specified by application ID.
      tags:
      - rules
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      - name: rule_id
        description: The rule ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Rule
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/rule_response"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: Not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
    patch:
      summary: Updates a Rule
      description: Updates the <a href="https://ably.com/docs/general/webhooks">rule</a> specified by the rule ID, for the application specified by application ID.
      tags:
      - rules
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      - name: rule_id
        description: The rule ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Rule updated
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/rule_response"
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
      requestBody:
        description: Properties for the rule.
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/rule_patch"
    delete:
      summary: Deletes a rule
      description: Deletes the <a href="https://ably.com/docs/general/webhooks">rule</a> specified by the rule ID, for the application specified by application ID.
      tags:
      - rules
      parameters:
      - name: app_id
        description: The application ID.
        in: path
        required: true
        schema:
          type: string
      - name: rule_id
        description: The rule ID.
        in: path
        required: true
        schema:
          type: string
      security:
      - bearer_auth: []
      responses:
        '204':
          description: Rule deleted
          content: {}
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '404':
          description: App not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
  "/me":
    get:
      summary: Get token details
      description: Retrieve information about the <a href="https://ably.com/docs/platform/account/control-api#authentication">token</a> the current user authenticates with.
      tags:
      - tokens
      security:
      - bearer_auth: []
      responses:
        '200':
          description: Token details
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/me"
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error"

components:
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: Control API uses bearer authentication. You need to generate an access token for use with this API. More details can be found in the <a href="https://ably.com/docs/platform/account/control-api/#authentication">Ably docs</a>.
  schemas:
    rule_source:
      type: object
      additionalProperties: false
      properties:
        channelFilter:
          type: string
          description: This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
          example: ^my-channel.*
        type:
          type: string
          description: "Ably currently supports the following sources for all rule types, in both single and batch mode: `channel.message`, `channel.presence`, `channel.lifecycle` and `channel.occupancy`. If the source `channel.message` is selected, you receive notifications when messages are published on a channel. If the source `channel.presence` is selected, you receive notifications of presence events when clients enter, update their data, or leave channels. If the source `channel.lifecycle` is selected, you receive notifications of channel lifecycle events, such as when a channel is created (following the first client attaching to this channel) or discarded (when there are no more clients attached to the channel). If the source `channel.occupancy` is selected, you receive notifications of occupancy events, which relate to the number and type of occupants in the channel."
          example: channel.message
      required:
      - channelFilter
      - type
    rule_source_patch:
      type: object
      additionalProperties: false
      properties:
        channelFilter:
          type: string
          description: This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
          example: ^my-channel.*
        type:
          type: string
          description: "Ably currently supports the following sources for all rule types, in both single and batch mode: `channel.message`, `channel.presence`, `channel.lifecycle` and `channel.occupancy`. If the source `channel.message` is selected, you receive notifications when messages are published on a channel. If the source `channel.presence` is selected, you receive notifications of presence events when clients enter, update their data, or leave channels. If the source `channel.lifecycle` is selected, you receive notifications of channel lifecycle events, such as when a channel is created (following the first client attaching to this channel) or discarded (when there are no more clients attached to the channel). If the source `channel.occupancy` is selected, you receive notifications of occupancy events, which relate to the number and type of occupants in the channel."
          example: channel.message
    rule_post:
      oneOf:
      - "$ref": "#/components/schemas/http_rule_post"
      - "$ref": "#/components/schemas/ifttt_rule_post"
      - "$ref": "#/components/schemas/zapier_rule_post"
      - "$ref": "#/components/schemas/cloudflare_worker_rule_post"
      - "$ref": "#/components/schemas/azure_function_rule_post"
      - "$ref": "#/components/schemas/google_cloud_function_rule_post"
      - "$ref": "#/components/schemas/aws_lambda_rule_post"
      - "$ref": "#/components/schemas/aws_kinesis_rule_post"
      - "$ref": "#/components/schemas/aws_sqs_rule_post"
      - "$ref": "#/components/schemas/before_publish_aws_lambda_rule_post"
      - "$ref": "#/components/schemas/before_publish_webhook_rule_post"
      - "$ref": "#/components/schemas/amqp_rule_post"
      - "$ref": "#/components/schemas/amqp_external_rule_post"
      - "$ref": "#/components/schemas/kafka_rule_post"
      - "$ref": "#/components/schemas/pulsar_rule_post"
      - "$ref": "#/components/schemas/ingress_postgres_outbox_rule_post"
      - "$ref": "#/components/schemas/ingress_mongodb_changestream_rule_post"
      - "$ref": "#/components/schemas/hive_text_model_only_rule_post"
      - "$ref": "#/components/schemas/hive_dashboard_rule_post"
      - "$ref": "#/components/schemas/bodyguard_text_moderation_rule_post"
      - "$ref": "#/components/schemas/tisane_text_moderation_rule_post"
      - "$ref": "#/components/schemas/azure_text_moderation_rule_post"
      discriminator:
        propertyName: ruleType
        mapping:
          http: "#/components/schemas/http_rule_post"
          http/ifttt: "#/components/schemas/ifttt_rule_post"
          http/zapier: "#/components/schemas/zapier_rule_post"
          http/cloudflare-worker: "#/components/schemas/cloudflare_worker_rule_post"
          http/azure-function: "#/components/schemas/azure_function_rule_post"
          http/google-cloud-function: "#/components/schemas/google_cloud_function_rule_post"
          aws/lambda: "#/components/schemas/aws_lambda_rule_post"
          aws/kinesis: "#/components/schemas/aws_kinesis_rule_post"
          aws/sqs: "#/components/schemas/aws_sqs_rule_post"
          aws/lambda/before-publish: "#/components/schemas/before_publish_aws_lambda_rule_post"
          http/before-publish: "#/components/schemas/before_publish_webhook_rule_post"
          amqp: "#/components/schemas/amqp_rule_post"
          amqp/external: "#/components/schemas/amqp_external_rule_post"
          kafka: "#/components/schemas/kafka_rule_post"
          pulsar: "#/components/schemas/pulsar_rule_post"
          ingress-postgres-outbox: "#/components/schemas/ingress_postgres_outbox_rule_post"
          ingress/mongodb: "#/components/schemas/ingress_mongodb_changestream_rule_post"
          hive/text-model-only: "#/components/schemas/hive_text_model_only_rule_post"
          hive/dashboard: "#/components/schemas/hive_dashboard_rule_post"
          bodyguard/text-moderation: "#/components/schemas/bodyguard_text_moderation_rule_post"
          tisane/text-moderation: "#/components/schemas/tisane_text_moderation_rule_post"
          azure/text-moderation: "#/components/schemas/azure_text_moderation_rule_post"
    rule_patch:
      oneOf:
      - "$ref": "#/components/schemas/http_rule_patch"
      - "$ref": "#/components/schemas/ifttt_rule_patch"
      - "$ref": "#/components/schemas/zapier_rule_patch"
      - "$ref": "#/components/schemas/cloudflare_worker_rule_patch"
      - "$ref": "#/components/schemas/azure_function_rule_patch"
      - "$ref": "#/components/schemas/google_cloud_function_rule_patch"
      - "$ref": "#/components/schemas/aws_lambda_rule_patch"
      - "$ref": "#/components/schemas/aws_kinesis_rule_patch"
      - "$ref": "#/components/schemas/aws_sqs_rule_patch"
      - "$ref": "#/components/schemas/before_publish_aws_lambda_rule_patch"
      - "$ref": "#/components/schemas/before_publish_webhook_rule_patch"
      - "$ref": "#/components/schemas/amqp_rule_patch"
      - "$ref": "#/components/schemas/amqp_external_rule_patch"
      - "$ref": "#/components/schemas/kafka_rule_patch"
      - "$ref": "#/components/schemas/pulsar_rule_patch"
      - "$ref": "#/components/schemas/ingress_postgres_outbox_rule_patch"
      - "$ref": "#/components/schemas/ingress_mongodb_changestream_rule_patch"
      - "$ref": "#/components/schemas/hive_text_model_only_rule_patch"
      - "$ref": "#/components/schemas/hive_dashboard_rule_patch"
      - "$ref": "#/components/schemas/bodyguard_text_moderation_rule_patch"
      - "$ref": "#/components/schemas/tisane_text_moderation_rule_patch"
      - "$ref": "#/components/schemas/azure_text_moderation_rule_patch"
      discriminator:
        propertyName: ruleType
        mapping:
          http: "#/components/schemas/http_rule_patch"
          http/ifttt: "#/components/schemas/ifttt_rule_patch"
          http/zapier: "#/components/schemas/zapier_rule_patch"
          http/cloudflare-worker: "#/components/schemas/cloudflare_worker_rule_patch"
          http/azure-function: "#/components/schemas/azure_function_rule_patch"
          http/google-cloud-function: "#/components/schemas/google_cloud_function_rule_patch"
          aws/lambda: "#/components/schemas/aws_lambda_rule_patch"
          aws/kinesis: "#/components/schemas/aws_kinesis_rule_patch"
          aws/sqs: "#/components/schemas/aws_sqs_rule_patch"
          aws/lambda/before-publish: "#/components/schemas/before_publish_aws_lambda_rule_patch"
          http/before-publish: "#/components/schemas/before_publish_webhook_rule_patch"
          amqp: "#/components/schemas/amqp_rule_patch"
          amqp/external: "#/components/schemas/amqp_external_rule_patch"
          kafka: "#/components/schemas/kafka_rule_patch"
          pulsar: "#/components/schemas/pulsar_rule_patch"
          ingress-postgres-outbox: "#/components/schemas/ingress_postgres_outbox_rule_patch"
          ingress/mongodb: "#/components/schemas/ingress_mongodb_changestream_rule_patch"
          hive/text-model-only: "#/components/schemas/hive_text_model_only_rule_patch"
          hive/dashboard: "#/components/schemas/hive_dashboard_rule_patch"
          bodyguard/text-moderation: "#/components/schemas/bodyguard_text_moderation_rule_patch"
          tisane/text-moderation: "#/components/schemas/tisane_text_moderation_rule_patch"
          azure/text-moderation: "#/components/schemas/azure_text_moderation_rule_patch"
    rule_response:
      oneOf:
      - "$ref": "#/components/schemas/http_rule_response"
      - "$ref": "#/components/schemas/ifttt_rule_response"
      - "$ref": "#/components/schemas/zapier_rule_response"
      - "$ref": "#/components/schemas/cloudflare_worker_rule_response"
      - "$ref": "#/components/schemas/azure_function_rule_response"
      - "$ref": "#/components/schemas/google_cloud_function_rule_response"
      - "$ref": "#/components/schemas/aws_lambda_rule_response"
      - "$ref": "#/components/schemas/aws_kinesis_rule_response"
      - "$ref": "#/components/schemas/aws_sqs_rule_response"
      - "$ref": "#/components/schemas/before_publish_aws_lambda_rule_response"
      - "$ref": "#/components/schemas/before_publish_webhook_rule_response"
      - "$ref": "#/components/schemas/amqp_rule_response"
      - "$ref": "#/components/schemas/amqp_external_rule_response"
      - "$ref": "#/components/schemas/kafka_rule_response"
      - "$ref": "#/components/schemas/pulsar_rule_response"
      - "$ref": "#/components/schemas/ingress_postgres_outbox_rule_response"
      - "$ref": "#/components/schemas/ingress_mongodb_changestream_rule_response"
      - "$ref": "#/components/schemas/hive_text_model_only_rule_response"
      - "$ref": "#/components/schemas/hive_dashboard_rule_response"
      - "$ref": "#/components/schemas/bodyguard_text_moderation_rule_response"
      - "$ref": "#/components/schemas/tisane_text_moderation_rule_response"
      - "$ref": "#/components/schemas/azure_text_moderation_rule_response"
      - "$ref": "#/components/schemas/unsupported_rule_response"
      discriminator:
        propertyName: ruleType
        mapping:
          http: "#/components/schemas/http_rule_response"
          http/ifttt: "#/components/schemas/ifttt_rule_response"
          http/zapier: "#/components/schemas/zapier_rule_response"
          http/cloudflare-worker: "#/components/schemas/cloudflare_worker_rule_response"
          http/azure-function: "#/components/schemas/azure_function_rule_response"
          http/google-cloud-function: "#/components/schemas/google_cloud_function_rule_response"
          aws/lambda: "#/components/schemas/aws_lambda_rule_response"
          aws/kinesis: "#/components/schemas/aws_kinesis_rule_response"
          aws/sqs: "#/components/schemas/aws_sqs_rule_response"
          aws/lambda/before-publish: "#/components/schemas/before_publish_aws_lambda_rule_response"
          http/before-publish: "#/components/schemas/before_publish_webhook_rule_response"
          amqp: "#/components/schemas/amqp_rule_response"
          amqp/external: "#/components/schemas/amqp_external_rule_response"
          kafka: "#/components/schemas/kafka_rule_response"
          pulsar: "#/components/schemas/pulsar_rule_response"
          ingress-postgres-outbox: "#/components/schemas/ingress_postgres_outbox_rule_response"
          ingress/mongodb: "#/components/schemas/ingress_mongodb_changestream_rule_response"
          hive/text-model-only: "#/components/schemas/hive_text_model_only_rule_response"
          hive/dashboard: "#/components/schemas/hive_dashboard_rule_response"
          bodyguard/text-moderation: "#/components/schemas/bodyguard_text_moderation_rule_response"
          tisane/text-moderation: "#/components/schemas/tisane_text_moderation_rule_response"
          azure/text-moderation: "#/components/schemas/azure_text_moderation_rule_response"
          unsupported: "#/components/schemas/unsupported_rule_response"
    http_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http
          description: The type of rule. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhook security docs</a> for more information.
              example: bw66AB
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
          required:
          - url
          - format
      required:
      - ruleType
      - requestMode
      - source
      - target
    http_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http
          description: The type of rule. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhook security docs</a> for more information.
              example: bw66AB
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
      required:
      - ruleType
    http_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the Ably <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - http
          description: The type of rule. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhooks security docs</a> for more information.
              example: bw66AB
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
          required:
          - url
          - format
      required:
      - ruleType
      - requestMode
      - source
      - target
    ifttt_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/ifttt
          description: The type of rule. In this case IFTTT. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/ifttt
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            webhookKey:
              type: string
              description: The key in the Webhook Service Documentation page of your IFTTT account.
              example: aBcd12Ef98-Z1ab3yTe-EXAMPLE
            eventName:
              type: string
              description: The Event name is used to identify the IFTTT applet that will receive the Event, make sure the name matches the name of the IFTTT applet.
              example: MyAppletName
          required:
          - webhookKey
          - eventName
      required:
      - ruleType
      - requestMode
      - source
      - target
    ifttt_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/ifttt
          description: The type of rule. In this case IFTTT. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/ifttt
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            webhookKey:
              type: string
              description: The key in the Webhook Service Documentation page of your IFTTT account.
              example: aBcd12Ef98-Z1ab3yTe-EXAMPLE
            eventName:
              type: string
              description: The Event name is used to identify the IFTTT applet that will receive the Event, make sure the name matches the name of the IFTTT applet.
              example: MyAppletName
      required:
      - ruleType
    ifttt_rule_response:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/ifttt
          description: The type of rule. In this case IFTTT. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/ifttt
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            webhookKey:
              type: string
              description: The key in the Webhook Service Documentation page of your IFTTT account.
              example: aBcd12Ef98-Z1ab3yTe-EXAMPLE
            eventName:
              type: string
              description: The Event name is used to identify the IFTTT applet that will receive the Event, make sure the name matches the name of the IFTTT applet.
              example: MyAppletName
          required:
          - webhookKey
          - eventName
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
      required:
      - ruleType
      - requestMode
      - source
      - target
    zapier_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/zapier
          description: The type of rule. In this case Zapier. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/zapier
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhooks security docs</a> for more information.
              example: bw66AB
          required:
          - url
      required:
      - ruleType
      - requestMode
      - source
      - target
    zapier_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/zapier
          description: The type of rule. In this case Zapier. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/zapier
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhooks security docs</a> for more information.
              example: bw66AB
      required:
      - ruleType
    zapier_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - http/zapier
          description: The type of rule. In this case Zapier. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/zapier
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhooks security docs</a> for more information.
              example: bw66AB
          required:
          - url
      required:
      - ruleType
      - requestMode
      - source
      - target
    cloudflare_worker_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/cloudflare-worker
          description: The type of rule. In this case Cloudflare Worker. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/cloudflare-worker
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhooks security docs</a> for more information.
              example: bw66AB
          required:
          - url
      required:
      - ruleType
      - requestMode
      - source
      - target
    cloudflare_worker_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/cloudflare-worker
          description: The type of rule. In this case Cloudflare Worker. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/cloudflare-worker
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhooks security docs</a> for more information.
              example: bw66AB
      required:
      - ruleType
    cloudflare_worker_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - http/cloudflare-worker
          description: The type of rule. In this case Cloudflare Worker. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/cloudflare-worker
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhooks security docs</a> for more information.
              example: bw66AB
          required:
          - url
      required:
      - ruleType
      - requestMode
      - source
      - target
    azure_function_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/azure-function
          description: The type of rule. In this case Microsoft Azure Function. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/azure-function
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            azureAppId:
              type: string
              description: The Microsoft Azure Application ID. You can find your Microsoft Azure Application ID as shown in this <a href="https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID">article</a>.
              example: d1e9f419-c438-6032b32df979
            azureFunctionName:
              type: string
              description: The name of your Microsoft Azure Function.
              example: myFunctionName
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhooks security docs</a> for more information.
              example: bw66AB
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
          required:
          - azureAppId
          - azureFunctionName
      required:
      - ruleType
      - requestMode
      - source
      - target
    azure_function_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/azure-function
          description: The type of rule. In this case Microsoft Azure Function. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/azure-function
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            azureAppId:
              type: string
              description: The Microsoft Azure Application ID. You can find your Microsoft Azure Application ID as shown in this <a href="https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID">article</a>.
              example: d1e9f419-c438-6032b32df979
            azureFunctionName:
              type: string
              description: The name of your Microsoft Azure Function.
              example: myFunctionName
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhooks security docs</a> for more information.
              example: bw66AB
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
      required:
      - ruleType
    azure_function_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - http/azure-function
          description: The type of rule. In this case Microsoft Azure Function. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/azure-function
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            azureAppId:
              type: string
              description: The Microsoft Azure Application ID. You can find your Microsoft Azure Application ID as shown in this <a href="https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID">article</a>.
              example: d1e9f419-c438-6032b32df979
            azureFunctionName:
              type: string
              description: The name of your Microsoft Azure Function.
              example: myFunctionName
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhook security docs</a> for more information.
              example: bw66AB
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
          required:
          - azureAppId
          - azureFunctionName
      required:
      - ruleType
      - requestMode
      - source
      - target
    google_cloud_function_rule_post:
      type: object
      additionalProperties: false
      properties:
        ruleType:
          type: string
          enum:
          - http/google-cloud-function
          description: The type of rule. In this case Google Cloud Function. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/google-cloud-function
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region in which your Google Cloud Function is hosted. See the <a href="https://cloud.google.com/compute/docs/regions-zones/">Google documentation</a> for more details.
              example: us-west1
            projectId:
              type: string
              description: The project ID for your Google Cloud Project that was generated when you created your project.
              example: my-sample-project-191923
            functionName:
              type: string
              description: The name of your Google Cloud Function.
              example: myFunctionName
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhooks security docs</a> for more information.
              example: bw66AB
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
          required:
          - region
          - projectId
          - functionName
      required:
      - ruleType
      - requestMode
      - source
      - target
    google_cloud_function_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/google-cloud-function
          description: The type of rule. In this case Google Cloud Function. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/google-cloud-function
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region in which your Google Cloud Function is hosted. See the <a href="https://cloud.google.com/compute/docs/regions-zones/">Google documentation</a> for more details.
              example: us-west1
            projectId:
              type: string
              description: The project ID for your Google Cloud Project that was generated when you created your project.
              example: my-sample-project-191923
            functionName:
              type: string
              description: The name of your Google Cloud Function.
              example: myFunctionName
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the Ably <a href="https://ably.com/docs/general/webhooks#security">webhook security docs</a> for more information.
              example: bw66AB
            enveloped:
              type: boolean
              nullable: true
              description: Delivered mssages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
      required:
      - ruleType
    google_cloud_function_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the Ably <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - http/google-cloud-function
          description: The type of rule. In this case Google Cloud Function. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: http/google-cloud-function
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region in which your Google Cloud Function is hosted. See the <a href="https://cloud.google.com/compute/docs/regions-zones/">Google documentation</a> for more details.
              example: us-west1
            projectId:
              type: string
              description: The project ID for your Google Cloud Project that was generated when you created your project.
              example: my-sample-project-191923
            functionName:
              type: string
              description: The name of your Google Cloud Function.
              example: myFunctionName
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            signingKeyId:
              type: string
              nullable: true
              description: The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/docs/general/webhooks#security">webhook security docs</a> for more information.
              example: bw66AB
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
          required:
          - region
          - projectId
          - functionName
      required:
      - ruleType
      - requestMode
      - source
      - target
    aws_access_keys:
      type: object
      additionalProperties: false
      properties:
        authenticationMode:
          type: string
          enum:
          - credentials
          description: Authentication method is using AWS credentials (AWS key ID and secret key).
          example: credentials
        accessKeyId:
          type: string
          description: The AWS key ID for the AWS IAM user. See the Ably <a href="https://ably.com/docs/general/aws-authentication/">AWS authentication docs</a> for details.
          example: AKIAIOSFODNN7EXAMPLE
        secretAccessKey:
          type: string
          description: The AWS secret key for the AWS IAM user. See the Ably <a href="https://ably.com/docs/general/aws-authentication/">AWS authentication docs</a> for details.
          example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
      required:
      - accessKeyId
      - secretAccessKey
    aws_access_keys_response:
      type: object
      additionalProperties: false
      properties:
        authenticationMode:
          type: string
          enum:
          - credentials
          description: Authentication method is using AWS credentials (AWS key ID and secret key).
          example: credentials
        accessKeyId:
          type: string
          description: The AWS key ID for the AWS IAM user. See the Ably <a href="https://ably.com/docs/general/aws-authentication/">AWS authentication docs</a> for details.
          example: AKIAIOSFODNN7EXAMPLE
    aws_assume_role:
      type: object
      additionalProperties: false
      properties:
        authenticationMode:
          type: string
          enum:
          - assumeRole
          description: Authentication method is using the ARN of an assumable role. See the Ably <a href="https://ably.com/docs/general/aws-authentication/">AWS authentication docs</a> for details.
          example: assumeRole
        assumeRoleArn:
          type: string
          description: If you are using the "ARN of an assumable role" authentication method, this is your Assume Role ARN. See the Ably <a href="https://ably.com/docs/general/aws-authentication/">AWS authentication docs</a> for details.
          example: 'arn:aws:iam::123456789012:user/Development/product_1234/*'
      required:
      - assumeRoleArn
    aws_lambda_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - aws/lambda
          description: The type of rule. In this case AWS Lambda. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: aws/lambda
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region is which your AWS Lambda Function is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            functionName:
              type: string
              description: The name of your AWS Lambda Function.
              example: myFunctionName
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys"
                  assumeRole: "#/components/schemas/aws_assume_role"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
          required:
          - region
          - functionName
          - authentication
      required:
      - ruleType
      - requestMode
      - source
      - target
    aws_lambda_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - aws/lambda
          description: The type of rule. In this case AWS Lambda. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: aws/lambda
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region is which your AWS Lambda Function is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            functionName:
              type: string
              description: The name of your AWS Lambda Function.
              example: myFunctionName
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys"
                  assumeRole: "#/components/schemas/aws_assume_role"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
          required:
          - region
          - functionName
          - authentication
      required:
      - ruleType
    aws_lambda_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - aws/lambda
          description: The type of rule. In this case AWS Lambda. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: aws/lambda
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region is which your AWS Lambda Function is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            functionName:
              type: string
              description: The name of your AWS Lambda Function.
              example: myFunctionName
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys_response"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys_response"
                  assumeRole: "#/components/schemas/aws_assume_role"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
          required:
          - region
          - functionName
          - authentication
      required:
      - ruleType
      - requestMode
      - source
      - target
    aws_kinesis_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - aws/kinesis
          description: The type of rule. In this case AWS Kinesis. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: aws/kinesis
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region is which AWS Kinesis is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            streamName:
              type: string
              description: The name of your AWS Kinesis Stream.
              example: myStreamName
            partitionKey:
              type: string
              description: The AWS Kinesis partition key. The partition key is used by Kinesis to route messages to one of the stream shards. See this <a href="https://faqs.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably FAQs</a> for details.
              example: 'message name: #{message.name}, clientId: #{message.clientId}'
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys"
                  assumeRole: "#/components/schemas/aws_assume_role"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
          required:
          - region
          - streamName
          - partitionKey
          - authentication
          - format
      required:
      - ruleType
      - requestMode
      - source
      - target
    aws_kinesis_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - aws/kinesis
          description: The type of rule. In this case AWS Kinesis. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: aws/kinesis
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region is which AWS Kinesis is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            streamName:
              type: string
              description: The name of your AWS Kinesis Stream.
              example: myStreamName
            partitionKey:
              type: string
              description: The AWS Kinesis partition key. The partition key is used by Kinesis to route messages to one of the stream shards. See this <a href="https://faqs.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably FAQs</a> for details.
              example: 'message name: #{message.name}, clientId: #{message.clientId}'
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys"
                  assumeRole: "#/components/schemas/aws_assume_role"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
      required:
      - ruleType
    aws_kinesis_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - aws/kinesis
          description: The type of rule. In this case AWS Kinesis. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: aws/kinesis
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region is which AWS Kinesis is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            streamName:
              type: string
              description: The name of your AWS Kinesis Stream.
              example: myStreamName
            partitionKey:
              type: string
              description: The AWS Kinesis partition key. The partition key is used by Kinesis to route messages to one of the stream shards. See this <a href="https://faqs.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably FAQs</a> for details.
              example: 'message name: #{message.name}, clientId: #{message.clientId}'
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys_response"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys_response"
                  assumeRole: "#/components/schemas/aws_assume_role"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
          required:
          - region
          - streamName
          - partitionKey
          - authentication
          - format
      required:
      - ruleType
      - requestMode
      - source
      - target
    aws_sqs_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - aws/sqs
          description: The type of rule. In this case AWS SQS. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: aws/sqs
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region is which AWS SQS is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            awsAccountId:
              type: string
              description: Your AWS account ID.
              example: '123456789012'
            queueName:
              type: string
              description: The AWS SQS queue name.
              example: MyQueue
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys"
                  assumeRole: "#/components/schemas/aws_assume_role"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
          required:
          - region
          - awsAccountId
          - queueName
          - authentication
      required:
      - ruleType
      - requestMode
      - source
      - target
    aws_sqs_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - aws/sqs
          description: The type of rule. In this case AWS SQS. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: aws/sqs
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region is which AWS SQS is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            awsAccountId:
              type: string
              description: Your AWS account ID.
              example: '123456789012'
            queueName:
              type: string
              description: The AWS SQS queue name.
              example: MyQueue
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys"
                  assumeRole: "#/components/schemas/aws_assume_role"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
      required:
      - ruleType
    aws_sqs_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - aws/sqs
          description: The type of rule. In this case AWS SQS. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: aws/sqs
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            region:
              type: string
              description: The region is which AWS SQS is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            awsAccountId:
              type: string
              description: Your AWS account ID.
              example: '123456789012'
            queueName:
              type: string
              description: The AWS SQS queue name.
              example: MyQueue
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys_response"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys_response"
                  assumeRole: "#/components/schemas/aws_assume_role"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a text-based encoding.
              example: json
          required:
          - region
          - awsAccountId
          - queueName
          - authentication
      required:
      - ruleType
      - requestMode
      - source
      - target
    amqp_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - amqp
          description: The type of rule. In this case AMQP. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: amqp
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            queueId:
              type: string
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
          required:
          - queueId
      required:
      - ruleType
      - requestMode
      - source
      - target
    amqp_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - amqp
          description: The type of rule. In this case AMQP. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: amqp
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            queueId:
              type: string
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
      required:
      - ruleType
    amqp_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - amqp
          description: The type of rule. In this case AMQP. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          example: amqp
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            queueId:
              type: string
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
          required:
          - queueId
      required:
      - ruleType
      - requestMode
      - source
      - target
    amqp_external_rule_post:
      type: object
      additionalProperties: false
      properties:
        ruleType:
          type: string
          enum:
          - amqp/external
          description: The type of rule. In this case AMQP external (using Firehose). See the <a href="https://ably.com/docs/general/firehose">Firehose docs</a> for further information.
          example: amqp/external
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            routingKey:
              type: string
              description: The AMQP routing key. The routing key is used by the AMQP exchange to route messages to a physical queue. See this <a href="https://faqs.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably FAQs</a> for details.
              example: 'message name: #{message.name}, clientId: #{message.clientId}'
            mandatoryRoute:
              type: boolean
              description:  Reject delivery of the message if the route does not exist, otherwise fail silently.
              example: true
            persistentMessages:
              type: boolean
              description:  Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.
              example: true
            messageTtl:
              type: integer
              description: You can optionally override the default TTL on a queue and specify a TTL in minutes for messages to be persisted. It is unusual to change the default TTL, so if this field is left empty, the default TTL for the queue will be used.
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
          required:
          - url
          - routingKey
          - mandatoryRoute
          - persistentMessages
      required:
      - ruleType
      - requestMode
      - source
      - target
    amqp_external_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - amqp/external
          description: The type of rule. In this case AMQP external (using Firehose). See the <a href="https://ably.com/docs/general/firehose">Firehose docs</a> for further information.
          example: amqp/external
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            routingKey:
              type: string
              description: The AMQP routing key. The routing key is used by the AMQP exchange to route messages to a physical queue. See this <a href="https://faqs.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably FAQs</a> for details.
              example: 'message name: #{message.name}, clientId: #{message.clientId}'
            mandatoryRoute:
              type: boolean
              description:  Reject delivery of the message if the route does not exist, otherwise fail silently.
              example: true
            persistentMessages:
              type: boolean
              description:  Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.
              example: true
            messageTtl:
              type: integer
              description: You can optionally override the default TTL on a queue and specify a TTL in minutes for messages to be persisted. It is unusual to change the default TTL, so if this field is left empty, the default TTL for the queue will be used.
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
      required:
      - ruleType
    amqp_external_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - amqp/external
          description: The type of rule. In this case AMQP external (using Firehose). See the <a href="https://ably.com/docs/general/firehose">Firehose docs</a> for further information.
          example: amqp/external
        requestMode:
          type: string
          description: Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
            routingKey:
              type: string
              description: The AMQP routing key. The routing key is used by the AMQP exchange to route messages to a physical queue. See this <a href="https://faqs.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably FAQs</a> for details.
              example: 'message name: #{message.name}, clientId: #{message.clientId}'
            mandatoryRoute:
              type: boolean
              description:  Reject delivery of the message if the route does not exist, otherwise fail silently.
              example: true
            persistentMessages:
              type: boolean
              description:  Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.
              example: true
            messageTtl:
              type: integer
              description: You can optionally override the default TTL on a queue and specify a TTL in minutes for messages to be persisted. It is unusual to change the default TTL, so if this field is left empty, the default TTL for the queue will be used.
              example: 60
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: User-Agent
                  value:
                    type: string
                    description: The value of the header.
                    example: user-agent-string
              description: If you have additional information to send, you'll need to include the relevant headers.
              example: [{"name": "User-Agent", "value": "user-agent-string"}, {"name": "headerName", "value": "headerValue"}]
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
          required:
          - url
          - routingKey
          - mandatoryRoute
          - persistentMessages
      required:
      - ruleType
      - requestMode
      - source
      - target
    kafka_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          description: The type of rule. In this case Kafka (using Firehose). See the <a href="https://ably.com/docs/general/firehose">Firehose docs</a> for further information.
          enum:
          - kafka
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            routingKey:
              type: string
              description: The Kafka partition key. This is used to determine which partition a message should be routed to, where a topic has been partitioned. `routingKey` should be in the format `topic:key` where `topic` is the topic to publish to, and `key` is the value to use as the message key.
              example: 'partitionKey'
            brokers:
              type: array
              description: This is an array of brokers that host your Kafka partitions. Each broker is specified using the format `host`, `host:port` or `ip:port`.
              example: ['kafka.ci.ably.io:19092', 'kafka.ci.ably.io:19093']
              items:
                type: string
                example: 'kafka.ci.ably.io:19092'
            auth:
              type: object
              description: The Kafka <a href="https://docs.confluent.io/platform/current/kafka/overview-authentication-methods.html">authentication mechanism</a>.
              additionalProperties: false
              properties:
                sasl:
                  type: object
                  description: SASL(Simple Authentication Security Layer) / SCRAM (Salted Challenge Response Authentication Mechanism) uses usernames and passwords stored in ZooKeeper. Credentials are created during installation. See documentation on <a href="https://docs.confluent.io/platform/current/kafka/authentication_sasl/authentication_sasl_scram.html#kafka-sasl-auth-scram">configuring SCRAM</a>.
                  additionalProperties: false
                  properties:
                    mechanism:
                      type: string
                      description: The hash type to use. SCRAM supports either SHA-256 or SHA-512 hash functions.
                      example: 'scram-sha-256'
                      enum:
                      - 'plain'
                      - 'scram-sha-256'
                      - 'scram-sha-512'
                    username:
                      type: string
                      description: Kafka login credential.
                      example: 'username'
                    password:
                      type: string
                      description: Kafka login credential.
                      example: 'password'
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
          required:
          - routingKey
          - brokers
          - auth
      required:
      - ruleType
      - requestMode
      - source
      - target
    kafka_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          description: The type of rule. In this case Kafka (using Firehose). See the <a href="https://ably.com/docs/general/firehose">Firehose docs</a> for further information.
          enum:
          - kafka
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            routingKey:
              type: string
              description: The Kafka partition key. This is used to determine which partition a message should be routed to, where a topic has been partitioned. `routingKey` should be in the format `topic:key` where `topic` is the topic to publish to, and `key` is the value to use as the message key.
              example: 'partitionKey'
            brokers:
              type: array
              description: This is an array of brokers that host your Kafka partitions. Each broker is specified using the format `host`, `host:port` or `ip:port`.
              example: ['kafka.ci.ably.io:19092', 'kafka.ci.ably.io:19093']
              items:
                type: string
                example: 'kafka.ci.ably.io:19092'
            auth:
              type: object
              description: The Kafka <a href="https://docs.confluent.io/platform/current/kafka/overview-authentication-methods.html">authentication mechanism</a>.
              additionalProperties: false
              properties:
                sasl:
                  type: object
                  description: SASL(Simple Authentication Security Layer) / SCRAM (Salted Challenge Response Authentication Mechanism) uses usernames and passwords stored in ZooKeeper. Credentials are created during installation. See documentation on <a href="https://docs.confluent.io/platform/current/kafka/authentication_sasl/authentication_sasl_scram.html#kafka-sasl-auth-scram">configuring SCRAM</a>.
                  additionalProperties: false
                  properties:
                    mechanism:
                      type: string
                      description: The hash type to use. SCRAM supports either SHA-256 or SHA-512 hash functions.
                      example: 'scram-sha-256'
                      enum:
                      - 'plain'
                      - 'scram-sha-256'
                      - 'scram-sha-512'
                    username:
                      type: string
                      description: Kafka login credential.
                      example: 'username'
                    password:
                      type: string
                      description: Kafka login credential.
                      example: 'password'
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
      required:
      - ruleType
    kafka_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          description: The type of rule. In this case Kafka (using Firehose). See the <a href="https://ably.com/docs/general/firehose">Firehose docs</a> for further information.
          enum:
          - kafka
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            routingKey:
              type: string
              description: The Kafka partition key. This is used to determine which partition a message should be routed to, where a topic has been partitioned. `routingKey` should be in the format `topic:key` where `topic` is the topic to publish to, and `key` is the value to use as the message key.
              example: 'partitionKey'
            brokers:
              type: array
              description: This is an array of brokers that host your Kafka partitions. Each broker is specified using the format `host`, `host:port` or `ip:port`.
              example: ['kafka.ci.ably.io:19092', 'kafka.ci.ably.io:19093']
              items:
                type: string
                example: 'kafka.ci.ably.io:19092'
            auth:
              type: object
              description: The Kafka <a href="https://docs.confluent.io/platform/current/kafka/overview-authentication-methods.html">authentication mechanism</a>.
              additionalProperties: false
              properties:
                sasl:
                  type: object
                  description: SASL (Simple Authentication Security Layer) / SCRAM (Salted Challenge Response Authentication Mechanism) uses usernames and passwords stored in ZooKeeper. Credentials are created during installation. See documentation on <a href="https://docs.confluent.io/platform/current/kafka/authentication_sasl/authentication_sasl_scram.html#kafka-sasl-auth-scram">configuring SCRAM</a>.
                  additionalProperties: false
                  properties:
                    mechanism:
                      type: string
                      description: The hash type to use. SCRAM supports either SHA-256 or SHA-512 hash functions.
                      example: 'scram-sha-256'
                      enum:
                      - 'plain'
                      - 'scram-sha-256'
                      - 'scram-sha-512'
                    username:
                      type: string
                      description: Kafka login credential.
                      example: 'username'
                    password:
                      type: string
                      description: Kafka login credential.
                      example: 'password'
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
          required:
          - routingKey
          - brokers
          - auth
      required:
      - ruleType
      - requestMode
      - source
      - target
    pulsar_token_auth:
      type: object
      additionalProperties: false
      properties:
        authenticationMode:
          type: string
          description: Authentication mode, in this case JSON Web Token (JWT).
          enum:
          - token
          example: token
        token:
          type: string
          description: The JWT string.
          example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'
      required:
      - token
      - authenticationMode
    pulsar_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          description: The type of rule. In this case Pulsar (using Firehose). See the <a href="https://ably.com/docs/general/firehose">Firehose docs</a> for further information.
          enum:
          - pulsar
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            routingKey:
              type: string
              description: The optional routing key (partition key) used to publish messages. Supports interpolation as described in the <a href="https://faqs.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably FAQs</a>.
              example: 'test-key'
            topic:
              type: string
              description: 'A Pulsar topic. This is a named channel for transmission of messages between producers and consumers. The topic has the form: `{persistent|non-persistent}://tenant/namespace/topic`'
              example: 'persistent://my-tenant/my-namespace/my-topic'
            serviceUrl:
              type: string
              description: The URL of the Pulsar cluster in the form `pulsar://host:port` or `pulsar+ssl://host:port`.
              example: 'pulsar://pulsar.us-west.example.com:6650/'
            tlsTrustCerts:
              type: array
              description: All connections to a Pulsar endpoint require TLS. The `tlsTrustCerts` option allows you to configure different or additional trust anchors for those TLS connections. This enables server verification. You can specify an optional list of trusted CA certificates to use to verify the TLS certificate presented by the Pulsar cluster. Each certificate should be encoded in PEM format.
              items:
                type: string
                example: "-----BEGIN CERTIFICATE-----
MIIFiTCCA3GgAwIBAgIUYO1Lomxzj7VRawWwEFiQht9OLpUwDQYJKoZIhvcNAQEL
BQAwTDELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMQ8wDQYDVQQHDAZX
...snip...
TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz
7Y+sUx6eIl4dlNl9kVrH1TD3EwwtGsjUNlFSZhg=
-----END CERTIFICATE-----"
              nullable: true
            authentication:
              type: object
              description: Pulsar supports authenticating clients using security tokens that are based on JSON Web Tokens.
              oneOf:
              - "$ref": "#/components/schemas/pulsar_token_auth"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  token: "#/components/schemas/pulsar_token_auth"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
          required:
          - topic
          - authentication
          - serviceUrl
      required:
      - ruleType
      - requestMode
      - source
      - target
    pulsar_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          description: The type of rule. In this case Pulsar (using Firehose). See the <a href="https://ably.com/docs/general/firehose">Firehose docs</a> for further information.
          enum:
          - pulsar
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          properties:
            routingKey:
              type: string
              description: The optional routing key (partition key) used to publish messages. Supports interpolation as described in the <a href="https://faqs.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably FAQs</a>.
              example: 'test-key'
            topic:
              type: string
              description: 'A Pulsar topic. This is a named channel for transmission of messages between producers and consumers. The topic has the form: `{persistent|non-persistent}://tenant/namespace/topic`'
              example: 'persistent://my-tenant/my-namespace/my-topic'
            serviceUrl:
              type: string
              description: The URL of the Pulsar cluster in the form `pulsar://host:port` or `pulsar+ssl://host:port`.
              example: 'pulsar://pulsar.us-west.example.com:6650/'
            tlsTrustCerts:
              type: array
              description: All connections to a Pulsar endpoint require TLS. The `tlsTrustCerts` option allows you to configure different or additional trust anchors for those TLS connections. This enables server verification. You can specify an optional list of trusted CA certificates to use to verify the TLS certificate presented by the Pulsar cluster. Each certificate should be encoded in PEM format.
              items:
                type: string
                example: "-----BEGIN CERTIFICATE-----
MIIFiTCCA3GgAwIBAgIUYO1Lomxzj7VRawWwEFiQht9OLpUwDQYJKoZIhvcNAQEL
BQAwTDELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMQ8wDQYDVQQHDAZX
...snip...
TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz
7Y+sUx6eIl4dlNl9kVrH1TD3EwwtGsjUNlFSZhg=
-----END CERTIFICATE-----"
              nullable: true
            authentication:
              type: object
              description: Pulsar supports authenticating clients using security tokens that are based on JSON Web Tokens.
              oneOf:
              - "$ref": "#/components/schemas/pulsar_token_auth"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  token: "#/components/schemas/pulsar_token_auth"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
      required:
      - ruleType
    pulsar_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          description: The type of rule. In this case Pulsar (using Firehose). See the <a href="https://ably.com/docs/general/firehose">Firehose docs</a> for further information.
          enum:
          - pulsar
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            routingKey:
              type: string
              description: The optional routing key (partition key) used to publish messages. Supports interpolation as described in the <a href="https://faqs.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably FAQs</a>.
              example: 'test-key'
            topic:
              type: string
              description: 'A Pulsar topic. This is a named channel for transmission of messages between producers and consumers. The topic has the form: `{persistent|non-persistent}://tenant/namespace/topic`'
              example: 'persistent://my-tenant/my-namespace/my-topic'
            serviceUrl:
              type: string
              description: The URL of the Pulsar cluster in the form `pulsar://host:port` or `pulsar+ssl://host:port`.
              example: 'pulsar://pulsar.us-west.example.com:6650/'
            tlsTrustCerts:
              type: array
              description: All connections to a Pulsar endpoint require TLS. The `tlsTrustCerts` option allows you to configure different or additional trust anchors for those TLS connections. This enables server verification. You can specify an optional list of trusted CA certificates to use to verify the TLS certificate presented by the Pulsar cluster. Each certificate should be encoded in PEM format.
              items:
                type: string
                example: "-----BEGIN CERTIFICATE-----
MIIFiTCCA3GgAwIBAgIUYO1Lomxzj7VRawWwEFiQht9OLpUwDQYJKoZIhvcNAQEL
BQAwTDELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMQ8wDQYDVQQHDAZX
...snip...
TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz
7Y+sUx6eIl4dlNl9kVrH1TD3EwwtGsjUNlFSZhg=
-----END CERTIFICATE-----"
              nullable: true
            authentication:
              type: object
              description: Pulsar supports authenticating clients using security tokens that are based on JSON Web Tokens.
              oneOf:
              - "$ref": "#/components/schemas/pulsar_token_auth"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  token: "#/components/schemas/pulsar_token_auth"
            enveloped:
              type: boolean
              nullable: true
              description: Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
              example: true
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
      required:
      - ruleType
      - requestMode
      - source
      - target
    ingress_postgres_outbox_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          description: The type of rule. In this case Postgres. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          enum:
          - ingress-postgres-outbox
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: Postgres database connection URL.
              example: postgres://user:password@example.com:5432/your-database-name
            outboxTableSchema:
              type: string
              description: Schema for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#outbox-table">outbox table</a> in your database which allows for the reliable publication of an ordered sequence of change event messages over Ably.
              example: public
            outboxTableName:
              type: string
              description: Table name for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#outbox-table">outbox table</a>.
              example: outbox
            nodesTableSchema:
              type: string
              description: Schema for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#nodes-table">outbox table</a> in your database to allow for operation as a cluster to provide fault tolerance.
              example: public
            nodesTableName:
              type: string
              description: Table name for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#nodes-table">outbox table</a>.
              example: nodes
            sslMode:
              type: string
              description: Determines the level of protection provided by the SSL connection.
              example: prefer
              enum:
              - prefer
              - require
              - verify-ca
              - verify-full
            sslRootCert:
              type: string
              description: Specifies the SSL certificate authority (CA) certificate(s). Required if sslMode is either `verify-ca` or `verify-full`.
              example: "-----BEGIN CERTIFICATE-----
MIIFiTCCA3GgAwIBAgIUYO1Lomxzj7VRawWwEFiQht9OLpUwDQYJKoZIhvcNAQEL
BQAwTDELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMQ8wDQYDVQQHDAZX
...snip...
TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz
7Y+sUx6eIl4dlNl9kVrH1TD3EwwtGsjUNlFSZhg=
-----END CERTIFICATE-----"
              nullable: true
          required:
          - url
          - outboxTableSchema
          - outboxTableName
          - nodesTableSchema
          - nodesTableName
          - sslMode
      required:
      - ruleType
      - target
    ingress_postgres_outbox_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          description: The type of rule. In this case Postgres. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          enum:
          - ingress-postgres-outbox
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: Postgres database connection URL.
              example: postgres://user:password@example.com:5432/your-database-name
            outboxTableSchema:
              type: string
              description: Schema for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#outbox-table">outbox table</a> in your database which allows for the reliable publication of an ordered sequence of change event messages over Ably.
              example: public
            outboxTableName:
              type: string
              description: Table name for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#outbox-table">outbox table</a>.
              example: outbox
            nodesTableSchema:
              type: string
              description: Schema for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#nodes-table">outbox table</a> in your database to allow for operation as a cluster to provide fault tolerance.
              example: public
            nodesTableName:
              type: string
              description: Table name for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#nodes-table">outbox table</a>.
              example: nodes
            sslMode:
              type: string
              description: Determines the level of protection provided by the SSL connection.
              example: prefer
              enum:
              - prefer
              - require
              - verify-ca
              - verify-full
            sslRootCert:
              type: string
              description: Specifies the SSL certificate authority (CA) certificate(s). Required if sslMode is either `verify-ca` or `verify-full`.
              example: "-----BEGIN CERTIFICATE-----
MIIFiTCCA3GgAwIBAgIUYO1Lomxzj7VRawWwEFiQht9OLpUwDQYJKoZIhvcNAQEL
BQAwTDELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMQ8wDQYDVQQHDAZX
...snip...
TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz
7Y+sUx6eIl4dlNl9kVrH1TD3EwwtGsjUNlFSZhg=
-----END CERTIFICATE-----"
              nullable: true
          required:
          - url
          - outboxTableSchema
          - outboxTableName
          - nodesTableSchema
          - nodesTableName
          - sslMode
      required:
      - ruleType
      - target
    ingress_postgres_outbox_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the Ably <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1602844091815
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          description: The type of rule. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          enum:
          - ingress-postgres-outbox
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: Postgres database connection URL.
              example: postgres://user:password@example.com:5432/your-database-name
            outboxTableSchema:
              type: string
              description: Schema for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#outbox-table">outbox table</a> in your database which allows for the reliable publication of an ordered sequence of change event messages over Ably.
              example: public
            outboxTableName:
              type: string
              description: Table name for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#outbox-table">outbox table</a>.
              example: outbox
            nodesTableSchema:
              type: string
              description: Schema for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#nodes-table">nodes table</a>, which is used to store available nodes. The nodes are used to automatically redistribute work in the event of failures.
              example: public
            nodesTableName:
              type: string
              description: Table name for the <a href="https://ably.com/docs/livesync/outbox-nodes-tables#nodes-table">nodes table</a>.
              example: nodes
            sslMode:
              type: string
              description: Determines the level of protection provided by the SSL connection.
              example: prefer
              enum:
              - prefer
              - require
              - verify-ca
              - verify-full
            sslRootCert:
              type: string
              description: Specifies the SSL certificate authority (CA) certificate(s). Required if sslMode is either `verify-ca` or `verify-full`.
              example: "-----BEGIN CERTIFICATE-----
MIIFiTCCA3GgAwIBAgIUYO1Lomxzj7VRawWwEFiQht9OLpUwDQYJKoZIhvcNAQEL
BQAwTDELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMQ8wDQYDVQQHDAZX
...snip...
TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz
7Y+sUx6eIl4dlNl9kVrH1TD3EwwtGsjUNlFSZhg=
-----END CERTIFICATE-----"
              nullable: true
      required:
      - ruleType
      - target
    ingress_mongodb_changestream_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          description: The type of rule. In this case a MongoDB database connector rule. See the Ably <a href="https://ably.com/docs/livesync/mongodb">LiveSync docs</a> for further information.
          enum:
          - ingress/mongodb
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: MongoDB database connection URL.
              example: mongodb://user:password@example.com/
            database:
              type: string
              description: The database to use.
              example: myDocuments
            collection:
              type: string
              description: The collection to watch.
              example: myUsers
            pipeline:
              type: string
              description: A MongoDB Change stream compatible pipeline as a JSON array string.
              example: "[{\"set\":{\"_ablyChannel\": \"myChannel\"}}]"
            fullDocument:
              type: string
              description: Controls whether the full document should be included in the published change events.
              example: updateLookup
              enum:
                - off
                - whenAvailable
                - updateLookup
            fullDocumentBeforeChange:
              type: string
              description: Controls wheter the full document before the change should be included in the change event.
              example: whenAvailable
              enum:
                - off
                - whenAvailable
            primarySite:
              type: string
              description: The primary site that the connector will run in.
              example: eu-central-1-A
              enum:
                - eu-central-1-A
                - eu-west-1-A
                - us-east-1-A
                - us-east-2-A
                - us-west-1-A
          required:
          - url
          - database
          - collection
          - pipeline
          - fullDocument
          - fullDocumentBeforeChange
          - primarySite
      required:
        - target
        - ruleType
    ingress_mongodb_changestream_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          description: The type of rule. In this case a MongoDB database connector rule. See the Ably <a href="https://ably.com/docs/livesync/mongodb">LiveSync docs</a> for further information.
          enum:
          - ingress/mongodb
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: MongoDB database connection URL.
              example: mongodb://user:password@example.com/
            database:
              type: string
              description: The database to use.
              example: myDocuments
            collection:
              type: string
              description: The collection to watch.
              example: myUsers
            pipeline:
              type: string
              description: A MongoDB Change stream compatible pipeline as a JSON array string.
              example: "[{\"set\":{\"_ablyChannel\": \"myChannel\"}}]"
            fullDocument:
              type: string
              description: Controls whether the full document should be included in the published change events.
              example: updateLookup
              enum:
                - off
                - whenAvailable
                - updateLookup
            fullDocumentBeforeChange:
              type: string
              description: Controls wheter the full document before the change should be included in the change event.
              example: whenAvailable
              enum:
                - off
                - whenAvailable
            primarySite:
              type: string
              description: The primary site that the connector will run in.
              example: eu-central-1-A
              enum:
                - eu-central-1-A
                - eu-west-1-A
                - us-east-1-A
                - us-east-2-A
                - us-west-1-A
    ingress_mongodb_changestream_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the Ably <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1602844091815
        ruleType:
          type: string
          description: The type of rule. See the Ably <a href="https://ably.com/docs/general/integrations">integrations docs</a> for further information.
          enum:
          - ingress/mongodb
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: MongoDB database connection URL.
              example: mongodb://user:password@example.com/
            database:
              type: string
              description: The database to use.
              example: myDocuments
            collection:
              type: string
              description: The collection to watch.
              example: myUsers
            pipeline:
              type: string
              description: A MongoDB Change stream compatible pipeline as a JSON array string.
              example: "[{\"set\":{\"_ablyChannel\": \"myChannel\"}}]"
            fullDocument:
              type: string
              description: Controls whether the full document should be included in the published change events.
              example: updateLookup
              enum:
                - off
                - whenAvailable
                - updateLookup
            fullDocumentBeforeChange:
              type: string
              description: Controls wheter the full document before the change should be included in the change event.
              example: whenAvailable
              enum:
                - off
                - whenAvailable
            primarySite:
              type: string
              description: The primary site that the connector will run in.
              example: eu-central-1-A
              enum:
                - eu-central-1-A
                - eu-west-1-A
                - us-east-1-A
                - us-east-2-A
                - us-west-1-A
    before_publish_aws_lambda_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - aws/lambda/before-publish
          description: The type of rule. In this case a before-publish AWS Lambda rule that invokes a Lambda function before a message is published to a channel.
          example: aws/lambda/before-publish
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the AWS Lambda function to invoke.
          properties:
            region:
              type: string
              description: The AWS region in which your Lambda function is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            functionName:
              type: string
              description: The name of your AWS Lambda function.
              example: myBeforePublishFunction
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys"
                  assumeRole: "#/components/schemas/aws_assume_role"
          required:
          - functionName
          - region
          - authentication
      required:
      - ruleType
      - target
      - invocationMode
      - beforePublishConfig
    before_publish_aws_lambda_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - aws/lambda/before-publish
          description: The type of rule. In this case a before-publish AWS Lambda rule that invokes a Lambda function before a message is published to a channel.
          example: aws/lambda/before-publish
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        source:
          "$ref": "#/components/schemas/rule_source_patch"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the AWS Lambda function to invoke.
          properties:
            region:
              type: string
              description: The AWS region in which your Lambda function is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            functionName:
              type: string
              description: The name of your AWS Lambda function.
              example: myBeforePublishFunction
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys"
                  assumeRole: "#/components/schemas/aws_assume_role"
          required:
          - region
          - functionName
          - authentication
      required:
      - ruleType
    before_publish_aws_lambda_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the Ably <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - aws/lambda/before-publish
          description: The type of rule. In this case a before-publish AWS Lambda rule that invokes a Lambda function before a message is published to a channel.
          example: aws/lambda/before-publish
        source:
          "$ref": "#/components/schemas/rule_source"
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the AWS Lambda function to invoke.
          properties:
            region:
              type: string
              description: The AWS region in which your Lambda function is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
              example: us-west-1
            functionName:
              type: string
              description: The name of your AWS Lambda function.
              example: myBeforePublishFunction
            authentication:
              oneOf:
              - "$ref": "#/components/schemas/aws_access_keys_response"
              - "$ref": "#/components/schemas/aws_assume_role"
              discriminator:
                propertyName: authenticationMode
                mapping:
                  credentials: "#/components/schemas/aws_access_keys_response"
                  assumeRole: "#/components/schemas/aws_assume_role"
          required:
          - region
          - functionName
          - authentication
      required:
      - ruleType
      - target
      - invocationMode
      - beforePublishConfig
    before_publish_webhook_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/before-publish
          description: The type of rule. In this case a before-publish webhook rule that sends an HTTP request before a message is published to a channel.
          example: http/before-publish
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the webhook endpoint to call.
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to before publishing.
              example: https://example.com/before-publish
            headers:
              type: array
              description: If you have additional information to send, you'll need to include the relevant headers.
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: Authorization
                  value:
                    type: string
                    description: The value of the header.
                    example: Bearer token123
              example: [{"name": "Authorization", "value": "Bearer token123"}]
          required:
          - url
      required:
      - ruleType
      - target
      - invocationMode
      - beforePublishConfig
    before_publish_webhook_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - http/before-publish
          description: The type of rule. In this case a before-publish webhook rule that sends an HTTP request before a message is published to a channel.
          example: http/before-publish
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the webhook endpoint to call.
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to before publishing.
              example: https://example.com/before-publish
            headers:
              type: array
              description: If you have additional information to send, you'll need to include the relevant headers.
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: Authorization
                  value:
                    type: string
                    description: The value of the header.
                    example: Bearer token123
              example: [{"name": "Authorization", "value": "Bearer token123"}]
          required:
          - url
      required:
      - ruleType
    before_publish_webhook_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the Ably <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - http/before-publish
          description: The type of rule. In this case a before-publish webhook rule that sends an HTTP request before a message is published to a channel.
          example: http/before-publish
        source:
          "$ref": "#/components/schemas/rule_source"
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the webhook endpoint to call.
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to before publishing.
              example: https://example.com/before-publish
            headers:
              type: array
              description: If you have additional information to send, you'll need to include the relevant headers.
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the header.
                    example: Authorization
                  value:
                    type: string
                    description: The value of the header.
                    example: Bearer token123
              example: [{"name": "Authorization", "value": "Bearer token123"}]
            format:
              type: string
              description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
              example: json
          required:
          - url
      required:
      - ruleType
      - target
      - invocationMode
      - beforePublishConfig
    hive_text_model_only_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - hive/text-model-only
          description: The type of rule. In this case a Hive AI text moderation rule that evaluates message content using the Hive text classification model before publishing.
          example: hive/text-model-only
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Hive AI moderation configuration.
          properties:
            apiKey:
              type: string
              description: The Hive API key for authenticating with the moderation service.
              example: hive-api-key-123
            modelUrl:
              type: string
              description: The URL of the Hive text classification model to use.
              example: https://api.thehive.ai/api/v2/task/text/text_moderation
            thresholds:
              type: object
              additionalProperties:
                type: integer
                minimum: 1
                maximum: 3
              description: A map of moderation categories to threshold levels (1-3). Messages scoring above the threshold for any category will be rejected.
          required:
          - apiKey
      required:
      - ruleType
      - target
      - beforePublishConfig
      - invocationMode
    hive_text_model_only_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - hive/text-model-only
          description: The type of rule. In this case a Hive AI text moderation rule that evaluates message content using the Hive text classification model before publishing.
          example: hive/text-model-only
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Hive AI moderation configuration.
          properties:
            apiKey:
              type: string
              description: The Hive API key for authenticating with the moderation service.
              example: hive-api-key-123
            modelUrl:
              type: string
              description: The URL of the Hive text classification model to use.
              example: https://api.thehive.ai/api/v2/task/text/text_moderation
            thresholds:
              type: object
              additionalProperties:
                type: integer
                minimum: 1
                maximum: 3
              description: A map of moderation categories to threshold levels (1-3). Messages scoring above the threshold for any category will be rejected.
          required:
          - apiKey
      required:
      - ruleType
      - target
      - beforePublishConfig
      - invocationMode
    hive_text_model_only_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the Ably <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - hive/text-model-only
          description: The type of rule. In this case a Hive AI text moderation rule that evaluates message content using the Hive text classification model before publishing.
          example: hive/text-model-only
        source:
          "$ref": "#/components/schemas/rule_source"
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Hive AI moderation configuration.
          properties:
            apiKey:
              type: string
              description: The Hive API key for authenticating with the moderation service.
              example: hive-api-key-123
            modelUrl:
              type: string
              description: The URL of the Hive text classification model to use.
              example: https://api.thehive.ai/api/v2/task/text/text_moderation
            thresholds:
              type: object
              additionalProperties:
                type: integer
                minimum: 1
                maximum: 3
              description: A map of moderation categories to threshold levels (1-3). Messages scoring above the threshold for any category will be rejected.
          required:
          - apiKey
      required:
      - ruleType
      - source
      - target
      - beforePublishConfig
      - invocationMode
      - chatRoomFilter
    hive_dashboard_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - hive/dashboard
          description: The type of rule. In this case a Hive dashboard rule that sends published messages to the Hive moderation dashboard for review after publishing.
          example: hive/dashboard
        invocationMode:
          type: string
          enum:
          - AFTER_PUBLISH
          description: The invocation mode for this rule. After-publish rules are invoked after a message is published.
          example: AFTER_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Hive dashboard configuration.
          properties:
            apiKey:
              type: string
              description: The Hive API key for authenticating with the moderation dashboard.
              example: hive-api-key-123
            checkWatchLists:
              type: boolean
              nullable: true
              description: If `true`, messages will also be checked against Hive watch lists.
              example: false
          required:
          - apiKey
      required:
      - ruleType
      - target
      - invocationMode
    hive_dashboard_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - hive/dashboard
          description: The type of rule. In this case a Hive dashboard rule that sends published messages to the Hive moderation dashboard for review after publishing.
          example: hive/dashboard
        invocationMode:
          type: string
          enum:
          - AFTER_PUBLISH
          description: The invocation mode for this rule. After-publish rules are invoked after a message is published.
          example: AFTER_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Hive dashboard configuration.
          properties:
            apiKey:
              type: string
              description: The Hive API key for authenticating with the moderation dashboard.
              example: hive-api-key-123
            checkWatchLists:
              type: boolean
              nullable: true
              description: If `true`, messages will also be checked against Hive watch lists.
              example: false
          required:
          - apiKey
      required:
      - ruleType
    hive_dashboard_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the Ably <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - hive/dashboard
          description: The type of rule. In this case a Hive dashboard rule that sends published messages to the Hive moderation dashboard for review after publishing.
          example: hive/dashboard
        source:
          "$ref": "#/components/schemas/rule_source"
        invocationMode:
          type: string
          enum:
          - AFTER_PUBLISH
          description: The invocation mode for this rule. After-publish rules are invoked after a message is published.
          example: AFTER_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Hive dashboard configuration.
          properties:
            apiKey:
              type: string
              description: The Hive API key for authenticating with the moderation dashboard.
              example: hive-api-key-123
            checkWatchLists:
              type: boolean
              nullable: true
              description: If `true`, messages will also be checked against Hive watch lists.
              example: false
          required:
          - apiKey
      required:
      - ruleType
      - target
      - invocationMode
    bodyguard_text_moderation_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - bodyguard/text-moderation
          description: The type of rule. In this case a Bodyguard text moderation rule that evaluates message content using the Bodyguard moderation service before publishing.
          example: bodyguard/text-moderation
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Bodyguard moderation configuration.
          properties:
            apiKey:
              type: string
              description: The Bodyguard API key for authenticating with the moderation service.
              example: bodyguard-api-key-123
            channelId:
              type: string
              description: The Bodyguard channel ID to associate with moderation requests.
              example: my-channel
            apiUrl:
              type: string
              description: The Bodyguard API URL for the moderation service.
              example: https://api.bodyguard.ai/v1/moderate
            defaultLanguage:
              type: string
              description: The default language for text moderation analysis.
              example: en
          required:
          - apiKey
      required:
      - ruleType
      - target
      - beforePublishConfig
      - invocationMode
    bodyguard_text_moderation_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - bodyguard/text-moderation
          description: The type of rule. In this case a Bodyguard text moderation rule that evaluates message content using the Bodyguard moderation service before publishing.
          example: bodyguard/text-moderation
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Bodyguard moderation configuration.
          properties:
            apiKey:
              type: string
              description: The Bodyguard API key for authenticating with the moderation service.
              example: bodyguard-api-key-123
            channelId:
              type: string
              description: The Bodyguard channel ID to associate with moderation requests.
              example: my-channel
            apiUrl:
              type: string
              description: The Bodyguard API URL for the moderation service.
              example: https://api.bodyguard.ai/v1/moderate
            defaultLanguage:
              type: string
              description: The default language for text moderation analysis.
              example: en
          required:
          - apiKey
      required:
      - ruleType
      - target
      - beforePublishConfig
      - invocationMode
    bodyguard_text_moderation_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the Ably <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - bodyguard/text-moderation
          description: The type of rule. In this case a Bodyguard text moderation rule that evaluates message content using the Bodyguard moderation service before publishing.
          example: bodyguard/text-moderation
        source:
          "$ref": "#/components/schemas/rule_source"
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Bodyguard moderation configuration.
          properties:
            apiKey:
              type: string
              description: The Bodyguard API key for authenticating with the moderation service.
              example: bodyguard-api-key-123
            apiUrl:
              type: string
              description: The Bodyguard API URL for the moderation service.
              example: https://api.bodyguard.ai/v1/moderate
            channelId:
              type: string
              description: The Bodyguard channel ID to associate with moderation requests.
              example: my-channel
            defaultLanguage:
              type: string
              description: The default language for text moderation analysis.
              example: en
          required:
          - apiKey
      required:
      - ruleType
      - source
      - target
      - beforePublishConfig
      - invocationMode
      - chatRoomFilter
    tisane_text_moderation_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - tisane/text-moderation
          description: The type of rule. In this case a Tisane text moderation rule that evaluates message content using the Tisane natural language processing service before publishing.
          example: tisane/text-moderation
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Tisane moderation configuration.
          properties:
            apiKey:
              type: string
              description: The Tisane API key for authenticating with the moderation service.
              example: tisane-api-key-123
            modelUrl:
              type: string
              description: The URL of the Tisane model to use for text analysis.
              example: https://api.tisane.ai/parse
            thresholds:
              type: object
              additionalProperties:
                type: integer
                minimum: 0
                maximum: 3
              description: A map of moderation categories to threshold levels (0-3). Messages scoring above the threshold for any category will be rejected.
            defaultLanguage:
              type: string
              description: The default language for text moderation analysis.
              example: en
          required:
          - apiKey
          - defaultLanguage
      required:
      - ruleType
      - target
      - beforePublishConfig
      - invocationMode
    tisane_text_moderation_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - tisane/text-moderation
          description: The type of rule. In this case a Tisane text moderation rule that evaluates message content using the Tisane natural language processing service before publishing.
          example: tisane/text-moderation
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Tisane moderation configuration.
          properties:
            apiKey:
              type: string
              description: The Tisane API key for authenticating with the moderation service.
              example: tisane-api-key-123
            modelUrl:
              type: string
              description: The URL of the Tisane model to use for text analysis.
              example: https://api.tisane.ai/parse
            thresholds:
              type: object
              additionalProperties:
                type: integer
                minimum: 0
                maximum: 3
              description: A map of moderation categories to threshold levels (0-3). Messages scoring above the threshold for any category will be rejected.
            defaultLanguage:
              type: string
              description: The default language for text moderation analysis.
              example: en
          required:
          - apiKey
          - defaultLanguage
      required:
      - ruleType
      - target
      - beforePublishConfig
      - invocationMode
    tisane_text_moderation_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the Ably <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - tisane/text-moderation
          description: The type of rule. In this case a Tisane text moderation rule that evaluates message content using the Tisane natural language processing service before publishing.
          example: tisane/text-moderation
        source:
          "$ref": "#/components/schemas/rule_source"
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Tisane moderation configuration.
          properties:
            apiKey:
              type: string
              description: The Tisane API key for authenticating with the moderation service.
              example: tisane-api-key-123
            modelUrl:
              type: string
              description: The URL of the Tisane model to use for text analysis.
              example: https://api.tisane.ai/parse
            thresholds:
              type: object
              additionalProperties:
                type: integer
                minimum: 0
                maximum: 3
              description: A map of moderation categories to threshold levels (0-3). Messages scoring above the threshold for any category will be rejected.
            defaultLanguage:
              type: string
              description: The default language for text moderation analysis.
              example: en
          required:
          - apiKey
          - defaultLanguage
      required:
      - ruleType
      - source
      - target
      - beforePublishConfig
      - invocationMode
      - chatRoomFilter
    azure_text_moderation_rule_post:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - azure/text-moderation
          description: The type of rule. In this case an Azure text moderation rule that evaluates message content using Azure AI Content Safety before publishing.
          example: azure/text-moderation
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Azure Content Safety configuration.
          properties:
            apiKey:
              type: string
              description: The Azure Content Safety API key for authenticating with the moderation service.
              example: azure-content-safety-key-123
            endpoint:
              type: string
              description: The Azure Content Safety endpoint URL.
              example: https://my-resource.cognitiveservices.azure.com
            thresholds:
              type: object
              additionalProperties:
                type: integer
                minimum: 0
                maximum: 7
              description: A map of moderation categories to threshold levels (0-7). Messages scoring above the threshold for any category will be rejected.
          required:
          - apiKey
          - endpoint
      required:
      - ruleType
      - target
      - beforePublishConfig
      - invocationMode
    azure_text_moderation_rule_patch:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        ruleType:
          type: string
          enum:
          - azure/text-moderation
          description: The type of rule. In this case an Azure text moderation rule that evaluates message content using Azure AI Content Safety before publishing.
          example: azure/text-moderation
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Azure Content Safety configuration.
          properties:
            apiKey:
              type: string
              description: The Azure Content Safety API key for authenticating with the moderation service.
              example: azure-content-safety-key-123
            endpoint:
              type: string
              description: The Azure Content Safety endpoint URL.
              example: https://my-resource.cognitiveservices.azure.com
            thresholds:
              type: object
              additionalProperties:
                type: integer
                minimum: 0
                maximum: 7
              description: A map of moderation categories to threshold levels (0-7). Messages scoring above the threshold for any category will be rejected.
          required:
          - apiKey
          - endpoint
      required:
      - ruleType
      - target
      - beforePublishConfig
      - invocationMode
    azure_text_moderation_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the Ably <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          enum:
          - azure/text-moderation
          description: The type of rule. In this case an Azure text moderation rule that evaluates message content using Azure AI Content Safety before publishing.
          example: azure/text-moderation
        source:
          "$ref": "#/components/schemas/rule_source"
        beforePublishConfig:
          type: object
          description: Configuration for before-publish behavior, including retry logic and failure handling.
          properties:
            retryTimeout:
              type: integer
              minimum: 0
              maximum: 10000
              description: The timeout in milliseconds for retrying the rule invocation.
              example: 5000
            maxRetries:
              type: integer
              minimum: 0
              maximum: 10
              description: The maximum number of retry attempts.
              example: 3
            failedAction:
              type: string
              enum:
              - REJECT
              - PUBLISH
              description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through.
              example: REJECT
            tooManyRequestsAction:
              type: string
              enum:
              - RETRY
              - FAIL
              description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`.
              example: RETRY
          required:
          - retryTimeout
          - maxRetries
          - failedAction
          - tooManyRequestsAction
        chatRoomFilter:
          type: string
          pattern: "^/.*/$"
          description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule.
          example: "/^chat:.*$/"
        invocationMode:
          type: string
          enum:
          - BEFORE_PUBLISH
          description: The invocation mode for this rule. Before-publish rules are invoked before a message is published.
          example: BEFORE_PUBLISH
        target:
          type: object
          additionalProperties: false
          description: The target for the rule, specifying the Azure Content Safety configuration.
          properties:
            apiKey:
              type: string
              description: The Azure Content Safety API key for authenticating with the moderation service.
              example: azure-content-safety-key-123
            endpoint:
              type: string
              description: The Azure Content Safety endpoint URL.
              example: https://my-resource.cognitiveservices.azure.com
            thresholds:
              type: object
              additionalProperties:
                type: integer
                minimum: 0
                maximum: 7
              description: A map of moderation categories to threshold levels (0-7). Messages scoring above the threshold for any category will be rejected.
          required:
          - apiKey
          - endpoint
      required:
      - ruleType
      - source
      - target
      - beforePublishConfig
      - invocationMode
      - chatRoomFilter
    unsupported_rule_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The rule ID.
          example: 83IzAB
        appId:
          type: string
          description: The Ably application ID.
          example: 28GY6a
        version:
          type: string
          description: API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/docs/general/webhooks">webhooks docs</a>.
          example: '1.2'
        status:
          type: string
          description: The status of the rule. Rules can be enabled or disabled.
          example: enabled
        created:
          type: number
          description: Unix timestamp representing the date and time of creation of the rule.
          example: 1602844091815
        modified:
          type: number
          description: Unix timestamp representing the date and time of last modification of the rule.
          example: 1614679682091
        _links:
          type: object
          nullable: true
        ruleType:
          type: string
          description: This rule type is currently unsupported.
          enum:
          - unsupported
          example: unsupported
        requestMode:
          type: string
          description: This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/docs/general/webhooks#batching">batching docs</a>.
          example: single
        source:
          "$ref": "#/components/schemas/rule_source"
        target:
          type: object
          additionalProperties: false
          properties:
            url:
              type: string
              description: The webhook URL that Ably will POST events to.
              example: https://example.com/webhooks
          required:
          - url
      required:
      - ruleType
      - requestMode
      - source
      - target
    queue:
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
          maxLength: 64
          pattern: "^[A-Za-z0-9_-]+$"
          description: A friendly name for your queue. May only contain letters, numbers, hyphens and underscores, up to 64 characters.
          example: my-queue
        ttl:
          type: integer
          description: TTL in minutes.
          example: 60
        maxLength:
          type: integer
          description: Message limit in number of messages.
          example: 10000
        region:
          type: string
          description: The data center region. US East (Virginia) or EU West (Ireland). Values are `us-east-1-a` or `eu-west-1-a`.
          example: us-east-1-a
      required:
      - name
      - ttl
      - maxLength
      - region
    queue_response:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The ID of the Ably queue
          example: 28AB6w:us-east-1-a:my-queue
        appId:
          type: string
          description: The Ably application ID.
          example: 28AB6w
        name:
          type: string
          description: The friendly name of the queue.
          example: my-queue
        region:
          type: string
          description: The data center region for the queue.
          example: eu-west-1-a
        amqp:
          type: object
          additionalProperties: false
          properties:
            uri:
              type: string
              description: URI for the AMQP queue interface.
              example: amqps://us-east-1-a-queue.ably.io:5671/shared
            queueName:
              type: string
              description: Name of the Ably queue.
              example: 28AB6w:my-queue
        stomp:
          type: object
          additionalProperties: false
          properties:
            uri:
              type: string
              description: URI for the STOMP queue interface.
              example: stomp://us-east-1-a-queue.ably.io:61614
            host:
              type: string
              description: The host type for the queue.
              example: shared
            destination:
              type: string
              description: Destination queue.
              example: /amqp/queue/28AB6w:my-queue
        state:
          type: string
          description: The current state of the queue.
          example: Running
        messages:
          type: object
          additionalProperties: false
          description: Details of messages in the queue.
          properties:
            ready:
              type: integer
              nullable: true
              description: The number of ready messages in the queue.
              example: 0
            unacknowledged:
              type: integer
              nullable: true
              description: The number of unacknowledged messages in the queue.
              example: 0
            total:
              type: integer
              nullable: true
              description: The total number of messages in the queue.
              example: 0
        stats:
          type: object
          additionalProperties: false
          properties:
            publishRate:
              type: number
              nullable: true
              description: The rate at which messages are published to the queue. Rate is messages per minute.
            deliveryRate:
              type: number
              nullable: true
              description: The rate at which messages are delivered from the queue. Rate is messages per minute.
            acknowledgementRate:
              type: number
              nullable: true
              description: The rate at which messages are acknowledged. Rate is messages per minute.
        ttl:
          type: integer
          description: TTL in minutes.
          example: 60
        maxLength:
          type: integer
          description: Message limit in number of messages.
          example: 10000
        deadletter:
          type: boolean
          description: A boolean that indicates whether this is a dead letter queue or not.
          example: false
        deadletterId:
          type: string
          description: The ID of the dead letter queue.
          nullable: true
          example: 28AB6w:us-east-1-a:deadletter
    namespace_post:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: The namespace or channel name that the channel rule will apply to. For example, if you specify `namespace` the namespace will be set to `namespace` and will match with channels `namespace:*` and `namespace`.
          example: namespace
        authenticated:
          type: boolean
          default: false
          description: If `true`, clients will not be permitted to use (including to attach, publish, or subscribe) any channels within this namespace unless they are identified, that is, authenticated using a client ID. See the documentation for <a href="https://ably.com/docs/auth/identified-clients">identified clients</a> for more details.
          example: false
        persisted:
          type: boolean
          default: false
          description: If `true`, all messages on a channel will be stored for 24 hours. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation.
          example: false
        persistLast:
          type: boolean
          default: false
          description: If `true`, the last message published on a channel will be stored for 365 days. You can access the stored message only by using the channel rewind mechanism and attaching with rewind=1. Please note that for each message stored, an additional message is deducted from your monthly allocation.
          example: false
        pushEnabled:
          type: boolean
          default: false
          description: If `true`, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a native push notification to registered devices for the channel.
          example: false
        batchingEnabled:
          type: boolean
          default: false
          description: If `true`, channels within this namespace will start batching inbound messages instead of sending them out immediately to subscribers.
          example: false
        batchingInterval:
          type: integer
          default: 20
          description: If `true`, the batching interval, configurable from 20ms to 1s, temporarily holds and aggregates incoming messages. These messages are then combined and delivered as a single batch once the interval elapses or a size limit is reached (before the interval elapses).
          example: 20
        conflationEnabled:
          type: boolean
          default: false
          description: If `true`, enables <a href="https://ably.com/docs/messages#conflation">conflation</a> for channels within this namespace. Conflation will aggregate published messages for a set period of time and evaluate them against a conflation key. Only the most recent message that satisfies the key will be sent to subscribers at the end of the conflation interval.
          example: false
        conflationInterval:
          type: integer
          description: The interval in milliseconds over which messages are held and evaluated for conflation.
          example: 1000
        conflationKey:
          type: string
          description: The <a href="https://ably.com/docs/messages#routing">key</a> used to determine which messages should be conflated.
        tlsOnly:
          type: boolean
          default: false
          description: If `true`, only clients that are connected using TLS will be permitted to subscribe to any channels within this namespace.
          example: false
        exposeTimeserial:
          type: boolean
          default: false
          description: If `true`, messages received on a channel will contain a unique `timeserial` that can be referenced by later messages for use with message interactions.
        mutableMessages:
          type: boolean
          default: false
          description: If `true`, messages published on channels within this namespace can be updated or deleted after publishing. See the <a href="https://ably.com/docs/messages#update">message interactions</a> documentation for more details.
          example: false
        populateChannelRegistry:
          type: boolean
          default: false
          description: If `true`, channels within this namespace are included in the channel registry, enabling channel enumeration via the <a href="https://ably.com/docs/metadata-stats/metadata/subscribe#channel-lifecycle">Channel Metadata API</a>.
          example: false
      required:
      - id
    namespace_patch:
      type: object
      additionalProperties: false
      properties:
        authenticated:
          type: boolean
          default: false
          description: If `true`, clients will not be permitted to use (including to attach, publish, or subscribe) any channels within this namespace unless they are identified, that is, authenticated using a client ID. See the documentation for <a href="https://ably.com/docs/auth/identified-clients">identified clients</a> for more details.
          example: false
        persisted:
          type: boolean
          default: false
          description: If `true`, all messages on a channel will be stored for 24 hours. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation.
          example: false
        persistLast:
          type: boolean
          default: false
          description: If `true`, the last message published on a channel will be stored for 365 days. You can access the stored message only by using the channel rewind mechanism and attaching with rewind=1. Please note that for each message stored, an additional message is deducted from your monthly allocation.
          example: false
        pushEnabled:
          type: boolean
          default: false
          description: If `true`, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a native push notification to registered devices for the channel.
          example: false
        batchingEnabled:
          type: boolean
          default: false
          description: If `true`, channels within this namespace will start batching inbound messages instead of sending them out immediately to subscribers.
          example: false
        batchingInterval:
          type: integer
          default: 20
          description: If `true`, the batching interval, configurable from 20ms to 1s, temporarily holds and aggregates incoming messages. These messages are then combined and delivered as a single batch once the interval elapses or a size limit is reached (before the interval elapses).
          example: 20
        conflationEnabled:
          type: boolean
          default: false
          description: If `true`, enables <a href="https://ably.com/docs/messages#conflation">conflation</a> for channels within this namespace. Conflation will aggregate published messages for a set period of time and evaluate them against a conflation key. Only the most recent message that satisfies the key will be sent to subscribers at the end of the conflation interval.
          example: false
        conflationInterval:
          type: integer
          description: The interval in milliseconds over which messages are held and evaluated for conflation.
          example: 1000
        conflationKey:
          type: string
          description: The <a href="https://ably.com/docs/messages#routing">key</a> used to determine which messages should be conflated.
        tlsOnly:
          type: boolean
          default: false
          description: If `true`, only clients that are connected using TLS will be permitted to subscribe to any channels within this namespace.
          example: false
        exposeTimeserial:
          type: boolean
          description: If `true`, messages received on a channel will contain a unique `timeserial` that can be referenced by later messages for use with message interactions.
        mutableMessages:
          type: boolean
          description: If `true`, messages published on channels within this namespace can be updated or deleted after publishing. See the <a href="https://ably.com/docs/messages#update">message interactions</a> documentation for more details.
          example: false
        populateChannelRegistry:
          type: boolean
          description: If `true`, channels within this namespace are included in the channel registry, enabling channel enumeration via the <a href="https://ably.com/docs/metadata-stats/metadata/subscribe#channel-lifecycle">Channel Metadata API</a>.
          example: false
    namespace_response:
      type: object
      additionalProperties: false
      properties:
        appId:
          type: string
          description: The ID of the application the namespace belongs to.
          example: 28GY6a
        authenticated:
          type: boolean
          default: false
          description: If `true`, clients will not be permitted to use (including to attach, publish, or subscribe) any channels within this namespace unless they are identified, that is, authenticated using a client ID. See the documentation for <a href="https://ably.com/docs/auth/identified-clients">identified clients</a> for more details.
          example: false
        created:
          type: integer
          description: Unix timestamp representing the date and time of creation of the namespace.
          example: 1602844091815
        modified:
          type: integer
          description: Unix timestamp representing the date and time of last modification of the namespace.
          example: 1614679682091
        id:
          type: string
          description: The namespace or channel name that the channel rule will apply to. For example, if you specify `namespace` the namespace will be set to `namespace` and will match with channels `namespace:*` and `namespace`.
          example: namespace
        persisted:
          type: boolean
          default: false
          description: If `true`, all messages on a channel will be stored for 24 hours. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation.
          example: false
        persistLast:
          type: boolean
          default: false
          description: If `true`, the last message published on a channel will be stored for 365 days. You can access the stored message only by using the channel rewind mechanism and attaching with rewind=1. Please note that for each message stored, an additional message is deducted from your monthly allocation.
          example: false
        pushEnabled:
          type: boolean
          default: false
          description: If `true`, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a native push notification to registered devices for the channel.
          example: false
        batchingEnabled:
          type: boolean
          default: false
          description: If `true`, channels within this namespace will start batching inbound messages instead of sending them out immediately to subscribers.
          example: false
        batchingInterval:
          type: integer
          default: 20
          description: If `true`, the batching interval, configurable from 20ms to 1s, temporarily holds and aggregates incoming messages. These messages are then combined and delivered as a single batch once the interval elapses or a size limit is reached (before the interval elapses).
          example: 20
        conflationEnabled:
          type: boolean
          default: false
          description: If `true`, enables <a href="https://ably.com/docs/messages#conflation">conflation</a> for channels within this namespace. Conflation will aggregate published messages for a set period of time and evaluate them against a conflation key. Only the most recent message that satisfies the key will be sent to subscribers at the end of the conflation interval.
          example: false
        conflationInterval:
          type: integer
          description: The interval in milliseconds over which messages are held and evaluated for conflation.
          example: 1000
        conflationKey:
          type: string
          description: The <a href="https://ably.com/docs/messages#routing">key</a> used to determine which messages should be conflated.
        tlsOnly:
          type: boolean
          default: false
          description: If `true`, only clients that are connected using TLS will be permitted to subscribe to any channels within this namespace.
          example: false
        exposeTimeserial:
          type: boolean
          description: If `true`, messages received on a channel will contain a unique `timeserial` that can be referenced by later messages for use with message interactions.
        mutableMessages:
          type: boolean
          description: If `true`, messages published on channels within this namespace can be updated or deleted after publishing. See the <a href="https://ably.com/docs/messages#update">message interactions</a> documentation for more details.
          example: false
        populateChannelRegistry:
          type: boolean
          description: If `true`, channels within this namespace are included in the channel registry, enabling channel enumeration via the <a href="https://ably.com/docs/metadata-stats/metadata/subscribe#channel-lifecycle">Channel Metadata API</a>.
          example: false
    app_post:
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
          description: The name of the application for your reference only.
          example: My App
        status:
          type: string
          description: The status of the application. Can be `enabled` or `disabled`. Enabled means available to accept inbound connections and all services are available.
          example: enabled
          deprecated: true
        tlsOnly:
          type: boolean
          nullable: true
          description: Enforce TLS for all connections.
          example: true
        fcmKey:
          description: The Firebase Cloud Messaging key.
          type: string
          nullable: true
          example: 'AABBQ1KyxCE:APA91bCCYs7r_Q-sqW8HMP_hV4t3vMYx...cJ8344-MhGWODZEuAmg_J4MUJcVQEyDn...I'
        fcmServiceAccount:
          type: string
          nullable: true
          description: Used to specify the Firebase Cloud Messaging(FCM) service account credentials used for authentication and enabling communication with FCM to send push notifications to devices.
          example: "service_account"
        fcmProjectId:
          type: string
          nullable: true
          description: The unique identifier for the Firebase Cloud Messaging(FCM) project. This ID is used to specify the Firebase project when configuring FCM or other Firebase services.
          example: "notional-armor-405018"
        apnsCertificate:
          type: string
          nullable: true
          description: The Apple Push Notification service certificate.
          example: '-----BEGIN CERTIFICATE-----MIIFaDCC...EXAMPLE...3Dc=-----END CERTIFICATE-----'
        apnsPrivateKey:
          type: string
          nullable: true
          description: The Apple Push Notification service private key.
          example: '-----BEGIN PRIVATE KEY-----ABCFaDCC...EXAMPLE...3Dc=-----END PRIVATE KEY-----'
        apnsUseSandboxEndpoint:
          type: boolean
          nullable: true
          description: Use the Apple Push Notification service sandbox endpoint.
          example: false
        apnsAuthType:
          type: string
          enum:
          - certificate
          - token
          nullable: true
          description: The Apple Push Notification service authentication type. Use `certificate` for p12 certificate-based auth, or `token` for p8 key-based auth.
          example: token
        apnsSigningKey:
          type: string
          nullable: true
          description: The contents of the `.p8` signing key file from the Apple Developer portal. Used for token-based APNs authentication.
          example: '-----BEGIN PRIVATE KEY-----MIGTAgE...EXAMPLE...AB12-----END PRIVATE KEY-----'
        apnsSigningKeyId:
          type: string
          nullable: true
          description: The 10-character Key ID from the Apple Developer portal, associated with the `.p8` signing key.
          example: ABC123DEFG
        apnsIssuerKey:
          type: string
          nullable: true
          description: The Team ID from the Apple Developer account. Used as the issuer when generating APNs authentication tokens.
          example: TEAMID1234
        apnsTopicHeader:
          type: string
          nullable: true
          description: The app's bundle ID (for example, `com.example.myapp`). Used as the `apns-topic` header when sending push notifications.
          example: com.example.myapp
      required:
      - name
    app_patch:
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
          description: The name of the application for your reference only.
          example: My App
        status:
          type: string
          description: The status of the application. Can be `enabled` or `disabled`. Enabled means available to accept inbound connections and all services are available.
          example: enabled
        tlsOnly:
          type: boolean
          nullable: true
          description: Enforce TLS for all connections.
          example: true
        fcmKey:
          description: The Firebase Cloud Messaging key.
          type: string
          nullable: true
          example: 'AABBQ1KyxCE:APA91bCCYs7r_Q-sqW8HMP_hV4t3vMYx...cJ8344-MhGWODZEuAmg_J4MUJcVQEyDn...I'
        fcmServiceAccount:
          type: string
          nullable: true
          description: Used to specify the Firebase Cloud Messaging(FCM) service account credentials used for authentication and enabling communication with FCM to send push notifications to devices.
          example: "service_account"
        fcmProjectId:
          type: string
          nullable: true
          description: The unique identifier for the Firebase Cloud Messaging(FCM) project. This ID is used to specify the Firebase project when configuring FCM or other Firebase services.
          example: "notional-armor-405018"
        apnsCertificate:
          type: string
          nullable: true
          description: The Apple Push Notification service certificate.
          example: '-----BEGIN CERTIFICATE-----MIIFaDCC...EXAMPLE...3Dc=-----END CERTIFICATE-----'
        apnsPrivateKey:
          type: string
          nullable: true
          description: The Apple Push Notification service private key.
          example: '-----BEGIN PRIVATE KEY-----ABCFaDCC...EXAMPLE...3Dc=-----END PRIVATE KEY-----'
        apnsUseSandboxEndpoint:
          type: boolean
          nullable: true
          description: Use the Apple Push Notification service sandbox endpoint.
          example: false
        apnsAuthType:
          type: string
          enum:
          - certificate
          - token
          nullable: true
          description: The Apple Push Notification service authentication type. Use `certificate` for p12 certificate-based auth, or `token` for p8 key-based auth.
          example: token
        apnsSigningKey:
          type: string
          nullable: true
          description: The contents of the `.p8` signing key file from the Apple Developer portal. Used for token-based APNs authentication.
          example: '-----BEGIN PRIVATE KEY-----MIGTAgE...EXAMPLE...AB12-----END PRIVATE KEY-----'
        apnsSigningKeyId:
          type: string
          nullable: true
          description: The 10-character Key ID from the Apple Developer portal, associated with the `.p8` signing key.
          example: ABC123DEFG
        apnsIssuerKey:
          type: string
          nullable: true
          description: The Team ID from the Apple Developer account. Used as the issuer when generating APNs authentication tokens.
          example: TEAMID1234
        apnsTopicHeader:
          type: string
          nullable: true
          description: The app's bundle ID (for example, `com.example.myapp`). Used as the `apns-topic` header when sending push notifications.
          example: com.example.myapp
    app_pkcs12:
      type: object
      additionalProperties: false
      properties:
        p12File:
          type: string
          format: binary
          description: The `.p12` file containing the app's APNs information.
          example: example.p12
        p12Pass:
          type: string
          description: The password for the corresponding `.p12` file.
          example: secret
      required:
      - p12File
      - p12Pass
    app_response:
      type: object
      additionalProperties: false
      properties:
        accountId:
          type: string
          description: The ID of your Ably account.
          example: WgRpOB
        id:
          type: string
          description: The application ID.
          example: 28AB6x
        name:
          type: string
          description: The application name.
          example: Default
        status:
          type: string
          description: The status of the application. Can be `enabled` or `disabled`. Enabled means available to accept inbound connections and all services are available.
          example: enabled
        tlsOnly:
          type: boolean
          nullable: true
          description: Enforce TLS for all connections. This setting overrides any channel setting.
          example: true
        apnsUseSandboxEndpoint:
          type: boolean
          nullable: true
          description: Use the Apple Push Notification service sandbox endpoint.
          example: false
        apnsAuthType:
          type: string
          enum:
          - certificate
          - token
          nullable: true
          description: The Apple Push Notification service authentication type. Use `certificate` for p12 certificate-based auth, or `token` for p8 key-based auth.
          example: token
        apnsCertificateConfigured:
          type: boolean
          description: Whether a certificate-based APNs configuration is currently active.
          example: false
        apnsSigningKeyConfigured:
          type: boolean
          description: Whether a token-based (p8) APNs signing key is currently configured.
          example: true
        apnsIssuerKey:
          type: string
          nullable: true
          description: The Team ID from the Apple Developer account. Used as the issuer when generating APNs authentication tokens.
          example: TEAMID1234
        apnsSigningKeyId:
          type: string
          nullable: true
          description: The 10-character Key ID from the Apple Developer portal, associated with the `.p8` signing key.
          example: ABC123DEFG
        apnsTopicHeader:
          type: string
          nullable: true
          description: The app's bundle ID (for example, `com.example.myapp`). Used as the `apns-topic` header when sending push notifications.
          example: com.example.myapp
        fcmProjectId:
          type: string
          nullable: true
          description: The unique identifier for the Firebase Cloud Messaging (FCM) project. This ID is used to specify the Firebase project when configuring FCM or other Firebase services.
          example: notional-armor-405018
        fcmServiceAccountConfigured:
          type: boolean
          description: Whether Firebase Cloud Messaging (FCM) service account credentials are currently configured.
          example: false
        created:
          type: integer
          description: Unix timestamp representing the date and time of creation of the application.
          example: 1602844091815
        modified:
          type: integer
          description: Unix timestamp representing the date and time of last modification of the application.
          example: 1614679682091
        _links:
          type: object
          nullable: true
          description: A link self-referencing the app that has been created.
    key_post:
      type: object
      additionalProperties: false
      properties:
        name:
          description: The name for your API key. This is a friendly name for your reference.
          type: string
          example: 'My key name'
        revocableTokens:
          type: boolean
          nullable: true
          description: If `true`, tokens issued by this key can be individually revoked. See the <a href="https://ably.com/docs/auth/revocation">token revocation</a> documentation for more details.
          example: true
        capability:
          description: These are the capability operations described in the <a href="https://ably.com/docs/auth/capabilities">capabilities docs</a>.
          type: object
          additionalProperties:
            type: array
            description: An array of strings setting the capability operations for the resource.
            items:
              type: string
      example:
        name: My key name
        capability:
          channel1:
          - publish
          - subscribe
          channel2:
          - history
      required:
      - name
      - capability
    key_patch:
      type: object
      additionalProperties: false
      properties:
        name:
          description: The name for your API key. This is a friendly name for your reference.
          type: string
          example: 'My key name'
        revocableTokens:
          type: boolean
          nullable: true
          description: If `true`, tokens issued by this key can be individually revoked. See the <a href="https://ably.com/docs/auth/revocation">token revocation</a> documentation for more details.
          example: true
        capability:
          description: These are the capability operations described in the Ably <a href="https://ably.com/docs/auth/capabilities">capabilities docs</a>.
          type: object
          additionalProperties:
            type: array
            description: An array of strings setting the capability operations for the resource.
            items:
              type: string
      example:
        name: My key name
        capability:
          channel1:
          - publish
          - subscribe
          channel2:
          - history
    key_response:
      type: object
      additionalProperties: false
      properties:
        appId:
          description: The Ably application ID which this key is associated with.
          type: string
          example: 28GY6a
        id:
          description: The key ID.
          type: string
          example: G8dabc
        name:
          description: The name for your API key. This is a friendly name for your reference.
          type: string
          example: 'My key name'
        revocableTokens:
          type: boolean
          nullable: true
          description: If `true`, tokens issued by this key can be individually revoked. See the <a href="https://ably.com/docs/auth/revocation">token revocation</a> documentation for more details.
          example: true
        status:
          description: The status of the key. `0` is enabled, `1` is revoked.
          type: integer
        key:
          description: The complete API key including API secret.
          type: string
        capability:
          description: The capabilities that this key has. More information on capabilities can be found in the Ably <a href="https://ably.com/docs/auth/capabilities">capabilities docs</a>.
          type: object
          additionalProperties:
            type: array
            description: An array of strings setting the capability operations for the resource.
            items:
              type: string
          example:
            channel1:
            - publish
            - subscribe
            channel2:
            - history
        created:
          type: integer
          description: Unix timestamp representing the date and time of creation of the key.
          example: 1602844091815
        modified:
          type: integer
          description: Unix timestamp representing the date and time of the last modification of the key.
          example: 1614679682091
    me:
      type: object
      additionalProperties: false
      properties:
        token:
          type: object
          additionalProperties: false
          properties:
            id:
              type: string
              description: The token ID.
              example: "12345"
            name:
              type: string
              description: The friendly name for the token.
              example: My Token
            capabilities:
              type: array
              description: An array containing the access capabilities associated with the access token.
              example: ["write:namespace", "read:namespace", "write:queue", "read:queue", "write:rule", "read:rule", "write:key", "read:key", "write:app", "read:app"]
              items:
                type: string
            expires_at:
              type: string
              format: date-time
              nullable: true
              description: The date and time at which the access token expires, in ISO 8601 format. A value of `null` indicates the token does not expire.
              example: "2026-04-25T00:00:00Z"
            last_used_at:
              type: string
              format: date-time
              nullable: true
              description: The date and time at which the access token was last used to authenticate a Control API request, in ISO 8601 format. Updated at most once per 10-minute window. A value of `null` indicates the token has not been used since tracking began.
              example: "2026-04-17T12:34:56Z"
          required:
          - id
          - name
          - capabilities
          - expires_at
          - last_used_at
        user:
          type: object
          additionalProperties: false
          properties:
            id:
              type: integer
              description: The user ID associated with the account.
              example: 12345
            email:
              type: string
              description: Email address of the user associated with the account.
              example: user@example.com
          required:
          - id
          - email
        account:
          type: object
          additionalProperties: false
          properties:
            id:
              type: string
              description: The account ID.
              example: VpWaOA
            name:
              type: string
              description: The name of the account.
              example: Free account
          required:
          - id
          - name
    account_stats_response:
      type: object
      additionalProperties: false
      properties:
        intervalId:
          type: string
          description: The UTC time at which the time period covered by these statistics begins. If `unit` is set to `minute` this will be in the format `YYYY-mm-dd:HH:MM`, if `hour` it will be `YYYY-mm-dd:HH`, if `day` it will be `YYYY-mm-dd:00` and if `month` it will be `YYYY-mm-01:00`.
          example: "2024-08-04:20"
        unit:
          type: string
          description: The length of interval that these statistics span. One of `minute`, `hour`, `day`, or `month`.
          example: "hour"
        accountId:
          type: string
          description: The ID of the account the statistics are for.
          example: "DhSspB"
        schema:
          type: string
          description: The schema URL defining the structure of the statistics.
          example: "https://schemas.ably.com/json/account-stats-0.0.3.json"
        entries:
          type: object
          description: Contains the actual statistics entries for this interval. View the `schema` for descriptions of each entry.
          additionalProperties: true
          example: { "messages.all.all.count": 10293,
      "connections.all.peak": 510,
      "channels.peak": 68 }
    app_stats_response:
      type: object
      additionalProperties: false
      properties:
        intervalId:
          type: string
          description: The UTC time at which the time period covered by these statistics begins. If `unit` is set to `minute` this will be in the format `YYYY-mm-dd:HH:MM`, if `hour` it will be `YYYY-mm-dd:HH`, if `day` it will be `YYYY-mm-dd:00` and if `month` it will be `YYYY-mm-01:00`.
          example: "2024-08-04:20"
        unit:
          type: string
          description: The length of interval that these statistics span. One of `minute`, `hour`, `day`, or `month`.
          example: "hour"
        appId:
          type: string
          description: The ID of the application the statistics are for.
          example: "MKEFrw"
        schema:
          type: string
          description: The schema URL defining the structure of the statistics.
          example: "https://schemas.ably.com/json/app-stats-0.0.5.json"
        entries:
          type: object
          description: Contains the actual statistics entries for this interval. View the `schema` for descriptions of each entry.
          additionalProperties: true
          example: { "messages.all.all.count": 723,
      "connections.all.peak": 201,
      "channels.peak": 27 }
    error:
      type: object
      additionalProperties: false
      properties:
        message:
          type: string
          description: The error message.
        code:
          type: integer
          description: The HTTP status code returned.
        statusCode:
          type: integer
          description: The Ably error code.
        href:
          type: string
          description: The URL to documentation about the error code.
        details:
          type: object
          nullable: true
          description: Any additional details about the error message.
      required:
      - message
      - code
      - statusCode
      - href
