---
title: "Update Provider Setting"
method: PUT
path: "/api/v1/oauth/providers/{provider}"
tags: ["Internal: Providers"]
---

# Update Provider Setting

`PUT /api/v1/oauth/providers/{provider}`

Update is_enabled and/or live_sync_mode for a single provider.

## Path parameters

- `provider` string, required

## Request body

- ProviderSettingUpdate — Schema for updating a single provider setting.
  - `is_enabled` boolean, nullable
  - `live_sync_mode` 'pull' | 'webhook'
  - `data_granularity` 'daily' | 'hourly' | 'raw' — How finely a provider's 24/7 data is stored. DAILY — one aggregated value per day (server-side rollup). HOURLY — one aggregated value per hour (server-side rollup). RAW — every individual reading (no aggregation), where the provider supports it.

## Response `200`

Successful Response

- ProviderSettingRead — Provider setting with metadata.
  - `provider` string, required — Provider identifier (e.g., 'apple', 'garmin')
  - `name` string, required — Display name (e.g., 'Apple Health', 'Garmin')
  - `has_cloud_api` boolean, required — Whether provider uses cloud OAuth API
  - `is_enabled` boolean, required — Whether provider is enabled by admin
  - `icon_url` string, required — Relative URL to provider icon (e.g., '/static/provider-icons/garmin.svg'). Resolve against the API base URL.
  - `live_sync_mode` 'pull' | 'webhook'
  - `live_sync_configurable` boolean — Whether the admin can switch live_sync_mode for this provider.
  - `data_granularity` 'daily' | 'hourly' | 'raw' — How finely a provider's 24/7 data is stored. DAILY — one aggregated value per day (server-side rollup). HOURLY — one aggregated value per hour (server-side rollup). RAW — every individual reading (no aggregation), where the provider supports it.

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-26** `e8a9270a1ee1` — 2 info
  - added the new optional request property `data_granularity`
  - added the optional property `data_granularity` to the response with the `200` status

[Change history](https://skmtc.dev/openwearables/apis/open-wearables-api/changes/api/v1/oauth/providers/:provider/put.md)

---

[API](https://skmtc.dev/openwearables/apis/open-wearables-api.md) · [All operations](https://skmtc.dev/openwearables/apis/open-wearables-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openwearables/apis/open-wearables-api/revisions/427d02add648?raw)
