---
title: "Update consumer"
method: PATCH
path: "/vault/consumers/{consumer_id}"
tags: ["Consumers"]
---

# Update consumer

`PATCH /vault/consumers/{consumer_id}`

Update consumer metadata such as name and email.

## Path parameters

- `consumer_id` string, required

## Headers

- `x-apideck-app-id` string, required

## Request body

- UpdateConsumerRequest
  - `metadata` ConsumerMetadata — The metadata of the consumer. This is used to display the consumer in the sidebar. This is optional, but recommended.
    - `account_name` string — The name of the account as shown in the sidebar.
    - `user_name` string — The name of the user as shown in the sidebar.
    - `email` string — The email of the user as shown in the sidebar.
    - `image` string — The avatar of the user in the sidebar. Must be a valid URL

## Response `200`

Consumer updated

- UpdateConsumerResponse
  - `status_code` integer, required — HTTP Response Status Code
  - `status` string, required — HTTP Response Status
  - `data` Consumer, required
    - `consumer_id` string, required — Unique consumer identifier. You can freely choose a consumer ID yourself. Most of the time, this is an ID of your internal data model that represents a user or account in your system (for example account:12345). If the consumer doesn't exist yet, Vault will upsert a consumer based on your ID.
    - `application_id` string — ID of your Apideck Application
    - `metadata` ConsumerMetadata — The metadata of the consumer. This is used to display the consumer in the sidebar. This is optional, but recommended.
      - `account_name` string — The name of the account as shown in the sidebar.
      - `user_name` string — The name of the user as shown in the sidebar.
      - `email` string — The email of the user as shown in the sidebar.
      - `image` string — The avatar of the user in the sidebar. Must be a valid URL
    - `connections` ConsumerConnection[]
      - `id` string
      - `name` string
      - `icon` string
      - `logo` string
      - `website` string
      - `tag_line` string
      - `service_id` string
      - `unified_api` string
      - `consumer_id` string
      - `auth_type` 'oauth2' | 'apiKey' | 'basic' | 'custom' | 'none' — Type of authorization used by the connector
      - `enabled` boolean
      - `settings` object, nullable — Connection settings. Values will persist to `form_fields` with corresponding id
      - `metadata` object, nullable — Attach your own consumer specific metadata
        - `company_id` string — Normalized identifier of the authorized organization, copied from the connector-specific setting (e.g. Xero tenant_id, QuickBooks realm_id, NetSuite account_id).
      - `created_at` string
      - `updated_at` string, nullable
      - `state` 'available' | 'callable' | 'added' | 'authorized' | 'invalid' — [Connection state flow](#section/Connection-state)
      - `health` 'ok' | 'pending_refresh' | 'needs_auth' | 'pending_confirmation' | 'needs_consent' | 'revoked' | 'missing_settings' | 'degraded' — The operational health status of the connection
      - `credentials_expire_at` string, nullable — ISO 8601 timestamp indicating when credentials will be cleared if token refresh continues to fail. Only present when connection health is pending_refresh and a retention window is active.
      - `last_refresh_failed_at` string, nullable — ISO 8601 timestamp of the most recent token refresh failure. Only present when connection has experienced refresh failures.
    - `services` string[]
    - `aggregated_request_count` number
    - `request_counts` RequestCountAllocation
      - `unify` number
      - `proxy` number
      - `vault` number
    - `created` string
    - `modified` string
    - `request_count_updated` string
  - `_raw` Raw, nullable — Raw response from the integration when raw=true query param is provided

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required
- `404` — The specified resource was not found
- `422` — Unprocessable
- `default` — Unexpected error

---

[API](https://skmtc.net/apideck-libraries/apis/vault-api.md) · [All operations](https://skmtc.net/apideck-libraries/apis/vault-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apideck-libraries/vault-api/versions/1b8e8b6feb36/schema)
