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

# Deregister Connection

> Deregister a provider connection via the Junction API. Requires authentication with your team API key.

<Note>
  Deregistration has well-defined behavior only on [cloud-based providers](/wearables/providers/introduction#cloud-based-providers).
</Note>

<Warning>
  If your Junction Health SDK uses [the default Auto Connect mode](/wearables/sdks/health/connection-policies#auto-connect-mode-default),
  deregistering an Apple HealthKit, Health Connect or Samsung Health connection has no effect.

  For explicit connection and disconnection of Apple HealthKit, Health Connect and Samsung Health connections, see the [opt-in Explicit Connect mode](/wearables/sdks/health/connection-policies#explicit-connect-mode).

  You can also pause [Health SDK data sync](/wearables/sdks/health/overview#pausing-data-synchronization) client-side, or
  [sign-out the user](/wearables/sdks/vital-core#reset-the-sdk-sign-out) from the SDK.
</Warning>

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
       --url {{BASE_URL}}/v2/user/{user_id}/{provider} \
       --header 'Accept: application/json' \
       --header 'x-vital-api-key: <API_KEY>'
  ```

  ```typescript TypeScript theme={null}
  import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";

  const client = new JunctionClient({
      apiKey: "YOUR_API_KEY",
      environment: JunctionEnvironment.Sandbox,
  });

  const data = await client.user.deregisterProvider({
      userId: "<user_id>",
      provider: "oura",
  });
  ```

  ```python Python theme={null}
  from junction import Junction, Providers
  from junction.environment import JunctionEnvironment

  client = Junction(
      api_key="YOUR_API_KEY",
      environment=JunctionEnvironment.SANDBOX,
  )

  data = client.user.deregister_provider("<user_id>", Providers.OURA)
  ```

  ```java Java theme={null}
  import com.junction.api.Junction;
  import com.junction.api.core.Environment;
  import com.junction.api.types.Providers;

  Junction client = Junction.builder()
      .apiKey("YOUR_API_KEY")
      .environment(Environment.SANDBOX)
      .build();

  var data = client.user().deregisterProvider("<user_id>", Providers.OURA);
  ```

  ```go Go theme={null}
  import (
      "context"

      junction "github.com/junction-api/junction-go"
      "github.com/junction-api/junction-go/client"
      "github.com/junction-api/junction-go/option"
  )

  c := client.NewClient(
      option.WithApiKey("YOUR_API_KEY"),
      option.WithBaseURL(junction.Environments.Sandbox),
  )

  response, err := c.User.DeregisterProvider(context.TODO(), &junction.DeregisterProviderUserRequest{
      UserId:   "<user_id>",
      Provider: junction.ProvidersOura,
  })
  if err != nil {
      return err
  }
  fmt.Printf("Received data %s\n", response)
  ```
</RequestExample>


## OpenAPI

````yaml DELETE /v2/user/{user_id}/{provider}
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.483
servers:
  - url: https://api.us.junction.com
    x-fern-server-name: Production
  - url: https://api.eu.junction.com
    x-fern-server-name: ProductionEU
  - url: https://api.sandbox.us.junction.com
    x-fern-server-name: Sandbox
  - url: https://api.sandbox.eu.junction.com
    x-fern-server-name: SandboxEU
security:
  - apiKeyAuth: []
paths:
  /v2/user/{user_id}/{provider}:
    delete:
      tags:
        - user
      summary: Deregister Provider
      operationId: deregister_provider_v2_user__user_id___provider__delete
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: >-
              User id returned by vital create user id request. This id should
              be stored in your database against the user and used for all
              interactions with the vital api.
        - name: provider
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/Providers'
            description: Provider slug. e.g., `oura`, `fitbit`, `garmin`.
          description: Provider slug. e.g., `oura`, `fitbit`, `garmin`.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSuccessResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Providers:
      type: string
      enum:
        - oura
        - fitbit
        - garmin
        - whoop
        - strava
        - renpho
        - peloton
        - wahoo
        - zwift
        - freestyle_libre
        - abbott_libreview
        - tandem_source
        - freestyle_libre_ble
        - eight_sleep
        - withings
        - apple_health_kit
        - manual
        - ihealth
        - google_fit
        - beurer_api
        - beurer_ble
        - omron
        - omron_ble
        - onetouch_ble
        - accuchek_ble
        - contour_ble
        - dexcom
        - dexcom_v3
        - hammerhead
        - my_fitness_pal
        - health_connect
        - samsung_health
        - polar
        - cronometer
        - kardia
        - whoop_v2
        - ultrahuman
        - my_fitness_pal_v2
        - map_my_fitness
        - runkeeper
      title: Providers
      description: ℹ️ This enum is non-exhaustive.
    UserSuccessResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether operation was successful or not
      type: object
      required:
        - success
      title: UserSuccessResponse
      example:
        success: true
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````