# Rotate connection credentials (/docs/management-api/endpoints/connections/post-connections-by-id-rotate)

Location: Management API > Endpoints > Connections > Rotate connection credentials

Generates new credentials for the connection with the given ID. Revocation of the previous credentials is best-effort.

## API reference

### Rotate connection credentials

`POST /v1/connections/{id}/rotate`

Generates new credentials for the connection with the given ID. Revocation of the previous credentials is best-effort.

#### Parameters

- `id` (path, string, required)

#### Responses

- `200`: Rotated connection credentials.
- `401`: Missing or invalid authorization token.
- `404`: Connection with the given ID was not found.

## Related pages

- [`Create connection`](https://www.prisma.io/docs/management-api/endpoints/connections/post-connections): Creates a new connection for the specified database.
- [`Delete connection`](https://www.prisma.io/docs/management-api/endpoints/connections/delete-connections-by-id): Deletes the connection with the given ID.
- [`Get connection`](https://www.prisma.io/docs/management-api/endpoints/connections/get-connections-by-id): Returns the connection with the given ID.
- [`List connections`](https://www.prisma.io/docs/management-api/endpoints/connections/get-connections): Returns all connections the actor has access to, with optional database filter.