## API-URL
URL som brukes til å sende HTTP-forespørsler:
```url
https://portal.bulkgate.com/api/1.0/address-book/remove
```

> [!NOTE]
> Hvis forespørselen ikke kommer frem, kan du sende den på nytt til [reserveserveren](https://www.bulkgate.com/no/dokumentasjon/api-administrasjon/api-reserveserver/) `backup1.bulkgate.com`.


## Støttede HTTP-metoder

- `POST` - `application/json`

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

## Parametertabell

| PARAMETERNAVN | VERDI | OBLIGATORISK | STANDARDVERDI |
|:--- |:--- |:--- |:--- |
|application_id| [Application ID](https://www.bulkgate.com/no/dokumentasjon/api-administrasjon/administrasjon-av-api/) |**Ja**|-| 
|application_token| [Application token](https://www.bulkgate.com/no/dokumentasjon/api-administrasjon/api-token/)	|**Ja**|-|
|phone_number| Telefonnummeret til kontakten som skal fjernes. |**Ja**|-|
| category          | Adresseboken det skal arbeides med. Standard er kontoens hovedadressebok. | Nei       | `main`                      |


## Eksempel på forespørsel

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

{
	"application_id": 451,
	"application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj",
	"phone_number": "123456789"
}
```

## Svar

**Ved suksess:**
```json
{
    "data": {
        "message": "contact_has_been_removed"
    }
}
```


**Ved feil:**
```json
{
    "type": "number_not_found",
    "code": 400,
    "error": "Number not found",
    "detail": null
}
```

```json
{
    "type": "invalid_phone_number",
    "code": 400,
    "error": "Invalid phone number",
    "detail": null
}
```

Der:

- **type** og **error** (beskrivelse av feilen) finner du i [tabellen over feiltyper](https://www.bulkgate.com/no/dokumentasjon/api-administrasjon/api-feiltyper/)
- **code** er HTTP-feilkoden
- **detail** er tilleggsinformasjon om feilen
