NAV undefined
Documentation
JSON

Introduction

Welcome to the Damcorp API! You can use our API to access Damcorp API endpoints. This example API documentation page was created with NodeJS.

We have language bindings in NodeJS. You can view code examples in the dark area to the right.

Whatsapp

Send Message

{
    "token": "Your API Token",
    "to": "Recipients number",
    "message": "Message to be sent"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta2",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "gBGHYoITgIJpXwIJLV7tPke21fR-",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "6281234",
            "msgId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "6281234567890",
            "msgId": null,
            "status": "failed"
        }
    ],
    "message": "success"
}
{
    "responseCode":"726",
    "version":"1.3.7.1",
    "data":null,
    "message":"invalid_product"
}

This endpoint used to sent single message.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendText

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
message None Text Message Hello world!

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send HSM

{
    "token": "Your API Token",
    "to": "Recipient's number",
    "param": [ "param1", "param2" ]
}
{
    "responseCode": "000",
    "version": "1.3.4-beta2",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "gBGHYoITgIJpXwIJLV7tPke21fR-",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
    "responseCode": "725",
    "version": "1.3.4-beta3",
    "data": null,
    "message": "invalid template"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "62812345",
            "msgId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode":"726",
    "version":"1.3.7.1",
    "data":null,
    "message":"invalid_product"
}

This endpoint used to sent text messages with template.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/template_name (You can use "welcome_msg" template with 2 parameter)

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
param None Parameters of the template ["Damcorp","Team"]

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send HSM Media Header Image

{
    "to": [
        "+6285123456789"
    ],
    "token": "eyJ0eXAiOiJKV1QiLCxxxxxxxxx",
    "param": [
        "Test"
    ],
    "header": {
        "type": "image",
        "data": "https://example.com/file.jpg"
    }
}
{
    "responseCode": "000",
    "version": "1.4.0",
    "data": [
        {
            "to": "62851234567890",
            "msgId": "gBGHYoV3YZQDHwxxxxxx",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to sent hsm media with image file.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/template_name (example: hsm_media_dummy)

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
header None Object type "header": { "type": "image", "data": "https://example.com/file.jpg" }
param None Parameters of the template ["Test"]

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send HSM Media Header Document

{
    "to": [
        "+6285123456789"
    ],
    "token": "eyJ0eXAiOiJKV1QiLCxxxxxxxxxx",
    "param": [
        "Test"
    ],
    "header": {
        "type": "document",
        "data": "https://example.com/file.pdf",
        "filename": "Dokumen API Damcorp"
    }
}
{
    "responseCode": "000",
    "version": "1.4.0",
    "data": [
        {
            "to": "62851234567890",
            "msgId": "gBGHYoV3YZQDHwxxxxxx",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to sent hsm media with pdf file.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/template_name (example: hsm_report_dummy)

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
header None Header document type for the template "header": { "type": "document", "data": "https://example.com/file.pdf", "filename":"Dokumen API Damcorp" }
param None Parameters of the template ["Test"]

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send HSM Media Header Video

{
    "to": [
        "+6285123456789"
    ],
    "token": "eyJ0eXAiOiJKV1QiLCxxxxxxxxxx",
    "param": [
        "Test"
    ],
    "header": {
        "type": "video",
        "data": "https://example.com/file.mp4"
    }
}
{
    "responseCode": "000",
    "version": "1.4.0",
    "data": [
        {
            "to": "62851234567890",
            "msgId": "gBGHYoV3YZQDHwxxxxxx",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to sent hsm media with video file.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/template_name (example: hsm_video_dummy)

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
header None Object type "header": { "type": "video", "data": "https://example.com/file.mp4" }
param None Parameters of the template ["Test"]

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send HSM Header Text

{
    "to": [
        "+6285123456789"
    ],
    "token": "eyJ0eXAiOiJKV1QiLCxxxxxxxxxxxxx",
    "param": [
        "dummy",
        "text"
    ],
    "header": {
        "type": "text",
        "data": "welcome"
    }
}
{
    "responseCode": "000",
    "version": "1.4.0",
    "data": [
        {
            "to": "628123456789",
            "msgId": "gBGHYoV3YZQDHwxxxxxx",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to sent hsm with header text.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/template_name (example: hsm_text_dummy)

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
header None Object type "header": { "type": "text", "data": "welcome" }
param None Parameters of the template ["dummy","text"]

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send HSM Limited-Time Offer (LTO)

{
    "token": "<token>",
    "to": "+628123456789",
    "param": ["test","5w","we2323"],
    "header": {
       "type": "image",
       "data": "https://yoururlimage/image.jpg"
    },
    "limited_time_offer": {
        "type": "limited_time_offer",
        "parameters": [
          {
            "type": "limited_time_offer",
            "limited_time_offer": {
              "expiration_time_ms": 1209600000
            }
          }
        ]
    },
    "buttons": [
        {
            "type": "copy_code",
            "coupon_code": "CARIBE25"
        }, 
        {
            "type": "url",
            "url_param": "test2"
        }
    ]
}
{
    "responseCode": "000",
    "version": "1.5.18",
    "data": [
        {
            "to": "628123456789",
            "msgId": "HBgLNjI4MTExMzE5NDQVAgARGBI4MjhCNzg0MjNENEIyODgyNEMA",
            "status": "sent",
            "error_status": null,
            "error_msg": null,
            "trxid": 123456789
        }
    ],
    "message": "success"
}

Send HSM Limited-Time Offer Templates (LTO) with header image, copy code button and url button

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/example_lto

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
param None Your template parameters ["test","5w","we2323"]
header None Object type "header": { "type": "image", "data": "https://example.com/file.jpg" }
buttons type copy_code None Type of the button {"type": "copy_code","coupon_code": "CARIBE25"}
buttons url None Your url { "type": "url", "url_param": "test2"}
limited_time_offer None Required if template uses offer expiration details, otherwise omit
expiration_time_ms None expiration time 1209600000

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send HSM Coupon Code

{
    "token": "<token>",
    "to": "+628123456789",
    "param": ["test","5w","we2323"],
    "buttons": [
        {
            "type": "copy_code",
            "coupon_code": "222xx2122"
        }
    ]
}
{
    "responseCode": "000",
    "version": "1.5.18",
    "data": [
        {
            "to": "628123456789",
            "msgId": "HBgLNjI4MTExMzE5NDQVAgARGBI4MjhCNzg0MjNENEIyODgyNEMA",
            "status": "sent",
            "error_status": null,
            "error_msg": null,
            "trxid": 123456789
        }
    ],
    "message": "success"
}

Send Coupon Code Templates with buttons

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/example_lto

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
param None Your template parameters ["test","5w","we2323"]
buttons type copy_code None Type of the button {"type": "copy_code","coupon_code": "CARIBE25"}

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send HSM Catalog Multi-Product (MPM)

{
    "token": "<token>",
    "to": "+628123456789",
    "param": ["test","5w","we2323"],
    "buttons": [{
        "type": "catalog",
        "action": {
             "thumbnail_product_retailer_id": "fgbid80y0f",
             "sections": [
                {
                  "title": "Popular Bundles",
                  "product_items": [
                    {
                      "product_retailer_id": "fgbid80y0f"
                    },
                    {
                      "product_retailer_id": "gq7up1s3xf"
                    }
                  ]
                },
                {
                  "title": "Premium Packages",
                  "product_items": [
                    {
                      "product_retailer_id": "w0xing60by"
                    }
                  ]
                }
              ]
        }
    }]
}
{
    "responseCode": "000",
    "version": "1.5.18",
    "data": [
        {
            "to": "628123456789",
            "msgId": "HBgLNjI4MTExMzE5NDQVAgARGBI4MjhCNzg0MjNENEIyODgyNEMA",
            "status": "sent",
            "error_status": null,
            "error_msg": null,
            "trxid": 123456789
        }
    ],
    "message": "success"
}

Send HSM Multi-Product Templates (MPM)

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/example_lto

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
param None Your template parameters ["test","5w","we2323"]
buttons type catalog None list for your catalog multi product catalog_id: 6395xxxxxxxx (Text type), sections: [{"title": "the-section-title", "product_items": [{ "product_retailer_id": "1y3tm4siby" },{ "product_retailer_id": "55s66pcc4o" }]}]

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send HSM Combined Button

{
    "token": "<token>",
    "to": "+628123456789",
    "param": ["test","5w","we2323"],
}
{
    "token": "<token>",
    "to": "+628123456789",
    "param": ["test","5w","we2323"],    
    "buttons": [
        {},
        {
            "type": "copy_code",
            "coupon_code": "222xx2122"
        }, 
        {
        "type": "url",
        "url_param": "test2"
        }
    ]
}
{
    "responseCode": "000",
    "version": "1.5.18",
    "data": [
        {
            "to": "628123456789",
            "msgId": "HBgLNjI4MTExMzE5NDQVAgARGBI4MjhCNzg0MjNENEIyODgyNEMA",
            "status": "sent",
            "error_status": null,
            "error_msg": null,
            "trxid": 123456789
        }
    ],
    "message": "success"
}

Send HSM Combined Button

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/example_lto

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
param None Your template parameters ["test","5w","we2323"]
buttons type copy_code None Type of the button {"type": "copy_code","coupon_code": "CARIBE25"}
buttons type Quick Reply None For static data just send {} param {}
buttons type url None Your url { "type": "url", "url_param": "test2"}

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

if combine static and dynamic buttons, in static object just sent empty object example {}

Send HSM Flow

{
    "token": "<token>",
    "to": "+628123456789",
    "param": ["test","5w","we2323"],
    "buttons": [{
        "type": "flow",
        "action": {
            "flow_token": "FLOW_TOKENx"
        }
    }]
}
{
    "responseCode": "000",
    "version": "1.5.10",
    "data": [
        {
            "to": "628123456789",
            "msgId": "HBgLNjI4MTExMzE5NDQVAgARGBI5MjY5MkXXXXXXXXXXXXXX",
            "status": "sent",
            "error_status": null,
            "error_msg": null,
            "trxid": 123456789
        }
    ],
    "message": "success"
}

This endpoint used to send hsm flow type button.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/example_flow

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
param None Your template parameters ["test","5w","we2323"]
buttons type None Type of the button flow
buttons action flow_token None Your flow token "FLOW_TOKENx"

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

{
    "token": "<token>",
    "to": [
        "6281234567890"
    ],
    "param": [],
    "carousel": {
        "type": "CAROUSEL",
        "cards": [
            {
                "card_index": <CARD_INDEX>,
                "components": [
                    {
                        "type": "HEADER",
                        "parameters": [
                            {
                                "type": "IMAGE",
                                "image": {
                                    "id": "<HEADER_ASSET_ID>"
                                }
                            }
                        ]
                    },
                    {
                        "type": "BODY",
                        "parameters": [
                            {
                                "type": "TEXT",
                                "text": "<CARD_BODY_VARIABLE>"
                            },
                            {
                                "type": "TEXT",
                                "text": "<CARD_BODY_VARIABLE>"
                            }
                        ]
                    },
                    {
                        "type": "BUTTON",
                        "sub_type": "QUICK_REPLY",
                        "index": "<BUTTON_INDEX>",
                        "parameters": [
                            {
                                "type": "PAYLOAD",
                                "payload": "<QUICK_REPLY_BUTTON_PAYLOAD>"
                            }
                        ]
                    },
                    {
                        "type": "button",
                        "sub_type": "URL",
                        "index": "<BUTTON_INDEX>",
                        "parameters": [
                            {
                                "type": "payload",
                                "payload": "<URL_BUTTON_PAYLOAD>"
                            }
                        ]
                    }
                ]
            }
        ]
    }
}
{
    "responseCode": "000",
    "version": "1.5.09",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "HBgNNjI4MjEyNTQ4MDg1MhUCABEYEkUyRDVBQUJGRTQyQjc5NTM2QQA=",
            "status": "sent",
            "error_status": null,
            "error_msg": null,
            "trxid": 623600859
        }
    ],
    "message": "success"
}

This endpoint used to send hsm carousel type.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/carousel_template_example

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
param None Parameters of the template ["Damcorp","Team"]
type CAROUSEL Carousel type CAROUSEL
cards None Cards must have a media header (image or video) and can optionally include body text Show on JSON example
<BUTTON_INDEX> Integer None Required. Zero-indexed order in which button appears at the bottom of the template message. 0 indicates the first button, 1 indicates second button, etc. 0
<CARD_INDEX> Integer None Required. Zero-indexed order in which card appears within the card carousel. 0 indicates first card, 1 indicates second card, etc. 0
<CARD_BODY_VARIABLE> String None Required if card body text uses a variable. Card body text variable. There is no maximum character limit on this value, but counts against the card body text limit of 160 characters. 20OFF
<HEADER_ASSET_ID> None Required. Media asset handle 24230790383178626
<QUICK_REPLY_BUTTON_PAYLOAD> String None Optional. Value to be included in messages webhooks (messages.button.payload) when the button is tapped 59NqSd
<URL_BUTTON_PAYLOAD> String None Required if the URL button uses a variable. URL button variable value. last_chance_2023

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send Authentication Message

{
    "to": [
        "+6285123456789"
    ],
    "token": "eyJ0eXAiOiJKV1QiLCxxxxxxxxxxxxx",
    "param": [
        "123456"
    ],
    "buttons": [
        {
            "text": "123456"
        }
    ]
}
{
    "responseCode": "000",
    "version": "1.4.0",
    "data": [
        {
            "to": "628123456789",
            "msgId": "gBGHYoV3YZQDHwxxxxxx",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to sent hsm with header text.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendHsm/template_name (example: copy_code)

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
param None Parameters of the template ["123456"]
button None Button operation for auth template "123456"

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send Sticker

{
    "token": "Your API Token",
    "to": "Recipients number",
    "sticker": "Sticker url"
}
{
    "responseCode": "000",
    "version": "1.4.7",
    "data": [
        {
            "to": "6285776194031",
            "msgId": "gBGHYoV3YZQDHwIJB59FuXoQUjmV",
            "mediaId": "wIJB59FuXoQUjmVgBGHYoV3YZQDH",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "6281234",
            "msgId": null,
            "mediaId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "6281234567890",
            "msgId": null,
            "mediaId": null,
            "status": "failed"
        }
    ],
    "message": "success"
}

This endpoint used to sent sticker.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendSticker

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
sticker None Sticker URL with webp format https://res.cloudinary.com/yanuaran/image/upload/v1590680126/WhatsApp_Image_2020-05-28_at_22.31.30.webp

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send Location

{
    "token": "eyJ0eXAiOiJKVxxxxx",
    "to": ["085123456789"],
    "header": {
        "type": "location",
        "data": {
            "latitude": "37.483307",
            "longitude": "122.148981",
            "name": "Pablo Morales",
            "address": "1 Hacker Way, Menlo Park, CA 94025"
        }
    },
    "param": []
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to send a location.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendLocation

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
longitude None Location longitude -122.425332
latitude None Location latitude 37.758056
name None Place Name "John Doe House"
address None Detail location "1 Hacker Way, Menlo Park, CA 94025"

Note :

You must include a (+) sign if you are using a country code. Example: + 6285xxx

Send Contact

{
    "token": "eyJ0eXAiOiJKVxxxxx",
    "to": "+6285123456789",
    "phone": "+62123456789",
    "name": "John Doe"
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to send a contact.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendContact

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
phone None Telephone number to be sent +62123456789
name None Name of number owner John Doe

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Interactive Message Templates

{
    "token": "eyJ0eXAiOiJKVxxxxx",
    "to": "+6285123456789",
    "param": ["*John Doe Office*"],
    "buttons": {
        "type":"url",
        "url_param": "example"
    }
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

{
    "token": "eyJ0eXAiOiJKVxxxxx",
    "to": "+6285123456789",
    "param": ["*John Doe Office*","*123456*","*packing process*"]
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

{
    "token": "eyJ0eXAiOiJKVxxxxx",
    "to": "+6285123456789",
    "param": [],
    "buttons": {
        "url_param": "login"
    }
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

{
    "token": "eyJ0eXAiOiJKVxxxxx",
    "to": "+6285123456789",
    "param": ["*EXAMPLEPAY*"],
    "header": {
        "type": "text"
    },
    "buttons": {
        "url_param": "examplepay"
    }
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

{
    "token": "eyJ0eXAiOiJKVxxxxx",
    "to": "+6285123456789",
    "param": ["*John Doe*","*we*"]
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

Interactive message templates expand the content you can send recipients beyond the standard message template and media messages template types to include interactive buttons using the components object.

There are two types of predefined buttons offered:
Call-to-Action — Allows your customer to call a phone number and visit a website
Quick Reply — Allows your customer to return a simple text message

These buttons can be attached to text messages or media messages. Once your interactive message templates have been created and approved, you can use them in notification messages as well as customer service/care messages.

HTTP Request

A). This is example for hsm change an address
POST https://icwaba.damcorp.id/whatsapp/sendHsm/ubah_alamat

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
params None Template message param ["John Doe Office"]
buttons None Template button text { url_params: "login" }

Note: If you choose Call-to-Action and your param is not null, the buttons key must be added.




B). This is example for hsm goods receiptions confirm
POST https://icwaba.damcorp.id/whatsapp/sendHsm/konfirmasi_penerimaan_barang

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
params None Template message param ["John Doe Office","123456","packing process"]




C). This is example for hsm auto respons
POST https://icwaba.damcorp.id/whatsapp/sendHsm/auto_respon

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
params None Template message param []
buttons None Template button text { url_params: "login" }




D). This is example for hsm payment confirmation
POST https://icwaba.damcorp.id/whatsapp/sendHsm/konfirmasi_pembayaran

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
params None Template message param (for example with payment method) ["EXAMPLEPAY"]
header (Optional) None Header of your template Payment Confirmation
buttons None Template button text { url_params: "examplepay" }




E). This is example for hsm follow up confirmation
POST https://icwaba.damcorp.id/whatsapp/sendHsm/fu_phone_web

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
params None Template message param ["John Doe","we"]

Interactive (Reply Button)

{
    "token": "<token>",
    "to": "+6281234567890",
    "message": "Test",
    "type": "button",
    "buttons": [
        {
            "text": "Yes"
        },
        {
            "text": "No"
        }
    ]
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to reply button.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendInteractive

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
message None Text Message Hello
type button Reply button type button
buttons None Button message [{"text": "Yes"},{"text": "No"}]

Note :

  1. You must include a (+) sign if you are using a country code. Example: +6285xxx
  2. Button message max 3 buttons.

Interactive (Reply Button with Header Text)

{
    "token": "<token>",
    "to": "+6281234567890",
    "message": "Test",
    "type": "button",
    "header": {
        "type": "text",
        "data": "Hello!"
    },
    "buttons": [
        {
            "text": "Yes"
        },
        {
            "text": "No"
        }
    ]
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to reply button with header text.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendInteractive

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
message None Text Message Hello
type button Reply button type button
header None The header text in the template Hello!
buttons None Button message [{"text": "Yes"},{"text": "No"}]

Note :

  1. You must include a (+) sign if you are using a country code. Example: +6285xxx
  2. Button message max 3 buttons.

Interactive (Reply Button with Header Media)

{
    "token": "<token>",
    "to": "+6281234567890",
    "message": "Test",
    "type": "button",
    "header": {
        "type": "image (If the header media type is image)",
        "data": "https://cloud-bucket.damcorp.id/whatsapp/test/menu.jpg"
    },
    "buttons": [
        {
            "text": "Yes"
        },
        {
            "text": "No"
        }
    ]
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to reply button with header media (image/document/video) type.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendInteractive

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
message None Text Message Hello
type button Reply button type button
header None The header media in the template, adjust it with the header in your template Hello!
buttons None Button message [{"text": "Yes"},{"text": "No"}]

Note :

  1. You must include a (+) sign if you are using a country code. Example: +6285xxx
  2. Button message max 3 buttons.
{
    "token": "<token>",
    "to": "+6281234567890",
    "message": "Test",
    "type": "button",
    "buttons": [
        {
            "text": "Yes"
        },
        {
            "text": "No"
        }
    ],
    "footer": "Thank you."
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to reply button with footer.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendInteractive

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
message None Text Message Hello
type button Reply button type button
buttons None Button message [{"text": "Yes"},{"text": "No"}]
footer None The footer in the template Thank you.

Note :

  1. You must include a (+) sign if you are using a country code. Example: +6285xxx
  2. Button message max 3 buttons.

Interactive (List Message Type)

{
    "token": "<token>",
    "to": "+6281234567890",
    "message": "Test",
    "type": "list",
    "list_title": "Menu",
    "list": [
        {
            "title": "Option 1",
            "description": "description 1"
        },
        {
            "title": "Option 2",
            "description": "Description 2"
        }
    ]
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to create list message.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendInteractive

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
message None Text Message Hello
type list The type of the message list
list_title None The title on the list Menu
list None The list data [{"title": "Option 1"},{"title": "Option 2"}]

Note :

  1. You must include a (+) sign if you are using a country code. Example: +6285xxx
  2. List menu options max 10 lists.

Interactive (List Message Type with Header Text)

{
    "token": "<token>",
    "to": "+6281234567890",
    "message": "Test",
    "type": "list",
    "list_title": "Menu",
    "list": [
        {
            "title": "Option 1",
            "description": "description 1"

        },
        {
            "title": "Option 2",
            "description": "description 2"
        }
    ],
    "header": {
        "type": "text",
        "data": "Hi"
    }
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to create list message with header text.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendInteractive

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
message None Text Message Hello
type list The type of the message list
list_title None The title on the list Menu
list None The list data [{"title": "Option 1"},{"title": "Option 2"}]
header text The header on the message Hi

Note :

  1. You must include a (+) sign if you are using a country code. Example: +6285xxx
  2. List menu options max 10 lists.

Catalog (Single Product)

{
    "token": "T0k3N",
    "to": "62XXXXXX",
    "message": "Selamat datang, silahkan pilih menu",
    "type": "product",
    "product": {
        "catalog_id": "6395xxxxxxxx",
        "product_retailer_id": "retailerda"
    },
    "footer": "This is footer"
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to send catalog single product.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendInteractive

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
message None Text Message Hello
type button Reply button type button
product catalog_id None id catalog 6395xxxxxxxx
product product_retailer_id None product retailer id retailerjohndoe
footer None Footer text message Thank you!

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Catalog (Multi Product)

{
    "token": "T0k3N",
    "to": "62XXXXXX",
    "message": "Selamat datang, silahkan pilih menu",
    "type": "product_list",
    "product_list": {
        "catalog_id": "6395xxxxxxxx",
        "sections": [
            {
                "title": "the-section-title",             
                "product_items": [
                    { "product_retailer_id": "1y3tm4siby" },
                    { "product_retailer_id": "55s66pcc4o" }
                ]
            },
            {
                "title": "the-section-title",
                "product_items": [
                    { "product_retailer_id": "1y3tm4siby" }
                ]
            }
        ]
    },
    "footer": "This is footer",
    "header": {
        "type": "text",
        "data": "Hello!"
    }
}
{
    "responseCode": "000",
    "version": "1.4.5-beta4",
    "data": [
        {
            "to": "6285123456789",
            "msgId": "gBGHYoV3YZQDHwIJJQccDu-abcde",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to send catalog multi product.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendInteractive

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 6285123456789
message None Text Message Hello
type button Reply button type button
product_list None list for your catalog multi product catalog_id: 6395xxxxxxxx (Text type), sections: [{"title": "the-section-title", "product_items": [{ "product_retailer_id": "1y3tm4siby" },{ "product_retailer_id": "55s66pcc4o" }]}]
header None Object type "header": { "type": "text", "data": "Hello!" }
footer None Footer text message Thank you!

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send Image

{
  "to": "Recipients number",
  "token": "Your API Token",
  "image": "you can to use base64, image URL, or image ID",
  "caption": "Image caption"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta2",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "gBGHYoITgIJpXwIJvlUgGqfqZ7XW",
            "mediaId": "65aa4574-668a-4f16-a193-184f01084680",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
  "responseCode": "000",
  "version": "1.3.4-beta3",
  "data": [
    {
      "to": "6281234567890",
      "msgId": null,
      "mediaId": "",
      "status": "failed"
    }
  ],
  "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "62812345",
            "msgId": null,
            "mediaId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode":"726",
    "version":"1.3.7.1",
    "data":null,
    "message":"invalid_product"
}

This endpoint used to sent image.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendImage

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Recipient number 85567891234
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
image None Image file (You can to use base64, image URL, or image ID) data:image/jpeg;base64,iVBORw0KGgoA
caption None Image captions Test send image

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send Document (PDF)

{
  "to": "Recipient's number",
  "token": "Your API Token",
  "document": "you can to use base64, document URL, or document ID",
  "caption": "Document caption",
  "filename": "Document"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta2",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "gBGHYoITgIJpXwIJvlUgGqfqZ7XW",
            "mediaId": "65aa4574-668a-4f16-a193-184f01084680",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "6281234567890",
            "msgId": null,
            "mediaId": "",
            "status": "failed"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "62812345",
            "msgId": null,
            "mediaId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode":"726",
    "version":"1.3.7.1",
    "data":null,
    "message":"invalid_product"
}

This endpoint used to sent document file (PDF format).

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendDocument

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
document None Document file (You can to use base64, document URL, or document ID) data:application/pdf;base64,iVBORw0KGgoA
caption None Image captions Test send image
filename None Name of file Documentation

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send Audio (AAC)

{
  "to": "Recipient's number",
  "token": "Your API Token",
  "audio": "you can to use base64, audio URL, or audio ID"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta2",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "gBGHYoITgIJpXwIJvlUgGqfqZ7XW",
            "mediaId": "65aa4574-668a-4f16-a193-184f01084680",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "62812345",
            "msgId": null,
            "mediaId": "",
            "status": "failed"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "62812345",
            "msgId": null,
            "mediaId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode":"726",
    "version":"1.3.7.1",
    "data":null,
    "message":"invalid_product"
}

This endpoint used to sent audio file (AAC format).

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendAudio

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
audio None Document file (You can to use base64, audio URL, or audio ID) data:application/aac;base64,iVBORw0KGgoA

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Send Video

{
  "to": "Recipients number",
  "token": "Your API Token",
  "video": "you can to use base64, video URL, or video ID",
  "caption": "your video captions"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta2",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "gBGHYoITgIJpXwIJvlUgGqfqZ7XW",
            "mediaId": "65aa4574-668a-4f16-a193-184f01084680",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
  "responseCode": "000",
  "version": "1.3.4-beta3",
  "data": [
    {
      "to": "6281234567890",
      "msgId": null,
      "mediaId": "",
      "status": "failed"
    }
  ],
  "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "62812345",
            "msgId": null,
            "mediaId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode":"726",
    "version":"1.3.7.1",
    "data":null,
    "message":"invalid_product"
}

This endpoint used to sent image.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/sendVideo

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Recipient's number, use prefix code +62/62 +628567712345/628567712345
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
video None Video file (You can to use base64, video URL, or video ID) data:image/jpeg;base64,iVBORw0KGgoA
caption None Video captions Test send video

Note :

You must include a (+) sign if you are using a country code. Example: +6285xxx

Upload Media

{
    "responseCode": "000",
    "version": "1.4.87",
    "data": [
        {
            "id": "334668083xxxxxxx"
        }
    ],
    "message": "success"
}

This endpoint used to upload media.

HTTP Request

POST https://icwaba.damcorp.id/whatsapp/uploadMedia

Parameter

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
media None Media data with format .jpeg/.jpg/.png https://previews.123rf.com/images/aquir/aquir1311/aquir131100316/23569861-sample-grunge-red-round-stamp.jpg

Download Media (by ID)

{
    "responseCode": "000",
    "version": "1.2.2",
    "data": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/7QCEUGhvdG9zaG9wIDMxxxxxx",
    "message": "success"
}

This endpoint used to download media by media ID.

HTTP Request

GET https://icwaba.damcorp.id/whatsapp/downloadMedia

Parameter

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
id None Media ID (You can get from send media (image, document, audio) response on 'data') 9bacdef-ae01-5xxx-xxx9-e0c678910

Helpdesk

API Get One Ticket

{
    "responseCode": "000",
    "version": "2.0.4",
    "message": "success",
    "data": {
        "companyNumber": "08123456789",
        "ticket": [
            {
                "dateCreate": "2019-02-15 18:00:09",
                "dateClose": "2019-02-16 17:31:01",
                "ticketCode": "34",
                "problem": "What happen?",
                "customerName": "Jhon",
                "customerNumber": "6282101234567",
                "operatorName": "Daisy",
                "operatorNumber": "0898765432101",
                "totalResponse": "4",
                "status": "close",
                "messages": [
                    {
                        "dateCreate": "2019-02-15 17:59:56",
                        "body": "Examples",
                        "messageType": "text",
                        "type": "USER_ANSWER",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 17:59:57",
                        "body": "Hi, Jhon. Any questions? We'll help you.",
                        "messageType": "text",
                        "type": "QUESTION_PROBLEM",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 18:00:09",
                        "body": "I want to test an API.",
                        "messageType": "text",
                        "type": "USER_ANSWER",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 18:00:10",
                        "body": "Ok Jhon, please wait for answer from our customer service. Your ticket number is: *#34* 🤝",
                        "messageType": "text",
                        "type": "ANSWER_TICKET",
                        "caption": null
                    }
                ]
            }
        ],
        "total": 1,
        "companyName": "DAM Corp."
    }
}

This endpoint used to get One Ticket.

HTTP Request

GET https://drccsapi.damcorp.id/api/v2/report/ticket/?ticketCode=79&with_message=true

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Key Default Description Example
ticketCode None Ticket Code (Mandatory) 34
with_message None To show all ticket messages. This is a boolean type (Optional) true
{
    "responseCode": "000",
    "version": "2.0.4",
    "message": "success",
    "data": {
        "companyNumber": "08123456789",
        "ticket": [
            {
                "dateCreate": "2019-02-15 18:00:09",
                "dateClose": "2019-02-16 17:31:01",
                "ticketCode": "34",
                "problem": "What happen?",
                "customerName": "Jhon",
                "customerNumber": "6282101234567",
                "operatorName": "Daisy",
                "operatorNumber": "0898765432101",
                "totalResponse": "1",
                "status": "close",
            }
        ],
        "total": 1,
        "companyName": "DAM Corp."
    }
}

HTTP Request

GET https://drccsapi.damcorp.id/api/v2/report/ticket/?ticketCode=79&with_message=false

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Key Default Description Example
ticketCode None Ticket Code (Mandatory) 34
with_message None To show all ticket messages. This is a boolean type (Optional) false

API Get List Ticket By Status

{
    "responseCode": "000",
    "version": "2.0.4",
    "message": "success",
    "data": {
        "companyNumber": "08123456789",
        "ticket": [
            {
                "dateCreate": "2019-03-27 16:01:24",
                "dateClose": "2019-03-27 16:05:33",
                "ticketCode": "34",
                "problem": "API test",
                "customerName": "Jhon",
                "customerNumber": "628212345678",
                "operatorName": "Daisy",
                "operatorNumber": "089876543210",
                "totalResponse": "1",
                "status": "open"
            }
        ],
        "total": 1,
        "companyName": "DAM Corp."
}

This endpoint used to get list ticket by status.

HTTP Request

GET https://drccsapi.damcorp.id/api/v2/report/tickets/open?start_date=2019-03-01&end_date=2019-03-28&with_message=false

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Parameter Default Description Example
start_date None The initial range of the ticket date is open 2019-03-01
end_date None The end date of the ticket date is open 2019-03-31
with_message None To show all ticket messages. This is a boolean type (Optional) false
{
    "responseCode": "000",
    "version": "2.0.4",
    "message": "success",
    "data": {
        "companyNumber": "08123456789",
        "ticket": [
            {
                "dateCreate": "2019-03-27 16:01:24",
                "dateClose": "2019-03-27 16:05:33",
                "ticketCode": "34",
                "problem": "API test",
                "customerName": "Jhon",
                "customerNumber": "628212345678",
                "operatorName": "Daisy",
                "operatorNumber": "089876543210",
                "totalResponse": "1",
                "status": "processing"
            }
        ],
        "total": 1,
        "companyName": "DAM Corp."
    }
}

HTTP Request

GET https://drccsapi.damcorp.id/api/v2/report/tickets/processing?start_date=2019-03-01&end_date=2019-03-28&with_message=false

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Parameter Default Description Example
start_date None The initial range of the ticket date is processing 2019-03-01
end_date None The end date of the ticket date is processing 2019-03-31
with_message None To show all ticket messages. This is a boolean type (Optional) false
{
    "responseCode": "000",
    "version": "2.0.4",
    "message": "success",
    "data": {
        "companyNumber": "08123456789",
        "ticket": [
            {
                "dateCreate": "2019-03-27 16:01:24",
                "dateClose": "2019-03-27 16:05:33",
                "ticketCode": "34",
                "problem": "diclose terus",
                "customerName": "Yanuar",
                "customerNumber": "6282138082695",
                "operatorName": "Alfatta Rezqa",
                "operatorNumber": "0895346216170",
                "totalResponse": "1",
                "status": "close"
            },
            {
                "dateCreate": "2019-03-27 15:59:13",
                "dateClose": "2019-03-27 16:00:36",
                "ticketCode": "35",
                "problem": "hello",
                "customerName": "Yanuar",
                "customerNumber": "6282138082695",
                "operatorName": "Alfatta Rezqa",
                "operatorNumber": "0895346216170",
                "totalResponse": "1",
                "status": "close"
            }
        ],
        "total": 2,
        "companyName": "DAM Corp."
    }
}

HTTP Request

GET https://drccsapi.damcorp.id/api/v2/report/tickets/closed?start_date=2019-03-01&end_date=2019-03-28&with_message=false

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Parameter Default Description Example
start_date None The initial range of the ticket date is closed 2019-03-01
end_date None The end date of the ticket date is closed 2019-03-31
with_message None To show all ticket messages. This is a boolean type (Optional) false
{
    "responseCode": "000",
    "version": "2.0.5",
    "message": "success",
    "data": {
        "companyNumber": "0895346216170",
        "ticket": [
            {
                "dateCreate": "2019-03-27 16:01:24",
                "dateClose": "2019-03-27 16:05:33",
                "ticketCode": "34",
                "problem": "What happen?",
                "customerName": "Jhon",
                "customerNumber": "6282101234567",
                "operatorName": "Daisy",
                "operatorNumber": "0898765432101",
                "totalResponse": "4",
                "status": "close",
                "messages": [
                    {
                        "dateCreate": "2019-02-15 17:59:56",
                        "body": "Examples",
                        "messageType": "text",
                        "type": "USER_ANSWER",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 17:59:57",
                        "body": "Hi, Jhon. Any questions? We'll help you.",
                        "messageType": "text",
                        "type": "QUESTION_PROBLEM",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 18:00:09",
                        "body": "I want to test an API.",
                        "messageType": "text",
                        "type": "USER_ANSWER",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 18:00:10",
                        "body": "Ok Jhon, please wait for answer from our customer service. Your ticket number is: *#34* 🤝",
                        "messageType": "text",
                        "type": "ANSWER_TICKET",
                        "caption": null
                    }
                ]
            }
        ],
        "total": 1,
        "companyName": "DAM Corp."
    }
}

HTTP Request

GET https://drccsapi.damcorp.id/api/v2/report/tickets/closed?start_date=2019-03-01&end_date=2019-03-28&with_message=true

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Parameter Default Description Example
start_date None The initial range of the ticket date is closed 2019-03-01
end_date None The end date of the ticket date is closed 2019-03-31
with_message None To show all ticket messages. This is a boolean type (Optional) true
per_page None To show ticket with minimum data (Optional, if your data is very to long) 2 ( the meaning is 2 data per page)

API Open Ticket

{
    "userNumber": "628123456789",
    "userName": "Jhon",
    "issue": "Example issue",
    "tag": "Example tag",
    "operatorEmail": "johndoe@example.com",
    "group": "1"
}
{
    "responseCode": "000",
    "version": "2.0.7",
    "message": "success",
    "data":""
}
{
    "responseCode": "400",
    "version": "2.0.7",
    "message": "ticket_exists",
    "data": {
        "code": "101917000",
        "status": "open",
        "user": "628123456789"
    }
}
{
    "userNumber": "628123456789",
    "userName": "Jhon",
    "tag": "Example tag"
}
{
    "responseCode": "400",
    "version": "2.0.7",
    "message": "invalid_param",
    "data": [
        "issue"
    ]
}
{
    "responseCode": "400",
    "version": "2.0.7",
    "message": "invalid_param_group",
    "data": [
        "group"
    ]
}

This endpoint used to open ticket.

HTTP Request

POST https://drccsapi.damcorp.id/api/v2/ticket/open

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Body (Use raw and JSON (application/json))

Key Default Description Example
userNumber None User number phone 628123456789
userName None User name john_doe
issue None User issue/problem Example issue
tag None Tag of issue Example tag
operatorEmail None CS Email (Optional) johndoe@example.com
group None CS Group ID (Optional) 1

Note :

  1. You must include a (+) sign if you are using a country code. Example: + 6285xxx
  2. If the number starts with 8 or 08, it will be considered to an Indonesian number.

API Close Ticket

{
    "userNumber": "628123456789",
    "ticketCode": "34"
}
{
    "responseCode": "000",
    "version": "2.0.7",
    "message": "success",
    "data":""
}

This endpoint used to close ticket.

HTTP Request

POST https://drccsapi.damcorp.id/api/v2/ticket/close

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Body (Use raw and JSON (application/json))

Key Default Description Example
userNumber None User number phone 628123456789
ticketCode None Ticket Code (Mandatory) 34

Note :

  1. You must include a (+) sign if you are using a country code. Example: + 6285xxx
  2. If the number starts with 8 or 08, it will be considered to an Indonesian number.

Errors

The Damcorp API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your credentials is wrong.
403 Forbidden -- The requested is hidden for administrators only.
404 Not Found -- The specified could not be found.
405 Method Not Allowed -- You tried to access a with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The requested has been removed from our servers.
418 You're a teapot.
429 Too Many Requests -- You're requesting too many s! Slow down!
470 Message failed to send because more than 24 hours have passed since the customer last replied to this number -- Your customer must be to send a text message firstly
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
721 Invalid Parameter
722 Invalid Sender
723, 732 Service Name Is Not Available
724 User Has Reached Send Limit
725 Invalid Template -- Your template is not binded to your Whatsapp business number / incorrect template components, please check your template components (header (if used), body message, template type, etc)
726 Invalid Product -- You do not have a valid product
727 HSM exist with same name
728 User Has Reached Caping Limit
729 A. Credit Limit -- Your credit/quota has been reached, please applied for additional credit/quota
B. Credit limit, Quota International -- Charge credit/quota for international number
C. Error Invoice Type
730 Invalid prefix
731 Window not set
734 Phone number id is empty, please check your services
999 General Error / Unknown error
1009 Parameter value is not valid -- Value entered for a parameter is of the wrong type or other problem, please check your value for a parameter
2000 Template Param Count Mismatch
Number of parameters provided does not match the expected number of parameters -- Please check your template parameters count
2001 Template Missing -- Template does not exist for a language and locale, please check if your template is already in your template list
2012 Template Parameter Format Mismatch
Parameter format does not match format in the created Template -- Please check your template components and parameters
2014 Expected Namespace is Empty
This error happens when a template message language pack has not been downloaded yet -- Please wait until 1 or 2 hours and try again