---
title: "POST /v1/templates/{template-name}/inapp"
method: POST
path: "/v1/templates/{template-name}/inapp"
---

# POST /v1/templates/{template-name}/inapp

`POST /v1/templates/{template-name}/inapp`

Creates a new message template for messages using the in-app message channel.

## Path parameters

- `template-name` string, required

## Request body

- object
  - `InAppTemplateRequest` object, required — InApp Template Request.
    - `Content` InAppMessageContent[] — The content of the message, can include up to 5 modals. Each modal must contain a message, a header, and background color. ImageUrl and buttons are optional.
      - `BackgroundColor` string — The background color for the message.
      - `BodyConfig` object — The configuration for the message body.
        - `Alignment` 'LEFT' | 'CENTER' | 'RIGHT', required — The alignment of the text. Valid values: LEFT, CENTER, RIGHT.
        - `Body` string, required — Message Body.
        - `TextColor` string, required — The text color.
      - `HeaderConfig` object — The configuration for the message header.
        - `Alignment` 'LEFT' | 'CENTER' | 'RIGHT', required — The alignment of the text. Valid values: LEFT, CENTER, RIGHT.
        - `Header` string, required — Message Header.
        - `TextColor` string, required — The text color.
      - `ImageUrl` string — The image url for the background of message.
      - `PrimaryBtn` object — The first button inside the message.
        - `Android` object — Default button content.
          - `ButtonAction` 'LINK' | 'DEEP_LINK' | 'CLOSE', required — Action triggered by the button.
          - `Link` string — Button destination.
        - `DefaultConfig` object — Default button content.
          - `BackgroundColor` string — The background color of the button.
          - `BorderRadius` integer — The border radius of the button.
          - `ButtonAction` 'LINK' | 'DEEP_LINK' | 'CLOSE', required — Action triggered by the button.
          - `Link` string — Button destination.
          - `Text` string, required — Button text.
          - `TextColor` string — The text color of the button.
        - `IOS` object — Default button content.
          - `ButtonAction` 'LINK' | 'DEEP_LINK' | 'CLOSE', required — Action triggered by the button.
          - `Link` string — Button destination.
        - `Web` object — Default button content.
          - `ButtonAction` 'LINK' | 'DEEP_LINK' | 'CLOSE', required — Action triggered by the button.
          - `Link` string — Button destination.
      - `SecondaryBtn` object — The second button inside message.
        - `Android` object — Default button content.
          - `ButtonAction` 'LINK' | 'DEEP_LINK' | 'CLOSE', required — Action triggered by the button.
          - `Link` string — Button destination.
        - `DefaultConfig` object — Default button content.
          - `BackgroundColor` string — The background color of the button.
          - `BorderRadius` integer — The border radius of the button.
          - `ButtonAction` 'LINK' | 'DEEP_LINK' | 'CLOSE', required — Action triggered by the button.
          - `Link` string — Button destination.
          - `Text` string, required — Button text.
          - `TextColor` string — The text color of the button.
        - `IOS` object — Default button content.
          - `ButtonAction` 'LINK' | 'DEEP_LINK' | 'CLOSE', required — Action triggered by the button.
          - `Link` string — Button destination.
        - `Web` object — Default button content.
          - `ButtonAction` 'LINK' | 'DEEP_LINK' | 'CLOSE', required — Action triggered by the button.
          - `Link` string — Button destination.
    - `CustomConfig` object — Custom config to be sent to client.
    - `Layout` 'BOTTOM_BANNER' | 'TOP_BANNER' | 'OVERLAYS' | 'MOBILE_FEED' | 'MIDDLE_BANNER' | 'CAROUSEL' — The layout of the message.
    - `tags` object — A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.
    - `TemplateDescription` string — The description of the template.

## Response `201`

Success

- CreateInAppTemplateResponse
  - `TemplateCreateMessageBody` TemplateCreateMessageBody, required — Provides information about a request to create a message template.
    - `Arn` string — The Amazon Resource Name (ARN) of the message template that was created.
    - `Message` string — The message that's returned from the API for the request to create the message template.
    - `RequestID` string — The unique identifier for the request to create the message template.

## Other responses

- `480` — MethodNotAllowedException
- `481` — TooManyRequestsException
- `482` — BadRequestException
- `483` — InternalServerErrorException
- `484` — ForbiddenException

---

[API](https://skmtc.net/aws/apis/pinpoint.md) · [All operations](https://skmtc.net/aws/apis/pinpoint/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/pinpoint/revisions/c0cf580f498b/schema)
