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

> Crea una nueva sesión de Devin. Puedes especificar opcionalmente parámetros como el ID de la instantánea y la visibilidad de la sesión.

# Crear una nueva sesión



## OpenAPI

````yaml es/v1-openapi.yaml POST /v1/sessions
openapi: 3.1.0
info:
  description: Devin v1 API con API keys personales y de servicio
  title: Devin API v1
  version: 1.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v1/sessions:
    post:
      summary: Crear una nueva sesión
      description: >-
        Crea una nueva sesión de Devin con el prompt y las opciones de
        configuración indicados.
      operationId: create_session_endpoint_v1_sessions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSessionParams'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSessionResponse'
          description: Respuesta satisfactoria
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Error de validación
components:
  schemas:
    CreateSessionParams:
      properties:
        idempotent:
          default: false
          title: Idempotent
          type: boolean
        knowledge_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Lista de IDs de Knowledge que se usarán. Si es None, se usa todo
            Knowledge. Si es una lista vacía, no se usa Knowledge.
          title: Knowledge Ids
        max_acu_limit:
          anyOf:
            - exclusiveMinimum: 0
              type: integer
            - type: 'null'
          description: Límite máximo de ACU; debe ser un valor positivo
          title: Max Acu Limit
        playbook_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Playbook Id
        prompt:
          title: Prompt
          type: string
        secret_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Lista de identificadores de secretos que se usarán. Si es None, se
            usan todos los secretos. Si es una lista vacía, no se usa ningún
            secreto.
          title: Secret Ids
        session_secrets:
          anyOf:
            - items:
                $ref: '#/components/schemas/SessionSecretInput'
              type: array
            - type: 'null'
          description: >-
            Lista de secretos específicos de la sesión que se usarán. Estos
            secretos solo están disponibles en esta sesión y no se almacenan
            entre los secretos de la organización.
          title: Session Secrets
        snapshot_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Snapshot Id
        structured_output_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            JSON Schema (Draft 7) para validar la salida estructurada. Máx. 64
            KB. Debe ser autocontenido (sin $ref externos).
          title: Structured Output Schema
        tags:
          anyOf:
            - items:
                type: string
              maxItems: 50
              type: array
            - type: 'null'
          description: Lista de etiquetas para agregar a la sesión.
          title: Tags
        title:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Título personalizado de la sesión. Si es `None`, se generará un
            título automáticamente.
          title: Title
        unlisted:
          default: false
          title: Unlisted
          type: boolean
      required:
        - prompt
      title: CreateSessionParams
      type: object
    CreateSessionResponse:
      description: >-
        Cuerpo de la respuesta que se devuelve cuando una sesión se crea
        correctamente.
      properties:
        is_new_session:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is New Session
        session_id:
          title: Session Id
          type: string
        url:
          title: Url
          type: string
      required:
        - session_id
        - url
      title: CreateSessionResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SessionSecretInput:
      description: >-
        Modelo de entrada para un secreto de sesión proporcionado mediante la
        API.
      properties:
        key:
          maxLength: 256
          minLength: 1
          title: Key
          type: string
        sensitive:
          default: true
          title: Sensitive
          type: boolean
        value:
          maxLength: 65536
          title: Value
          type: string
      required:
        - key
        - value
      title: SessionSecretInput
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: Clave de API personal (apk_user_\*) o clave de API de servicio (apk_\*)
      scheme: bearer
      type: http

````