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

# Enviar un mensaje a una sesión

> Envía un mensaje a una sesión activa. La sesión se reanudará automáticamente si está suspendida.

<Note>
  El `devin_id` es el identificador de la sesión con el prefijo `devin-` (por ejemplo, `devin-abc123`).
</Note>

<div id="permissions">
  ## Permisos
</div>

Requiere un usuario de servicio con el permiso `ManageAccountSessions` a nivel de Enterprise.


## OpenAPI

````yaml es/v3-openapi.yaml POST /v3/enterprise/sessions/{devin_id}/messages
openapi: 3.1.0
info:
  description: API de Devin v3 con autenticación mediante usuario de servicio y RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/sessions/{devin_id}/messages:
    post:
      tags:
        - sessions
      summary: Enviar un mensaje a una sesión
      description: >-
        Envía un mensaje a una sesión activa. La sesión se reanudará
        automáticamente si está suspendida.
      operationId: >-
        handle_post_account_session_message_v3_enterprise_sessions__devin_id__messages_post
      parameters:
        - description: 'ID de sesión de Devin (prefijo: devin-)'
          in: path
          name: devin_id
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            example: devin-abc123def456
            title: Devin Id
        - in: query
          name: org_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Org Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionMessageCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Respuesta correcta
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: No autorizado
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Prohibido
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: No encontrado
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflicto
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Contenido no procesable
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Demasiadas solicitudes
components:
  schemas:
    SessionMessageCreateRequest:
      properties:
        attachment_urls:
          anyOf:
            - items:
                format: uri
                maxLength: 2083
                minLength: 1
                type: string
              type: array
            - type: 'null'
          title: Attachment Urls
        message:
          title: Message
          type: string
        message_as_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Message As User Id
      required:
        - message
      title: SessionMessageCreateRequest
      type: object
    SessionResponse:
      properties:
        acus_consumed:
          title: Acus Consumed
          type: number
        automation_id:
          anyOf:
            - type: string
            - type: 'null'
          description: ID de la automatización que creó esta sesión, si existe.
          title: Automation Id
        category:
          anyOf:
            - enum:
                - bug_fixing
                - ci_cd_and_devops
                - code_quality_and_security
                - code_review
                - code_review_and_analysis
                - data_and_automation
                - documentation_and_content
                - feature_development
                - migrations_and_upgrades
                - other
                - production_investigation
                - refactoring_and_optimization
                - research_and_exploration
                - security
                - unit_test_generation
              type: string
            - type: 'null'
          description: >-
            La categoría de caso de uso asignada a la sesión, si se ha ejecutado
            la categorización. Solo se rellena en los endpoints GET/list.
          title: Category
        child_session_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Child Session Ids
        created_at:
          title: Created At
          type: integer
        devin_mode:
          anyOf:
            - enum:
                - normal
                - fast
                - lite
                - ultra
                - fusion
              type: string
            - type: 'null'
          description: >-
            El modo Agent de Devin con el que se creó la sesión, después de
            resolver los valores predeterminados de la organización/usuario y la
            herencia de la sesión principal. None cuando la sesión ejecuta una
            vista previa del agente que no tiene un equivalente de modo.
          title: Devin Mode
        is_archived:
          default: false
          title: Is Archived
          type: boolean
        org_id:
          title: Org Id
          type: string
        origin:
          anyOf:
            - enum:
                - webapp
                - slack
                - teams
                - api
                - linear
                - jira
                - automation
                - cli
                - desktop
                - code_scan
                - other
              type: string
            - type: 'null'
          description: El origen desde el que se creó la sesión.
          title: Origin
        parent_session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Session Id
        playbook_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Playbook Id
        pull_requests:
          items:
            $ref: '#/components/schemas/SessionPullRequest'
          title: Pull Requests
          type: array
        service_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Service User Id
        session_id:
          title: Session Id
          type: string
        status:
          enum:
            - new
            - claimed
            - running
            - exit
            - error
            - suspended
            - resuming
          title: Status
          type: string
        status_detail:
          anyOf:
            - enum:
                - working
                - waiting_for_user
                - waiting_for_approval
                - finished
                - inactivity
                - user_request
                - usage_limit_exceeded
                - out_of_credits
                - out_of_quota
                - no_quota_allocation
                - payment_declined
                - org_usage_limit_exceeded
                - user_usage_limit_exceeded
                - total_session_limit_exceeded
                - error
              type: string
            - type: 'null'
          description: >-
            Detalle adicional sobre el estado actual de la sesión. Cuando status
            es 'running': 'working' (trabajando activamente), 'waiting_for_user'
            (requiere intervención del usuario), 'waiting_for_approval' (a la
            espera de aprobación de la acción en modo seguro) o 'finished'
            (tarea completada). Cuando status es 'suspended': el motivo de la
            suspensión, como 'inactivity', 'user_request',
            'usage_limit_exceeded', 'out_of_credits', 'out_of_quota',
            'no_quota_allocation', 'payment_declined',
            'org_usage_limit_exceeded', 'user_usage_limit_exceeded',
            'total_session_limit_exceeded' o 'error'. Solo se rellena en los
            endpoints GET/list.
          title: Status Detail
        structured_output:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Salida estructurada validada de la sesión. Solo se incluye en
            endpoints GET/LIST.
          title: Structured Output
        subcategory:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            El nombre para mostrar de la subcategoría asignada a la sesión.
            'Other' cuando se establece una categoría, pero no se asignó ni se
            resolvió ninguna subcategoría. Solo se rellena en los endpoints
            GET/list.
          title: Subcategory
        tags:
          items:
            type: string
          title: Tags
          type: array
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        updated_at:
          title: Updated At
          type: integer
        url:
          title: Url
          type: string
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
      required:
        - session_id
        - url
        - status
        - tags
        - org_id
        - created_at
        - updated_at
        - acus_consumed
        - pull_requests
      title: SessionResponse
      type: object
    ProblemDetail:
      description: >-
        Cuerpo de error RFC 9457 application/problem+json para la API v3.


        detail se conserva del cuerpo heredado {"detail": ...} por
        compatibilidad con versiones anteriores; los

        otros miembros son adicionales. errors contiene errores de validación

        a nivel de campo (solo 422).
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: Explicación legible para humanos específica de esta ocurrencia.
          title: Detail
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: Errores de validación por campo (solo en respuestas 422).
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: Una referencia URI (la ruta de la solicitud) para esta ocurrencia.
          title: Instance
        status:
          description: El código de estado HTTP.
          title: Status
          type: integer
        title:
          description: Un breve resumen del tipo de problema, legible para humanos.
          title: Title
          type: string
        type:
          default: about:blank
          description: Una referencia URI que identifica el tipo de problema.
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    SessionPullRequest:
      properties:
        pr_state:
          anyOf:
            - type: string
            - type: 'null'
          title: Pr State
        pr_url:
          title: Pr Url
          type: string
      required:
        - pr_url
        - pr_state
      title: SessionPullRequest
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Credencial de usuario de servicio (prefijo: cog_)'
      scheme: bearer
      type: http

````

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