---
title: "Update the specified auth client"
method: PATCH
path: "/auth-clients/{auth-client_id}"
tags: ["auth clients"]
---

# Update the specified auth client

`PATCH /auth-clients/{auth-client_id}`

You have to be a member with appropriate permission to access this resource. This resource allows you to update the auth client. If the auth client with type `oauth2` then you can update `name`, `client_secret`, `token_expires_in` and linked components, otherwise if the type is other, then you can put in credentials any data that you want and add components which can use this auth client.

## Path parameters

- `auth-client_id` string, required

## Request body

- object
  - `data` object, required
    - `id` string, required — Auth client identifier. It has to match the identifier specified in the path.
    - `type` 'auth-client', required — Allowed value `auth-client`.
    - `attributes` object, required
      - `name` string — Auth client name
      - `credentials` union
        - object
          - `client_secret` string — Client secret of auth client
          - `token_expires_in` integer — The value that will be set as `expires_in` in auth secret linked to the auth client after auth secret refresh, if auth secret does not contain it.
        - object
    - `relationships` object, required
      - `components` object, required
        - `data` object[], required
          - `id` string, required — Component identifier
          - `type` 'component', required — Allowed value is `component`

## Response `200`

OK

- object
  - `data` object, required
    - `id` string, required
    - `type` 'auth-client', required — Allowed value: `auth-client`
    - `links` object, required
      - `self` string, required
    - `attributes` object, required
      - `name` string, required — Name of the auth client
      - `type` 'oauth2' | 'oauth2_instagram' | 'basic' | 'api_key' | 'noauth', required — Auth client type
      - `credentials` union, required
        - object — Only for type of auth client `oauth2`
          - `client_id` string, required — Client identifier of auth client
          - `client_secret` string, required — Client secret of auth client
          - `refresh_token_uri` string, required — Auth client refresh token URI
          - `token_expires_in` integer — The value that will be set as `expires_in` in auth secret linked to the auth client after auth secret refresh, if auth secret does not contain it.
          - `token_uri` string, required — Auth client token URI
          - `auth_uri` string, required — Auth client auth URI
        - object — Only for type of auth client `oauth2_instagram`
          - `client_id` string, required — Client identifier of auth client
          - `client_secret` string, required — Client secret of auth client
          - `refresh_token_uri` string, required — Auth client refresh token URI
          - `token_expires_in` integer — The value that will be set as `expires_in` in auth secret linked to the auth client after auth secret refresh, if auth secret does not contain it.
          - `token_uri` string, required — Auth client token URI
          - `auth_uri` string, required — Auth client auth URI
          - `exchange_token_uri` string, required — Auth client exchange token URI
        - object
    - `relationships` union, required
      - object
        - `components` object, required
          - `data` object[], required
            - `id` string, required — Component identifier
            - `type` 'component', required — Allowed value is `component`
        - `workspace` object, required
          - `data` object, required
            - `id` string, required — Workspace identifier
            - `type` 'workspace', required — Allowed value is `workspace`
          - `links` object, required
            - `self` string, required
      - object
        - `components` object, required
          - `data` object[], required
            - `id` string, required — Component identifier
            - `type` 'component', required — Allowed value is `component`
      - object
        - `components` object, required
          - `data` object[], required
            - `id` string, required — Component identifier
            - `type` 'component', required — Allowed value is `component`
        - `contract` object, required
          - `data` object, required
            - `id` string, required — Contract identifier
            - `type` 'contract', required — Allowed value is `contract`
          - `links` object, required
            - `self` string, required
      - object
        - `components` object, required
          - `data` object[], required
            - `id` string, required — Component identifier
            - `type` 'component', required — Allowed value is `component`
        - `tenant` object, required
          - `data` object, required
            - `id` string, required — Tenant identifier
            - `type` 'tenant', required — Allowed value is `tenant`
          - `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)
