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

# Create an artifact and immutable revision 1



## OpenAPI

````yaml /openapi.json post /api/orgs/{id}/artifacts
openapi: 3.1.0
info:
  title: Atoll API
  version: 1.0.0
  description: >-
    REST API for Atoll project management, agent collaboration, strategy
    tracking, and integrations.
servers:
  - url: https://atollhq.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Organizations
  - name: Projects
  - name: Project access
  - name: Issues
  - name: Issue details
  - name: Milestones
  - name: Artifacts
  - name: Strategy
  - name: Members and agents
  - name: Planning
  - name: Setup
  - name: Integrations and billing
  - name: Notifications and public
  - name: Private inbox
  - name: Agent executions
  - name: Human attention
paths:
  /api/orgs/{id}/artifacts:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Artifacts
      summary: Create an artifact and immutable revision 1
      operationId: create_artifact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArtifactCreateRequest'
      responses:
        '201':
          description: Artifact created atomically
          content:
            application/json:
              schema:
                type: object
                required:
                  - artifact
                  - revision
                  - links
                properties:
                  artifact:
                    $ref: '#/components/schemas/Artifact'
                  revision:
                    $ref: '#/components/schemas/ArtifactRevision'
                  links:
                    type: array
                    items:
                      $ref: '#/components/schemas/ArtifactLink'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    ArtifactCreateRequest:
      type: object
      additionalProperties: false
      required:
        - type
        - title
        - content
      properties:
        type:
          type: string
          enum:
            - prd
            - implementation_plan
            - test_plan
            - decision
            - research
            - release_checklist
        title:
          type: string
          minLength: 1
          maxLength: 200
          description: Artifact title; the server enforces a 200-byte UTF-8 limit.
        content:
          type: string
          minLength: 1
          maxLength: 262144
          description: >-
            Markdown or HTML source; the server enforces a 256 KiB UTF-8 limit
            before sanitization.
        content_format:
          type: string
          enum:
            - markdown
            - html
          default: markdown
        links:
          type: array
          maxItems: 20
          items:
            $ref: '#/components/schemas/ArtifactLinkRequest'
    Artifact:
      type: object
      additionalProperties: false
      required:
        - id
        - org_id
        - type
        - title
        - current_revision_id
        - created_by
        - created_at
        - updated_at
        - links
        - can_edit
        - can_unlink
      properties:
        id:
          type: string
          format: uuid
        org_id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - prd
            - implementation_plan
            - test_plan
            - decision
            - research
            - release_checklist
        title:
          type: string
          maxLength: 200
        current_revision_id:
          type: string
          format: uuid
          nullable: true
        created_by:
          type: string
          format: uuid
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        links:
          type: array
          items:
            $ref: '#/components/schemas/ArtifactLink'
        can_edit:
          type: boolean
          description: >-
            Whether the current member can create a revision or link the
            Artifact.
        can_unlink:
          type: boolean
          description: >-
            Whether the current member can remove a visible link from the
            Artifact.
    ArtifactRevision:
      type: object
      additionalProperties: false
      required:
        - id
        - org_id
        - artifact_id
        - revision_number
        - title_snapshot
        - content
        - content_format
        - content_digest
        - created_by
        - created_at
      properties:
        id:
          type: string
          format: uuid
        org_id:
          type: string
          format: uuid
        artifact_id:
          type: string
          format: uuid
        revision_number:
          type: integer
          minimum: 1
        title_snapshot:
          type: string
          minLength: 1
          maxLength: 200
        content:
          type: string
          maxLength: 262144
          description: Sanitized HTML content.
        content_format:
          type: string
          enum:
            - markdown
            - html
        content_digest:
          type: string
          pattern: ^[0-9a-f]{64}$
        created_by:
          type: string
          format: uuid
          nullable: true
        created_at:
          type: string
          format: date-time
    ArtifactLink:
      type: object
      additionalProperties: false
      required:
        - id
        - org_id
        - artifact_id
        - artifact_type
        - target_type
        - target_id
        - created_by
        - created_at
      properties:
        id:
          type: string
          format: uuid
        org_id:
          type: string
          format: uuid
        artifact_id:
          type: string
          format: uuid
        artifact_type:
          type: string
          enum:
            - prd
            - implementation_plan
            - test_plan
            - decision
            - research
            - release_checklist
        target_type:
          type: string
          enum:
            - issue
            - project
        target_id:
          type: string
          format: uuid
        created_by:
          type: string
          format: uuid
          nullable: true
        created_at:
          type: string
          format: date-time
    ArtifactLinkRequest:
      type: object
      additionalProperties: false
      required:
        - target_type
        - target_id
      properties:
        target_type:
          type: string
          enum:
            - issue
            - project
        target_id:
          type: string
          format: uuid
    Error:
      type: object
      description: >-
        Common error responses contain error. Shared missing-auth and
        unknown-API responses also contain a stable code.
      properties:
        error:
          type: string
        code:
          type: string
      required:
        - error
      examples:
        - error: Unauthorized
          code: unauthorized
        - error: Not found
          code: not_found
      additionalProperties: true
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Authenticated but not allowed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sk_atoll_<key>

````