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

> ## Agent Instructions
> Checkfu is open source (https://github.com/checkfu/checkfu) and runs in the reader's own Cloudflare account. There is no shared hosted base URL: `checkfu deploy` prints the deployment's API URL (`https://<api-worker>.workers.dev` or the CHECKFU_API_DOMAIN hostname, exported as `CHECKFU_BASE_URL` for the CLI, SDK, and curl) and MCP URL (`.../mcp`). Local development serves the API on http://localhost:1337 and MCP on http://localhost:1338/mcp.
> Authenticated HTTP requests send the deployment's CHECKFU_API_KEY as `Authorization: Bearer $CHECKFU_API_KEY` (or `x-api-key`) and `Content-Type: application/json` for JSON bodies. Pass `Idempotency-Key` on retriable writes.
> Core workflow: create an Agent (`POST /v1/agents`) and an Environment (`POST /v1/environments`), create a Session that references both (`POST /v1/sessions`), send a `user.message` event (`POST /v1/sessions/{session_id}/events`), and follow `GET /v1/sessions/{session_id}/events/stream` until `session.status_idle`.
> Other resources: Memory stores (`/v1/memory_stores`), Files (`/v1/files`), Artifacts (`/v1/artifacts`), Vaults and credentials (`/v1/vaults`), Provider credentials (`/v1/provider_credentials`), Automations (`/v1/automations`), Inbound bindings (`/v1/inbound_bindings`), and Webhooks (`/v1/webhooks`). The deployment serves its OpenAPI 3.1 specification at `GET /openapi.json`.

# Publish an artifact

> Serve an artifact at a public address that anyone who has it can view. Publishing again changes the version served and keeps the address; after an unpublish, the next publish gets a new address. A retry with the same Idempotency-Key is not applied again, so it cannot undo a later unpublish; the same key with another version, or one used to unpublish, answers 409



## OpenAPI

````yaml /openapi.json post /v1/artifacts/{artifact_id}/publication
openapi: 3.1.0
info:
  title: Checkfu API
  version: 0.0.1
  description: >-
    Managed agents API for managing agents, environments, sessions, automations,
    artifacts, vaults, memory stores, and outbound webhooks.
servers: []
security: []
tags:
  - name: health
  - name: auth
    description: Check a credential
  - name: agents
    description: Create and manage versioned agent configurations
  - name: models
    description: Discover models for agent authoring
  - name: provider_credentials
  - name: inbound_bindings
  - name: inbound_deliveries
  - name: environments
    description: Create and manage environments where agents run
  - name: sessions
    description: Run agents in sessions and follow their events
  - name: automations
    description: Run agents on a schedule or on demand and inspect their runs
  - name: artifacts
    description: Manage artifacts
  - name: artifact_data
    description: Manage the documents in an artifact's database
  - name: files
    description: Upload files to give to agents, and download files they produce
  - name: vaults
    description: Manage vaults and the credentials they hold
  - name: webhooks
    description: Manage outbound webhooks
  - name: memory_stores
    description: Manage memory stores
paths:
  /v1/artifacts/{artifact_id}/publication:
    post:
      tags:
        - artifacts
      summary: Publish an artifact
      description: >-
        Serve an artifact at a public address that anyone who has it can view.
        Publishing again changes the version served and keeps the address; after
        an unpublish, the next publish gets a new address. A retry with the same
        Idempotency-Key is not applied again, so it cannot undo a later
        unpublish; the same key with another version, or one used to unpublish,
        answers 409
      operationId: artifacts.publish
      parameters:
        - name: artifact_id
          in: path
          schema:
            type: string
            minLength: 1
            description: Artifact ID
          required: true
        - name: idempotency-key
          in: header
          schema:
            type: string
            pattern: ^\S[\s\S]*\S$|^\S$|^$
            minLength: 1
            maxLength: 128
            description: Optional Idempotency-Key header for safe retries
          required: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                version:
                  anyOf:
                    - type: integer
                      minimum: 1
                      maximum: 9007199254740991
                    - type: string
                      enum:
                        - latest
                  description: >-
                    Version to serve, or "latest" (the default) to serve each
                    new version as it is added
                access:
                  type: string
                  enum:
                    - view
                    - read
                    - write
                  description: >-
                    What anyone with the address may do with the artifact's
                    data: view (files only), read or write. Each collection
                    still allows at most what the version served declares for
                    visitors. Collections a later version adds stay closed to
                    visitors until a level is set again. Omit it to keep the
                    level already set; a new publication starts at view
                if_current:
                  type: object
                  properties:
                    version:
                      type: integer
                      minimum: 1
                      maximum: 9007199254740991
                      description: >-
                        The current artifact version you reviewed, regardless of
                        the version served
                    publication:
                      anyOf:
                        - type: object
                          properties:
                            address:
                              type: string
                              pattern: ^a[0-9a-f]{1,32}-[0-9a-z]{25}$
                            version:
                              anyOf:
                                - type: integer
                                  minimum: 1
                                  maximum: 9007199254740991
                                - type: 'null'
                              description: >-
                                The version served, or null when the latest
                                version is served
                            access:
                              type: string
                              enum:
                                - view
                                - read
                                - write
                              description: >-
                                What anyone with the address may do: view the
                                files only, also read the artifact's data, or
                                also write it
                            grants:
                              type: object
                              patternProperties:
                                ^[a-z][a-z0-9_-]{0,31}$:
                                  type: string
                                  enum:
                                    - read
                                    - add
                                    - write
                              additionalProperties: false
                              description: >-
                                The most a visitor may do in each collection,
                                recorded when the access level was set from the
                                version then served. A later version cannot
                                widen it
                          required:
                            - address
                            - version
                            - access
                            - grants
                          additionalProperties: false
                        - type: 'null'
                      description: >-
                        The address and settings you reviewed, or null if the
                        artifact was unpublished
                  required:
                    - version
                    - publication
                  additionalProperties: false
                  description: >-
                    Require the artifact version and publication settings to
                    match the values you reviewed. Answers 409 if either changed
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                  type:
                    type: string
                    enum:
                      - artifact
                  name:
                    type: string
                  version:
                    type: integer
                    minimum: 1
                    maximum: 9007199254740991
                    description: Current version
                  capabilities:
                    type: object
                    properties:
                      database:
                        type: object
                        properties:
                          collections:
                            type: object
                            patternProperties:
                              ^[a-z][a-z0-9_-]{0,31}$:
                                type: object
                                properties:
                                  visitors:
                                    type: string
                                    enum:
                                      - none
                                      - read
                                      - add
                                      - write
                                    description: >-
                                      What someone opening the page may do with
                                      a collection: nothing, list and get, add
                                      only, or everything
                                required:
                                  - visitors
                                additionalProperties: false
                            additionalProperties: false
                        required:
                          - collections
                        additionalProperties: false
                    additionalProperties: false
                    description: >-
                      What the version's page may ask of the platform at run
                      time, as declared in its artifact.json. Empty when it
                      declares nothing
                  made_from:
                    anyOf:
                      - type: object
                        properties:
                          artifact_id:
                            type: string
                            minLength: 1
                          version:
                            type: integer
                            minimum: 1
                            maximum: 9007199254740991
                        required:
                          - artifact_id
                          - version
                        additionalProperties: false
                      - type: 'null'
                    description: >-
                      The artifact version this version's files were started
                      from, or null
                  file_count:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  total_bytes:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  files:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                          minLength: 1
                          maxLength: 512
                          pattern: >-
                            ^(?:[^./\\\u0000-\u001f\u007f-\u009f\u2028\u2029][^/\\\u0000-\u001f\u007f-\u009f\u2028\u2029]*|\.[^./\\\u0000-\u001f\u007f-\u009f\u2028\u2029][^/\\\u0000-\u001f\u007f-\u009f\u2028\u2029]*|\.\.[^/\\\u0000-\u001f\u007f-\u009f\u2028\u2029]+)(?:\/(?:[^./\\\u0000-\u001f\u007f-\u009f\u2028\u2029][^/\\\u0000-\u001f\u007f-\u009f\u2028\u2029]*|\.[^./\\\u0000-\u001f\u007f-\u009f\u2028\u2029][^/\\\u0000-\u001f\u007f-\u009f\u2028\u2029]*|\.\.[^/\\\u0000-\u001f\u007f-\u009f\u2028\u2029]+))*$
                        sha256:
                          type: string
                          pattern: ^[0-9a-f]{64}$
                        size:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        content_type:
                          type: string
                      required:
                        - path
                        - sha256
                        - size
                        - content_type
                      additionalProperties: false
                  publication:
                    anyOf:
                      - type: object
                        properties:
                          address:
                            type: string
                            pattern: ^a[0-9a-f]{1,32}-[0-9a-z]{25}$
                          url:
                            type: string
                          version:
                            anyOf:
                              - type: integer
                                minimum: 1
                                maximum: 9007199254740991
                              - type: 'null'
                            description: >-
                              The version served, or null when the latest
                              version is served
                          access:
                            type: string
                            enum:
                              - view
                              - read
                              - write
                            description: >-
                              What anyone with the address may do: view the
                              files only, also read the artifact's data, or also
                              write it
                          grants:
                            type: object
                            patternProperties:
                              ^[a-z][a-z0-9_-]{0,31}$:
                                type: string
                                enum:
                                  - read
                                  - add
                                  - write
                            additionalProperties: false
                            description: >-
                              The most a visitor may do in each collection,
                              recorded when the access level was set from the
                              version then served. A later version cannot widen
                              it
                          published_at:
                            type: string
                        required:
                          - address
                          - url
                          - version
                          - access
                          - grants
                          - published_at
                        additionalProperties: false
                      - type: 'null'
                    description: >-
                      The artifact's public address, or null when it is not
                      published
                  created_at:
                    type: string
                  updated_at:
                    type: string
                required:
                  - id
                  - type
                  - name
                  - version
                  - capabilities
                  - made_from
                  - file_count
                  - total_bytes
                  - files
                  - publication
                  - created_at
                  - updated_at
                additionalProperties: false
        '400':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - invalid_request_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '401':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '404':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - not_found_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '409':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - conflict_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '413':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - payload_too_large
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '415':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - unsupported_media_type
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '429':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - rate_limit_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '500':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - internal_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '503':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - service_unavailable
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
      security:
        - bearer: []
        - apiKey: []
components:
  schemas:
    ErrorCode:
      type: string
      enum:
        - session_awaiting_action
        - idempotency_key_reused
        - agent_model_unavailable
        - automation_reference_unavailable
        - automation_memory_store_archived
        - automation_schedule_unusable
        - automation_capacity_reached
        - credential_url_taken
        - mcp_server_blocked
        - mcp_server_credential_invalid
        - mcp_server_credentials_ambiguous
        - machine_credential_invalid
  securitySchemes:
    bearer:
      type: http
      scheme: Bearer
    apiKey:
      type: apiKey
      name: x-api-key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.