# Send Interactive Message

**POST** `/{phone_number_id}/messages`

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 to send the interactive message to the end user.

## Request

URL: `https://partnersv1.pinbot.ai/v3/{phone_number_id}/messages`

Authentication location: `header`

Authentication name: `apikey`

### Request schema


```json
{
  "type": "object",
  "properties": {
    "to": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "interactive": {
      "type": "object",
      "properties": {
        "body": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            }
          }
        },
        "type": {
          "type": "string"
        },
        "action": {
          "type": "object",
          "properties": {
            "button": {
              "type": "string"
            },
            "sections": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "rows": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "title": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "footer": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            }
          }
        },
        "header": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "type": {
              "type": "string"
            }
          }
        }
      }
    },
    "recipient_type": {
      "type": "string"
    },
    "messaging_product": {
      "type": "string"
    }
  }
}
```

### Request example


```json
{
  "to": "{{Recipient phone number}}",
  "type": "interactive",
  "interactive": {
    "body": {
      "text": "hello"
    },
    "type": "list",
    "action": {
      "button": "BUTTON_TEXT",
      "sections": [
        {
          "rows": [
            {
              "id": "SECTION_1_ROW_1_ID",
              "title": "SECTION_1_ROW_1_TITLE",
              "description": "SECTION_1_ROW_1_DESCRIPTION"
            },
            {
              "id": "SECTION_1_ROW_2_ID",
              "title": "SECTION_1_ROW_2_TITLE",
              "description": "SECTION_1_ROW_2_DESCRIPTION"
            }
          ],
          "title": "SECTION_1_TITLE"
        },
        {
          "rows": [
            {
              "id": "SECTION_2_ROW_1_ID",
              "title": "SECTION_2_ROW_1_TITLE",
              "description": "SECTION_2_ROW_1_DESCRIPTION"
            },
            {
              "id": "SECTION_2_ROW_2_ID",
              "title": "SECTION_2_ROW_2_TITLE",
              "description": "SECTION_2_ROW_2_DESCRIPTION"
            }
          ],
          "title": "SECTION_2_TITLE"
        }
      ]
    },
    "footer": {
      "text": "FOOTER_TEXT"
    },
    "header": {
      "text": "{{text string}}",
      "type": "text"
    }
  },
  "recipient_type": "individual",
  "messaging_product": "whatsapp"
}
```

## Response schema


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

## Response examples


```json
{
  "200": {
    "raw_example": "{\n\"messaging_product\": \"whatsapp\",\n\"contacts\": [\n{\n\"input\": \"9175XXXXXXXX\",\n\"wa_id\": \"9175XXXXXXXX\"\n}\n],\n\"messages\": [\n{\n\n\"id\":\n\"wamid.HBgMOTE3OTcyODkyNzEyFQIAERgSQzAwRDEzNkQ1NDFFNkM3NkEzAA=\n=\"\n}\n]\n}\nPayment API"
  }
}
```

## 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."
  }
]
```
