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

# Attach Result Outreach Drafts

> Give an existing CRM contact a sequence on this result.

The edit endpoint can only rewrite drafts the run wrote, so a buyer who
reached the CRM some other way — imported, found by hand, or found by a
provider the run's people search could not reach — can never get drafts on
the result, and the run page lists them nowhere. This creates the slot:

* on the contact, a by-run entry for this run (and `latest`, unless a later
  run owns it) — the copy a campaign sends from;
* on the result, a line in the run copy of the sequences, and the person in
  `stakeholders_json`, so the run page shows them as a decision-maker.

Guarded to the company: the contact must be linked to the account this
result belongs to, so a sequence cannot be filed under the wrong company.
A person who already has drafts here is refused — edit those instead.

Contact first, then result, for the same reason as the edit endpoint.



## OpenAPI

````yaml /openapi-generated.json post /customer-intelligence/runs/{run_id}/results/{result_id}/outreach-drafts/attach
openapi: 3.1.0
info:
  title: anycrm-api
  version: 0.0.1
servers: []
security: []
tags:
  - name: Customer Intelligence
    description: >-
      Company research and ICP-fit scoring — create a research run, track its
      progress, and read back scored companies as leads.
  - name: Outreach
    description: >-
      The cold-email sending infrastructure — domains and mailboxes, over
      Primeforge and Warmforge.
  - name: AnyCard
    description: >-
      Authenticated CRUD for AnyCard, the org's digital business-card /
      lead-capture product.
  - name: AnyCard Events
    description: >-
      Event-attribution analytics for AnyCard — which captured leads converted,
      broken down by source, owner, and deal.
  - name: AnyCard Share Links
    description: >-
      Unauthenticated endpoints reached by anyone who scans a QR code or opens a
      shared AnyCard link.
  - name: AI
    description: >-
      A streaming (SSE) AI chat endpoint with account-commit actions it can take
      on the caller's behalf, and the job that fills every deal and account tab
      of an org.
  - name: Analytics Assistant
    description: >-
      The natural-language analytics assistant — a guarded text-to-SQL loop
      (SSE) that answers ad-hoc questions over the org's CRM data as a
      least-privilege, read-only database role.
  - name: Account Readiness
    description: >-
      Account Readiness Profiles — AI-scored signals on whether an account is
      ready for outreach or expansion, computed via a Temporal workflow.
  - name: Integrations
    description: >-
      Pipedream Connect — issuing connect tokens and managing the org's
      connected third-party accounts.
  - name: Feedback
    description: >-
      User-submitted platform feedback (bug reports, feature requests) — global,
      not scoped to one organization.
  - name: Public Media
    description: >-
      Unauthenticated image reads for publicly-embeddable assets (card photos,
      inline email images) — allowlisted by key shape; everything else in the
      storage bucket stays private.
  - name: Service Health
    description: Service liveness.
paths:
  /customer-intelligence/runs/{run_id}/results/{result_id}/outreach-drafts/attach:
    post:
      tags:
        - Customer Intelligence
      summary: Attach Result Outreach Drafts
      description: >-
        Give an existing CRM contact a sequence on this result.


        The edit endpoint can only rewrite drafts the run wrote, so a buyer who

        reached the CRM some other way — imported, found by hand, or found by a

        provider the run's people search could not reach — can never get drafts
        on

        the result, and the run page lists them nowhere. This creates the slot:


        * on the contact, a by-run entry for this run (and `latest`, unless a
        later
          run owns it) — the copy a campaign sends from;
        * on the result, a line in the run copy of the sequences, and the person
        in
          `stakeholders_json`, so the run page shows them as a decision-maker.

        Guarded to the company: the contact must be linked to the account this

        result belongs to, so a sequence cannot be filed under the wrong
        company.

        A person who already has drafts here is refused — edit those instead.


        Contact first, then result, for the same reason as the edit endpoint.
      operationId: >-
        attach_result_outreach_drafts_customer_intelligence_runs__run_id__results__result_id__outreach_drafts_attach_post
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            title: Run Id
        - name: result_id
          in: path
          required: true
          schema:
            type: string
            title: Result Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OutreachDraftsAttachBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Attach Result Outreach Drafts Customer Intelligence
                  Runs  Run Id  Results  Result Id  Outreach Drafts Attach Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    OutreachDraftsAttachBody:
      properties:
        contact_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Contact Id
        emails:
          items:
            $ref: '#/components/schemas/OutreachDraftEmail'
          type: array
          maxItems: 12
          minItems: 1
          title: Emails
      type: object
      required:
        - contact_id
        - emails
      title: OutreachDraftsAttachBody
      description: >-
        Give an existing CRM contact a sequence on a run result.


        The run only drafts for the people its own search found. A buyer who was

        added to the CRM another way (imported, found by hand, created before
        the

        run) has no slot to edit, so the edit endpoint can only answer 404. This

        creates that slot, with the authored sequence in it, in the same two
        places

        a generated one lives.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OutreachDraftEmail:
      properties:
        step:
          type: integer
          maximum: 12
          minimum: 1
          title: Step
        subject:
          type: string
          maxLength: 300
          minLength: 1
          title: Subject
        body:
          type: string
          maxLength: 8000
          minLength: 1
          title: Body
      type: object
      required:
        - step
        - subject
        - body
      title: OutreachDraftEmail
      description: One hand-edited draft in a stakeholder's sequence.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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