Entfernt einen Kurzlink aus dem BulkGate Portal. Nach dem Löschen leitet der Link nicht mehr weiter, auch nicht in Nachrichten, die mit ihm bereits gesendet wurden.

## API-URL

Die URL, an die die HTTP-Anfragen gesendet werden:

```url
https://portal.bulkgate.com/api/1.0/shortener/remove
```

> [!NOTE]
> Erreicht die Anfrage ihr Ziel nicht, wiederholen Sie sie auf dem [Backup-Server](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/backup-server/) `backup1.bulkgate.com`.

## Unterstützte HTTP-Methoden

- `POST` - `application/json`

```http
POST /api/1.0/shortener/remove HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
```

> [!NOTE]
> Für die API gilt ein Kontingent von `20` Anfragen pro Minute.

## Parametertabelle

| PARAMETERNAME     | WERT                                                     | PFLICHT   | STANDARDWERT  |
|:------------------|:---------------------------------------------------------|:----------|:--------------|
| application_id    | [Application ID](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/api-verwaltung/)           | **Ja**    | -             | 
| application_token | [Authentifizierungstoken der Anwendung](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/api-tokens/)	 | **Ja**    | -             |
| short_url         | Gekürzte URL, die entfernt werden soll	                    | **Ja**    | -             |

## Beispiel einer Anfrage

```http-json
POST /api/1.0/shortener/remove HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json

{
  "application_id": 451,
  "application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj",
  "short_url": "http://ur7.wf/W/1"
}
```

## Antwort

**Bei Erfolg:**

```json
{
    "data": {
        "short_url": "http://ur7.wf/W"
    }
}
```

**Bei einem Fehler:**

```json
{
    "type": "url_not_found",
    "code": 400,
    "error": "Url not found",
    "detail": null
}
```

```json
{
    "type": "the_per_minute_quota_has_been_exceeded",
    "code": 400,
    "error": "The per minute quota has been exceeded",
    "detail": null
}
```

Dabei gilt:

- **type** und **error** (Beschreibung des Fehlers) finden Sie in der [Tabelle der Fehlertypen](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/api-fehlertypen/)
- **code** ist der HTTP-Fehlercode
- **detail** sind zusätzliche Informationen zum Fehler

### Fehlertypen der Shortener API

Neben den [allgemeinen Typen](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/api-fehlertypen/) gibt die Shortener API eigene zurück:

| TYP                                     | WANN ER AUFTRITT                                                       |
|:----------------------------------------|:-----------------------------------------------------------------------|
| `url_not_found`                         | `short_url` existiert im Konto nicht.                                  |
| `the_per_minute_quota_has_been_exceeded`| Das Kontingent von 20 Anfragen pro Minute ist ausgeschöpft.             |
