---
title: "Upsert a push notification template"
method: POST
path: "/push_templates"
tags: ["product:chat"]
---

# Upsert a push notification template

`POST /push_templates`

Create or update a push notification template for a specific event type and push provider

## Request body

- UpsertPushTemplateRequest, nullable
  - `enable_push` boolean — Whether to send push notification for this event
  - `event_type` 'message.new' | 'message.updated' | 'reaction.new' | 'notification.reminder_due' | 'feeds.activity.added' | 'feeds.comment.added' | 'feeds.activity.reaction.added' | 'feeds.comment.reaction.added' | 'feeds.follow.created' | 'feeds.notification_feed.updated', required — Event type. One of: message.new, message.updated, reaction.new, notification.reminder_due, feeds.activity.added, feeds.comment.added, feeds.activity.reaction.added, feeds.comment.reaction.added, feeds.follow.created, feeds.notification_feed.updated
  - `push_provider_name` string — Push provider name
  - `push_provider_type` 'firebase' | 'apn' | 'huawei' | 'xiaomi', required — Push provider type. One of: firebase, apn, huawei, xiaomi
  - `template` string — Push template

## Response `201`

Response

- UpsertPushTemplateResponse, nullable — Basic response information
  - `duration` string, required — Duration of the request in milliseconds
  - `template` PushTemplateResponse
    - `created_at` string, date-time, required — Time when the template was created
    - `enable_push` boolean, required — Whether push notification is enabled for this event
    - `event_type` string, required — Type of event this template applies to
    - `push_provider_internal_id` string, required — Internal ID of the push provider
    - `template` string — The push notification template
    - `updated_at` string, date-time, required — Time when the template was last updated

## Other responses

- `400` — Bad request
- `429` — Too many requests

---

[API](https://skmtc.net/getstream/apis/stream-api.md) · [All operations](https://skmtc.net/getstream/apis/stream-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getstream/stream-api/versions/3dba86aaa0d8/schema)
