> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecobalt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Provider

> Updates a provider's status, working hours, and/or availability visibility.

<Note>
  **Use the Cobalt `id` in the URL path.** The `{id}` parameter should be the Cobalt provider ID (the `id` field from GET responses), not the `ehr_id`. If you prefer to use the EMR ID, see `PATCH /providers/ehr/{ehr_id}` instead.
</Note>

### Example Request

```bash theme={null}
curl -X PATCH https://api.usecobalt.com/v1/providers/abc123def4567890abcdef1234567890 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
    "status": "active",
    "hours": [
        {
            "day": "Monday",
            "shifts": [
                {
                    "start": "T09:00:00",
                    "end": "T18:00:00",
                    "facility_id": "095f8067-d3fc-4e13-b771-32f87cd0c3f2",
                    "set_start_date": "2025-11-13T00:00:00",
                    "set_end_date": "2026-11-13T00:00:00"
                }
            ]
        },
                {
            "day": "Tuesday",
            "shifts": [
                {
                    "start": "T08:00:00",
                    "end": "T17:00:00",
                    "facility_id": "095f8067-d3fc-4e13-b771-32f87cd0c3f2",
                    "set_start_date": "2025-11-13T00:00:00",
                    "set_end_date": "2026-11-13T00:00:00"
                }
            ]
        }
    ]
}'
```

**Response:**

```json theme={null}
{
    "success": true,
    "message": "Provider status and hours updated successfully.",
    "provider_id": "abc123def4567890abcdef1234567890"
}
```

### Request Body Parameters

You can update one or more of the following fields:

* **status** (string, optional): Provider's sync status
  * `"active"`: Schedule will be synced from EMR
  * `"inactive"`: Schedule will not be synced from EMR
  * Status is case-insensitive ("active", "Active", "ACTIVE" are all accepted)

* **hide\_in\_availability** (string, optional): Controls whether provider is hidden from availability results
  * `"false"`: Provider appears in `/v1/availability` endpoint (default behavior)
  * `"true"`: Provider is hidden from `/v1/availability` endpoint
  * **Common use case**: Set a provider to `"status": "active"` and `"hide_in_availability": "true"` to continue syncing their schedule (for reporting purposes) while hiding them from new appointment availability

* **hours** (array, optional): Provider's working schedule
  * The `facility_id` must exist in your organization's locations
  * The `facility_name` will be automatically enriched from the database
  * Time format must be `THH:MM:SS` (e.g., `T08:00:00`)
  * Dates must be in ISO 8601 format (e.g., `2025-11-13T00:00:00`)
  * Days must be capitalized day names (Monday, Tuesday, etc.)

### Example: Hide Provider from Availability

```bash theme={null}
curl -X PATCH https://api.usecobalt.com/v1/providers/abc123def4567890abcdef1234567890 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
    "status": "active",
    "hide_in_availability": "true"
}'
```

**Response:**

```json theme={null}
{
    "success": true,
    "message": "Provider status and hide_in_availability updated successfully.",
    "provider_id": "abc123def4567890abcdef1234567890"
}
```


## OpenAPI

````yaml PATCH /providers/{id}
openapi: 3.0.0
info:
  title: Cobalt API
  version: 1.0.1
  description: API for interacting with Cobalt's EHR integration services
servers:
  - url: https://api.usecobalt.com/v1
security:
  - ClientCredentials: []
    ClientSecret: []
    AccessToken: []
paths:
  /providers/{id}:
    patch:
      summary: Update Provider
      description: Updates a provider's status and/or working hours.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The provider's ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                hours:
                  type: array
                  items:
                    type: object
                    properties:
                      day:
                        type: string
                        enum:
                          - Monday
                          - Tuesday
                          - Wednesday
                          - Thursday
                          - Friday
                          - Saturday
                          - Sunday
                      shifts:
                        type: array
                        items:
                          type: object
                          properties:
                            start:
                              type: string
                              pattern: ^T\d{2}:\d{2}:\d{2}$
                              example: T08:00:00
                            end:
                              type: string
                              pattern: ^T\d{2}:\d{2}:\d{2}$
                              example: T17:00:00
                            facility_id:
                              type: string
                            set_start_date:
                              type: string
                              format: date-time
                              example: '2025-11-13T00:00:00'
                            set_end_date:
                              type: string
                              format: date-time
                              example: '2026-11-13T00:00:00'
                            set_recur:
                              type: object
                              properties:
                                rec_start_date:
                                  type: string
                                  format: date-time
                                  example: '2025-11-13T00:00:00'
                                rec_end_date:
                                  type: string
                                  format: date-time
                                  example: '2026-11-13T00:00:00'
                                recur_interval_type:
                                  type: string
                                  enum:
                                    - days
                                    - weeks
                                    - months
                                recur_interval_amount:
                                  type: integer
                                  minimum: 1
                                  example: 1
                                recur_interval_description:
                                  type: string
                                  example: Every 1 week.
                hide_in_availability:
                  type: string
                  enum:
                    - 'true'
                    - 'false'
                  description: >-
                    Controls whether provider is hidden from availability
                    results. When "true", provider won't appear in
                    /v1/availability endpoint.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  provider_id:
                    type: string
components:
  securitySchemes:
    ClientCredentials:
      type: apiKey
      in: header
      name: client_id
    ClientSecret:
      type: apiKey
      in: header
      name: client_secret
    AccessToken:
      type: apiKey
      in: header
      name: access_token

````