---
title: "Store the credential for a registry host, replacing any stored for it"
method: PUT
path: "/sandbox-registries"
tags: ["sandbox-templates"]
---

# Store the credential for a registry host, replacing any stored for it

`PUT /sandbox-registries`

## Request

- Base URL: `https://api.letsship.ai/v1`
- URL: `https://api.letsship.ai/v1/sandbox-registries`
- Auth: none declared

## Request body

- PutSandboxRegistryRequest
  - `host` string, required: Host name or URL; stored as the host alone.
  - `scheme` 'bearer' | 'basic', required
  - `username` string: Required for basic auth.
  - `secret` string, required: Token or password. Write-only.

## Response `200`

Stored

- SandboxRegistry
  - `id` string, required
  - `host` string, required
  - `scheme` 'bearer' | 'basic', required
  - `username` string, nullable, required
  - `createdAt` integer, required
  - `updatedAt` integer, required

## Other responses

- `403`: Role insufficient
- `404`: No org for caller
- `422`: Host or credential can't be used

---

[API](https://skmtc.dev/letsship/apis/ship-api.md) · [All operations](https://skmtc.dev/letsship/apis/ship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/letsship/apis/ship-api/revisions/e6eac1bcadd4?raw)
