📬
MobiPay API Documentation
Mobivate
📬
MobiPay API Documentation
  • 👋Welcome to MobiPay
  • Send SMS via HTTP (MT)
  • Receive SMS via HTTP (MO)
  • Use Cases
    • Send SMS via HTTP (MT) Example
    • Receive SMS via HTTP (MO) Example
    • Gateway Responses
    • Send Silent OBS Billing Message Example
    • Unsubscribe VIA MT Unsubscribe Notification
    • Receive Delivery Receipt via HTTP (DR)
    • Acknowledging MO's and DR's
    • Send A Premium SMS via HTTP (MT) Example
    • Vodafone/Airtel Ghana Billing
  • API Message Paramaters
    • API Message Parameters
    • Send BINARY SMS (MT) parameters
    • Receive SMS (MO) parameters
    • Subscription API (RESTFul)
      • Initiate Subscription (API)
      • Validate PIN (API)
      • Unsubscribing Users (API)
      • Checking Subscription Status (API)
      • Sending Messages To Subscribers (API)
      • Sending Content To Subscribers (API)
    • Content API (RESTFul)
      • Content Types (API)
      • Content Categories (API)
      • Search Content (API)
      • Latest Content Items (API)
      • Content Items (API)
  • Network Double Opt-In
    • Network Double Opt-in (NDOI)
    • Network Double Opt-in (NDOI) Unsubscribe
    • NDOI Keyword Patterns per country
  • MNO Web Opt-in
    • MNO Web Opt-in Introduction
    • MNO Web Opt-In South Africa
    • MNO Web Opt-In Kenya
      • Configuring your campaign
      • Subscribing users to your service
        • Subscribing users via Upstream
        • Subscribing users via Scienlabs
      • Unsubscribing users from your service
      • Receiving callback notifications
    • MNO Web Opt-In Nigeria
      • Subscribing the User to the Service
      • Unsubscribing user from the Service
      • Delivery Notifications
  • UK Direct Carrier Billing
    • UK DCB/Charge to Bill
      • UK Network Flows
Powered by GitBook
On this page
  • Parameters
  • Successful response
  • Failed response
  • Additional parameters/User Information

Was this helpful?

  1. API Message Paramaters
  2. Subscription API (RESTFul)

Initiate Subscription (API)

This document will detail how to initiate a subscription via RESTFul api.

To initiate a subscription via our RESTFul API you must make the following POST request:

https://subscription-api.mobivate.com/subscriptions/v1/<campaign_id>/initiate
{
    "msisdn":"xxxxxxxxxxx"
    "signature":"xxxxxxxxxxxxxxxxxx"
    "keyword":"xxxxxxxx"
    "pin":"1234"
}

Parameters

Parameter
Description

msisdn

The unique MSISDN you are trying to unsubscribe.

signature

Unique parameter consisting of three values: campaign_id, msisdn and account_id. For example: 1af289e14aa593c843da7cd869a8e2f7.

keyword

Your unique Mobivate keyword.

pin

Your validated PIN code. For example: 12345.

Successful response

If your initiate subscription was successful, you will receive a HTTP Status Code: 200:

{
  "authenticated" : True,
  "valid_msisdn" : True,
  "valid_campaign" : True,
  "campaign_status" : "active",
  "campaign_name" : "Test Campaign",
  "campaign_service" : "12345",
  "state" : "pending_pin",
  "error" : Null,
  "reference": "AP:aaaaaaa-bbbbbbbbb-cccccccc"
}

Failed response

In case the campaign id is invalid or campaign is no longer available, the following status will be returned, HTTP Status Code: 404:

{
  "authenticated" : True,
  "valid_msisdn" : True,
  "valid_campaign" : False,
  "campaign_status" : Null,
  "campaign_name" : Null,
  "campaign_service" : Null,
  "state" : Null,
  "error" : "CampaignID '...' not found!",
  "reference": "AP:aaaaaaa-bbbbbbbbb-cccccccc"
}

Additional parameters/User Information

When submitting the subscription initiate response, you can also submit additional information that you have obtained about the subscriber. Here is a list of some of the additional parameters you can submit:

Parameter
Description

first_name

First Name

last_name

Last Name

email

Valid Email Address

dob

Date of birth

ip

Valid IPv4 Address

handset

Device/Make/Model/ID

custom_data

Any custom data in JSON format. Under 1kb

traffic_source

A name/ID to identify this traffic source

PreviousSubscription API (RESTFul)NextValidate PIN (API)

Last updated 1 year ago

Was this helpful?