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

# Read

> Reading customers programmatically via the Laudspeaker API

The `read` endpoint is designed to allow Laudspeaker users the programmatic ability to read existing customers.

The `read` endpoint looks up a customer document using the supplied `primary_key`, returning the customer's key/value pairs. If the customer does not exist, an error is returned.

> [!WARNING]
>
> In order to use this endpoint, a primary key must have first been selected via the [Laudspeaker UI](https://app.laudspeaker.com/).

### Authentication

**Authorization** `string` *required*

Header for authenticating with Laudspeaker. Starts with `Api-Key` followed by the API key, for example `Api-Key M4jxXt6diYz1Dds1YmhHe93KGPAUi24PlXgaiRXi`.

### Body

**primary\_key** `string` *required*

This field specifies the primary key value used to uniquely identify users.

### Response

```json 200 theme={null}
{
  "email":"test@example.com",
  "first_name":"John",
  "last_name":"Doe",
  "phone_number":"123-456-7890"
}
```

```json 400 theme={null}
{
  "error":"Primary Key not selected"
}
```

```json 404 theme={null}
{
  "error":"Customer with specified primary key does not exist"
}
```

**primary\_key** `string` *required*

The primary key of the customer object that was found.

### Example

#### Reading a customer

```cURL cURL theme={null}
curl --request POST \
  --url https://api.laudspeaker.com/customers/read \
  --header 'Authorization: Api-Key M4jxXt6diYz1Dds1YmhHe93KGPAUi24PlXgaiRXi' \
  --header 'Content-Type: application/json' \
  --data '{
  "primary_key": "test@example.com"
}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.