> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myabode.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# List events

> Every deal and task transition in transaction order, oldest first. Two changes to one subject can arrive out of commit order, so fetch the subject for its current state rather than replaying from/to. Poll forward from next_cursor; has_more false means caught up. Requires `events:read`, plus `tasks:read` for task events.



## OpenAPI

````yaml https://api.myabode.ca/v1/openapi.json get /v1/events
openapi: 3.1.1
info:
  title: myAbode Public API
  version: 1.0.0
  description: >-
    The `/v1` surface. Authenticate with `Authorization: Bearer mya_…`. A member
    key reads what its member reads; a service key reads its brokerage. Every
    failure is an RFC 9457 Problem Details body served as
    `application/problem+json`; branch on its `code`.
servers:
  - url: https://api.myabode.ca
security:
  - apiKey: []
paths:
  /v1/events:
    get:
      summary: List events
      description: >-
        Every deal and task transition in transaction order, oldest first. Two
        changes to one subject can arrive out of commit order, so fetch the
        subject for its current state rather than replaying from/to. Poll
        forward from next_cursor; has_more false means caught up. Requires
        `events:read`, plus `tasks:read` for task events.
      operationId: events.list
      parameters:
        - name: type
          in: query
          schema:
            type: array
            maxItems: 100
            items:
              enum:
                - deal.created
                - deal.updated
                - deal.status_changed
                - deal.deleted
                - deal.restored
                - deal.agent_added
                - deal.agent_removed
                - deal.primary_agent_changed
                - task.created
                - task.status_changed
                - task.reassigned
              type: string
              description: >-
                Event type. New values may be added; this is not a breaking
                change. Handle unknown values.
          style: form
          explode: true
          allowEmptyValue: true
          allowReserved: true
        - name: brokerage
          in: query
          schema:
            type: array
            maxItems: 100
            items:
              type: string
              minLength: 1
          style: form
          explode: true
          allowEmptyValue: true
          allowReserved: true
        - name: start
          in: query
          schema:
            const: latest
          allowEmptyValue: true
          allowReserved: true
        - name: cursor
          in: query
          schema:
            type: string
            minLength: 1
            description: 'Opaque: send back a next_cursor unchanged.'
          allowEmptyValue: true
          allowReserved: true
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventList'
        '400':
          description: >-
            A parameter failed validation — a filter, a paging value or the path
            id. `errors[]` names each rejected value with a JSON Pointer. A
            `cursor` this API cannot read, or one sent with a different `sort`,
            is `INVALID_CURSOR` and fails the same way on every retry: drop it
            and re-run the initial sync (on `/v1/events`, from `start=latest`,
            as for a 410).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: >-
            No `Authorization: Bearer mya_…` header (`API_KEY_REQUIRED`), or a
            credential this API will not accept (`API_KEY_INVALID`). Unknown,
            revoked and expired keys are one outcome.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: >-
            The key is valid but does not hold the scope this route requires
            (`INSUFFICIENT_SCOPE`).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: >-
            No such resource, or none this key may read — the two answers are
            identical bar `request_id` (`NOT_FOUND`).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '410':
          description: >-
            The cursor is from an earlier feed epoch (`CURSOR_EXPIRED`). Re-run
            the initial sync from `start=latest`. The epoch changes only after a
            database restore or a major-version upgrade.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: >-
            The key spent its per-minute request budget (`RATE_LIMITED`).
            `Retry-After` carries the seconds to wait.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    EventList:
      type: object
      properties:
        object:
          const: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Event'
        has_more:
          type: boolean
        next_cursor:
          type: string
          description: Never null. Poll from it again; has_more false means caught up.
      required:
        - object
        - data
        - has_more
        - next_cursor
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        detail:
          type: string
        code:
          type: string
        request_id:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              pointer:
                type: string
              code:
                type: string
              detail:
                type: string
              resource:
                type: string
            required:
              - pointer
              - code
              - detail
      required:
        - type
        - title
        - status
        - detail
        - code
        - request_id
      additionalProperties: false
      description: >-
        RFC 9457 Problem Details — the only error body the `/v1` surface emits,
        served as `application/problem+json` on every failure. Branch on `code`,
        not on `title` or `detail`; quote `request_id` (also the `Request-Id`
        response header) in a support request. `errors` is present only on a
        400, carrying one entry per rejected field.
    Event:
      anyOf:
        - type: object
          properties:
            object:
              const: event
            id:
              type: string
            type:
              const: deal.created
            created_at:
              type: string
              format: date-time
            brokerage:
              type: string
            deal:
              anyOf:
                - type: string
                - type: 'null'
            subject:
              type: object
              properties:
                object:
                  const: deal
                id:
                  type: string
              required:
                - object
                - id
              additionalProperties: false
            actor:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: ai_agent
                        id:
                          const: abby
                        name:
                          const: Abby
                        on_behalf_of:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - on_behalf_of
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: system
                      required:
                        - type
                      additionalProperties: false
                - type: 'null'
            data:
              anyOf:
                - type: object
                  additionalProperties: false
                - type: 'null'
              description: Null only when the stored event’s details could not be read.
          required:
            - object
            - id
            - type
            - created_at
            - brokerage
            - deal
            - subject
            - actor
            - data
          additionalProperties: false
        - type: object
          properties:
            object:
              const: event
            id:
              type: string
            type:
              const: deal.updated
            created_at:
              type: string
              format: date-time
            brokerage:
              type: string
            deal:
              anyOf:
                - type: string
                - type: 'null'
            subject:
              type: object
              properties:
                object:
                  const: deal
                id:
                  type: string
              required:
                - object
                - id
              additionalProperties: false
            actor:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: ai_agent
                        id:
                          const: abby
                        name:
                          const: Abby
                        on_behalf_of:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - on_behalf_of
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: system
                      required:
                        - type
                      additionalProperties: false
                - type: 'null'
            data:
              anyOf:
                - type: object
                  additionalProperties: false
                - type: 'null'
              description: Null only when the stored event’s details could not be read.
          required:
            - object
            - id
            - type
            - created_at
            - brokerage
            - deal
            - subject
            - actor
            - data
          additionalProperties: false
        - type: object
          properties:
            object:
              const: event
            id:
              type: string
            type:
              const: deal.status_changed
            created_at:
              type: string
              format: date-time
            brokerage:
              type: string
            deal:
              anyOf:
                - type: string
                - type: 'null'
            subject:
              type: object
              properties:
                object:
                  const: deal
                id:
                  type: string
              required:
                - object
                - id
              additionalProperties: false
            actor:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: ai_agent
                        id:
                          const: abby
                        name:
                          const: Abby
                        on_behalf_of:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - on_behalf_of
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: system
                      required:
                        - type
                      additionalProperties: false
                - type: 'null'
            data:
              anyOf:
                - type: object
                  properties:
                    status:
                      type: object
                      properties:
                        from:
                          enum:
                            - SUBMITTED
                            - IN_PROGRESS
                            - READY_FOR_PAYOUT
                            - PAID_OUT
                            - COMPLETED
                            - FELL_THROUGH
                          type: string
                          description: >-
                            Deal status. New values may be added; this is not a
                            breaking change. Handle unknown values.
                        to:
                          enum:
                            - SUBMITTED
                            - IN_PROGRESS
                            - READY_FOR_PAYOUT
                            - PAID_OUT
                            - COMPLETED
                            - FELL_THROUGH
                          type: string
                          description: >-
                            Deal status. New values may be added; this is not a
                            breaking change. Handle unknown values.
                      required:
                        - from
                        - to
                      additionalProperties: false
                  required:
                    - status
                  additionalProperties: false
                - type: 'null'
              description: Null only when the stored event’s details could not be read.
          required:
            - object
            - id
            - type
            - created_at
            - brokerage
            - deal
            - subject
            - actor
            - data
          additionalProperties: false
        - type: object
          properties:
            object:
              const: event
            id:
              type: string
            type:
              const: deal.deleted
            created_at:
              type: string
              format: date-time
            brokerage:
              type: string
            deal:
              anyOf:
                - type: string
                - type: 'null'
            subject:
              type: object
              properties:
                object:
                  const: deal
                id:
                  type: string
              required:
                - object
                - id
              additionalProperties: false
            actor:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: ai_agent
                        id:
                          const: abby
                        name:
                          const: Abby
                        on_behalf_of:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - on_behalf_of
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: system
                      required:
                        - type
                      additionalProperties: false
                - type: 'null'
            data:
              anyOf:
                - type: object
                  additionalProperties: false
                - type: 'null'
              description: Null only when the stored event’s details could not be read.
          required:
            - object
            - id
            - type
            - created_at
            - brokerage
            - deal
            - subject
            - actor
            - data
          additionalProperties: false
        - type: object
          properties:
            object:
              const: event
            id:
              type: string
            type:
              const: deal.restored
            created_at:
              type: string
              format: date-time
            brokerage:
              type: string
            deal:
              anyOf:
                - type: string
                - type: 'null'
            subject:
              type: object
              properties:
                object:
                  const: deal
                id:
                  type: string
              required:
                - object
                - id
              additionalProperties: false
            actor:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: ai_agent
                        id:
                          const: abby
                        name:
                          const: Abby
                        on_behalf_of:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - on_behalf_of
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: system
                      required:
                        - type
                      additionalProperties: false
                - type: 'null'
            data:
              anyOf:
                - type: object
                  additionalProperties: false
                - type: 'null'
              description: Null only when the stored event’s details could not be read.
          required:
            - object
            - id
            - type
            - created_at
            - brokerage
            - deal
            - subject
            - actor
            - data
          additionalProperties: false
        - type: object
          properties:
            object:
              const: event
            id:
              type: string
            type:
              const: deal.agent_added
            created_at:
              type: string
              format: date-time
            brokerage:
              type: string
            deal:
              anyOf:
                - type: string
                - type: 'null'
            subject:
              type: object
              properties:
                object:
                  const: deal
                id:
                  type: string
              required:
                - object
                - id
              additionalProperties: false
            actor:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: ai_agent
                        id:
                          const: abby
                        name:
                          const: Abby
                        on_behalf_of:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - on_behalf_of
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: system
                      required:
                        - type
                      additionalProperties: false
                - type: 'null'
            data:
              anyOf:
                - type: object
                  properties:
                    agent:
                      type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                      additionalProperties: false
                  required:
                    - agent
                  additionalProperties: false
                - type: 'null'
              description: Null only when the stored event’s details could not be read.
          required:
            - object
            - id
            - type
            - created_at
            - brokerage
            - deal
            - subject
            - actor
            - data
          additionalProperties: false
        - type: object
          properties:
            object:
              const: event
            id:
              type: string
            type:
              const: deal.agent_removed
            created_at:
              type: string
              format: date-time
            brokerage:
              type: string
            deal:
              anyOf:
                - type: string
                - type: 'null'
            subject:
              type: object
              properties:
                object:
                  const: deal
                id:
                  type: string
              required:
                - object
                - id
              additionalProperties: false
            actor:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: ai_agent
                        id:
                          const: abby
                        name:
                          const: Abby
                        on_behalf_of:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - on_behalf_of
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: system
                      required:
                        - type
                      additionalProperties: false
                - type: 'null'
            data:
              anyOf:
                - type: object
                  properties:
                    agent:
                      type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                      additionalProperties: false
                  required:
                    - agent
                  additionalProperties: false
                - type: 'null'
              description: Null only when the stored event’s details could not be read.
          required:
            - object
            - id
            - type
            - created_at
            - brokerage
            - deal
            - subject
            - actor
            - data
          additionalProperties: false
        - type: object
          properties:
            object:
              const: event
            id:
              type: string
            type:
              const: deal.primary_agent_changed
            created_at:
              type: string
              format: date-time
            brokerage:
              type: string
            deal:
              anyOf:
                - type: string
                - type: 'null'
            subject:
              type: object
              properties:
                object:
                  const: deal
                id:
                  type: string
              required:
                - object
                - id
              additionalProperties: false
            actor:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: ai_agent
                        id:
                          const: abby
                        name:
                          const: Abby
                        on_behalf_of:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - on_behalf_of
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: system
                      required:
                        - type
                      additionalProperties: false
                - type: 'null'
            data:
              anyOf:
                - type: object
                  properties:
                    primary_agent:
                      type: object
                      properties:
                        from:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        to:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                      required:
                        - from
                        - to
                      additionalProperties: false
                  required:
                    - primary_agent
                  additionalProperties: false
                - type: 'null'
              description: Null only when the stored event’s details could not be read.
          required:
            - object
            - id
            - type
            - created_at
            - brokerage
            - deal
            - subject
            - actor
            - data
          additionalProperties: false
        - type: object
          properties:
            object:
              const: event
            id:
              type: string
            type:
              const: task.created
            created_at:
              type: string
              format: date-time
            brokerage:
              type: string
            deal:
              anyOf:
                - type: string
                - type: 'null'
            subject:
              type: object
              properties:
                object:
                  const: task
                id:
                  type: string
              required:
                - object
                - id
              additionalProperties: false
            actor:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: ai_agent
                        id:
                          const: abby
                        name:
                          const: Abby
                        on_behalf_of:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - on_behalf_of
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: system
                      required:
                        - type
                      additionalProperties: false
                - type: 'null'
            data:
              anyOf:
                - type: object
                  additionalProperties: false
                - type: 'null'
              description: Null only when the stored event’s details could not be read.
          required:
            - object
            - id
            - type
            - created_at
            - brokerage
            - deal
            - subject
            - actor
            - data
          additionalProperties: false
        - type: object
          properties:
            object:
              const: event
            id:
              type: string
            type:
              const: task.status_changed
            created_at:
              type: string
              format: date-time
            brokerage:
              type: string
            deal:
              anyOf:
                - type: string
                - type: 'null'
            subject:
              type: object
              properties:
                object:
                  const: task
                id:
                  type: string
              required:
                - object
                - id
              additionalProperties: false
            actor:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: ai_agent
                        id:
                          const: abby
                        name:
                          const: Abby
                        on_behalf_of:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - on_behalf_of
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: system
                      required:
                        - type
                      additionalProperties: false
                - type: 'null'
            data:
              anyOf:
                - type: object
                  properties:
                    status:
                      type: object
                      properties:
                        from:
                          enum:
                            - open
                            - held
                            - done
                            - dismissed
                          type: string
                          description: >-
                            Task status. New values may be added; this is not a
                            breaking change. Handle unknown values.
                        to:
                          enum:
                            - open
                            - held
                            - done
                            - dismissed
                          type: string
                          description: >-
                            Task status. New values may be added; this is not a
                            breaking change. Handle unknown values.
                      required:
                        - from
                        - to
                      additionalProperties: false
                    outcome:
                      anyOf:
                        - enum:
                            - abandoned
                            - accepted_as_is
                            - answered
                            - applied
                            - approved
                            - bound_to_existing
                            - bound_to_existing_listing
                            - chased
                            - classified
                            - completed
                            - corrected
                            - deal_created
                            - discarded
                            - materialized
                            - nothing_owed
                            - not_applicable
                            - not_a_deal
                            - not_extractable
                            - no_residual_owed
                            - rejected
                            - replied
                            - returned_for_corrections
                            - routed_manually
                            - settled
                            - superseded
                            - typed
                            - unprocessable
                            - withdrawn
                          type: string
                          description: >-
                            Task outcome, read together with the task type. New
                            values may be added; this is not a breaking change.
                            Handle unknown values.
                        - type: 'null'
                    reason:
                      anyOf:
                        - type: string
                        - type: 'null'
                  required:
                    - status
                    - outcome
                    - reason
                  additionalProperties: false
                - type: 'null'
              description: Null only when the stored event’s details could not be read.
          required:
            - object
            - id
            - type
            - created_at
            - brokerage
            - deal
            - subject
            - actor
            - data
          additionalProperties: false
        - type: object
          properties:
            object:
              const: event
            id:
              type: string
            type:
              const: task.reassigned
            created_at:
              type: string
              format: date-time
            brokerage:
              type: string
            deal:
              anyOf:
                - type: string
                - type: 'null'
            subject:
              type: object
              properties:
                object:
                  const: task
                id:
                  type: string
              required:
                - object
                - id
              additionalProperties: false
            actor:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        type:
                          const: user
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: ai_agent
                        id:
                          const: abby
                        name:
                          const: Abby
                        on_behalf_of:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: 'null'
                        impersonated_by:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: withheld
                                  required:
                                    - type
                                  additionalProperties: false
                            - type: 'null'
                      required:
                        - type
                        - id
                        - name
                        - on_behalf_of
                        - impersonated_by
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: system
                      required:
                        - type
                      additionalProperties: false
                - type: 'null'
            data:
              anyOf:
                - type: object
                  properties:
                    assignee:
                      type: object
                      properties:
                        from:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: user
                                    id:
                                      type: string
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: role
                                    role:
                                      enum:
                                        - system_admin
                                        - org_admin
                                        - brokerage_admin
                                        - office_admin
                                        - team_leader
                                        - deal_processor
                                        - closing_processor
                                        - listing_processor
                                        - deal_processor_manager
                                        - agent
                                        - assistant
                                      type: string
                                      description: >-
                                        Role. New values may be added; this is
                                        not a breaking change. Handle unknown
                                        values.
                                  required:
                                    - type
                                    - role
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      const: ai_agent
                                    id:
                                      const: abby
                                    name:
                                      const: Abby
                                  required:
                                    - type
                                    - id
                                    - name
                                  additionalProperties: false
                            - type: 'null'
                        to:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: user
                                id:
                                  type: string
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  const: role
                                role:
                                  enum:
                                    - system_admin
                                    - org_admin
                                    - brokerage_admin
                                    - office_admin
                                    - team_leader
                                    - deal_processor
                                    - closing_processor
                                    - listing_processor
                                    - deal_processor_manager
                                    - agent
                                    - assistant
                                  type: string
                                  description: >-
                                    Role. New values may be added; this is not a
                                    breaking change. Handle unknown values.
                              required:
                                - type
                                - role
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  const: ai_agent
                                id:
                                  const: abby
                                name:
                                  const: Abby
                              required:
                                - type
                                - id
                                - name
                              additionalProperties: false
                      required:
                        - from
                        - to
                      additionalProperties: false
                    reason:
                      type: string
                  required:
                    - assignee
                    - reason
                  additionalProperties: false
                - type: 'null'
              description: Null only when the stored event’s details could not be read.
          required:
            - object
            - id
            - type
            - created_at
            - brokerage
            - deal
            - subject
            - actor
            - data
          additionalProperties: false
      description: Something that happened. Fetch the subject for its current state.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An API key of the form `mya_…`, sent as `Authorization: Bearer mya_…`.
        The secret is shown once, when the key is created.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.