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

# Get what you need to reply

> Returns the latest saved messages and the revision you must send with a reply.

Permission: `inbox:read`



## OpenAPI

````yaml openapi/emailx.en.json GET /workspaces/{workspace_id}/conversations/{channel}/{conversation_id}/context
openapi: 3.0.3
info:
  title: Emailx API
  version: 1.0.0-beta
  description: >-
    Customer and agency integrations for Emailx. Beta access is operator-issued.
    The v1 beta supports bounded People CSV/XLSX imports, saved email-template
    settings, selected email generation with explicit AI-credit confirmation,
    exact-message approval, reviewed email activation for native scheduled
    sending, and explicitly confirmed inbox replies bound to saved context when
    host capabilities permit. Inbox context is bounded and may be incomplete or
    stale; no provider refresh occurs. Manual LinkedIn imports, reviewed
    activation and reviewed resume of paused campaigns are separate gated
    workflows. Reply drafts, knowledge, team, infrastructure quotes with hosted
    checkout and agency administration are covered by separate scopes. Signed
    webhooks report durable operation outcomes. It does not support immediate
    batches or direct card charges.
servers:
  - url: https://app.emailx.ai/api/v1
    description: Emailx application · access must be enabled
security: []
tags:
  - name: Getting started
  - name: Workspaces
  - name: Contacts
  - name: Templates
  - name: Campaigns
  - name: Inbox
  - name: Senders
  - name: Team
  - name: Analytics
  - name: Imports
  - name: Operations
  - name: Knowledge
  - name: Infrastructure
  - name: Agency
paths:
  /workspaces/{workspace_id}/conversations/{channel}/{conversation_id}/context:
    get:
      tags:
        - Inbox and replies
      summary: Get what you need to reply
      description: >-
        Returns the latest saved messages and the revision you must send with a
        reply.


        Permission: `inbox:read`
      operationId: get_api_reply_context
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: Emailx workspace (Clients) ID, not the agency workspace link ID.
        - name: channel
          in: path
          required: true
          schema:
            type: string
            enum:
              - email
              - linkedin
          description: Resource identifier.
        - name: conversation_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: Resource identifier.
      responses:
        '200':
          description: Success
          headers:
            X-Request-Id:
              schema:
                type: string
            Emailx-Api-Version:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: string
            X-RateLimit-Remaining:
              schema:
                type: string
            X-RateLimit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ReplyContext'
                required:
                  - data
              example:
                data:
                  channel: email
                  conversation_id: 789
                  sender:
                    id: 903
                    email: sender@example.com
                    name: Example sender
                    connection_method: gmail
                    active: true
                    needs_reauth: false
                    subclient_id: null
                    ready: true
                  recipient:
                    email: alex@example.com
                    thread_id: thread_example
                  messages:
                    - id: saved_1
                      role: lead
                      text: Thanks for the details.
                      time: '2026-11-01T09:00:00Z'
                  revision: >-
                    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                  source: sent_emails
                  freshness:
                    saved_at: '2026-11-01T09:00:00Z'
                    provider_checked: false
                  completeness:
                    complete_within_saved_source: true
                    provider_complete: false
                    truncated: false
                    message_limit: 40
        '400':
          description: Request error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid, expired or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope or write permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource missing or inaccessible
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict, concurrent request or uncertain original result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              schema:
                type: string
              description: Seconds to wait when present.
        '413':
          description: Request error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Request error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; respect Retry-After
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              schema:
                type: string
              description: Seconds to wait when present.
        '500':
          description: Request error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: API disabled, request storage unavailable or feature not enabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              schema:
                type: string
              description: Seconds to wait when present.
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            "https://app.emailx.ai/api/v1/workspaces/123/conversations/email/789/context"
            \
              -H "Authorization: Bearer $EMAILX_API_KEY"
        - lang: Python
          source: |-
            import os, requests

            response = requests.get(
                "https://app.emailx.ai/api/v1/workspaces/123/conversations/email/789/context",
                headers={"Authorization": "Bearer " + os.environ["EMAILX_API_KEY"]},
                timeout=30,
            )
            response.raise_for_status()
            print(response.json())
        - lang: JavaScript
          source: >-
            const response = await
            fetch("https://app.emailx.ai/api/v1/workspaces/123/conversations/email/789/context",
            {
              method: "GET",
              headers: { Authorization: `Bearer ${process.env.EMAILX_API_KEY}` },
              signal: AbortSignal.timeout(30000),
            });

            if (!response.ok) throw new Error(`Emailx: ${response.status}`);

            console.log(await response.json());
components:
  schemas:
    ReplyContext:
      type: object
      properties:
        channel:
          type: string
          enum:
            - email
            - linkedin
        conversation_id:
          type: integer
          minimum: 1
        sender:
          oneOf:
            - $ref: '#/components/schemas/EmailReplySender'
            - $ref: '#/components/schemas/LinkedinReplySender'
        recipient:
          oneOf:
            - $ref: '#/components/schemas/EmailReplyRecipient'
            - $ref: '#/components/schemas/LinkedinReplyRecipient'
        messages:
          type: array
          items:
            $ref: '#/components/schemas/InboxReplyMessage'
          maxItems: 40
        revision:
          type: string
          pattern: ^[a-f0-9]{64}$
        source:
          type: string
          enum:
            - conversation_outcomes
            - sent_emails
            - linkedin_message_history
        freshness:
          $ref: '#/components/schemas/ReplyContextFreshness'
        completeness:
          $ref: '#/components/schemas/ReplyContextCompleteness'
      required:
        - channel
        - conversation_id
        - sender
        - recipient
        - messages
        - revision
        - source
        - freshness
        - completeness
      description: >-
        Bounded saved conversation context. It performs no provider read;
        completeness is limited to the saved source and may be incomplete or
        stale.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            request_id:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
            - request_id
      required:
        - error
    EmailReplySender:
      type: object
      properties:
        id:
          type: integer
          minimum: 1
          nullable: true
        name:
          type: string
        active:
          type: boolean
        subclient_id:
          type: integer
          minimum: 1
          nullable: true
        ready:
          type: boolean
        email:
          type: string
        connection_method:
          type: string
          nullable: true
        needs_reauth:
          type: boolean
      required:
        - id
        - email
        - name
        - connection_method
        - active
        - needs_reauth
        - subclient_id
        - ready
    LinkedinReplySender:
      type: object
      properties:
        id:
          type: integer
          minimum: 1
          nullable: true
        name:
          type: string
        active:
          type: boolean
        subclient_id:
          type: integer
          minimum: 1
          nullable: true
        ready:
          type: boolean
        account_id:
          type: string
      required:
        - id
        - account_id
        - name
        - active
        - subclient_id
        - ready
    EmailReplyRecipient:
      type: object
      properties:
        email:
          type: string
        thread_id:
          type: string
      required:
        - email
        - thread_id
    LinkedinReplyRecipient:
      type: object
      properties:
        provider_id:
          type: string
        thread_id:
          type: string
      required:
        - provider_id
        - thread_id
    InboxReplyMessage:
      type: object
      properties:
        id:
          type: string
        role:
          type: string
          enum:
            - sender
            - lead
        text:
          type: string
          maxLength: 1200
        time:
          type: string
          nullable: true
      required:
        - id
        - role
        - text
        - time
    ReplyContextFreshness:
      type: object
      properties:
        saved_at:
          type: string
          nullable: true
        provider_checked:
          type: boolean
          enum:
            - false
      required:
        - saved_at
        - provider_checked
    ReplyContextCompleteness:
      type: object
      properties:
        complete_within_saved_source:
          type: boolean
        provider_complete:
          type: boolean
          enum:
            - false
        truncated:
          type: boolean
        message_limit:
          type: integer
          enum:
            - 40
      required:
        - complete_within_saved_source
        - provider_complete
        - truncated
        - message_limit
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        ex_test_ or ex_live_ key issued by an Emailx operator. Never use
        provider keys or session cookies.

````

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