# KakaoTalk over API

Infobip supports KakaoTalk through its [dedicated APIs](https://www.infobip.com/docs/api/channels/kakao).

- [Infobip Kakao Alim API](https://www.infobip.com/docs/api/channels/kakao/alim): Send notification messages to your customer base. After registering templates for your communication, use the Kakao ALIM API message method to formulate and send requests.
- Infobip Kakao Sangdam API: Set up real-time conversations with your customers, offer live agent support, and help your agents provide the best customer service.
- Infobip Kakao Brand Message API: Deliver promotional content and engage customers with tailored messages using the Kakao Brand Message API. This API enables businesses to send Friend Talk messages, share promo codes, provide exclusive offers, and create dynamic campaigns to increase visibility, drive sales, and foster customer loyalty.

Remember to add supplementary options to your send request in case you would like to benefit from our additional features.

## Message options

Additional message options can be applied to your API request.

### Bulk messages [#bulk-messages-message-options]

You can send multiple text messages or message templates in a single API request.

### Scheduling messages [#scheduling-messages-message-options]

Every communication can be scheduled. You can set a **start date**, **time**, and a **time zone**. This feature comes in handy when you don’t want to disturb your customers during the night, or you want to send messages only during a specific period for optimal conversion.

```json
    "SendAt": 2015-07-07T17:00:00.000+01:00
```

An additional scheduling option is to set sending speed limit. For example, you can limit the sending speed when sending messages in bulk to deliver messages over a longer period of time. This feature can be beneficial when you expect recipients to react to your call-to-action embedded within the dispatched message. In that way you could avoid overwhelming your system or agents with an influx of responses from end customers and avoid operational strain. You can set the **number (amount) of messages** that will be sent periodically. Available time units are: **minutes**, **hours**, **days**.

```json
    "sendingSpeedLimit":  {
        "amount": 30,
        "timeUnit": "HOUR"
        }
```

You can also set a specific message delivery window outside of which messages won’t be delivered. You can set **start time** (hour/minute), **end time** (hour/minute), and **days of the week**. Time is expressed in the UTC time zone.

```json
    "deliveryTimeWindow": {
        "days": [
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
            ],
        "from": {
            "hour": 6,
            "minute": 0
            },
        "to": {
            "hour": 15,
            "minute": 30
            }
        }
```

### Validity period [#validity-period-message-options]

There is a specific time period for messages during which the system will try to deliver them. For example, when you want to send a message to your audience and some users have their cell phones turned off, the system will retry delivery to these users until the validity period passes. The default and also the maximum validity period is 48 hours. It does not need to be set for each request. If you want to set a shorter period, you should define it under Validity period. Available time units are: **seconds**, **minutes**, **hours**. The default value is **minutes**.

```json
    "validityPeriod":  {
        "amount": 30,
        "timeUnit": "MINUTES"
        }
```

### SMS Failover [#sms-failover-message-options]

Add a failover to SMS option in case your Kakao Alim message does not reach the end user within the defined period. You can also set a validity period for the SMS message.

```json
    "smsFailover":  {
        "sender": "41793026726",
        "text": "Failover message text",
        "validityPeriod":  {
            "amount": 2,
            "timeUnit": "HOURS"
            }
        }
```

### Platform [#platform-message-options]

Kakao APIs work seamlessly with [CPaaS X](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). This gives you greater flexibility in managing your configurations and resources in whatever manner that suits your needs. For more information about CPaaS X, refer to our [CPaaS X documentation](https://www.infobip.com/docs/cpaas-x).

```json
    "platform": {
        "entityId": "priorityCustomer",
        "applicationId": "clientTestEnvironment"
        }
```

### Webhooks [#webhooks-message-options]

Use the `webhooks` > `delivery` > `url` parameter option if you want users to be able to set the URL where they want to receive API responses. Define the URL under the webhooks parameter of the API request.

```json
    "webhooks": {
        "delivery": {
            "url": "https://www.example.com/kakaotalk"
            }
        }
```

### URL shortening and tracking [#url-shortening-tracking-message-options]

**Kakao Brand Messages** messages support URL shortening and tracking functionality. This allows you to send shortened URLs through the [Kakao Brand Message API](https://www.infobip.com/docs/api/channels/kakao/chingu/send-kakao-chingu-message) and monitor their performance, enabling better insights into customer engagement and interaction. You can track links in the message body and Open URL CTA buttons.

This feature is also available when using [Broadcast](https://www.infobip.com/docs/send-a-message#kakao-chingu-over-broadcast).

To enable this feature:

1. **Activate URL shortening and tracking**:
    - In your API request, set the `shortenUrl` and `trackClicks` parameters to `true`.

2. **Configure custom domain and tracking URL**:

    - Use the `customDomain` parameter to define your registered custom domain if you want the shortened URLs to reflect your branding. Ensure that you have previously [registered your custom domain](https://www.infobip.com/docs/url-shortening/register-custom-domain).
    - Specify a `trackingUrl` to receive click reports on your callback server. If not provided, tracking data may be accessible in other ways.

3. **Remove protocol**:
    - If needed, set `removeProtocol` to `true` to shorten URLs further by removing the protocol (for example, `https://`).

```json
      "options": {
        "tracking": {
            "shortenUrl": true,
            "trackClicks": true,
            "trackingUrl": "https://example.com/click-report",
            "removeProtocol": true,
            "customDomain": "example.com"
        }
      }
```

## Inbound messages

Incoming messages are forwarded to you in real-time when you use Kakao Sangdam for two-way communication.

## Delivery reports

This method allows you to get one-time delivery reports for sent Kakao Alim messages.

The endpoint is defined in the following locations:

- In the platform at the account-level setting
- (Optional) In the `webhooks` > `delivery` > `url` parameter of the API request of a message. If you do not define this endpoint, the reports are forwarded to the endpoint that is defined in the platform