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

# Get a brief run

> Reads a run started with `POST /brief` or `POST /brief/bulk`: how many briefs are written, failed and pending, and each finished contact's hook, drafts, red flags and CRM save. `status` is `running` while a contact is pending.

A run is read by the API key that started it, and kept **7 days**.

Rate limited to **60 requests per minute**.



## OpenAPI

````yaml GET /brief/runs/{id}
openapi: 3.1.0
info:
  title: OpenAPI Lonescale
  description: A sample API for Lonescale
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://public-api.lonescale.com
security:
  - ApiKeyAuth: []
paths:
  /brief/runs/{id}:
    get:
      description: >-
        Reads a run started with `POST /brief` or `POST /brief/bulk`: how many
        briefs are written, failed and pending, and each finished contact's
        hook, drafts, red flags and CRM save. `status` is `running` while a
        contact is pending.


        A run is read by the API key that started it, and kept **7 days**.


        Rate limited to **60 requests per minute**.
      parameters:
        - name: id
          in: path
          required: true
          description: The run id.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The run as it stands
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BriefRun'
              example:
                id: 9d2f6a54-1c1e-4f6b-8f0e-5a7c2b9e4d11
                status: running
                total: 2
                done: 1
                failed: 0
                pending: 1
                crm: hubspot
                created_at: '2026-11-20T15:02:30.000Z'
                results:
                  - index: 0
                    status: done
                    input:
                      crm_contact_id: '710432049398'
                    result:
                      hook:
                        line: She moved to CFO in March.
                        linkedin_fact: CFO at Acme since March 2026
                        crm_fact: null
                      outreach_messages:
                        email:
                          subject: consolidation at acme
                          body: |-
                            Hi Jane,

                            Congrats on the CFO role.

                            Yann
                        linkedin: |-
                          Jane,

                          Congrats on the CFO role at Acme.
                      red_flags: []
                      talking_points:
                        - Matches your CFO persona
                      crm_matched: true
                      contact_found_in_crm: true
                      crm_save:
                        status: saved
                        fields:
                          - ls_brief_subject
                          - ls_brief_body
                  - index: 1
                    status: pending
                    input:
                      linkedin_url: https://www.linkedin.com/in/john-roe
        '401':
          description: Invalid or missing authentication credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
              example:
                message: Invalid API Key
                error: Unauthorized
                statusCode: 401
        '404':
          description: Unknown run, expired, or started with another API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Brief run not found
                error: Not Found
                statusCode: 404
components:
  schemas:
    BriefRun:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - running
            - done
          description: '`running` while a contact is pending.'
        total:
          type: integer
        done:
          type: integer
        failed:
          type: integer
        pending:
          type: integer
        crm:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        results:
          type: array
          description: One entry per contact, in the order of the request.
          items:
            type: object
            properties:
              index:
                type: integer
              status:
                type: string
                enum:
                  - pending
                  - done
                  - failed
              input:
                type: object
                description: How the request named the person.
                properties:
                  crm_contact_id:
                    type: string
                  linkedin_url:
                    type: string
                  email:
                    type: string
                  full_name:
                    type: string
              error:
                type: string
                description: '`failed`: the reason.'
              result:
                allOf:
                  - $ref: '#/components/schemas/Brief'
                description: >-
                  `done`: the hook, the two drafts, the talking points, the red
                  flags and `crm_save`. A run started with `POST /brief` carries
                  the whole brief.
    AuthError:
      required:
        - message
        - error
        - statusCode
      type: object
      properties:
        message:
          type: string
          example: Invalid API Key
        error:
          type: string
          example: Unauthorized
        statusCode:
          type: integer
          example: 401
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    Brief:
      type: object
      description: The outreach brief of one person.
      properties:
        hook:
          type: object
          nullable: true
          description: Why write to this person now.
          properties:
            line:
              type: string
            linkedin_fact:
              type: string
              nullable: true
            crm_fact:
              type: string
              nullable: true
        outreach_messages:
          type: object
          properties:
            email:
              allOf:
                - $ref: '#/components/schemas/BriefDraftEmail'
              nullable: true
            linkedin:
              type: string
              nullable: true
              description: Plain text; paragraphs are separated by line breaks.
        account_context:
          type: string
          nullable: true
        relationship_history:
          type: string
          nullable: true
        target_person:
          type: string
          nullable: true
        pain_points:
          type: array
          items:
            type: string
        talking_points:
          type: array
          items:
            type: string
        questions_to_ask:
          type: array
          items:
            type: string
        red_flags:
          type: array
          items:
            type: string
          description: >-
            What changes how to approach: an open deal held by a colleague, a
            lost deal, an open support ticket.
        crm_matched:
          type: boolean
          description: The account was found in the CRM.
        contact_found_in_crm:
          type: boolean
          description: The person was found in the CRM.
        crm_save:
          $ref: '#/components/schemas/BriefCrmSave'
        crm_context:
          type: object
          description: >-
            The deals, tickets and recent activities of the account, as
            structured data.
        metadata:
          type: object
          properties:
            company_name:
              type: string
              nullable: true
            activity_count:
              type: integer
            last_touch:
              type: string
              nullable: true
            truncated:
              type: boolean
    BriefDraftEmail:
      type: object
      properties:
        subject:
          type: string
        body:
          type: string
          description: Plain text; paragraphs are separated by line breaks.
        template:
          type: string
          description: >-
            The email template the draft follows, when your organisation keeps
            several.
    BriefCrmSave:
      type: object
      description: >-
        What happened to the email draft on the CRM record. Present only when an
        admin picked the fields to write to, in the Chrome extension settings.
      properties:
        status:
          type: string
          enum:
            - saved
            - failed
            - skipped
        fields:
          type: array
          items:
            type: string
          description: '`saved`: the CRM fields written.'
        reason:
          type: string
          description: >-
            `failed`: the CRM's reason. `skipped`: `not_in_crm` (the person has
            no record) or `no_email_draft`.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Provide your API key in the x-api-key header.

````

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