# Template

Studio templates can be [created](broken://spaces/U9kiDiTGVD8kkbnKKyEn/pages/tN8KnSPe5ZavQhaLa5cx) that either apply to some or all channel types depending on the options selected when creating the template. In all cases sending the template is the same for all channels

{% hint style="info" %}
All examples below must be sent within the **template** field of a message as shown below
{% endhint %}

{% code lineNumbers="true" %}

```json
{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "template": {...}
}
```

{% endcode %}

## Text template with variable

### Studio template

![](/files/bEP5RKp8XForVvgfVW0L)

### Template body

{% code lineNumbers="true" %}

```json
{
   "projectId":"ce6a2fd6-b2fa-4f5a-a2cd-f3bd15883318",
   "version":"latest",
   "locale":"en",
   "parameters":[
      {
         "type":"string",
         "key":"name",
         "value":"Robert"
      }
   ]
}
```

{% endcode %}

## Image template with variable

### Studio template

![](/files/kh0Fe2JW210E2AhEHX4M)

### Template body

{% code lineNumbers="true" %}

```json
{
   "projectId":"7b492653-450b-4e97-b5e4-3827868e7438",
   "version":"latest",
   "locale":"en",
   "parameters":[
      {
         "type":"string",
         "key":"imageURL",
         "value":"https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media"
      }
   ]
}
```

{% endcode %}

## Image with a variable in a button

### Studio template

![](/files/HNDMqwMjEGWe7uKHYzEp)

### Template body

{% code lineNumbers="true" %}

```json
{
   "projectId":"6449eb42-dffb-41c2-81a1-7fd956d2e7a6",
   "version":"e0e9190c-c3e7-4026-8fc3-d28a77aa1a52",
   "locale":"en",
   "parameters":[
      {
         "type":"string",
         "key":"name",
         "value":"Robert"
      },
      {
         "type":"string",
         "key":"url",
         "value":"?campaignid=123456"
      }
   ]
}
```

{% endcode %}


---

# 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.bird.com/api/channels-api/message-types/template.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.
