# Models

## The IsoDateTime object

```json
{"openapi":"3.0.3","info":{"title":"Pristo Public API","version":"1.0.0"},"components":{"schemas":{"IsoDateTime":{"type":"string","format":"date-time"}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.3","info":{"title":"Pristo Public API","version":"1.0.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}
```

## The Contact object

```json
{"openapi":"3.0.3","info":{"title":"Pristo Public API","version":"1.0.0"},"components":{"schemas":{"Contact":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid","description":"Client-owned contact identifier"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"language":{"type":"string","description":"ISO 639-1 language code (e.g. en, he)"},"name":{"type":"string"},"lastName":{"type":"string"},"customFields":{"type":"object","description":"Dynamic contact fields (string values). Keys must match fields defined on the population.","additionalProperties":{"type":"string","maxLength":255}}},"additionalProperties":false}}}}
```

## The ContactUpsertRequest object

```json
{"openapi":"3.0.3","info":{"title":"Pristo Public API","version":"1.0.0"},"components":{"schemas":{"ContactUpsertRequest":{"type":"object","required":["contact"],"properties":{"contact":{"$ref":"#/components/schemas/Contact"}}},"Contact":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid","description":"Client-owned contact identifier"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"language":{"type":"string","description":"ISO 639-1 language code (e.g. en, he)"},"name":{"type":"string"},"lastName":{"type":"string"},"customFields":{"type":"object","description":"Dynamic contact fields (string values). Keys must match fields defined on the population.","additionalProperties":{"type":"string","maxLength":255}}},"additionalProperties":false}}}}
```

## The ContactResponse object

```json
{"openapi":"3.0.3","info":{"title":"Pristo Public API","version":"1.0.0"},"components":{"schemas":{"ContactResponse":{"type":"object","properties":{"contact":{"$ref":"#/components/schemas/Contact"}}},"Contact":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid","description":"Client-owned contact identifier"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"language":{"type":"string","description":"ISO 639-1 language code (e.g. en, he)"},"name":{"type":"string"},"lastName":{"type":"string"},"customFields":{"type":"object","description":"Dynamic contact fields (string values). Keys must match fields defined on the population.","additionalProperties":{"type":"string","maxLength":255}}},"additionalProperties":false}}}}
```

## The SendEventRequest object

```json
{"openapi":"3.0.3","info":{"title":"Pristo Public API","version":"1.0.0"},"components":{"schemas":{"SendEventRequest":{"type":"object","required":["contact","type"],"properties":{"contact":{"$ref":"#/components/schemas/Contact"},"type":{"type":"string","description":"Event type identifier"},"occurredAt":{"$ref":"#/components/schemas/IsoDateTime"},"customFields":{"type":"object","description":"Dynamic event fields (string values).","additionalProperties":{"type":"string","maxLength":255}}},"additionalProperties":false},"Contact":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid","description":"Client-owned contact identifier"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"language":{"type":"string","description":"ISO 639-1 language code (e.g. en, he)"},"name":{"type":"string"},"lastName":{"type":"string"},"customFields":{"type":"object","description":"Dynamic contact fields (string values). Keys must match fields defined on the population.","additionalProperties":{"type":"string","maxLength":255}}},"additionalProperties":false},"IsoDateTime":{"type":"string","format":"date-time"}}}}
```

## The SendEventResponse object

```json
{"openapi":"3.0.3","info":{"title":"Pristo Public API","version":"1.0.0"},"components":{"schemas":{"SendEventResponse":{"type":"object","required":["ok","status","statusText","raw"],"properties":{"ok":{"type":"boolean","description":"Indicates whether the request succeeded."},"status":{"type":"integer","description":"Application-level status code returned by the API."},"statusText":{"type":"string","description":"Application-level status text returned by the API."},"body":{"nullable":true,"description":"Optional response body. Null when no structured body is returned."},"raw":{"type":"string","description":"Raw response value returned by the API."}},"additionalProperties":false}}}}
```

## The GenerateLinkRequest object

```json
{"openapi":"3.0.3","info":{"title":"Pristo Public API","version":"1.0.0"},"components":{"schemas":{"GenerateLinkRequest":{"type":"object","properties":{"expiresInMinutes":{"type":"integer","minimum":1,"description":"How long the link should stay active. If omitted, the link does not expire."},"language":{"type":"string","description":"Language to open the survey in. If omitted, the survey default language is used."},"isReusable":{"type":"boolean","description":"Indicates whether the generated link can be used multiple times. If omitted, the link is single-use."},"title":{"type":"string","description":"User-friendly name for the generated link, used for display in the UI."},"customFields":{"type":"object","description":"Custom fields to attach to the generated link. Values must be strings (max 50 characters).","additionalProperties":{"type":"string","maxLength":50}}},"additionalProperties":false}}}}
```

## The GenerateLinkResponse object

```json
{"openapi":"3.0.3","info":{"title":"Pristo Public API","version":"1.0.0"},"components":{"schemas":{"GenerateLinkResponse":{"type":"object","required":["linkId","url"],"properties":{"linkId":{"type":"string","format":"uuid","description":"Unique identifier of the generated shareable link."},"url":{"type":"string","format":"uri","description":"The generated shareable link URL."}},"additionalProperties":false}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.pristo.io/models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
