# Push Templates API

## Get Template

<mark style="color:blue;">`GET`</mark> `https://api.codemash.io/:version/notifications/push/templates/:id`

Gets a push notification template.

#### Path Parameters

| Name    | Type   | Description                                             |
| ------- | ------ | ------------------------------------------------------- |
| version | string | The version of the API endpoint. Current latest **v1**. |
| id      | string | The ID of a template to get.                            |

#### Headers

| Name           | Type   | Description                                            |
| -------------- | ------ | ------------------------------------------------------ |
| Authorization  | string | Your project's secret key.                             |
| x-cm-projectid | string | Your project's ID. Can be passed as a query parameter. |

{% tabs %}
{% tab title="200 Returns an ID of created notification group." %}

```javascript
{
    Result: ""
}
```

{% endtab %}

{% tab title="401 Returns if the user does not have a valid permission to call this method." %}

```
```

{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title=".NET" %}

```csharp
var client = new CodeMashClient(apiKey, projectId);
var pushService = new CodeMashPushService(client);

var response = await pushService.GetTemplateAsync(
    new GetNotificationTemplateRequest
    {
        Id = Guid.Parse("{TEMPLATEID_ID}")
    }
);
```

{% endtab %}

{% tab title="Node" %}

```
```

{% endtab %}
{% endtabs %}

## Get Templates

<mark style="color:blue;">`GET`</mark> `https://api.codemash.io/:version/notifications/push/templates`

Gets many push notification templates.

#### Path Parameters

| Name    | Type   | Description                                             |
| ------- | ------ | ------------------------------------------------------- |
| version | string | The version of the API endpoint. Current latest **v1**. |

#### Headers

| Name           | Type   | Description                                            |
| -------------- | ------ | ------------------------------------------------------ |
| Authorization  | string | Your project's secret key.                             |
| x-cm-projectid | string | Your project's ID. Can be passed as a query parameter. |

{% tabs %}
{% tab title="200 Returns an ID of created notification group." %}

```javascript
{
    Result: ""
}
```

{% endtab %}

{% tab title="401 Returns if the user does not have a valid permission to call this method." %}

```
```

{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title=".NET" %}

```csharp
var client = new CodeMashClient(apiKey, projectId);
var pushService = new CodeMashPushService(client);

var response = await pushService.GetTemplatesAsync(
    new GetNotificationTemplatesRequest()
);
```

{% 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://docs.codemash.io/dashboard/notifications/push/push-templates-api.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.
