## MedplumClient.createComment() method [​](/content/docs/sdk/core.medplumclient.createcomment#medplumclientcreatecomment-method "Direct link to MedplumClient.createComment(/index.html) method")

Creates a FHIR `Communication` resource with the provided data content.

This is a convenience method to handle common cases where a `Communication` resource is created with a `payload`.

**Signature:**

```typescript
createComment(resource: Resource, text: string, options?: MedplumRequestOptions): Promise<WithId<Communication>>;
```

## Parameters [​](/content/docs/sdk/core.medplumclient.createcomment#parameters "Direct link to Parameters"/index.html)

| Parameter | Type | Description |
| --- | --- | --- |
| resource | Resource | The FHIR resource to comment on. |
| text | string | The text of the comment. |
| options | [MedplumRequestOptions](/content/docs/sdk/core.medplumrequestoptions) | _(Optional)_ Optional fetch options. |

**Returns:**

Promise< [WithId](/content/docs/sdk/core.withid) <Communication>>

The result of the create operation.

- [MedplumClient.createComment() method](/content/docs/sdk/core.medplumclient.createcomment#medplumclientcreatecomment-method/index.html)
- [Parameters](/content/docs/sdk/core.medplumclient.createcomment#parameters/index.html)
