> 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

Endpoint, authentication, and responses for the DinMo Personalization API.

## 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
