7.3 Build your own campaign manager

If you have UI requirements specific to your business/application domain, you can build a custom campaign manager application on top of Moloco’s management API. The management API allows you to perform ad campaign-related operations such as creating/updating ad campaigns and pulling report data for the campaigns.

First, you will need an API credential with admin-level access privilege to programmatically access the MCM management API. Your Moloco account representative will provide you with the credentials.

  • The API credential is long-lived/permanent, it is used to issue short-lived access tokens.
  • Store the credentials in a secure place.
  • Do not expose it to the client side.

Second, with the API credential, you can issue a short-lived access token using the CreateToken API.

  • You can also use the same CreateToken API endpoint to refresh the access token.

Lastly, use the issued access token to perform campaign management operations.

The Moloco provided API does not cover the following features:

  • End-user authentication, authorization, and management: Please use your Single Sign On solution to implement these features.
  • Notifications: You must handle your user notifications
  • Change History: The changed by field cannot be personalized. This field will only display the platform admin user account.

Creative Uploading Methods for Sponsored Banner Campaign Operation

We provide two ways to upload creatives, which are Upload by File and Upload by Content Delivery Network (CDN) URL.

  • Upload by File: Using Moloco’s CDN solution
  • Upload by CDN URL: Using your own CDN solution.



Use multipart/form-data Content-type to support sending both file and JSON, CreateCreative / UpdateCreative, requests. Do not use application/json

Option 1: Upload by File

There are two keys named file, and creative.

  • The file must be uploaded in the key namedfile. If the key file is not used, the request will fail to parse the upload request properly.
  • The creative asset’s metadata must be included as json value in the key named creative. There are additional fields for request, such as ad_account_id, title, and type (currently, only IMAGE is supported for the type field).
Cample Postman Request

Sample Postman Request

Option 2: Upload by CDN URL

In this case, we only use the creative key with JSON format.

  "ad_account_id": "test_ad_account",
  "title": "test_title",
  "type": "IMAGE",
  "image_source": {
    "url": "https://storage.googleapis.com/rmp-cdn-test/platform/MOLOCO_PORTAL_DEMO/images/lalrq0mi_xys1xwo.jpeg",
    "size": 40000,
    "width": 200,
    "height": 200,
    "file_name": "test_filename" 

Please include the above fields - ad_account_id, title, type(currently, only IMAGE is supported for the type field), and most importantly image_source. The image_source field should contain the information about the image CDN URL.

Sample Postman Request

Sample Postman Request



Use only one option for uploading creatives: either file or creative.image_source (json content). These methods cannot be used together in the same request.