> For the complete documentation index, see [llms.txt](https://docs.taqnyat.sa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.taqnyat.sa/api-reference/send-templates/send-image-template.md).

# Send Image Template

Use this endpoint to send an approved WhatsApp template that includes an **image**.

The image must be available through a public HTTP or HTTPS URL.

### Endpoint

```http
POST /messages/
```

Full URL:

```
https://api.taqnyat.sa/wa/v2/messages/
```

### Authentication

Include your Bearer Token in the request header:

```http
Authorization: Bearer <YOUR_TOKEN>
Content-Type: application/json
```

### Request Parameters

| Parameter       | Type   | Required | Description                                            |
| --------------- | ------ | -------- | ------------------------------------------------------ |
| `type`          | String | Yes      | Must be `image`.                                       |
| `url`           | String | Yes      | Public HTTP or HTTPS URL of the image file.            |
| `template.name` | String | Yes      | Name of the approved template in your Taqnyat account. |
| `code`          | String | Yes      | Language code of the template.                         |

The current API documentation lists `ar` as the default language code.

### Example Payload

```json
{
  "type": "image",
  "url": "https://example.com/images/order-confirmation.jpg",
  "template": {
    "name": "order_confirmation"
  },
  "code": "en"
}
```

### Example Request

```bash
curl --location 'https://api.taqnyat.sa/wa/v2/messages/' \
--header 'Authorization: Bearer <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "type": "image",
  "url": "https://example.com/images/order-confirmation.jpg",
  "template": {
    "name": "order_confirmation"
  },
  "code": "en"
}'
```

### Image Requirements

The image URL must:

* Use `HTTP` or `HTTPS`.
* Be publicly accessible.
* Return a supported image content type.
* Not require login credentials or authorization to access.

The current Taqnyat reference supports:

* `image/jpeg`
* `image/png`

with a post-processing limit of **5 MB** for images. Uploaded media through Taqnyat can be up to 100 MB, but the file must still meet WhatsApp's applicable post-processing limits.

### Template Requirements

Before sending:

* The template must already be approved.
* The template must include an image media component.
* The template name must match the approved template exactly.
* The language code must match the configured template language.
* The recipient must meet the applicable messaging and opt-in requirements.

### Response

The current Taqnyat API reference does not document the exact JSON response body for this request.

Add the actual production response after testing the endpoint in Postman.

### Message Status

After the request is accepted, use the **Delivery Status Callback** to track the message through statuses such as:

* `sent`
* `delivered`
* `read`
* `failed`

### Notes

* The media URL is used to provide the image attached to the approved template.
* Make sure the file remains accessible while the message is being processed.
* If the image cannot be retrieved or does not meet the supported requirements, message delivery may fail.
