# Create or update a data source for a patient Internal endpoint to upsert patient data source provider details in all their associated clinic records. Endpoint: PUT /v1/patients/{userId}/data_sources Version: 1.0 Security: sessionToken ## Path parameters: - `userId` (string, required) String representation of a Tidepool User ID. Old style IDs are 10-digit strings consisting of only hexadeximcal digits. New style IDs are 36-digit UUID v4) ## Request fields (application/json): - `state` (string, required) Enum: "pending", "pendingReconnect", "connected", "disconnected", "error" - `providerName` (string, required) Example: "dexcom" - `modifiedTime` (string) [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) / [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp _with_ timezone information Example: "2017-02-06T02:37:46Z" - `expirationTime` (string) [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) / [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp _with_ timezone information Example: "2017-02-06T02:37:46Z"