> ## 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 nuova sessione Devin. Puoi anche specificare parametri facoltativi come l'ID dello snapshot e la visibilità della sessione.

# Crea una nuova sessione



## OpenAPI

````yaml it/v1-openapi.yaml POST /v1/sessions
openapi: 3.1.0
info:
  description: Devin v1 API con API Keys personali e di servizio
  title: Devin API v1
  version: 1.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v1/sessions:
    post:
      summary: Crea una nuova sessione
      description: >-
        Crea una nuova sessione Devin con il prompt e le opzioni di
        configurazione indicati.
      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: Risposta corretta
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Errore di validazione
components:
  schemas:
    CreateSessionParams:
      properties:
        idempotent:
          default: false
          title: Idempotent
          type: boolean
        knowledge_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Elenco degli ID di Knowledge da utilizzare. Se è None, utilizza
            tutta la Knowledge. Se è una lista vuota, non utilizzare alcuna
            Knowledge.
          title: Knowledge Ids
        max_acu_limit:
          anyOf:
            - exclusiveMinimum: 0
              type: integer
            - type: 'null'
          description: Limite massimo di ACU, deve essere 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: >-
            Elenco di ID di secret da utilizzare. Se è None, vengono usati tutti
            i secret. Se è una lista vuota, non viene usato alcun secret.
          title: Secret Ids
        session_secrets:
          anyOf:
            - items:
                $ref: '#/components/schemas/SessionSecretInput'
              type: array
            - type: 'null'
          description: >-
            Elenco di segreti specifici della sessione da utilizzare. Questi
            segreti sono disponibili solo in questa sessione e non vengono
            archiviati tra i segreti dell’organizzazione.
          title: Session Secrets
        snapshot_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Snapshot Id
        structured_output_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Schema JSON (Draft 7) per convalidare l’output strutturato.
            Dimensione massima 64 KB. Deve essere autosufficiente (nessun $ref
            esterno).
          title: Structured Output Schema
        tags:
          anyOf:
            - items:
                type: string
              maxItems: 50
              type: array
            - type: 'null'
          description: Elenco di tag da aggiungere alla sessione.
          title: Tags
        title:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Titolo personalizzato per la sessione. Se è None, il titolo verrà
            generato automaticamente.
          title: Title
        unlisted:
          default: false
          title: Unlisted
          type: boolean
      required:
        - prompt
      title: CreateSessionParams
      type: object
    CreateSessionResponse:
      description: >-
        Corpo della risposta restituito quando una sessione è stata creata
        correttamente.
      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: Modello di input per un segreto di sessione fornito tramite 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: Chiave API personale (apk_user_\*) o chiave API di servizio (apk_\*)
      scheme: bearer
      type: http

````