# Template Data

The Template Endpoints offer API Methods for Texts, Forms, Polls, and Votings. These Objects are only partly considered as “Media”, their API Access therefore differ. Especially, there are no listing Methods, it is only possible to request the Data of a single Element, mostly referenced by a Reference Context.

{% hint style="info" %}
As there are no List Methods, all Methods here are Single Item Calls. Therefore, the Result Set Object will be an Object (or NULL, if no valid Item could be found).
{% endhint %}

{% hint style="info" %}
Most of the Media API Parameters are supported, if they make Sense for this kind of Objects. Especially important is the "**forceLanguage**" Parameter, as for most Domains, Forms and Polls are available in multiple Languages.
{% endhint %}

## Text Templates

## /textbyreference

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/textbyreference/:reference`

#### Path Parameters

| Name      | Type   | Description                             |
| --------- | ------ | --------------------------------------- |
| reference | string | the Reference Code of any Text Template |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Form Templates

## /formbyid

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/formbyid/:formid`

#### Path Parameters

| Name   | Type   | Description               |
| ------ | ------ | ------------------------- |
| formid | string | the ID of the target Form |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /formbyreference

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/formbyreference/:reference`

#### Path Parameters

| Name      | Type   | Description                    |
| --------- | ------ | ------------------------------ |
| reference | string | the Reference Code of any Form |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /formbycodename

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/formbycodename/:codename`

#### Path Parameters

| Name     | Type   | Description              |
| -------- | ------ | ------------------------ |
| codename | string | the Codename of any Form |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Poll Templates

## /pollbyid

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/pollbyid/:pollid`

#### Path Parameters

| Name   | Type   | Description               |
| ------ | ------ | ------------------------- |
| pollid | string | the ID of the target Poll |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /pollbyreference

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/pollbyreference/:reference`

#### Path Parameters

| Name      | Type   | Description                    |
| --------- | ------ | ------------------------------ |
| reference | string | the Reference Code of any Poll |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /pollbycodename

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/pollbyreference/:codename`

#### Path Parameters

| Name     | Type   | Description              |
| -------- | ------ | ------------------------ |
| codename | string | the Codename of any Poll |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /openpoll

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/openpoll`

This Endpoint will simply return the oldest active and valid Poll for the calling Domain.

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Voting Templates

## /votingbyid

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/votingbyid/:votingid`

#### Path Parameters

| Name     | Type   | Description                 |
| -------- | ------ | --------------------------- |
| votingid | string | the ID of the target Voting |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /votingbyreference

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/votingbyreference/:reference`

#### Path Parameters

| Name      | Type   | Description                      |
| --------- | ------ | -------------------------------- |
| reference | string | the Reference Code of any Voting |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /votingbycodename

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/votingbyreference/:codename`

#### Path Parameters

| Name     | Type   | Description                |
| -------- | ------ | -------------------------- |
| codename | string | the Codename of any Voting |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /openvoting

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/templates/openvoting`

This Endpoint will simply return the oldest active and valid Voting for the calling Domain.

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}


---

# 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://api.docs.nexx.cloud/media-api/endpoints/template-endpoint.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.
