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

# Enroll a contact in a Reply.io sequence with dynamic content generation.

> Enroll a contact in a Reply.io sequence with dynamic content generation.

    Works even if the contact does NOT yet have a Pipedrive record — the
    provided overrides (first_name/last_name/company/title/linkedin_url/phone)
    are used to synthesize a person object for the content generator.

    Required:
      sequence_id: Lowercase slug (e.g. "healthcare-cold"). Must match a Reply
                   campaign name AND have a corresponding playbook in Spaces
                   (docs/spaces/sequences/<slug>.yaml) unless `sequence` is
                   passed inline.
      email:       Target email address.

    Optional overrides (used in content generation when no PD record exists):
      first_name, last_name, company, title, linkedin_url, phone

    Optional rich config:
      sequence:  Full sequence playbook dict (summary, steps, voice, etc.).
                 If omitted, loaded from Spaces by slug. See workflows/sequence.py
                 module docstring for the schema.
      campaign:  Campaign metadata {summary, template_path, campaign_id} for UTM
                 tagging and prompt augmentation.
      ignore_duplicate: If true (default), Reply.io ignores duplicate-contact errors.

    Returns:
      {sequence_id, reply_campaign_id, email, generated_steps, reply: {...}}



## OpenAPI

````yaml /openapi/private/specs/mcp/sagescreen.yml post /tools/sequence_add
openapi: 3.1.0
info:
  title: SageScreen — MCP Tool Catalog
  description: >-
    Agent-callable tools exposed by the SageScreen MCP server at
    `https://mcp.sagescreen.net`.


    These are the same tools served over the Model Context Protocol; this
    reference documents their **REST** surface (`POST /tools/{name}`, body = the
    tool's arguments), which is what the playground below invokes. The live,
    machine-readable catalog is `GET /tools/list`.


    **This page is generated deterministically** from the server's tool registry
    (`apps/docs/scripts/generate_mcp_spec.py`), not hand-written and not
    AI-generated — it cannot drift from the shipped tools.


    All calls authenticate with the `X-Service-Token` header (or `?token=`).
  version: 1.0.0
servers:
  - url: https://mcp.sagescreen.net
    description: Production MCP server
security:
  - serviceToken: []
  - tokenQuery: []
tags:
  - name: Agents
  - name: Contact Push
  - name: Image Generation
  - name: Other
  - name: Productlane
  - name: Reply.io
  - name: Sequences
  - name: Spaces
  - name: WordPress
paths:
  /tools/sequence_add:
    post:
      tags:
        - Sequences
      summary: Enroll a contact in a Reply.io sequence with dynamic content generation.
      description: |-
        Enroll a contact in a Reply.io sequence with dynamic content generation.

            Works even if the contact does NOT yet have a Pipedrive record — the
            provided overrides (first_name/last_name/company/title/linkedin_url/phone)
            are used to synthesize a person object for the content generator.

            Required:
              sequence_id: Lowercase slug (e.g. "healthcare-cold"). Must match a Reply
                           campaign name AND have a corresponding playbook in Spaces
                           (docs/spaces/sequences/<slug>.yaml) unless `sequence` is
                           passed inline.
              email:       Target email address.

            Optional overrides (used in content generation when no PD record exists):
              first_name, last_name, company, title, linkedin_url, phone

            Optional rich config:
              sequence:  Full sequence playbook dict (summary, steps, voice, etc.).
                         If omitted, loaded from Spaces by slug. See workflows/sequence.py
                         module docstring for the schema.
              campaign:  Campaign metadata {summary, template_path, campaign_id} for UTM
                         tagging and prompt augmentation.
              ignore_duplicate: If true (default), Reply.io ignores duplicate-contact errors.

            Returns:
              {sequence_id, reply_campaign_id, email, generated_steps, reply: {...}}
      operationId: sequence_add
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                sequence_id:
                  title: Sequence Id
                  type: string
                email:
                  title: Email
                  type: string
                first_name:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  title: First Name
                last_name:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  title: Last Name
                company:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  title: Company
                title:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  title: Title
                linkedin_url:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  title: Linkedin Url
                phone:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  title: Phone
                sequence:
                  anyOf:
                    - type: object
                      additionalProperties: true
                    - type: 'null'
                  default: null
                  title: Sequence
                campaign:
                  anyOf:
                    - type: object
                      additionalProperties: true
                    - type: 'null'
                  default: null
                  title: Campaign
                ignore_duplicate:
                  anyOf:
                    - type: boolean
                    - type: 'null'
                  default: true
                  title: Ignore Duplicate
              required:
                - sequence_id
                - email
              type: object
      responses:
        '200':
          description: >-
            Tool result. The shape is tool-specific; most tools return a JSON
            object, some a `{"result": ...}` envelope.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Bad arguments (unknown kwargs, malformed JSON body).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Unknown tool name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Tool raised an error during execution.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
        detail:
          type: string
          description: Optional additional context.
      required:
        - error
  responses:
    Unauthorized:
      description: Missing or invalid service token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Unauthorized
  securitySchemes:
    serviceToken:
      type: apiKey
      in: header
      name: X-Service-Token
    tokenQuery:
      type: apiKey
      in: query
      name: token

````