---
title: "Apply a Deployment (idempotent upsert)"
method: PUT
path: "/v0/deployments/{name}"
---

# Apply a Deployment (idempotent upsert)

`PUT /v0/deployments/{name}`

## Path parameters

- `name` string, required

## Query parameters

- `namespace` string — Namespace (internal; defaults to 'default').

## Request body

- Deployment
  - `apiVersion` string, required
  - `kind` string, required
  - `metadata` ObjectMeta, required
    - `annotations` object
    - `createdAt` string, date-time
    - `deletionTimestamp` string, date-time
    - `labels` object
    - `name` string, required
    - `namespace` string
    - `tag` string
    - `uid` string
    - `updatedAt` string, date-time
  - `spec` DeploymentSpec, required
    - `deploymentRefs` DeploymentRef[], nullable
      - `name` string, required
      - `namespace` string
    - `desiredState` string
    - `env` object
    - `harness` DeploymentHarness
      - `permissionMode` string
      - `type` string, required
    - `modelRef` ModelRef
      - `name` string, required
      - `namespace` string
      - `tag` string
    - `runtimeConfig` object
    - `runtimeRef` ResourceRef, required
      - `kind` string, required
      - `name` string, required
      - `namespace` string
      - `tag` string
    - `targetRef` ResourceRef, required
      - `kind` string, required
      - `name` string, required
      - `namespace` string
      - `tag` string
  - `status` Status
    - `conditions` Condition[], nullable
      - `lastTransitionTime` string, date-time
      - `message` string
      - `reason` string
      - `status` string, required
      - `type` string, required
    - `details` unknown

## Response `200`

OK

- Deployment
  - `apiVersion` string, required
  - `kind` string, required
  - `metadata` ObjectMeta, required
    - `annotations` object
    - `createdAt` string, date-time
    - `deletionTimestamp` string, date-time
    - `labels` object
    - `name` string, required
    - `namespace` string
    - `tag` string
    - `uid` string
    - `updatedAt` string, date-time
  - `spec` DeploymentSpec, required
    - `deploymentRefs` DeploymentRef[], nullable
      - `name` string, required
      - `namespace` string
    - `desiredState` string
    - `env` object
    - `harness` DeploymentHarness
      - `permissionMode` string
      - `type` string, required
    - `modelRef` ModelRef
      - `name` string, required
      - `namespace` string
      - `tag` string
    - `runtimeConfig` object
    - `runtimeRef` ResourceRef, required
      - `kind` string, required
      - `name` string, required
      - `namespace` string
      - `tag` string
    - `targetRef` ResourceRef, required
      - `kind` string, required
      - `name` string, required
      - `namespace` string
      - `tag` string
  - `status` Status
    - `conditions` Condition[], nullable
      - `lastTransitionTime` string, date-time
      - `message` string
      - `reason` string
      - `status` string, required
      - `type` string, required
    - `details` unknown

## Other responses

- `default` — Error

## Changes

- **2026-08-12** `a810e1eb233d` — 2 warning
  - removed the request property `spec/envFrom`
  - removed the optional property `spec/envFrom` from the response with the `200` status
- **2026-07-31** `d7d1aad202c6` — 2 info
  - added the new optional request property `spec/envFrom`
  - added the optional property `spec/envFrom` to the response with the `200` status
- **2026-07-20** `ef2b95994c58` — 2 info
  - added the new optional request property `spec/modelRef`
  - added the optional property `spec/modelRef` to the response with the `200` status
- **2026-07-10** `c0e427347223` — 2 warning
  - removed the request property `spec/harness/version`
  - removed the optional property `spec/harness/version` from the response with the `200` status
- **2026-07-01** `32b14abfd174` — 2 info
  - added the new optional request property `spec/harness`
  - added the optional property `spec/harness` to the response with the `200` status

[Full history](https://skmtc.dev/agentregistry-dev/apis/agentregistry/changes/v0/deployments/:name/put.md)

---

[API](https://skmtc.dev/agentregistry-dev/apis/agentregistry.md) · [All operations](https://skmtc.dev/agentregistry-dev/apis/agentregistry/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agentregistry-dev/agentregistry/revisions/d34de2400d39/schema)
