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

# Import Excalidraw Architecture Diagram



## OpenAPI

````yaml /openapi.json post /api/v1/architecture/{design_id}/diagrams/import-excalidraw
openapi: 3.1.0
info:
  description: >-
    Okto Pulse REST API schema generated from okto-pulse-core 0.2.0 source for
    docs.oktolabs.ai.
  title: Okto Pulse
  version: 0.2.0
servers: []
security: []
paths:
  /api/v1/architecture/{design_id}/diagrams/import-excalidraw:
    post:
      tags:
        - architecture
      summary: Import Excalidraw Architecture Diagram
      operationId: >-
        import_excalidraw_architecture_diagram_api_v1_architecture__design_id__diagrams_import_excalidraw_post
      parameters:
        - in: path
          name: design_id
          required: true
          schema:
            title: Design Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExcalidrawImportRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchitectureDesignResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    ExcalidrawImportRequest:
      description: Import an Excalidraw scene into an architecture design.
      properties:
        change_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Change Summary
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        diagram_type:
          default: other
          enum:
            - context
            - container
            - component
            - sequence
            - deployment
            - data_flow
            - other
          title: Diagram Type
          type: string
        order_index:
          default: 0
          title: Order Index
          type: integer
        payload:
          additionalProperties: true
          title: Payload
          type: object
        replace_diagram_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Replace Diagram Id
        title:
          maxLength: 255
          minLength: 1
          title: Title
          type: string
      required:
        - title
        - payload
      title: ExcalidrawImportRequest
      type: object
    ArchitectureDesignResponse:
      description: Full Architecture Design response.
      properties:
        board_id:
          title: Board Id
          type: string
        breaking_change_flag:
          default: false
          title: Breaking Change Flag
          type: boolean
        created_at:
          format: date-time
          title: Created At
          type: string
        created_by:
          title: Created By
          type: string
        diagrams:
          items:
            $ref: '#/components/schemas/ArchitectureDiagram'
          title: Diagrams
          type: array
        entities:
          items:
            $ref: '#/components/schemas/ArchitectureEntity'
          title: Entities
          type: array
        global_description:
          minLength: 1
          title: Global Description
          type: string
        id:
          title: Id
          type: string
        interfaces:
          items:
            $ref: '#/components/schemas/ArchitectureInterface'
          title: Interfaces
          type: array
        parent_id:
          title: Parent Id
          type: string
        parent_type:
          enum:
            - ideation
            - refinement
            - spec
            - card
          title: Parent Type
          type: string
        requires_arch_review:
          default: false
          title: Requires Arch Review
          type: boolean
        source_design_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Design Id
        source_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Ref
        source_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Source Version
        stale:
          default: false
          title: Stale
          type: boolean
        title:
          maxLength: 500
          minLength: 1
          title: Title
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
        version:
          title: Version
          type: integer
      required:
        - title
        - global_description
        - id
        - board_id
        - parent_type
        - parent_id
        - version
        - created_by
        - created_at
        - updated_at
      title: ArchitectureDesignResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ArchitectureDiagram:
      description: Diagram metadata embedded in the architecture envelope.
      properties:
        adapter_payload:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: string
            - type: 'null'
          title: Adapter Payload
        adapter_payload_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Adapter Payload Ref
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Hash
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        diagram_type:
          default: other
          enum:
            - context
            - container
            - component
            - sequence
            - deployment
            - data_flow
            - other
          title: Diagram Type
          type: string
        format:
          default: raw
          enum:
            - excalidraw_json
            - mermaid
            - svg
            - plantuml
            - c4
            - raw
          title: Format
          type: string
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        order_index:
          default: 0
          title: Order Index
          type: integer
        preview_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Preview Ref
        render_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Render Metadata
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
        source_diagram_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Diagram Id
        source_payload_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Payload Ref
        title:
          maxLength: 255
          minLength: 1
          title: Title
          type: string
      required:
        - title
      title: ArchitectureDiagram
      type: object
    ArchitectureEntity:
      description: Structured architecture entity description.
      properties:
        boundaries:
          anyOf:
            - type: string
            - type: 'null'
          title: Boundaries
        entity_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Type
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        name:
          maxLength: 255
          minLength: 1
          title: Name
          type: string
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        relationships:
          items:
            type: string
          title: Relationships
          type: array
        responsibility:
          anyOf:
            - type: string
            - type: 'null'
          title: Responsibility
        technologies:
          items:
            type: string
          title: Technologies
          type: array
      required:
        - name
      title: ArchitectureEntity
      type: object
    ArchitectureInterface:
      description: Structured architecture interface or contract boundary.
      properties:
        contract_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Contract Type
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        direction:
          anyOf:
            - type: string
            - type: 'null'
          title: Direction
        endpoint:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint
        error_contract:
          anyOf:
            - additionalProperties: true
              type: object
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: string
            - type: 'null'
          title: Error Contract
        event_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Event Schema
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        name:
          maxLength: 255
          minLength: 1
          title: Name
          type: string
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        participants:
          items:
            type: string
          title: Participants
          type: array
        protocol:
          anyOf:
            - type: string
            - type: 'null'
          title: Protocol
        request_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Request Schema
        response_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Response Schema
        schema_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Schema Ref
      required:
        - name
      title: ArchitectureInterface
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        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:
    HTTPBearer:
      scheme: bearer
      type: http

````