# Coupon Template

**POST** `/{wabaid}/message_templates`

Product: [WhatsApp](https://devdocs.pinnacle.in/docs/whatsapp.md)  
Version: [3.0](https://devdocs.pinnacle.in/docs/whatsapp/3-0.md)

This API is used for coupon code templates.

## Request

URL: `https://partnersv1.pinbot.ai/v3/{wabaid}/message_templates`

Authentication location: `header`

Authentication name: `apikey`

### Request schema


```json
{
  "type": "object",
  "properties": {
    "raw_example": {
      "type": "string"
    }
  }
}
```

### Request example


```json
{
  "raw_example": "{\n\"name\": \"copycode_temp_img_1a1\",\n\"category\": \"MARKETING\",\n\"components\": [\n{\n\"type\": \"body\",\n\"text\": \"Hey User,hi Pinnacle!\"\n},\n{\n\"type\": \"HEADER\",\n\"format\": \"image\",\n\"example\": {\n\"header_handle\": [\n\"4::aW1hZ2UvanBlZw==:ARaKNYAKteyoccHERwld0CGRr9lVfd1pQQA6uTMmz4EYDD\n8Nws1i2_ZSTlhso7vgYn6MPpGe9TUnY3TVIQ9CadEIlMPM8puJ8Uyz5XRUt631Cw:e:1\n711982059:1849455295211775:100061459561823:ARYJYd3EpvPr55CqmCo\"\n]\n}\n},\n\n{\n\"type\": \"BUTTONS\",\n\"buttons\": [\n{\n\"type\": \"COPY_CODE\",\n\"example\": \"CARIBE25\"\n},\n{\n\"type\": \"URL\",\n\"text\": \"Click\",\n\"url\": \"https:\n\"example\": [\n\"dynamic-url-example\"\n]\n},\n{\n\"type\": \"PHONE_NUMBER\",\n\"text\": \"call\",\n\"phone_number\": \"+917755991051\"\n}\n]\n}\n],\n\"language\": \"en_US\"\n}"
}
```

## Response schema


```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "category": {
      "type": "string"
    }
  }
}
```

## Response examples


```json
{
  "200": {
    "id": "123412341234123",
    "status": "APPROVED",
    "category": "MARKETING"
  }
}
```

## Status codes


```json
[
  {
    "code": 200,
    "description": "The request was successful."
  },
  {
    "code": 400,
    "description": "Bad request or invalid parameters."
  },
  {
    "code": 401,
    "description": "API key is missing or invalid."
  },
  {
    "code": 403,
    "description": "The request is not authorized for this resource."
  },
  {
    "code": 404,
    "description": "The requested resource was not found."
  },
  {
    "code": 500,
    "description": "The server encountered an error."
  }
]
```
