---
title: "Query customer communications"
---

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

Path: Communications API › Communications

`GET /`

## Authentication

Requires one of the following:

- `InternalApiKey`, apiKey, in header, header `Authorization`
- `PartnerBearer`, http, header `Authorization`

## Query parameters

- `sourceId` (`queryCommunications.query.sourceId`; string, required) — External customer ID, such as a NetSuite customer internal ID.
- `acfSource` (`queryCommunications.query.acfSource`; string, optional) — Connector/source name in the ACF ledger.
  - default `"netsuite"`
- `entityType` (`queryCommunications.query.entityType`; string, optional)
  - one of `"customer"`; default `"customer"`
- `type` (`queryCommunications.query.type`; string, optional) — Comma-separated communication type filter, e.g. customer_statement.
- `status` (`queryCommunications.query.status`; string, optional) — Comma-separated status filter.
- `limit` (`queryCommunications.query.limit`; integer, optional)
  - min 1; max 100; default `50`
- `offset` (`queryCommunications.query.offset`; integer, optional)
  - min 0; default `0`

## Header parameters

- `x-organization-id` (`queryCommunications.header.x-organization-id`; string, required) — Local organization UUID used to scope ACF resolution and communication logging.
  - format `uuid`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.caretlegal.net/communications/?sourceId=string' \
  --header 'Authorization: <Authorization>' \
  --header 'x-organization-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08'
```

### TypeScript

```typescript
const url = 'https://api.caretlegal.net/communications/?sourceId=string';
const options = {
  method: 'GET',
  headers: {
    'x-organization-id': '497f6eca-6276-4993-bfeb-53cbbbba6f08',
    Authorization: '<Authorization>'
  }
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.caretlegal.net/communications/?sourceId=string"

headers = {
    "x-organization-id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "Authorization": "<Authorization>"
}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Communications for the resolved customer.

#### Example

```json
{
  "success": true,
  "data": {
    "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",
    "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
    "recipientRef": {
      "entityType": "customer",
      "acfSource": "salesforce",
      "sourceId": "001xx000003DGbYAAW"
    },
    "communications": [
      {}
    ],
    "pagination": {
      "limit": 0,
      "offset": 0,
      "count": 0
    }
  }
}
```

- `success` (`queryCommunications.response.200.success`; boolean, optional)
  - example `true`
- `data` (`queryCommunications.response.200.data`; object, optional)
  - `customerId` (`queryCommunications.response.200.data.customerId`; string, optional) — Resolved local customers.id.
    - format `uuid`
  - `organizationId` (`queryCommunications.response.200.data.organizationId`; string, optional)
    - format `uuid`
  - `recipientRef` (`queryCommunications.response.200.data.recipientRef`; object, optional)
    - `entityType` (`queryCommunications.response.200.data.recipientRef.entityType`; string, required) — Entity type to resolve through ACF.
      - one of `"customer"`
    - `acfSource` (`queryCommunications.response.200.data.recipientRef.acfSource`; string, required) — Connector/source name in the ACF ledger.
      - example `"salesforce"`
    - `sourceId` (`queryCommunications.response.200.data.recipientRef.sourceId`; string, required) — Source-system entity ID to resolve to a local customer.
      - example `"001xx000003DGbYAAW"`
  - `communications` (`queryCommunications.response.200.data.communications`; array<object>, optional)
  - `pagination` (`queryCommunications.response.200.data.pagination`; object, optional)
    - `limit` (`queryCommunications.response.200.data.pagination.limit`; integer, optional)
    - `offset` (`queryCommunications.response.200.data.pagination.offset`; integer, optional)
    - `count` (`queryCommunications.response.200.data.pagination.count`; integer, optional)

### 400

Invalid request or organization scope.

#### Example

```json
{
  "success": false,
  "error": "string",
  "details": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
```

- `success` (`queryCommunications.response.400.success`; boolean, optional)
  - example `false`
- `error` (`queryCommunications.response.400.error`; string, optional)
- `details` (`queryCommunications.response.400.details`; array<object>, optional)
  - `path` (`queryCommunications.response.400.details.path`; string, optional)
  - `message` (`queryCommunications.response.400.details.message`; string, optional)

### 401

Missing or invalid API key.

#### Example

```json
{
  "success": false,
  "error": "string",
  "details": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
```

- `success` (`queryCommunications.response.401.success`; boolean, optional)
  - example `false`
- `error` (`queryCommunications.response.401.error`; string, optional)
- `details` (`queryCommunications.response.401.details`; array<object>, optional)
  - `path` (`queryCommunications.response.401.details.path`; string, optional)
  - `message` (`queryCommunications.response.401.details.message`; string, optional)

### 403

API key lacks communications:read.

#### Example

```json
{
  "success": false,
  "error": "string",
  "details": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
```

- `success` (`queryCommunications.response.403.success`; boolean, optional)
  - example `false`
- `error` (`queryCommunications.response.403.error`; string, optional)
- `details` (`queryCommunications.response.403.details`; array<object>, optional)
  - `path` (`queryCommunications.response.403.details.path`; string, optional)
  - `message` (`queryCommunications.response.403.details.message`; string, optional)

### 404

Recipient reference did not resolve to a local customer.

#### Example

```json
{
  "success": false,
  "error": "string",
  "details": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
```

- `success` (`queryCommunications.response.404.success`; boolean, optional)
  - example `false`
- `error` (`queryCommunications.response.404.error`; string, optional)
- `details` (`queryCommunications.response.404.details`; array<object>, optional)
  - `path` (`queryCommunications.response.404.details.path`; string, optional)
  - `message` (`queryCommunications.response.404.details.message`; string, optional)


Source: https://staging.caretlegal.net/docs/reference/communications/Communications/queryCommunications/index.md
