> For the complete documentation index, see [llms.txt](https://wiki.mobivate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.mobivate.com/mno-web-opt-in/mno-web-opt-in-south-africa.md).

# MNO Web Opt-In South Africa

### <mark style="color:green;">`GET`</mark> `/lookup/za/`

Opt-In users via MNO Web-Opt-In.&#x20;

Redirect the user to the Lookup URL. Once the lookup is performed, user will be sent back to your *Return URL*. Upon the return the user will already be subscribed to your service and you can start sending billed messages, but only if the `status` variable is `success`.

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

```hsts
curl -XGET -H "Content-type: application/json" 'https://<hostname>/lookup/za/?shortcode=<shortcode>&service=<keyword>=<product_id>&freq=<billing frequency>&campaign=<campaign name>&amount=<billing amount>&bl=<brand logo>&bc=<background color>&tc=<text colour>&return=<your return URL>'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'Content-type': 'application/json',
}

response = requests.get(
    'https://<hostname>/lookup/za/?shortcode=<shortcode>&service=<keyword>=<product_id>&freq=<billing frequency>&campaign=<campaign name>&amount=<billing amount>&bl=<brand logo>&bc=<background color>&tc=<text colour>&return=<your return URL>',
    headers=headers,
)
```

{% endtab %}
{% endtabs %}

**Headers**

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

**Body**

| Name      | Type    | Example                                                 | Description                                                                                |
| --------- | ------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| shortcode | string  | 30000                                                   | The shortcode associated with your service.                                                |
| service   | string  | apple=aaaabbbbcccccddddd                                | Your unique Mobivate Keyword and the Product ID.                                           |
| frequency | string  | 1-7,31                                                  | Billing frequency, `1`-`7` messages per week, or if `31` then it's single monthly billing. |
| campaign  | string  | My Campaign                                             | Your internal campaign description.                                                        |
| amount    | integer | 10                                                      | Amound of Rand (ZAR) billed per billing request.                                           |
| bl        | string  | [http://yourdomain/logo.pn](http://yourdomain/logo.png) | Full URL to your Header Image.                                                             |
| bc        | string  | ffffff                                                  | HEX value for the background colour.                                                       |
| tc        | string  | 000000                                                  | HEX value for the text colour.                                                             |
| return    | string  | <http://yourdomain/returned>                            | Your return URL.                                                                           |

#### Response

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

```json
{
  "status": "success",
  "message": "Successful subscription",
  "userid": "44700000000",
  "network": "safaricom"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

#### Output fields

| Parameter | Description                                             |
| --------- | ------------------------------------------------------- |
| status    | MNO subscription status, either `success` or `failed`.  |
| message   | Any message passed through from the MNO.                |
| userid    | If the MSISDN was detected, the fully qualified MSISDN. |
| network   | MNO identifier.                                         |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://wiki.mobivate.com/mno-web-opt-in/mno-web-opt-in-south-africa.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
