# Welcome to iSlash API Docs

Server REST API Guide

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Template Message</td><td></td><td></td><td><a href="/template-message/send-template-message">Template Message</a></td></tr><tr><td>Session Message</td><td></td><td></td><td><a href="/session-message/send-session-message">Session Message</a></td></tr><tr><td>Sticker List</td><td></td><td></td><td><a href="/sticker-list/get-sticker-list">Sticker List</a></td></tr><tr><td>Message Status</td><td></td><td></td><td><a href="/message-status-webhook/whatsapp-channel">Message Status (Webhook)</a></td></tr><tr><td>Broadcast Message</td><td></td><td></td><td><a href="/broadcast-message/send-broadcast-message">Broadcast Message</a></td></tr><tr><td>Labels</td><td></td><td></td><td><a href="/labels/get-labels">Labels</a></td></tr><tr><td>Schedule Message</td><td></td><td></td><td><a href="/schedule-message/send-schedule-message">Schedule Message</a></td></tr></tbody></table>


# Welcome

version 1.0

Other resources available

{% embed url="<https://learn.islash.io/>" %}


# Send Template Message

Sends template messages to your contacts

## Send a template message

> Sends a template message to a specified contact number. Requires a pre-approved template name and its associated variables.

```json
{"openapi":"3.0.0","info":{"title":"iSlash API","version":"1.0.1"},"servers":[{"url":"https://{ISLASH_API_ENDPOINT}/api/public","variables":{"ISLASH_API_ENDPOINT":{"default":"{ISLASH_API_ENDPOINT}","description":"The base hostname for the iSlash API platform."}}}],"paths":{"/send-message":{"post":{"summary":"Send a template message","description":"Sends a template message to a specified contact number. Requires a pre-approved template name and its associated variables.","parameters":[{"in":"header","name":"X-USER-TOKEN","schema":{"type":"string"},"required":true,"description":"The secret key provided by iSlash for accessing the iSlash API platform."}],"requestBody":{"description":"Template message data to send.","required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["session","template_name","identity"],"properties":{"session":{"type":"string","description":"The session key generated by your admin to control which channel can send messages via the API."},"template_name":{"type":"string","description":"The name of the approved WhatsApp template to send."},"identity":{"type":"string","description":"The target contact number (e.g., 85256872847)."},"variable_1":{"type":"string","description":"Template variable 1. The number of required variables depends on the template."},"button_url_variable_1":{"type":"string","description":"Button URL variable 1. Optional, depends on the template."},"catalog_id":{"type":"string","description":"Catalog identifier for product carousel, single product, and catalog templates. Product catalog template sending is supported for iSlash channels only. Accepts the CMS catalog ID, or the Facebook catalog ID if no matching CMS ID exists."},"product_id":{"type":"string","description":"Selected CMS product ID for single product templates."},"product_ids":{"type":"array","description":"Selected product IDs for product carousel templates. For single product templates, product_id is preferred. Accepts repeated multipart fields, a JSON array string, or comma-separated values.","items":{"type":"string"}},"catalog_fb_id":{"type":"string","description":"Facebook catalog ID for product carousel, single product, and catalog templates. Use this when sending with product_retailer_ids, product_retailer_id, or thumbnail_product_retailer_id."},"thumbnail_product_id":{"type":"string","description":"Required CMS product ID to use as the thumbnail product for catalog templates."},"thumbnail_product_retailer_id":{"type":"string","description":"Required Facebook product retailer ID to use as the thumbnail product for catalog templates when not using thumbnail_product_id."},"product_retailer_id":{"type":"string","description":"Selected Facebook product retailer ID for single product templates."},"product_retailer_ids":{"type":"array","description":"Selected product retailer IDs for product carousel templates. For single product templates, product_retailer_id is preferred. Accepts repeated multipart fields, a JSON array string, or comma-separated values.","items":{"type":"string"}},"card_url_variable_1":{"type":"string","description":"Product carousel card URL variable 1. Optional, only required when the carousel template uses a URL button with a variable."},"card_url_parameters":{"type":"array","description":"Product carousel card URL variables. Accepts a JSON array string such as [{\"card_index\":0,\"text\":\"abc\"}].","items":{"type":"object","properties":{"card_index":{"type":"integer"},"text":{"type":"string"}}}},"media":{"type":"string","format":"binary","description":"A media file to include with the template (for templates with IMAGE, VIDEO, or DOCUMENT header)."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["meta","data"],"properties":{"meta":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"data":{"type":"object","properties":{"message":{"type":"object","description":"The sent message object."},"contact":{"type":"object","description":"The contact the message was sent to.","properties":{"id":{"type":"integer","description":"The contact ID."},"identity":{"type":"string","description":"The contact phone number."},"type":{"type":"string","description":"The contact type."},"last_name":{"type":"string","description":"The contact last name."},"first_name":{"type":"string","description":"The contact first name."}}}}}}}}}}}}}}}
```


# Get Template Message

## Retrieve a list of template messages

> Retrieves all template messages available for the channel.

```json
{"openapi":"3.0.0","info":{"title":"iSlash API","version":"1.0.1"},"servers":[{"url":"https://{ISLASH_API_ENDPOINT}/api/public","variables":{"ISLASH_API_ENDPOINT":{"default":"{ISLASH_API_ENDPOINT}","description":"The base hostname for the iSlash API platform."}}}],"paths":{"/template-message":{"get":{"summary":"Retrieve a list of template messages","description":"Retrieves all template messages available for the channel.","parameters":[{"in":"header","name":"X-USER-TOKEN","schema":{"type":"string"},"required":true,"description":"The secret key provided by iSlash for accessing the iSlash API platform."},{"in":"query","name":"session","schema":{"type":"string"},"required":true,"description":"The session key generated by your admin to control which channel can send messages via the API."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["meta","data"],"properties":{"meta":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"data":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The template message ID."},"emma_template_id":{"type":"string","description":"The external template ID.","nullable":true},"namespace":{"type":"string","description":"The template namespace."},"name":{"type":"string","description":"The template name."},"components":{"type":"array","description":"The template components (HEADER, BODY, FOOTER, BUTTONS).","items":{"type":"object"}},"variable_map":{"type":"object","description":"The variable mapping for the template.","nullable":true},"language":{"type":"string","description":"The template language code."},"status":{"type":"string","description":"The template approval status."},"category":{"type":"string","description":"The template category.","nullable":true},"groups":{"type":"array","description":"Groups associated with the template.","nullable":true,"items":{"type":"string"}},"created_at":{"type":"string","description":"The creation timestamp."},"updated_at":{"type":"string","description":"The last update timestamp."}}}}}}}}}}}}}}}}
```


# Send Session Message

Sample Response

## Send a message in a session

> Sends a message to a specified contact number within a session. You can send a file along with text, but ensure that the message contains at least one of the following: text, file, file URL, or sticker.

```json
{"openapi":"3.0.0","info":{"title":"iSlash API","version":"1.0.1"},"servers":[{"url":"https://{ISLASH_API_ENDPOINT}/api/public","variables":{"ISLASH_API_ENDPOINT":{"default":"{ISLASH_API_ENDPOINT}","description":"The base hostname for the iSlash API platform."}}}],"paths":{"/send-session-message":{"post":{"summary":"Send a message in a session","description":"Sends a message to a specified contact number within a session. You can send a file along with text, but ensure that the message contains at least one of the following: text, file, file URL, or sticker.","parameters":[{"in":"header","name":"X-USER-TOKEN","schema":{"type":"string"},"required":true,"description":"The secret key provided by iSlash for accessing the iSlash API platform."}],"requestBody":{"description":"Message data to send. At least one of text, file, file_url, or sticker_id must be provided.","required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["session","identity"],"properties":{"session":{"type":"string","description":"The session key generated by your admin to control which channel can send messages via the API."},"identity":{"type":"string","description":"The target contact number (e.g., 85256872847)."},"text":{"type":"string","description":"The text message to send. At least one of text, file, file_url, or sticker_id must be provided."},"file":{"type":"string","format":"binary","description":"The file to upload as part of the message. At least one of text, file, file_url, or sticker_id must be provided."},"file_url":{"type":"string","description":"The URL of a file to send. At least one of text, file, file_url, or sticker_id must be provided."},"sticker_id":{"type":"string","description":"The ID of a sticker to send. At least one of text, file, file_url, or sticker_id must be provided."},"quoted_message_id":{"type":"integer","description":"The ID of the message to quote/reply to."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["meta","data"],"properties":{"meta":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"The response status code."},"message":{"type":"string","description":"A message describing the response status."}}},"data":{"type":"object","required":["message"],"properties":{"message":{"type":"object","required":["id","conversation_id","status","body","direction","is_auto_message","is_forwarded","is_template_message","is_sticker","is_cloned"],"properties":{"id":{"type":"integer","description":"The message ID in the iSlash system."},"conversation_id":{"type":"integer","description":"The conversation ID in iSlash."},"user":{"type":"string","description":"The name of the user who sent the message, null for API-sent messages.","nullable":true},"user_id":{"type":"integer","description":"The user ID of the sender, null for API-sent messages.","nullable":true},"contact":{"type":"object","description":"The contact associated with the message.","nullable":true},"status":{"type":"string","enum":["pending","sent","delivered","received","read","revoked","error"],"description":"The status of the message."},"body":{"type":"string","description":"The body of the message."},"message_reactions":{"type":"array","description":"Reactions to the message.","items":{"type":"object"}},"interactive":{"type":"object","description":"The interactive message content, if applicable.","nullable":true},"media_type":{"type":"string","description":"The media type of the file, if a file or sticker is sent.","nullable":true},"media_url":{"type":"string","description":"The URL of the media, if a file or sticker is sent.","nullable":true},"sid":{"type":"string","description":"The message ID from WhatsApp.","nullable":true},"direction":{"type":"string","description":"The direction of the message, always 'outbound' when sending."},"is_auto_message":{"type":"boolean","description":"Indicates if the message is automated. Always true."},"is_forwarded":{"type":"boolean","description":"Indicates if the message is forwarded. Always false."},"is_template_message":{"type":"boolean","description":"Indicates if the message is a template. Always false."},"is_sticker":{"type":"boolean","description":"Indicates if a sticker was sent."},"is_broadcast_message":{"type":"boolean","description":"Indicates if the message is a broadcast message."},"is_sms_message":{"type":"boolean","description":"Indicates if the message is an SMS message."},"is_cloned":{"type":"boolean","description":"Indicates if the message is cloned. Always false."},"quoted_message":{"type":"object","description":"The quoted message, if this message is a reply.","nullable":true},"media_thumbnail":{"type":"string","description":"The thumbnail path for the media, if a file or sticker is sent.","nullable":true},"media_filename":{"type":"string","description":"The file name of the media, if a file or sticker is sent.","nullable":true},"media_status":{"type":"string","description":"The status of the media, if a file or sticker is sent.","nullable":true},"media_resolution_x":{"type":"integer","description":"The image width in pixels, if an image is sent.","nullable":true},"media_resolution_y":{"type":"integer","description":"The image height in pixels, if an image is sent.","nullable":true},"media_archive_name":{"type":"string","description":"The archive name of the media file.","nullable":true},"stt_status":{"type":"string","description":"The speech-to-text processing status.","nullable":true},"stt_result":{"type":"string","description":"The speech-to-text result.","nullable":true},"error":{"type":"string","description":"The error message, if the message failed to send.","nullable":true},"error_code":{"type":"string","description":"The error code, if the message failed to send.","nullable":true},"message_at":{"type":"integer","description":"The timestamp of the message.","nullable":true},"sent_at":{"type":"integer","description":"The timestamp when the message was sent.","nullable":true},"delivered_at":{"type":"integer","description":"The timestamp when the message was delivered.","nullable":true},"received_at":{"type":"integer","description":"The timestamp when the message was received.","nullable":true},"read_at":{"type":"integer","description":"The timestamp when the message was read.","nullable":true},"read_by":{"type":"integer","description":"The ID of the user who read the message.","nullable":true},"read_by_user":{"type":"string","description":"The name of the user who read the message.","nullable":true},"revoked_at":{"type":"integer","description":"The timestamp when the message was revoked.","nullable":true},"error_at":{"type":"integer","description":"The timestamp when the message error occurred.","nullable":true}}}}}}}}}}}}}}}
```

{% tabs %}
{% tab title="Sending Text" %}

```json
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success"
    },
    "data": {
        "message": {
            "id": 9126,
            "conversation_id": 246,
            "user": null,
            "user_id": null,
            "contact": null,
            "status": "sent",
            "body": "Hello Testing",
            "media_type": null,
            "media_url": null,
            "sid": "gBGGhSlIRoQvAgn-vsCRNiIMutE",
            "direction": "outbound",
            "is_auto_message": true,
            "is_forwarded": false,
            "is_template_message": false,
            "is_sticker": false,
            "is_cloned": false,
            "quoted_message": null,
            "media_thumbnail": null,
            "media_filename": null,
            "media_status": null,
            "media_resolution_x": null,
            "media_resolution_y": null,
            "message_at": 1649755452,
            "sent_at": 1649755452,
            "delivered_at": null,
            "received_at": null,
            "read_at": null,
            "read_by": null,
            "read_by_user": null,
            "revoked_at": null
        }
    }
}
```

{% endtab %}

{% tab title="Sending image" %}

```json
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success"
    },
    "data": {
        "message": {
            "id": 9127,
            "conversation_id": 246,
            "user": null,
            "user_id": null,
            "contact": null,
            "status": "sent",
            "body": null,
            "media_type": "image/jpeg",
            "media_url": "https://cms.islash.io/media/9127/1649755682845881.jpeg",
            "sid": "gBGGhSlIRoQvAgkCsO17FgACU_E",
            "direction": "outbound",
            "is_auto_message": true,
            "is_forwarded": false,
            "is_template_message": false,
            "is_sticker": false,
            "is_cloned": false,
            "quoted_message": null,
            "media_thumbnail": "https://cms.islash.io/media/9127/thumb/1649755682845881-thumb.jpg",
            "media_filename": "testing.jpg",
            "media_status": "ready",
            "media_resolution_x": 681,
            "media_resolution_y": 425,
            "message_at": 1649755682,
            "sent_at": 1649755682,
            "delivered_at": null,
            "received_at": null,
            "read_at": null,
            "read_by": null,
            "read_by_user": null,
            "revoked_at": null
        }
    }
}

```

{% endtab %}

{% tab title="Sending sticker" %}

```json
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success"
    },
    "data": {
        "message": {
            "id": 9128,
            "conversation_id": 246,
            "user": null,
            "user_id": null,
            "contact": null,
            "status": "sent",
            "body": null,
            "media_type": "image/webp",
            "media_url": " https://cms.islash.io/media/9128/1649755748614211.webp",
            "sid": "gBGGhSlIRoQvAgkuFc1lWcIjD8Y",
            "direction": "outbound",
            "is_auto_message": true,
            "is_forwarded": false,
            "is_template_message": false,
            "is_sticker": true,
            "is_cloned": false,
            "quoted_message": null,
            "media_thumbnail": " https://cms.islash.io /media/9128/thumb/1649755748614211.webp",
            "media_filename": "sticker7.webp",
            "media_status": "ready",
            "media_resolution_x": 0,
            "media_resolution_y": 0,
            "message_at": 1649755748,
            "sent_at": 1649755748,
            "delivered_at": null,
            "received_at": null,
            "read_at": null,
            "read_by": null,
            "read_by_user": null,
            "revoked_at": null
        }
    }
}

```

{% endtab %}
{% endtabs %}


# Get Sticker List

{% openapi src="/files/9Toi3aQARo9nkoVg6W6F" path="https\://{ISLASH\_API\_ENDPOINT}/api/public/sticker" method="get" %}
[2.1.get\_sticker\_list.json](https://3840158533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYMAy98rfabp765nSz03%2Fuploads%2F5x6DHMavjEciaOakBDa8%2F2.1.get_sticker_list.json?alt=media\&token=69b807dc-aa51-4c35-a19d-334821940404)
{% endopenapi %}

{% code title="Sample Response" lineNumbers="true" %}

```json
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success"
    },
    "data": {
        "stickers": [
            {
                "id": 66,
                "name": "sticker7",
                "type": "image/webp",
                "width": 512,
                "height": 512
            },
            {
                "id": 67,
                "name": "sticker5",
                "type": "image/webp",
                "width": 512,
                "height": 512
            }
        ]
    }
}
```

{% endcode %}


# Get Sticker Image

{% openapi src="/files/D3snzu4tKALpQBK6yqto" path="https\://{ISLASH\_API\_ENDPOINT}/api/public/sticker/{id}" method="get" %}
[2.2.get\_sticker\_image.json](https://3840158533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYMAy98rfabp765nSz03%2Fuploads%2F0DzI0JBlqLp9wjUm29K4%2F2.2.get_sticker_image.json?alt=media\&token=5702566c-3748-466f-be10-b19ccaae5cbf)
{% endopenapi %}

{% code title="Sample Response" %}

```json
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success"
    },
    "data": {
        "stickers": [
            {
                "id": 66,
                "name": "sticker7",
                "type": "image/webp",
                "width": 512,
                "height": 512
            }
        ]
    }
}
```

{% endcode %}


# WhatsApp Channel

When there are new incoming messages, or message status is updated (e.g., sent, read), iSlash will post data to the Webhook URL.

## Incoming

The webhook format is very similar to the official API (<https://developers.facebook.com/docs/whatsapp/api/webhooks/inbound#text-message>), except the profile, wa\_id is not wrapped within contacts, and from, id, timestamp, text\\=, type is not wrapped in messages. If the incoming messages have the same timestamp, you may then use the sequence number to distinguish the sequence. Earlier incoming messages with same timestamp will have smaller sequence.

{% tabs %}
{% tab title="Incoming Text Message" %}

```json
{
    "messages": [
        {
            "profile": {
                "name": "iSlash"
            },
            "wa_id": "85256872847",
            "from": "85256872847",
            "id": "ABGGhSlIRoQvAgo-sL8KNOJ1WUnK",
            "text": {
                "body": "testing"
            },
            "type": "text",
            "sequence": "35500920",
            "timestamp": "1649756854"
        }
    ]
}

```

{% endtab %}

{% tab title="Incoming Image Message" %}

```json
{
    "messages": [
        {
            "image": {
                "sha256": "5b743dde51ec4e888f1b16e9773bafc2a36a4f0e729f2e6f60017623b9fb6069",
                "mime_type": "image/jpeg",
                "id": "5774c685-a393-42d9-a0d2-8e9c57690348"
            },
            "profile": {
                "name": "iSlash"
            },
            "wa_id": "85256872847",
            "from": "85256872847",
            "id": "ABGGhSlIRoQvAgo-sB6rm0wvh_fz",
            "type": "image",
            "sequence": "35546638",
            "timestamp": "1649834056"
        }
    ]
}


```

{% endtab %}
{% endtabs %}

## Other Message Status

Please refer to <https://developers.facebook.com/docs/whatsapp/api/webhooks/inbound> for other incoming message types.

{% tabs %}
{% tab title="Sent" %}

```json
{
    "statuses": [
        {
            "sequence": "35525319",
            "id": "gBGGhSlIRoQvAgkGNTcduk8W2CQ",
            "type": "message",
            "conversation": {
                "origin": {
                    "type": "user_initiated"
                },
                "id": "061ce662fd6f2580cee660e12d5db606"
            },
            "pricing": {
                "pricing_model": "CBP",
                "category": "user_initiated",
                "billable": true
            },
            "recipient_id": "85256872847",
            "status": "delivered",
            "timestamp": "1649812397"
        }
    ]
}

```

{% endtab %}

{% tab title="Delivered" %}

```json
{
    "statuses": [
        {
            "sequence": "35525319",
            "id": "gBGGhSlIRoQvAgkGNTcduk8W2CQ",
            "type": "message",
            "conversation": {
                "origin": {
                    "type": "user_initiated"
                },
                "id": "061ce662fd6f2580cee660e12d5db606"
            },
            "pricing": {
                "pricing_model": "CBP",
                "category": "user_initiated",
                "billable": true
            },
            "recipient_id": "85256872847",
            "status": "delivered",
            "timestamp": "1649812397"
        }
    ]
}

```

{% endtab %}

{% tab title="Read" %}

```json
{
    "statuses": [
        {
            "sequence": "35525462",
            "id": "gBGGhSlIRoQvAgkGNTcduk8W2CQ",
            "type": "message",
            "recipient_id": "85256872847",
            "status": "read",
            "timestamp": "1649812784"
        }
    ]
}

```

{% endtab %}

{% tab title="Failed to send message" %}

```json
{
    "statuses": [
        {
            "sequence": "35526170",
            "id": "gBGGhSlIRoQvAglgL8ey5qg79Q0",
            "type": "message",
            "errors": [
                {
                    "code": 1000,
                    "title": "Error message..."
                }
            ],
            "recipient_id": "85256872847",
            "status": "failed",
            "timestamp": "1649814170"
        }
    ]
}

```

{% endtab %}
{% endtabs %}


# Facebook Channel

When there are new incoming messages, or message status is updated (e.g., sent, read), iSlash will post data to the Webhook URL.

## Incoming

{% tabs %}
{% tab title="Incoming Text Message" %}

```json
{
  "object": "page",
  "entry": [
    {
      "id": "101577621799715",
      "time": 1692603667565,
      "messaging": [
        {
          "sender": {
            "id": "5696251489156017"
          },
          "recipient": {
            "id": "101577621799715"
          },
          "timestamp": 1692603667024,
          "message": {
            "mid": "m_P10R86QejqZGH_elIs8rtx-fllvb5gZ6gtMVyjR2CaW96qcItvaMPY0Os84-jit8H5cVZDdmzXFBRfN3eFqD7A",
            "text": "Hi"
          }
        }
      ]
    }
  ]
}
```

{% endtab %}

{% tab title="Incoming Image Message" %}

```json
{
  "object": "page",
  "entry": [
    {
      "id": "101577621799715",
      "time": 1692604042857,
      "messaging": [
        {
          "sender": {
            "id": "5696251489156017"
          },
          "recipient": {
            "id": "101577621799715"
          },
          "timestamp": 1692604042323,
          "message": {
            "mid": "m_G6TzKnYqb_RBaWeXRZ5EuB-fllvb5gZ6gtMVyjR2CaWyx-7bay6u57dV7nMZ3ZTuEU-vWRFgdhZMAoGA7qrMTA",
            "attachments": [
              {
                "type": "image",
                "payload": {
                  "url": "https://scontent.xx.fbcdn.net/v/t1.15752-9/368869888_252392991033601_1760216338335203218_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=58c789&_nc_ohc=JrZpInQnHvgAX80hQIK&_nc_ad=z-m&_nc_cid=0&_nc_ht=scontent.xx&oh=03_AdTHtMheWu5-6QJ0NOUj5uPb2w4FxaWCzAr4G_Te_RMHGg&oe=650A9302"
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Other Message Status

Please refer to <https://developers.facebook.com/docs/whatsapp/api/webhooks/inbound> for other incoming message types.

{% tabs %}
{% tab title="Delivered" %}

```json
{
    "object": "page",
    "entry": [
        {
            "time": 1692604786155,
            "id": "101577621799715",
            "messaging": [
                {
                    "sender": {
                        "id": "5696251489156017"
                    },
                    "recipient": {
                        "id": "101577621799715"
                    },
                    "timestamp": 1692604786005,
                    "delivery": {
                        "mids": [
                            "m_JiJWPqr36dPtP3qjT-1Bfh-fllvb5gZ6gtMVyjR2CaWeqI38tMhiZGv9vFVv78PsnStQ2O4G4p-dN6K0EgD_zw"
                        ],
                        "watermark": 1692604785165
                    }
                }
            ]
        }
    ]
}

```

{% endtab %}

{% tab title="Read" %}

```json
{
    "object": "page",
    "entry": [
        {
            "time": 1692605250846,
            "id": "101577621799715",
            "messaging": [
                {
                    "sender": {
                        "id": "5696251489156017"
                    },
                    "recipient": {
                        "id": "101577621799715"
                    },
                    "timestamp": 1692605250585,
                    "read": {
                        "watermark": 1692604785165
                    }
                }
            ]
        }
    ]
}
```

{% endtab %}
{% endtabs %}


# Send Broadcast Message

Broadcast template messages to your contacts

{% openapi src="/files/6mm83DGg3Vl6E9iman5M" path="https\://{ISLASH\_API\_ENDPOINT}/api/public/broadcast" method="post" %}
[6.1.send\_broadcast\_message.json](https://3840158533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYMAy98rfabp765nSz03%2Fuploads%2FonAtwBZx47Soonfz3jU3%2F6.1.send_broadcast_message.json?alt=media\&token=1f90964f-37e5-48a5-8398-aa4ef6ba5624)
{% endopenapi %}

{% code title="Sample Response" %}

```json
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success",
        "trace_id": "040a6b96021b02e3"
    },
    "data": []
}
```

{% endcode %}


# Get Broadcast

Get the status of your broadcast message

{% openapi src="/files/99NrYZgl6vRu3GWZh8mH" path="https\://{ISLASH\_API\_ENDPOINT}/api/public/broadcast/{id}" method="get" %}
[6.2.get\_broadcast.json](https://3840158533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYMAy98rfabp765nSz03%2Fuploads%2F5qSVeqiKDNfoKffcSDRS%2F6.2.get_broadcast.json?alt=media\&token=4b600fa2-0915-46c1-902d-3e3ef35e2572)
{% endopenapi %}

{% code title="Sample Response" %}

```json
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success",
        "trace_id": "a28d8bd80c5950ce"
    },
    "data": {
        "broadcast": {
            "id": 95,
            "name": "API Broadcast",
            "status": "pending",
            "attach_label": {
                "id": 2,
                "text": "Pending Payment",
                "color": "blue"
            },
            "total_recipients": 2,
            "progress": 0,
            "scheduled_at": 1667793600,
            "started_at": null,
            "ended_at": null,
            "reply_count": {
                "12_hours": 0,
                "24_hours": 0,
                "48_hours": 0
            }
        }
    }
}

```

{% endcode %}


# Get Labels

Get a list of available labels

## Retrieve a list of available labels

> Retrieves a list of available labels in the iSlash system.

```json
{"openapi":"3.0.0","info":{"title":"iSlash API","version":"1.0.1"},"servers":[{"url":"https://{ISLASH_API_ENDPOINT}/api/public","variables":{"ISLASH_API_ENDPOINT":{"default":"{ISLASH_API_ENDPOINT}","description":"The base hostname for the iSlash API platform."}}}],"paths":{"/label":{"get":{"summary":"Retrieve a list of available labels","description":"Retrieves a list of available labels in the iSlash system.","parameters":[{"in":"header","name":"X-USER-TOKEN","schema":{"type":"string"},"required":true,"description":"The secret key provided by iSlash for accessing the iSlash API platform."},{"in":"query","name":"session","schema":{"type":"string"},"required":true,"description":"The session key generated by your admin to control which channel can send messages via the API."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["meta","data"],"properties":{"meta":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"The response status code."},"message":{"type":"string","description":"A message describing the response status."}}},"data":{"type":"object","required":["labels"],"properties":{"labels":{"type":"array","items":{"type":"object","required":["id","text","color"],"properties":{"id":{"type":"integer","description":"The label ID in the iSlash system."},"text":{"type":"string","description":"The name of the label."},"color":{"type":"string","description":"The color of the label.","nullable":true},"sequence":{"type":"integer","description":"The display order sequence of the label.","nullable":true},"conversation_count":{"type":"integer","description":"The number of conversations associated with this label."}}}}}}}}}}}}}}}}
```

{% code title="Sample Response" %}

```json
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success",
        "trace_id": "040a6b96021b42e3"
    },
    "data": {
        "labels": [
            {
                "id": 1,
                "text": "Unassigned",
                "color": "blue"
            },
            {
                "id": 2,
                "text": "Pending Payment",
                "color": "blue"
            },
            {
                "id": 3,
                "text": "Paid",
                "color": "blue"
            }
        ]
    }
}


```

{% endcode %}


# Attach Label

{% openapi src="/files/52yuedXppTYj0FjTXOVQ" path="https\://{ISLASH\_API\_ENDPOINT}/api/public/chat-label" method="post" %}
[7.2.attach label.json](https://3840158533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYMAy98rfabp765nSz03%2Fuploads%2Fv8ZxeGeHmYDSCLWspOHG%2F7.2.attach%20label.json?alt=media\&token=d1a8b918-da5a-4901-b921-0cf9072b1ac2)
{% endopenapi %}


# Detach Label

{% openapi src="/files/4Qrr1UXRlncAhOy4P2nO" path="https\://{ISLASH\_API\_ENDPOINT}/api/public/chat-label" method="delete" %}
[7.3.detach label.json](https://3840158533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYMAy98rfabp765nSz03%2Fuploads%2FqLn7lBnYrTefVE9I7WTp%2F7.3.detach%20label.json?alt=media\&token=8e730998-a69a-4534-90fb-40515bde6e90)
{% endopenapi %}


# Get Customers By Label IDs

{% openapi src="/files/ilbZLWfXqH5fJVaqKTQ1" path="https\://{ISLASH\_API\_ENDPOINT}/api/public/chat-label/customers" method="post" %}
[7.4.get\_customers\_by\_label.json](https://3840158533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYMAy98rfabp765nSz03%2Fuploads%2Ff9y3IoJCvtTseWumxMwO%2F7.4.get_customers_by_label.json?alt=media\&token=44e0edbb-1151-4801-9bac-2cff415acf91)
{% endopenapi %}

{% code title="Response" %}

```json
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success"
    },
    "data": {
        "contacts": [
            {
                "id": 5,
                "first_name": "Tom",
                "last_name": "Chan",
                "identity": "85298765432",
                "labels": "Paid,Pending Payment",
                "assigned_to": "User 01"
            }
        ],
        "pagination": {
            "has-more-page": false,
            "per-page": 30
        }
    }
}
```

{% endcode %}


# Get Message By WAMID

## Retrieve a message by WhatsApp Message ID

> Retrieves a specific message from the iSlash system using its WhatsApp Message ID (wamid).

```json
{"openapi":"3.0.0","info":{"title":"iSlash API","version":"1.0.1"},"servers":[{"url":"https://{ISLASH_API_ENDPOINT}/api/public","variables":{"ISLASH_API_ENDPOINT":{"default":"{ISLASH_API_ENDPOINT}","description":"The base hostname for the iSlash API platform."}}}],"paths":{"/message":{"get":{"summary":"Retrieve a message by WhatsApp Message ID","description":"Retrieves a specific message from the iSlash system using its WhatsApp Message ID (wamid).","parameters":[{"in":"header","name":"X-USER-TOKEN","schema":{"type":"string"},"required":true,"description":"The secret key provided by iSlash for accessing the iSlash API platform."},{"in":"query","name":"session","schema":{"type":"string"},"required":true,"description":"The session key generated by your admin to control which channel can access messages via the API."},{"in":"query","name":"wamid","schema":{"type":"string"},"required":true,"description":"The WhatsApp Message ID of the message to retrieve."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["meta","data"],"properties":{"meta":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"The response status code."},"message":{"type":"string","description":"A message describing the response status."}}},"data":{"type":"object","required":["message"],"properties":{"message":{"type":"object","required":["id","conversation_id","status","body","direction"],"properties":{"id":{"type":"integer","description":"The message ID in the iSlash system."},"conversation_id":{"type":"integer","description":"The conversation ID in iSlash."},"status":{"type":"string","enum":["pending","sent","delivered","received","read","revoked","error"],"description":"The status of the message."},"body":{"type":"string","description":"The body of the message."},"media_type":{"type":"string","description":"The media type of the message, if applicable.","nullable":true},"media_url":{"type":"string","description":"The URL of the media, if applicable.","nullable":true},"sid":{"type":"string","description":"The WAMID from WhatsApp.","nullable":true},"direction":{"type":"string","enum":["inbound","outbound","system"],"description":"The direction of the message (inbound, outbound, system)."},"sent_at":{"type":"integer","description":"The timestamp when the message was sent.","nullable":true},"delivered_at":{"type":"integer","description":"The timestamp when the message was delivered.","nullable":true},"received_at":{"type":"integer","description":"The timestamp when the message was received.","nullable":true},"read_at":{"type":"integer","description":"The timestamp when the message was read.","nullable":true}}}}}}}}}}}}}}}
```


# Send Schedule Message

Sends schedule messages to your contacts

{% openapi src="/files/ZNK3l8posErDJBNqrmgv" path="https\://{ISLASH\_API\_ENDPOINT}/api/public/schedule-message" method="post" %}
[8.1.send\_schedule\_message.json](https://3840158533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYMAy98rfabp765nSz03%2Fuploads%2FyrYFvKJG7SZrT112shyR%2F8.1.send_schedule_message.json?alt=media\&token=80652c27-32fd-4885-8ee1-ab23343a21b9)
{% endopenapi %}

{% code title="Sample Response" %}

```json
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success",
        "trace_id": "040a6b96021b42e3"
    },
    "data": []
}
```

{% endcode %}


# Assign Conversation To User

{% openapi src="/files/x9tWUwXMrNoRnJfPXfmQ" path="https\://{ISLASH\_API\_ENDPOINT}/api/public/chat/assign" method="put" %}
[Assign to user.json](https://3840158533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYMAy98rfabp765nSz03%2Fuploads%2FLcINZlpEipZkDexdW6vS%2FAssign%20to%20user.json?alt=media\&token=f26cb7b5-9088-447b-84f2-b703d4d2c8a3)
{% endopenapi %}


# Unassign Conversation From User

{% openapi src="/files/EhL3sDr6wZoFhZ0OMLNk" path="https\://{ISLASH\_API\_ENDPOINT}/api/public/chat/assign" method="put" %}
[Unassign to user.json](https://3840158533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYMAy98rfabp765nSz03%2Fuploads%2FJw9GfKl6VroTuUeBCWqz%2FUnassign%20to%20user.json?alt=media\&token=34c645de-cd0b-4875-a69c-df9a68532066)
{% endopenapi %}


# Update Ticket Status

## PUT /chat/ticket-status

>

```json
{"openapi":"3.0.0","info":{"title":"iSlash API","version":"1.0.1"},"servers":[{"url":"https://{ISLASH_API_ENDPOINT}/api/public","variables":{"ISLASH_API_ENDPOINT":{"default":"{ISLASH_API_ENDPOINT}","description":"The base hostname for the iSlash API platform."}}}],"paths":{"/chat/ticket-status":{"put":{"summary":"","parameters":[{"in":"header","name":"X-USER-TOKEN","schema":{"type":"string"},"required":true,"description":"The secret key provided by iSlash for accessing the iSlash API platform"},{"in":"query","name":"session","schema":{"type":"string"},"required":true,"description":"The session key generated by your admin for controlling which channel is allowed to send message across API"},{"in":"query","name":"hash","schema":{"type":"string"},"required":false,"description":"If no identity, this is a must"},{"in":"query","name":"identity","schema":{"type":"string"},"required":false,"description":"If no hash, this is a must"},{"in":"query","name":"type","schema":{"type":"string","enum":["whatsapp","facebook","instagram"]},"required":false,"description":"Chat type. Required when hash is not provided."},{"in":"query","name":"status","schema":{"type":"string","enum":["open","closed"]},"required":true,"description":"To update the chat ticket status"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"data":{"type":"object","properties":{}}}}}}}}}}}}
```


# Get Users

{% openapi src="/files/UlLVfxGkaks1J2m42tgB" path="https\://{ISLASH\_API\_ENDPOINT}/api/public/user/all" method="get" %}
[Get Users.json](https://3840158533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYMAy98rfabp765nSz03%2Fuploads%2FyM1zwEh8te79ByCxHQq4%2FGet%20Users.json?alt=media\&token=83ecf60d-8f77-43c9-9d10-727fb4fe883e)
{% endopenapi %}


