---
title: "Create a message template. Roles: admin."
method: POST
path: "/api/message-templates"
tags: ["Messaging"]
---

# Create a message template. Roles: admin.

`POST /api/message-templates`

## Request body

- MessageTemplateRequest
  - `membershipId` integer, required
  - `name` string, required
  - `subject` string, required
  - `previewText` string
  - `bodyHtml` string, required
  - `bodyText` string, required
  - `imageUuid` string, uuid
  - `groupTypeId` integer
  - `groupId` integer
  - `groupDescendantsIncluded` boolean
  - `published` boolean, required

## Response `200`

OK

- MessageTemplateResponse
  - `success` boolean
  - `error` string
  - `messageTemplate` MessageTemplateFull
    - `audit` Audit
      - `createdTime` string, date-time
      - `modifiedTime` string, date-time
      - `modifiedBy` string
    - `messageTemplateId` integer
    - `membershipId` integer
    - `name` string
    - `subject` string
    - `previewText` string
    - `bodyHtml` string
    - `bodyText` string
    - `imageUuid` string, uuid
    - `groupDescendantsIncluded` boolean
    - `published` boolean
    - `groupType` GroupTypeCore
      - `audit` Audit
        - `createdTime` string, date-time
        - `modifiedTime` string, date-time
        - `modifiedBy` string
      - `groupTypeId` integer
      - `membershipId` integer
      - `name` string
      - `namePlural` string
      - `description` string
      - `properties` GroupTypeProperties
        - `announcementsHtml` string
        - `chatEnabled` boolean
        - `chatDefaultEnabled` boolean
        - `contactSharingDefaultEnabled` boolean
        - `postsEnabled` boolean
        - `postsDefaultEnabled` boolean
      - `root` boolean
      - `external` boolean
      - `isPrivate` boolean
    - `group` GroupCore
      - `audit` Audit
        - `createdTime` string, date-time
        - `modifiedTime` string, date-time
        - `modifiedBy` string
      - `groupId` integer
      - `groupType` GroupTypeCore
        - `audit` Audit
          - `createdTime` string, date-time
          - `modifiedTime` string, date-time
          - `modifiedBy` string
        - `groupTypeId` integer
        - `membershipId` integer
        - `name` string
        - `namePlural` string
        - `description` string
        - `properties` GroupTypeProperties
          - `announcementsHtml` string
          - `chatEnabled` boolean
          - `chatDefaultEnabled` boolean
          - `contactSharingDefaultEnabled` boolean
          - `postsEnabled` boolean
          - `postsDefaultEnabled` boolean
        - `root` boolean
        - `external` boolean
        - `isPrivate` boolean
      - `membershipId` integer
      - `name` string
      - `properties` GroupProperties
        - `chatEnabled` boolean
        - `postsEnabled` boolean
      - `nodeActive` boolean
      - `ancestryActive` boolean
      - `active` boolean
      - `root` boolean
      - `external` boolean
      - `externalReferenceId` string

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.dev/mobilecoach/apis/untitled-api.md) · [All operations](https://skmtc.dev/mobilecoach/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mobilecoach/untitled-api/revisions/f2568e11c0ab/schema)
