---
title: "Update Byo Environment Dsn"
method: PATCH
path: "/api/agent-data/environments/{environment_id}/dsn"
tags: ["agent-data"]
---

# Update Byo Environment Dsn

`PATCH /api/agent-data/environments/{environment_id}/dsn`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/agent-data/environments/{environment_id}/dsn`
- Auth: none declared

Correct the admin DSN on an environment you own, then re-verify.

Without this, a self-service registration that fails verification is
permanently stuck: the name is burned (globally unique), and every repair
path was admin-only — the exact dead end TOS-2932 fixed at the admin tier,
reintroduced at the self-service tier (TOS-1614 review round 4).
Re-verifies fail-closed via the same service the admin route uses.

## Path parameters

- `environment_id` string, uuid, required

## Request body

- UpdateByoEnvironmentDsnIn
  - `admin_dsn` string, required

## Response `200`

Successful Response

- EnvironmentDetailOut
  - `id` string, required
  - `name` string, required
  - `kind` string, required
  - `owner_identity_id` string, nullable, required
  - `status` string, required
  - `ownership_kind` string, required
  - `detached_at` string, nullable, required
  - `verification` object, nullable, required
  - `verified_at` string, nullable, required
  - `created_at` string, nullable, required

## Other responses

- `422`: Validation Error

---

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