---
title: "Update the specified topic"
method: PATCH
path: "/credentials/{credential_id}"
tags: ["credentials"]
---

# Update the specified topic

`PATCH /credentials/{credential_id}`

You need `workspaces.credential.edit` permission to access this resource

## Path parameters

- `credential_id` string, required

## Request body

- object
  - `data` object, required
    - `id` string, required — Credential identifier. It has to match the identifier specified in the path.
    - `type` 'credential', required — Allowed value `credential`.
    - `attributes` object, required
      - `name` string — Credential name. An automatic name will be generated if the parameter is omitted.
      - `keys` object — An object which represents component’s configuration (OAuth keys, etc.). API `attributes.keys` structure depends on `credentials.fields` property of component’s `component.json`. The keys from `credentials.fields` directly translate into keys of `attributes.keys`.
    - `relationships` object, required
      - `vpn_agent` object
        - `data` object, required
          - `id` string — The vpn agent identifier this credential is for
          - `type` 'vpn-agent' — A value must be `vpn-agent`
        - `links` object, required
          - `self` string, required

## Response `200`

OK

- object
  - `data` object, required
    - `id` string, required
    - `type` 'credential', required — Allowed value: `credential`
    - `links` object, required
      - `self` string, required
    - `attributes` object, required
      - `name` string — Credential name. An automatic name will be generated if the parameter is omitted.
      - `keys` object — An object which represents component’s configuration (OAuth keys, etc.). API `attributes.keys` structure depends on `credentials.fields` property of component’s `component.json`. The keys from `credentials.fields` directly translate into keys of `attributes.keys`.
    - `relationships` object, required
      - `component` object, required
        - `data` object, required
          - `id` string, required — The component identifier this credential is for
          - `type` 'component', required — A value must be `component`
        - `links` object, required
          - `self` string, required
      - `workspace` object, required
        - `data` object, required
          - `id` string, required — The Workspace identifier this credential is for
          - `type` 'workspace', required — A value must be `workspace`
        - `links` object, required
          - `self` string, required
      - `vpn_agent` object, required
        - `data` object, required
          - `id` string — The vpn agent identifier this credential is for
          - `type` 'vpn-agent' — A value must be `vpn-agent`
        - `links` object, required
          - `self` string, required
      - `user` object, required
        - `data` object, required
          - `id` string, required
          - `type` 'user', required
        - `links` object, required
          - `self` string, required
  - `meta` object, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2.md) · [All operations](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/elastic-io-rest-api-documentation-v2/revisions/411f9f98c01e/schema)
