---
title: "Preview Provider Build"
method: POST
path: "/api/v1/provider_builds/preview"
tags: ["provider_builds"]
---

# Preview Provider Build

`POST /api/v1/provider_builds/preview`

## Request body

- CreateProviderBuildRequest
  - `location` string, required
  - `on_complete` union
    - AddProvider — Will add a new provider or update an existing one with the same base docker image ID (docker registry + repository, excluding tag)
      - `type` 'add_provider'
      - `auto_stop_timeout_sec` integer, nullable — Timeout after which the agent provider will be automatically downscaled if unused.Contact administrator if you need to increase this value.
      - `variables` object, nullable
    - UpdateProvider — Will update provider specified by ID
      - `type` 'update_provider'
      - `provider_id` string, uuid, required
    - NoAction
      - `type` 'no_action'
  - `build_configuration` BuildConfiguration
    - `dockerfile_path` string, path, nullable — Path to Dockerfile relative to the repository path (provider_build.source.path or repository root if not defined)

## Response `200`

Successful Response

- ProviderBuild
  - `id` string, uuid
  - `created_at` string, date-time
  - `status` 'missing' | 'in_progress' | 'build_completed' | 'completed' | 'failed', required
  - `source` ResolvedGithubUrl, required
    - `host` string
    - `org` string, required
    - `repo` string, required
    - `version` string, required
    - `version_type` 'head' | 'tag', required
    - `commit_hash` string, required
    - `path` string, nullable
  - `destination` string, required
  - `build_configuration` BuildConfiguration
    - `dockerfile_path` string, path, nullable — Path to Dockerfile relative to the repository path (provider_build.source.path or repository root if not defined)
  - `provider_id` string, uuid, nullable — ID of the provider added or modified by this build
  - `created_by` string, uuid, required
  - `on_complete` union
    - AddProvider — Will add a new provider or update an existing one with the same base docker image ID (docker registry + repository, excluding tag)
      - `type` 'add_provider'
      - `auto_stop_timeout_sec` integer, nullable — Timeout after which the agent provider will be automatically downscaled if unused.Contact administrator if you need to increase this value.
      - `variables` object, nullable
    - UpdateProvider — Will update provider specified by ID
      - `type` 'update_provider'
      - `provider_id` string, uuid, required
    - NoAction
      - `type` 'no_action'
  - `error_message` string, nullable
  - `provider_origin` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/i-am-bee/apis/agentstack-server.md) · [All operations](https://skmtc.net/i-am-bee/apis/agentstack-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/i-am-bee/agentstack-server/revisions/7d68b3f8bf7f/schema)
