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

# Apply a Deployment (idempotent upsert)

`PUT /v0/deployments/{name}/{version}`

## Path parameters

- `name` string, required
- `version` 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
    - `uid` string
    - `updatedAt` string, date-time
    - `version` string
  - `spec` DeploymentSpec, required
    - `desiredState` string
    - `env` object
    - `runtimeConfig` object
    - `runtimeRef` ResourceRef, required
      - `kind` string, required
      - `name` string, required
      - `namespace` string
      - `version` string
    - `targetRef` ResourceRef, required
      - `kind` string, required
      - `name` string, required
      - `namespace` string
      - `version` string
  - `status` Status
    - `conditions` Condition[], nullable
      - `lastTransitionTime` string, date-time
      - `message` string
      - `reason` string
      - `status` string, required
      - `type` string, required

## 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
    - `uid` string
    - `updatedAt` string, date-time
    - `version` string
  - `spec` DeploymentSpec, required
    - `desiredState` string
    - `env` object
    - `runtimeConfig` object
    - `runtimeRef` ResourceRef, required
      - `kind` string, required
      - `name` string, required
      - `namespace` string
      - `version` string
    - `targetRef` ResourceRef, required
      - `kind` string, required
      - `name` string, required
      - `namespace` string
      - `version` string
  - `status` Status
    - `conditions` Condition[], nullable
      - `lastTransitionTime` string, date-time
      - `message` string
      - `reason` string
      - `status` string, required
      - `type` string, required

## Other responses

- `default` — Error

## Changes

- **2026-05-09** `e70ce4a71abe` — 2 breaking, 3 warning, 3 info
  - added the new required request property `spec/runtimeRef`
  - removed the required property `spec/providerRef` from the response with the `200` status
  - removed the request property `spec/providerConfig`
  - removed the request property `spec/providerRef`
  - …4 more
- **2026-05-07** `1f7dac4e4622` — 2 breaking, 1 info
  - the response property `errors` became nullable for the status `default`
  - the response property `status/conditions` became nullable for the status `200`
  - the request property `status/conditions` became nullable
- **2026-05-06** `844352c0303e` — 2 info
  - added the new optional request property `metadata/uid`
  - added the optional property `metadata/uid` to the response with the `200` status
- **2026-05-01** `051070ab6061` — 2 warning
  - removed the request property `spec/preferRemote`
  - removed the optional property `spec/preferRemote` from the response with the `200` status
- **2026-04-29** `68b97da7670c` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agentregistry-dev/apis/agentregistry/changes/v0/deployments/:name/:version/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/e70ce4a71abe/schema)
