---
title: "Add Orgunit Template"
method: POST
path: "/orgunit/{orgunitId}/templates"
tags: ["Orgunit"]
---

# Add Orgunit Template

`POST /orgunit/{orgunitId}/templates`

Templates are pre-saved messages that can be sent at any time simply by 
passing a `templateId` to the Message API. There are two types of templates:
- Text Templates: Used to send SMS.
- Media Templates: Used to send MMS.

You can create an orgunit-level template that applies directly to newly 
created groups.

To create a Media Template, first call the 'Upload Media File' API in the 
send section, then pass the 'mediaDetails' object from that response into 
the template object.

## Path parameters

- `orgunitId` string, required

## Request body

- AppTemplateRequestParams
  - `name` string, required — Template name can be alphanumeric characters along with special characters.
  - `message` string, required — This message will be sent to the subscriber when this template is used.
  - `mediaDetails` MediaDetails
    - `mediaPath` MediaPath[], nullable
      - `fileName` string
      - `extension` string
      - `fileSaveId` string
      - `mimetype` string
      - `url` string

## Response `200`

Success

- TemplateResponseExternalApiResponseNew
  - `data` TemplateResponse
    - `id` string
  - `appCode` string
  - `message` string
  - `isError` boolean

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/ministrybytext/apis/pbt-api-documentation.md) · [All operations](https://skmtc.net/ministrybytext/apis/pbt-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ministrybytext/pbt-api-documentation/revisions/ca6e9c8f430d/schema)
