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://waba.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 8567712345 (Use array data if recipient more than one, for example: ["8567712345","8554321776"])
message None Text Message Hello world!

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.

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://waba.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 8567712345 (Use array data if recipient more than one, for example: ["8567712345","8554321776"])
param None Parameters of the template ["Damcorp","Team"]

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.

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": "0851234567890",
            "msgId": "gBGHYoV3YZQDHwxxxxxx",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to sent hsm media with image file.

HTTP Request

POST https://waba.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
to None Recipient's number 0851234567890 (Use array data if recipient more than one, for example: ["0851234567890"])
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
param None Parameters of the template ["Test"]
header None Object type "header": { "type": "image", "data": "https://example.com/file.jpg" }

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.

Send HSM Media Header Document

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

This endpoint used to sent hsm media with pdf file.

HTTP Request

POST https://waba.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
to None Recipient's number 0851234567890 (Use array data if recipient more than one, for example: ["0851234567890"])
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
param None Parameters of the template ["Test"]
header None Object type "header": { "type": "document", "data": "https://example.com/file.pdf" }

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.

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": "0851234567890",
            "msgId": "gBGHYoV3YZQDHwxxxxxx",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to sent hsm media with video file.

HTTP Request

POST https://waba.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
to None Recipient's number 0851234567890 (Use array data if recipient more than one, for example: ["0851234567890"])
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
param None Parameters of the template ["Test"]
header None Object type "header": { "type": "video", "data": "https://example.com/file.mp4" }

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.

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://waba.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
to None Recipient's number 0851234567890 (Use array data if recipient more than one, for example: ["0851234567890","0851234567891"])
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
param None Parameters of the template ["dummy","text"]
header None Object type "header": { "type": "text", "data": "welcome" }

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.

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://waba.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 8567712345 (Use array data if recipient more than one, for example: ["8567712345","8554321776"])
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 :

  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.

Send Location

{
    "token": "eyJ0eXAiOiJKVxxxxx",
    "to": "+6285123456789",
    "longitude": -122.425332,
    "latitude": 37.758056,
    "name": "John Doe House",
    "address": "1 Hacker Way, Menlo Park, CA 94025"
}
{
    "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://waba.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 number 6285123456789
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 :

  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.

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://waba.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 number 6285123456789
phone None Telephone number to be sent +62123456789
name None Name of number owner John Doe

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.

Interactive Message Templates

{
    "token": "eyJ0eXAiOiJKVxxxxx",
    "to": "+6285123456789",
    "param": ["*John Doe Office*"],
    "buttons": {
        "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://waba.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://waba.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://waba.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://waba.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://waba.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://waba.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. If the number starts with 8 or 08, it will be considered to an Indonesian number.
  3. 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://waba.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. If the number starts with 8 or 08, it will be considered to an Indonesian number.
  3. 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://waba.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. If the number starts with 8 or 08, it will be considered to an Indonesian number.
  3. 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://waba.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. If the number starts with 8 or 08, it will be considered to an Indonesian number.
  3. Button message max 3 buttons.

Interactive (List Message Type)

{
    "token": "<token>",
    "to": "+6281234567890",
    "message": "Test",
    "type": "list",
    "list_title": "Menu",
    "list": [
        {
            "title": "Option 1"
        },
        {
            "title": "Option 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://waba.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. If the number starts with 8 or 08, it will be considered to an Indonesian number.
  3. 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"
        },
        {
            "title": "Option 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://waba.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. If the number starts with 8 or 08, it will be considered to an Indonesian number.
  3. List menu options max 10 lists.

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://waba.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 :

  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.

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"
}
{
    "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://waba.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 number 85567891234
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

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.

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://waba.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 number 85567891234
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 :

  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.

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://waba.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 number 85567891234
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 :

  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.

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://waba.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://csapi.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://csapi.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://csapi.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://csapi.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://csapi.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://csapi.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"
}
{
    "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"
    ]
}

This endpoint used to open ticket.

HTTP Request

POST https://csapi.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 628123456789
issue None User issue/problem Example issue
tag None Tag of issue Example tag
operatorEmail None CS Email (Optional) johndoe@example.com

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://csapi.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!
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.
726 Invalid Product -- You do not have a valid product