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

# Get Report

> One report: the agent's reading of the interval, the changes to the counterparty's deals in it and the threads they were read from, and its deals' tasks and the messages about it since it was last reviewed.



## OpenAPI

````yaml https://sonar.turtle.xyz/v1/openapi.json get /organization/{organizationId}/reports/{reportId}
openapi: 3.1.0
info:
  description: >-
    Sonar's CRM, as a tenant sees it: the events its sensors read, the contacts,
    organizations,

    deals, tasks and documents built from them, and the record of every change.
    Each organization's Sonar is its

    own silo: nothing in it is shared with another. Its agent reads the events
    and proposes or makes the changes;

    the people of the organization read, correct and decide. The organization
    graph is the one exception: a public

    directory of organizations, the same for every organization, that holds
    nothing of any organization's own.


    Every path is under /organization/{organizationId}, the Turtle organization
    whose Sonar you address.

    Authenticate with a Turtle API key, as a bearer token or in X-API-Key. A
    personal key acts as you, in the

    organizations you are a member of; an organization's key reaches that
    organization only.


    ## Versioning and deprecation


    v1 is stable. Within v1, changes are additive only:


    - new operations, and new optional query parameters or request fields;

    - new response fields;

    - new values in a response enum.


    Clients must ignore response fields they do not know and tolerate enum
    values they do not know.


    Anything else is breaking and ships only in a new version (/v2): removing or
    renaming an operation, a

    parameter or a field; making an optional input required; changing a type, a
    format or what a field means;

    accepting fewer values than before; changing what a credential may reach.


    An operation is retired in steps. First it is marked deprecated here and
    every answer it gives carries a

    Deprecation header (RFC 9745, the date it was deprecated), a Sunset header
    (RFC 8594, the date it stops

    answering) and a Link to this policy with rel="deprecation". The sunset is
    at least 90 days after the

    deprecation. Watch for the Deprecation header: it is the notice.
  title: Turtle Sonar API
  version: 1.0.0
servers:
  - url: https://sonar.turtle.xyz/v1
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - description: The companies you deal with, your own included.
    name: Organizations
  - description: >-
      The public directory of organizations, the same for every workspace, each
      beside your own organization on its domain.
    name: Organization graph
  - description: People, and the roles they hold at organizations.
    name: Contacts
  - description: >-
      Corrections to a role a contact held: a title misread, a date wrong.
      Starting and finishing one are Contacts operations.
    name: Contact roles
  - description: >-
      Deals on your boards, and the subjects from Turtle's catalog they are
      about.
    name: Engagements (deals)
  - description: 'Storylines: the events one topic is made of.'
    name: Threads (storylines)
  - description: Follow-ups with owners and due dates.
    name: Tasks
  - description: >-
      Paperwork held with a counterparty. Sonar records where a document lives,
      not the file.
    name: Documents
  - description: On-chain addresses an organization is known by.
    name: Wallets
  - description: A deal's changes between two reviews.
    name: Reports
  - description: >-
      What the sensors read. Events never change, and writes cite them as
      evidence.
    name: Events
  - description: Named slices of the event log, each read as a poll of its own.
    name: Feeds
  - description: >-
      Where each poller of the event log stands, and how far behind the log it
      is.
    name: Poll marks
  - description: The schedule, from the calendars Sonar reads.
    name: Meetings
  - description: 'The conversation with Sonar''s agent: questions, answers and notes.'
    name: Messages
  - description: 'The change log: every write, the drafts waiting for a person, and undo.'
    name: Change log and drafts
  - description: Boards, their stages, and the card each deal on them carries.
    name: Pipelines (boards)
  - description: The custom fields every other kind of record carries.
    name: Entity cards
  - description: Rules your workspace runs on incoming events.
    name: Rules
  - description: What the agent may do without a person.
    name: Permissions
  - description: >-
      The accounts Sonar reads through: what each may read, its history reads,
      its settings, and disconnecting it. Connecting one is the dashboard's.
    name: Sensing scope
  - description: What your inbound webhooks received.
    name: Webhook deliveries
  - description: What Sonar holds for you, its retention, and deletion.
    name: Data and retention
  - description: >-
      Keys minted for members' own agents, collected by Sonar's agent tier. Only
      the agent tier's own credential may call these.
    name: Agent keys
paths:
  /organization/{organizationId}/reports/{reportId}:
    get:
      tags:
        - Reports
      summary: Get Report
      description: >-
        One report: the agent's reading of the interval, the changes to the
        counterparty's deals in it and the threads they were read from, and its
        deals' tasks and the messages about it since it was last reviewed.
      operationId: sonarGetReport
      parameters:
        - description: >-
            Also attach the drafts an open report holds, as a sparse present /
            future beside it. Off by default.
          in: query
          name: drafts
          schema:
            description: >-
              Also attach the drafts an open report holds, as a sparse present /
              future beside it. Off by default.
            type: boolean
        - in: path
          name: organizationId
          required: true
          schema:
            $ref: '#/components/schemas/UuidUUID'
        - in: path
          name: reportId
          required: true
          schema:
            $ref: '#/components/schemas/UuidUUID'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SonarReportDetailView'
          description: OK
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrResponse'
          description: Internal Server Error
components:
  schemas:
    UuidUUID:
      examples:
        - 248df4b7-aa70-47b8-a036-33ac447e668d
      format: uuid
      type: string
    SonarReportDetailView:
      properties:
        activity:
          $ref: '#/components/schemas/SonarReportActivityView'
        budgets:
          description: >-
            How full each budgeted text of the report is, in characters. A size
            to keep it to, never enforced.
          items:
            $ref: '#/components/schemas/SonarFieldBudget'
          type: array
        counterparty:
          $ref: '#/components/schemas/SonarNameRef'
        counterpartyId:
          $ref: '#/components/schemas/UuidUUID'
          description: >-
            Who the report is about: the counterparty, on a counterparty report;
            who its deal is with now, on a call briefing about one.
        createdAt:
          format: date-time
          type: string
        decidedAt:
          description: >-
            When it was marked reviewed, or when the log settled its last draft:
            the counterparty's checkpoint, which the next report's changes run
            from.
          format: date-time
          type:
            - 'null'
            - string
        decidedBy:
          $ref: '#/components/schemas/UuidUUID'
        decider:
          $ref: '#/components/schemas/SonarNameRef'
        engagement:
          $ref: '#/components/schemas/SonarNameRef'
        engagementId:
          $ref: '#/components/schemas/UuidUUID'
          description: The deal a call briefing's call is about, when it is about one.
        engagements:
          description: >-
            Derived, on a counterparty report: its deals, the ones its changes
            are on, the one changed last first. Empty on a report of another
            kind.
          items:
            $ref: '#/components/schemas/SonarReportEngagementView'
          type:
            - array
            - 'null'
        fields:
          $ref: '#/components/schemas/UtilsJSONB'
        id:
          $ref: '#/components/schemas/UuidUUID'
        keyContacts:
          description: >-
            Derived, with ?keyContacts=true: who carries the counterparty in the
            interval — the key member of each storyline the report lists, the
            one leading the most first — or the owners of its deals, most
            changes first, when its storylines name none of the tenant's people.
            Always the owners for a person who is no member of the organization:
            they do not see who its storylines name. Empty on a report of
            another kind.
          items:
            $ref: '#/components/schemas/SonarRefView'
          type: array
        meetingAddress:
          type: string
        mine:
          description: >-
            Derived, beside keyContacts: the signed-in person's contact owns one
            of the report's deals. Absent when the reader has no contact in this
            silo (the agent, an admin from outside).
          type:
            - 'null'
            - boolean
        movedAt:
          description: >-
            Derived: when the interval last moved, a change proposed or settled,
            a task of one of its deals written or a message about the
            counterparty or one of its deals.
          format: date-time
          type: string
        open:
          description: Still waiting on a person.
          type: boolean
        periodEnd:
          description: When its last change was made or proposed. Inclusive.
          format: date-time
          type: string
        periodStart:
          description: When the report's first change was made or proposed. Inclusive.
          format: date-time
          type: string
        type:
          $ref: '#/components/schemas/SonarReportType'
          description: >-
            The kind of report, and so which report card its fields answer to
            (GET /entity-cards, entity report).
        updatedAt:
          format: date-time
          type: string
      type: object
    RestErrResponse:
      properties:
        code:
          description: Application-specific error code.
          type: integer
        context:
          additionalProperties: {}
          description: Application context.
          type: object
        error:
          description: Error message.
          type: string
        status:
          description: Status text.
          type: string
      type: object
    SonarReportActivityView:
      properties:
        messages:
          description: >-
            The chat's messages about the counterparty or any of its deals since
            it was last reviewed, and their replies, oldest first. Always empty
            for a person who is no member of the organization: they do not read
            its chat.
          items:
            $ref: '#/components/schemas/SonarMessageView'
          type:
            - array
            - 'null'
        mutations:
          description: >-
            What changed on the counterparty's deals since it was last reviewed,
            newest first, each in the status it holds now: applied or reverted
            took effect; draft is about to change and waits on a person;
            rejected, stale and superseded are proposals that ended without
            happening. entityId is the deal; id is the mutation, for linking to
            it.
          items:
            $ref: '#/components/schemas/SonarMutationView'
          type:
            - array
            - 'null'
        since:
          description: >-
            When the counterparty was last reviewed: the checkpoint the changes
            that took effect run from. On its first report, the report's own
            start.
          format: date-time
          type: string
        tasks:
          description: >-
            The tasks of the report's deals that moved since the counterparty
            was last reviewed; engagementId says whose.
          items:
            $ref: '#/components/schemas/SonarTaskView'
          type:
            - array
            - 'null'
        threads:
          description: >-
            The threads that hold now an event one of the listed changes cites,
            last moved first. A change on a teammate's word cites none, and
            brings none. Each deal's own are its threadIds.
          items:
            $ref: '#/components/schemas/SonarThreadView'
          type:
            - array
            - 'null'
        truncated:
          description: A list hit its cap; what is here is the newest part of the interval.
          type: boolean
      type: object
    SonarFieldBudget:
      properties:
        budget:
          type: integer
        chars:
          type: integer
        field:
          type: string
      type: object
    SonarNameRef:
      properties:
        name:
          type: string
      type: object
    SonarReportEngagementView:
      properties:
        changes:
          description: How many of the report's changes are on this deal.
          type: integer
        drafts:
          $ref: '#/components/schemas/SonarEntityDraftsView'
        engagement:
          $ref: '#/components/schemas/SonarNameRef'
        engagementId:
          $ref: '#/components/schemas/UuidUUID'
        threadIds:
          description: >-
            On a report read whole: the threads this deal's changes cite, a
            subset of activity.threads.
          items:
            $ref: '#/components/schemas/UuidUUID'
          type: array
      type: object
    UtilsJSONB:
      additionalProperties: {}
      type: object
    SonarRefView:
      properties:
        id:
          $ref: '#/components/schemas/UuidUUID'
        name:
          type: string
      type: object
    SonarReportType:
      enum:
        - counterparty
        - call-briefing
        - team-call
      type: string
    SonarMessageView:
      properties:
        about:
          items:
            $ref: '#/components/schemas/SonarAboutView'
          type:
            - array
            - 'null'
        action:
          type: string
        agent:
          description: >-
            The name of the agent that said it. Null on a person's message, and
            on the shared agent's (sonar).
          type:
            - 'null'
            - string
        answer:
          $ref: '#/components/schemas/SonarMessageView'
        audience:
          $ref: '#/components/schemas/UuidUUID'
          description: >-
            The member whose private room (their You room) the message is in;
            null in the team room.
        audienceUser:
          $ref: '#/components/schemas/SonarAudienceView'
        createdAt:
          format: date-time
          type: string
        id:
          $ref: '#/components/schemas/UuidUUID'
        kind:
          type: string
        mine:
          description: >-
            Derived, beside owner: the signed-in person's contact is the owner.
            Absent when there is no owner, or the reader has no contact in this
            silo.
          type:
            - 'null'
            - boolean
        owner:
          $ref: '#/components/schemas/SonarRefView'
          description: >-
            Derived, on a question read through GET /messages: the one of ours
            it waits on, from what it is about (the senders of its events, the
            members behind the messages a change it names cites, the key member
            of its threads or of the threads holding its events). Absent when
            none of these names one of ours. It routes, and limits nobody:
            anyone may answer.
        payload:
          $ref: '#/components/schemas/SonarMessagePayload'
          description: >-
            What the message says, by kind. A person's text the log wrote as
            they corrected the agent's work (undid it, changed what it set,
            wrote over its proposal, approved it with their own values, rejected
            it with a reason) carries correction: log (the log's words about
            what they did) or reason (their reason for the rejection, in their
            own words). Nobody posts one.
        re:
          $ref: '#/components/schemas/SonarMessageView'
        refId:
          $ref: '#/components/schemas/UuidUUID'
        user:
          $ref: '#/components/schemas/SonarAuthorView'
        userId:
          $ref: '#/components/schemas/UuidUUID'
      type: object
    SonarMutationView:
      properties:
        allowance:
          type: string
        allowedBy:
          $ref: '#/components/schemas/UuidUUID'
        allower:
          $ref: '#/components/schemas/SonarNameRef'
        amended:
          items:
            type: string
          type: array
        causedBy:
          $ref: '#/components/schemas/UuidUUID'
        changedAt:
          format: date-time
          type: string
        changes:
          $ref: '#/components/schemas/UtilsJSONB'
        createdAt:
          format: date-time
          type: string
        decidedAt:
          format: date-time
          type:
            - 'null'
            - string
        decidedBy:
          $ref: '#/components/schemas/UuidUUID'
        decider:
          $ref: '#/components/schemas/SonarNameRef'
        entity:
          $ref: '#/components/schemas/SonarNameRef'
        entityId:
          $ref: '#/components/schemas/UuidUUID'
        entityType:
          type: string
        evidence:
          $ref: '#/components/schemas/SonarEvidence'
        heldByAgent:
          type: boolean
        id:
          $ref: '#/components/schemas/UuidUUID'
        mine:
          description: >-
            Derived, beside owner: the signed-in person's contact is the owner.
            Absent when there is no owner, or the reader has no contact in this
            silo.
          type:
            - 'null'
            - boolean
        op:
          type: string
        owner:
          $ref: '#/components/schemas/SonarRefView'
          description: >-
            Derived, on GET /mutations/drafts: the one of ours this draft waits
            on, from the senders of the events it cites, else the member behind
            a message it cites, else the key member of the threads holding those
            events. A person's own draft (source human) waits on its author. For
            a person who is no member of the organization only that: they read
            none of what the rest is worked out from. Absent when none of these
            names one of ours. It routes, and limits nobody: anyone may decide
            the draft.
        proposal:
          $ref: '#/components/schemas/UtilsJSONB'
        rationale:
          type: string
        reason:
          type: string
        refs:
          additionalProperties:
            $ref: '#/components/schemas/SonarEntityRefView'
          type: object
        related:
          $ref: '#/components/schemas/SonarNameRef'
        relatedId:
          $ref: '#/components/schemas/UuidUUID'
        revertedBy:
          $ref: '#/components/schemas/UuidUUID'
        reverts:
          $ref: '#/components/schemas/UuidUUID'
        rule:
          $ref: '#/components/schemas/SonarNameRef'
        ruleId:
          $ref: '#/components/schemas/UuidUUID'
        source:
          type: string
        status:
          type: string
        supersededBy:
          $ref: '#/components/schemas/UuidUUID'
        user:
          $ref: '#/components/schemas/SonarNameRef'
        userId:
          $ref: '#/components/schemas/UuidUUID'
      type: object
    SonarTaskView:
      properties:
        createdAt:
          format: date-time
          type: string
        description:
          type: string
        engagement:
          $ref: '#/components/schemas/SonarEngagementNameRef'
        engagementId:
          $ref: '#/components/schemas/UuidUUID'
        fields:
          $ref: '#/components/schemas/UtilsJSONB'
        id:
          $ref: '#/components/schemas/UuidUUID'
        owner:
          $ref: '#/components/schemas/SonarContactNameRef'
        ownerId:
          $ref: '#/components/schemas/UuidUUID'
        plan:
          $ref: '#/components/schemas/SafetextProse'
          description: >-
            How the task would get done, in free text: the steps, and any
            content they use. Absent when there is none.
        status:
          $ref: '#/components/schemas/SonarTaskStatus'
        statusSince:
          description: >-
            Derived — when the task last became this status; its creation if it
            never changed.
          format: date-time
          type: string
      type: object
    SonarThreadView:
      properties:
        channels:
          items:
            type: string
          type: array
        createdAt:
          format: date-time
          type: string
        id:
          $ref: '#/components/schemas/UuidUUID'
        summary:
          type: string
        title:
          type: string
        updatedAt:
          format: date-time
          type: string
      type: object
    SonarEntityDraftsView:
      properties:
        disposition:
          type: string
        future:
          $ref: '#/components/schemas/UtilsJSONB'
        present:
          $ref: '#/components/schemas/UtilsJSONB'
        proposals:
          items:
            $ref: '#/components/schemas/SonarMutationView'
          type:
            - array
            - 'null'
        refs:
          additionalProperties:
            $ref: '#/components/schemas/SonarEntityRefView'
          type: object
      type: object
    SonarAboutView:
      properties:
        entity:
          $ref: '#/components/schemas/SonarNameRef'
        id:
          $ref: '#/components/schemas/UuidUUID'
        type:
          type: string
      type: object
    SonarAudienceView:
      properties:
        email:
          type: string
        id:
          $ref: '#/components/schemas/UuidUUID'
        name:
          type: string
      type: object
    SonarMessagePayload:
      properties:
        call:
          type: string
        choices:
          items:
            type: string
          type: array
        correction:
          $ref: '#/components/schemas/SonarMessageCorrection'
        emoji:
          type: string
        error:
          type: string
        expects:
          $ref: '#/components/schemas/SonarAnswerForm'
        mentions:
          items:
            type: string
          type: array
        ok:
          type:
            - 'null'
            - boolean
        options:
          items:
            type: string
          type: array
        state:
          $ref: '#/components/schemas/SonarAgentState'
        text:
          type: string
        tool:
          type: string
        turnId:
          type: string
        via:
          $ref: '#/components/schemas/SonarMessageVia'
        'yes':
          type:
            - 'null'
            - boolean
      type: object
    SonarAuthorView:
      properties:
        email:
          type: string
        name:
          type: string
      type: object
    SonarEvidence:
      items:
        $ref: '#/components/schemas/SonarEventRef'
      type:
        - array
        - 'null'
    SonarEntityRefView:
      properties:
        kind:
          type: string
        name:
          type: string
      type: object
    SonarEngagementNameRef:
      properties:
        name:
          type: string
        stage:
          type: string
      type: object
    SonarContactNameRef:
      properties:
        addresses:
          $ref: '#/components/schemas/SonarContactAddresses'
        name:
          type: string
      type: object
    SafetextProse:
      maxLength: 20000
      pattern: ^(?:[^<\p{C}]|[\t\n\r‍]|<+(?:[^<A-Za-z/!?\p{C}]|[\t\n\r‍]|$))*$
      type: string
    SonarTaskStatus:
      enum:
        - todo
        - wip
        - blocked
        - done
        - cancelled
      type: string
    SonarMessageCorrection:
      enum:
        - log
        - reason
      type: string
    SonarAnswerForm:
      enum:
        - open
        - yes_no
        - select_one
        - select_many
      type: string
    SonarAgentState:
      enum:
        - thinking
        - compacting
        - alarm
        - error
        - stopped
      type: string
    SonarMessageVia:
      properties:
        service:
          type: string
      type: object
    SonarEventRef:
      properties:
        eventId:
          $ref: '#/components/schemas/UuidUUID'
        messageId:
          $ref: '#/components/schemas/UuidUUID'
        quotes:
          items:
            type: string
          type: array
        sealed:
          type: string
        stance:
          type: string
      type: object
    SonarContactAddresses:
      items:
        $ref: '#/components/schemas/SonarContactAddress'
      type:
        - array
        - 'null'
    SonarContactAddress:
      properties:
        kind:
          type: string
        value:
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      description: A Turtle API key (sk_...) as a bearer token.
      scheme: bearer
      type: http
    apiKeyAuth:
      description: A Turtle API key (sk_...).
      in: header
      name: X-API-Key
      type: apiKey

````

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