# Infobip

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

[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

#### 200 Success

```json
{
    "listId": 2568
}
```

#### 400 Bad Request

```json
{
    "requestError": {
        "serviceException": {
            "messageId": "BAD_REQUEST",
            "text": "Bad request",
            "validationErrors": {
                "name": [
                    "property not found or blank"
                ]
            }
        }
    }
}
```

#### 401 Unauthorized

```json
{
    "requestError": {
        "serviceException": {
            "messageId": "UNAUTHORIZED",
            "text": "Invalid login details"
        }
    }
}
```

#### 429 Too Many Requests

One request per API key every 2 seconds

```json
{
    "requestError":{
        "serviceException":{
          "messageId":
              "TOO_MANY_REQUESTS",
            "text":"Too many requests"
          }
      }
}
```

### Add people to list

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

#### 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"]
    }
  }
}
```

#### 400 Bad Request

```json
{
  "statusCode": "TAG_NOT_FOUND",
  "message": "Tag with id \"87881\" does not exist"
}
```

#### 401 Unauthorized

```json
{
  "requestError": {
    "serviceException": {
      "messageId": "UNAUTHORIZED",
      "text": "Invalid login details"
    }
  }
}
```

#### 429 Too Many Requests

```json
{
  "requestError": {
    "serviceException": {
      "messageId": "TOO_MANY_REQUESTS",
      "text": "Too many requests"
    }
  }
}
```

### Remove people from list

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

#### 200 Success

```json
{}
```

#### 400 Bad Request

```json
{
  "statusCode": "TAG_NOT_FOUND",
  "message": "Tag with id \"87881\" does not exist"
}
```

#### 401 Unauthorized

```json
{
  "requestError": {
    "serviceException": {
      "messageId": "UNAUTHORIZED",
      "text": "Invalid login details"
    }
  }
}
```

#### 429 Too Many Requests

One request per Api key every 5 seconds.

```json
{
  "requestError": {
    "serviceException": {
      "messageId": "TOO_MANY_REQUESTS",
      "text": "Too many requests"
    }
  }
}
```
