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

# Ingest a code SBOM



## OpenAPI

````yaml https://api.draftt.io/swagger post /code/sbom
openapi: 3.1.0
info:
  title: Draftt API
  version: 0.2.1
servers:
  - url: https://api.draftt.io/v1
security:
  - BearerAuth: []
paths:
  /code/sbom:
    post:
      tags:
        - Code
      summary: Ingest a code SBOM
      operationId: IngestCodeSbom
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestSbomRequest'
      responses:
        '202':
          description: SBOM accepted for ingestion
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    IngestSbomRequest:
      type: object
      properties:
        project:
          $ref: '#/components/schemas/SbomResourceIdentifyingInformation'
        repository:
          $ref: '#/components/schemas/SbomResourceIdentifyingInformation'
        sbom:
          type: object
        projectInformation:
          $ref: '#/components/schemas/SbomProjectInformation'
      required:
        - project
        - sbom
    SbomResourceIdentifyingInformation:
      type: object
      properties:
        identifier:
          type: string
        name:
          type: string
      required:
        - identifier
    SbomProjectInformation:
      type: object
      properties:
        programmingLanguage:
          type: string
        dependencyManager:
          type: string
        runtimeVersion:
          type: string
        tags:
          type: object
        customTags:
          type: object
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````