# Remove the organization's sign-in for a registry

> DELETE /v1/registry-sign-ins/{registry}. , deprecated by deleteRegistryCredential.

Source: https://legion.ambient.xyz/docs/api/images/delete-registry-sign-in

`DELETE https://api.legion.ambient.xyz/v1/registry-sign-ins/{registry}`

Authenticate with an API key: `Authorization: Bearer $LEGION_API_KEY`.

, deprecated by `deleteRegistryCredential`. Removes the organization's
credential for the whole registry (path prefix `""`) and deletes its token from Vault. Refused
with 409 `registry_credential_in_use` while a rental that may still pull uses it, as
`deleteRegistryCredential`, and 409 `registry_sign_in_in_use` while a service that is not
deleted runs an image the credential matches (the detail names the services). Needs
`registry.manage`, which owners have. 404 `not_found` when the organization has no such
credential. Recorded as the event `registry_credential.deleted`.

## Path parameters

- `registry`, RegistrySignInRegistry, required: The registry of the sign-in.

## Responses

### 204

Removed.

### 401

Missing, unknown, expired or revoked credentials.

### 403

The caller lacks the permission this operation requires (`forbidden`),
or signed in without having joined an organization yet
(`no_organization`; `getOnboarding` and the invitation and
organization operations under it work), or could not sign in
(`email_unverified`, `account_conflict`, and `domain_not_allowed`). `not_invited` is no longer returned to
session tokens.

`access_not_approved`: a signed-in person who is not approved
for the beta yet. Every operation that takes a credential answers it to
them, except `getMe` and `joinMyWaitlist`; the problem carries
`access` (`waitlisted` or `not_requested`, and the email). Approved
means a member of an organization, holding a pending invitation, or Legion; an API key always belongs to a member.

`oauth_token_mcp_only`: the caller sent an OAuth access token (`lgo_`), which is accepted
only by `mcpMessage` and the tool calls it dispatches. Every other operation answers it, whatever
the token's scope. Use an API key or the Legion web app.

`org_suspended`: the caller's organization is suspended. Every operation that takes a
credential answers it, by session or API key, except `getMe` (which shows `org.suspended_at` and
`org.suspension_reason`) and the support operations under `/v1/support/`.

`terms_not_accepted`: an approved caller who has not accepted
the current version of the Terms of Use and the Acceptable Use Policy. Every operation that takes a credential answers it, except `getMe`,
`acceptLegalDocuments`, `joinMyWaitlist` and the wind-down operations
(`listRentals`, `stopRental`, `deleteRental`, `listHosts`,
`updateListing` with `listed` false, `removeHost`); the problem
carries `legal`. An API key acts for the person who created it, so it
is refused until that person accepts. Terminal
operations also return
`session_required` (called with an API key) and `step_up_required`
(neither a sign-in nor a step-up challenge within the step-up window).

### 404

The resource does not exist or belongs to another organization.

### 409

The resource's current state does not allow the operation. `legal_versions_stale`: a legal document version sent is not the current one; the
problem's `legal` holds the current documents.

### 500

An unexpected server error. Safe to retry.

### 503

A dependency is unavailable (`terminal_signing_unavailable`;
`image_registry_unavailable` when the image's registry did not answer in
time or failed; `secrets_unavailable` when secret variables cannot be
stored or read). Safe to retry.

## Errors

- 403 [`no_organization`](https://legion.ambient.xyz/docs/errors#no_organization)
- 409 [`registry_credential_in_use`](https://legion.ambient.xyz/docs/errors#registry_credential_in_use)
- 409 [`registry_sign_in_in_use`](https://legion.ambient.xyz/docs/errors#registry_sign_in_in_use)
- 503 [`registry_sign_ins_unavailable`](https://legion.ambient.xyz/docs/errors#registry_sign_ins_unavailable)

## Example request

```sh
curl -s -X DELETE "https://api.legion.ambient.xyz/v1/registry-sign-ins/$REGISTRY" \
  -H "Authorization: Bearer $LEGION_API_KEY"
```
