---
title: "Update an identity connection"
method: PATCH
path: "/v1/teams/{teamId}/identity-connections/{connectionId}"
tags: ["Teams"]
---

# Update an identity connection

`PATCH /v1/teams/{teamId}/identity-connections/{connectionId}`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/teams/{teamId}/identity-connections/{connectionId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.spacefast.com/v1/auth/oauth2/authorize`, token URL `https://api.spacefast.com/v1/auth/oauth2/token`; client credentials, token URL `https://api.spacefast.com/v1/auth/oauth2/token`, scopes: `teams:create`)

Renames a team identity connection, rotates its OIDC client ID or client secret, replaces its signer authorize URL or public keys, or changes its session length. Grants that name the connection keep working. The client secret is write-only and never returned. It changes how people sign in, so update it only at the user's request.

## Path parameters

- `teamId` string, required
- `connectionId` string, required

## Request body

- object
  - `name` string
  - `clientId` string
  - `clientSecret` string
  - `authorizeUrl` string
  - `publicKeys` object[]
    - `kid` string, required
    - `publicKey` string, required
  - `sessionTtlSeconds` integer

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `id` string, required
    - `teamId` string, required
    - `type` 'oidc' | 'signer', required
    - `name` string, required
    - `issuer` string, required
    - `clientId` string, nullable, required
    - `clientSecretSet` boolean, required
    - `authorizeUrl` string, nullable, required
    - `publicKeys` object[], required
      - `kid` string, required
      - `publicKey` string, required
    - `sessionTtlSeconds` integer, required
    - `createdAt` string, date-time, required
    - `rotatedAt` string, date-time, nullable, required
    - `lastUsedAt` string, date-time, nullable, required
    - `revokedAt` string, date-time, nullable, required

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

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