[Infobip](https://www.infobip.com/) is a global omnichannel engagement platform that powers messaging channels, tools, and solutions for customer engagement, authentication, and security.

This integration lets you send targeted messages using the cohorts you create in Amplitude.

## Set up the integration

### Infobip setup

1. Navigate to the [Infobip Portal](https://portal.infobip.com/login/?callback=https%3A%2F%2Fportal.infobip.com%2F%3F), click **Project Settings**, and select **API Keys**.
2. Generate a new key and add a description. Copy the key.

### Amplitude setup

1. In Amplitude Data, click **Catalog** and select the **Destinations** tab.
2. In the Cohort section, click **Infobip**.
3. Enter a name and Infobip API Key.
4. Save the destination.

## Statuses

### Create a new list

URL: `https://api.infobip.com/saas/amplitude/1/lists`

Status codes

{% tabs tabs="200 Success, 400 Bad Request, 401 Unauthorized, 429 Too Many Requests" %}
{% tab name="200 Success" %}
```json
{
    "listId": 2568
}
```
{% /tab %}
{% tab name="400 Bad Request" %}
```json
{
    "requestError": {
        "serviceException": {
            "messageId": "BAD_REQUEST",
            "text": "Bad request",
            "validationErrors": {
                "name": [
                    "property not found or blank"
                ]
            }
        }
    }
}
```
{% /tab %}
{% tab name="401 Unauthorized" %}
```json
{
    "requestError": {
        "serviceException": {
            "messageId": "UNAUTHORIZED",
            "text": "Invalid login details"
        }
    }
}
```
{% /tab %}
{% tab name="429 Too Many Requests" %}
One request per API key every 2 seconds


```json
{
    "requestError":{
        "serviceException":{
          "messageId":
              "TOO_MANY_REQUESTS",
            "text":"Too many requests"
          }
      }
}
```
{% /tab %}
{% /tabs %}

### Add people to list

URL: `https://api.infobip.com/saas/amplitude/1/lists/%257BlistId%257D/add`

{% tabs tabs="200 Success, 400 Bad Request, 401 Unauthorized, 429 Too Many Requests" %}
{% tab name="200 Success" %}
- If no errors occur, the modified and created counters show the number of IDs.
- If one or more IDs can't be added to a list, the errors section contains the total counter and arrays of IDs grouped by error type.

```json
{
  "modifiedCount": 0,
  "createdCount": 3,
  "errors": {
    "count": 1,
    "failed": {
      "VALIDATION_ERROR": ["invalid_mail.com"]
    }
  }
}
```
{% /tab %}
{% tab name="400 Bad Request" %}
```json
{
  "statusCode": "TAG_NOT_FOUND",
  "message": "Tag with id \"87881\" does not exist"
}
```
{% /tab %}
{% tab name="401 Unauthorized" %}
```json
{
  "requestError": {
    "serviceException": {
      "messageId": "UNAUTHORIZED",
      "text": "Invalid login details"
    }
  }
}
```
{% /tab %}
{% tab name="429 Too Many Requests" %}
```json
{
  "requestError": {
    "serviceException": {
      "messageId": "TOO_MANY_REQUESTS",
      "text": "Too many requests"
    }
  }
}
```
{% /tab %}
{% /tabs %}

### Remove people from list

URL: `https://api.infobip.com/saas/amplitude/1/lists/%257BlistId%257D/remove`

{% tabs tabs="200 Success, 400 Bad Request, 401 Unauthorized, 429 Too Many Requests" %}
{% tab name="200 Success" %}
```json
{}
```
{% /tab %}
{% tab name="400 Bad Request" %}
```json
{
  "statusCode": "TAG_NOT_FOUND",
  "message": "Tag with id \"87881\" does not exist"
}
```
{% /tab %}
{% tab name="401 Unauthorized" %}
```json
{
  "requestError": {
    "serviceException": {
      "messageId": "UNAUTHORIZED",
      "text": "Invalid login details"
    }
  }
}
```
{% /tab %}
{% tab name="429 Too Many Requests" %}
One request per Api key every 5 seconds.

```json
{
  "requestError": {
    "serviceException": {
      "messageId": "TOO_MANY_REQUESTS",
      "text": "Too many requests"
    }
  }
}
```
{% /tab %}
{% /tabs %}