> For the complete documentation index, see [llms.txt](https://docs.dinmo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dinmo.io/customer-hub/profiles-api/api-reference.md).

# Personalization API reference

## Base URL

```
https://data-export-api.dinmo.io/v1
```

## Retrieve a record

Use the endpoint displayed on an exposure. Its URL follows this format:

```http
GET /models/{workspace_id}/{model_id}/records/{record_id}
```

| Parameter      | Description                                                 |
| -------------- | ----------------------------------------------------------- |
| `workspace_id` | The workspace identifier included in the exposure endpoint. |
| `model_id`     | The model identifier included in the exposure endpoint.     |
| `record_id`    | A value for the lookup key configured in the activation.    |

## Authentication

Send a Personalization API key in the `Authorization` header.

```http
Authorization: Bearer <API_KEY>
```

## Request example

```bash
curl --request GET \
  --url 'https://data-export-api.dinmo.io/v1/models/<workspace_id>/<model_id>/records/<record_id>' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <API_KEY>'
```

## Response

The response contains the lookup key and the attributes mapped in the activation. The exact schema depends on the exposure configuration.

```json
{
  "customer_id": "12345",
  "rec_prod_1": "SKU-001",
  "rec_prod_2": "SKU-042",
  "rec_prod_3": "SKU-017"
}
```

## Response codes

| Status | Meaning                                 | Recommended action                                                  |
| ------ | --------------------------------------- | ------------------------------------------------------------------- |
| `200`  | The record was found.                   | Use the response.                                                   |
| `401`  | The API key is missing or invalid.      | Check the `Authorization` header and key status.                    |
| `404`  | No record matches the lookup-key value. | Use your application fallback.                                      |
| `429`  | The request rate limit was exceeded.    | Retry with backoff and reduce request volume.                       |
| `5xx`  | A temporary service error occurred.     | Retry with exponential backoff and use a fallback when appropriate. |

## Integration guidance

Keep API calls on trusted server-side infrastructure or an edge function. Cache only when your use case permits it, and use a fallback response so your customer experience remains available when a record is missing or the service is temporarily unavailable.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.dinmo.io/customer-hub/profiles-api/api-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
