# Disconnect a wearable provider

Canonical page: https://docs.ovok.com/api/wearables/disconnect-a-wearable-provider

`DELETE /v1/wearables/connections/{provider}`

Disconnects the signed-in patient from a wearable provider: the connection is deleted and its tokens are no longer readable through the API.

**Auth:** bearer token of a patient.
**Scope:** the caller's project and Patient profile (from the token).

## Behaviour

- Before the connection is deleted, ovok undoes what it set up at the provider where the provider allows it: Withings stops notifying ovok about the patient, and Polar deregisters the patient, which also revokes the app's access. Other providers keep the app's access until the patient removes it in the provider's own settings.
- A failure at the provider never stops the disconnect; the connection is deleted all the same.
- The resource history keeps the earlier versions, with the tokens still encrypted.
- A provider the patient has not connected answers `404 CONNECTION_NOT_FOUND`.

## Example

```bash
curl -X DELETE 'https://api.sandbox.ovok.com/v1/wearables/connections/oura' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
```
