# Update SMS/phone contact-preference consent

Operation ID: `patient.updateCommunicationConsent`

Update SMS/phone contact-preference consent

## Public method

`updateCommunicationConsent`

Signature: `patient.updateCommunicationConsent(request)`

Return type: `Promise<CommunicationConsentResponse>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`PUT /patients/communication-consent`

## Path parameters

None.

## Query parameters

None.

## Body parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `body` | [`UpdateCommunicationConsentRequest`](../models/UpdateCommunicationConsentRequest.md) | No |  |  |  | No |  |

Request model: [`UpdateCommunicationConsentRequest`](../models/UpdateCommunicationConsentRequest.md)

## Request example

```json
{
  "phone_permitted": true,
  "sms_permitted": true
}
```

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`CommunicationConsentResponse`](../models/CommunicationConsentResponse.md) | application/json | Consent updated |

## Success response examples

### 200

```json
{
  "effective_date": "2026-01-01",
  "id": "string",
  "phone_permitted": true,
  "sms_permitted": true
}
```

## Common errors

None declared in canonical OpenAPI.

## Error examples

None declared in canonical OpenAPI.

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
import type { UpdateCommunicationConsentRequest } from "@healthcloudai/hc-sdk";
```

```ts
const request = {
  "phone_permitted": true,
  "sms_permitted": true
};

const result = await patient.updateCommunicationConsent(request);
```

## cURL

```bash
curl -X PUT \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"phone_permitted":true,"sms_permitted":true}' \
  'https://dev-api-patient.health.cloud/patients/communication-consent'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
