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

# Start pulling an agent's production calls



## OpenAPI

````yaml openapi.json POST /v1/monitoring/start
openapi: 3.1.0
info:
  title: Egma Platform API
  version: 1.0.0
  description: >-
    The customer-facing HTTP interface used by Egma's web app, CLI, and outside
    clients.
servers:
  - url: https://app.egma.ai
security: []
paths:
  /v1/monitoring/start:
    post:
      tags:
        - Monitoring
      summary: Start pulling an agent's production calls
      operationId: startMonitoring
      parameters:
        - name: projectId
          in: query
          required: false
          schema:
            type: string
            minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agentPlatform:
                  type: string
                  enum:
                    - retell
                apiKey:
                  type: string
                  description: >-
                    A Retell key for new agents. It may be omitted only when
                    every watch entry names an existing agent that already
                    stores its monitoring key.
                watch:
                  type: array
                  items:
                    type: object
                    properties:
                      platformAgentId:
                        type: string
                      name:
                        type: string
                      agentId:
                        type: string
                        minLength: 1
                    required:
                      - platformAgentId
                    additionalProperties: false
              required:
                - agentPlatform
                - watch
              additionalProperties: false
      responses:
        '200':
          description: >-
            What each ticked platform agent turned out to be: the ones now
            pulling their production calls, and the ones refused.
          content:
            application/json:
              schema:
                type: object
                properties:
                  watching:
                    type: array
                    items:
                      type: object
                      properties:
                        agentId:
                          type: string
                          minLength: 1
                        agentName:
                          type: string
                        platformAgentId:
                          type: string
                        created:
                          type: boolean
                        pullProductionCalls:
                          type: boolean
                      required:
                        - agentId
                        - agentName
                        - platformAgentId
                        - created
                        - pullProductionCalls
                      additionalProperties: false
                  refused:
                    type: array
                    items:
                      type: object
                      properties:
                        platformAgentId:
                          type: string
                        reason:
                          type: string
                          enum:
                            - contested
                            - name_taken
                            - not_found
                            - archived
                        message:
                          type: string
                      required:
                        - platformAgentId
                        - reason
                        - message
                      additionalProperties: false
                required:
                  - watching
                  - refused
                additionalProperties: false
        '400':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '401':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '403':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '422':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '429':
          description: The request rate limit was reached.
          headers:
            Retry-After:
              description: Seconds to wait before trying again.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '503':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
      security:
        - bearerAuth: []
        - sessionCookie: []
components:
  schemas:
    Refusal:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
      required:
        - error
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Egma API key.
    sessionCookie:
      type: apiKey
      in: cookie
      name: egma.session_token
      description: >-
        The browser session cookie issued by Egma. HTTPS deployments add the
        standard __Secure- prefix.

````