---
title: "Update Credential"
method: PATCH
path: "/api/workflows/{team_key}/credentials/{credential_key}"
tags: ["workflows"]
---

# Update Credential

`PATCH /api/workflows/{team_key}/credentials/{credential_key}`

## Request

- Base URL: `https://api.superit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.superit.ai/api/workflows/{team_key}/credentials/{credential_key}`
- Auth: HTTP bearer

## Path parameters

- `credential_key` string, required
- `team_key` string, required

## Request body

- UpdateCredentialBody: Fields to change on a credential. Omitted fields are left as they are.
  - `name` string, nullable
  - `fields` union
    - OAuthAppFields
      - `type` 'oauth_app', required
      - `clientId` string, required
      - `clientSecret` string, required
      - `tenantId` string, nullable
      - `authorizeUrl` string, required
      - `tokenUrl` string, required
      - `scopes` string[], required
      - `grantType` string
    - ApiKeyFields
      - `type` 'api_key', required
      - `headers` object, required

## Response `200`

Successful Response

- CredentialDetail
  - `key` string, required
  - `name` string, required
  - `credentialType` 'oauth_app' | 'api_key', required
  - `fields` union, required
    - OAuthAppFields
      - `type` 'oauth_app', required
      - `clientId` string, required
      - `clientSecret` string, required
      - `tenantId` string, nullable
      - `authorizeUrl` string, required
      - `tokenUrl` string, required
      - `scopes` string[], required
      - `grantType` string
    - ApiKeyFields
      - `type` 'api_key', required
      - `headers` object, required
  - `hasToken` boolean, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400`: Invalid input
- `401`: Not authenticated
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `409`: Conflict
- `422`: Validation Error

---

[API](https://skmtc.dev/superit/apis/super-it-api.md) - [All operations](https://skmtc.dev/superit/apis/super-it-api/llms.txt) - [OpenAPI document](https://skmtc.dev/superit/apis/super-it-api/revisions/4944d556c2bb?raw)
