# Adding / Removing Contacts

### <mark style="color:green;">`GET`</mark> `/api/contacts`

Add or delete contacts from our applications using our proxy API.&#x20;

{% tabs %}
{% tab title="Curl" %}

```hsts
curl -XGET 'https://tasks-wave.mobivate.com/api/contacts/create?username=username&password=password&msisdn=447000000001&applications=optouts:call'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

response = requests.get(
    'https://tasks-wave.mobivate.com/api/contacts/create?username=username&password=password&msisdn=447000000001&applications=optouts:call',
)
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```http
curl -XGET 'https://tasks-wave.mobivate.com/api/contacts/delete?username=username&password=password&msisdn=447000000001&applications=optouts:call'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

response = requests.get(
    'https://tasks-wave.mobivate.com/api/contacts/delete?username=username&password=password&msisdn=447000000001&applications=optouts:call',
)
```

{% endtab %}
{% endtabs %}

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `No Auth`          |

**Body**

| Parameter    | Required | Description                                                                                   |
| ------------ | -------- | --------------------------------------------------------------------------------------------- |
| username     | Yes      | The username used to login to Mobivate.                                                       |
| password     | Yes      | The password used to login to Mobivate.                                                       |
| msidn        | Yes      | Phone number in international format.                                                         |
| applications | Yes      | Comma separated list of applications to subscribe to / remove from (see below).               |
| name         | No       | The contacts name to use.                                                                     |
| reference    | No       | Optional custom reference for the contact, used as callcentre reference id or custom 1 field. |

{% hint style="info" %}
Please note. Supplied reference is for your identification only.
{% endhint %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "status": "ok",
    "optouts:robocall": "ok"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
   "code":401,
   "message":"Not Authenticated"
}
```

{% endtab %}
{% endtabs %}

### **Applications**

Applications are denoted as a comma `","` separated list, with colon `":"` as the separator between the app name and identification token of the contact group/recurring campaign.

| Application Name        | Description                  |
| ----------------------- | ---------------------------- |
| appointments            | The appointment booking app. |
| recurring: `CampaignId` | The periodic reminder app.   |
| contacts: `ListId`      | The main contacts app.       |
| callcentre: `SetupId`   | The Callcentre app.          |
| optouts: `sms / call`   | Generic optouts.             |

### **Finding the Identification Tokens**

**Recurring**

The `CampaignId` can be obtained as the last numeric parameter of the url while editing the campaign details.

**Contacts Group**

The `ContactGroupId` is shown on the group details at the bottom of the right column.

**CallCentre**

The `SetupId` is shown on the setup details at the bottom of the right column.

**OptOuts**

The identification is either `sms` for sms optouts or `calls` for robocall optouts.

To find out more about our applications, [click here](https://www.mobivate.com/bulk-sms/system-features).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.mobivatebulksms.com/archived-integrations/adding-removing-contacts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
