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

# Add context to a lead

> Adds context to a lead



## OpenAPI

````yaml post /leads/{leadId}/addContext
openapi: 3.0.1
info:
  title: AttentPublicAPI
  version: '2024-05-17T21:09:13Z'
servers:
  - url: https://api.attent.app/v1
security: []
paths:
  /leads/{leadId}/addContext:
    post:
      description: Adds context to a lead
      parameters:
        - name: leadId
          in: path
          required: true
          schema:
            type: string
          description: The ID of the lead to add context to.
      requestBody:
        description: The lead's context and an optional command.
        content:
          application/json:
            schema:
              type: object
              properties:
                context:
                  type: string
                  description: >-
                    Additional context to add to the lead. Good for adding
                    free-form text context or event details.
                additionalInfo:
                  type: object
                  description: >-
                    An key-value object containing structured data to store with
                    the lead. These will be stored as variables that can be
                    accessed in the flow-chart conversation prompts.
                command:
                  type: string
                  description: >-
                    An optional command for Apten regarding the lead. Currently
                    allowed commands are scheduling a follow up and sending a
                    message.
              example:
                context: The lead has scheduled a meeting with me on Monday at 2pm.
                additionalInfo:
                  favoriteColor: blue
                  favoriteFood: pizza
                command: Schedule a follow up for next week.
      responses:
        '200':
          description: Context has successfully been added to the lead.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Returns `"Success"` if the context was added successfully.
                example:
                  message: Success
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '403':
          $ref: '#/components/responses/403'
        '500':
          $ref: '#/components/responses/500'
      security:
        - api_key: []
components:
  responses:
    '403':
      description: Forbidden API key
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Forbidden
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Internal Server Error
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````