Moonpull API (1.0.0)

Download OpenAPI specification:

Overview

Moonpull provides APIs for both submission and retrieval of information. They are relatively simple and the details of each of the relevant endpoints are in the relevant overviews.

Submission Overview: There are also APIs for confirming completion of the submission and determining the audits remaining for the month.

Retrieval Overview: For publishers to retrieval batch results

Batch ID Retrieval: Batches completed in a time period

The batch data retrieval endpoint provides data in the same format as is available by downloading from the platform - the Publisher Report. Therefore the data format is described in the Publisher Report document.

API Key Generation

  1. Navigate to the API key section on the Moonpull app (note: you must be a Company Owner to access this page).
  2. Click “Generate New API Key” to generate your API key.
  3. Copy and save your API in a secure location. You will not be able to access this API again so keep it secure. If the API is lost, a new one can be generated, but any requests relying on the old one once it has been revoked will then fail.

Further comments for users of the API

The API uses the format where quotes round a value can alter its value, as illustrated in the scenarios in the box below.

"proxyYN": true, <= true
"proxyYN": false, <= false
"proxyYN": "true", <= true (note the quotes)
"proxyYN": "false", <= TRUE (note the quotes) (this happens because any non-empty string is "truthy")

Moonpull utilised the application/json MIME type. This means all keys and string values have to be wrapped in double-quotes (") and no comments are allowed.

Empty values on a key need to have a "".

cookieType and proxyYN values do not need a ""

Request Tracing

On a response from Moonpull you should save/log the header x-request-id in the case you run into unexpected issues and need to contact us. If you ever have endpoint-specific issues that you are not expecting, please contact support with that request ID + the issue

#Support

For further support contact the Moonpull Team: support@moonpullpartners.com - or simply submit a ticket from within the Knowledgebase

Batches

Batch related endpoints

Get batch overview

Endpoint reporting the IDs for specific batches completed in specified time period. It is to be used to determine batches to retrieve.

Use Case

The detail with which the endpoint is set up is important. It may be every time it's triggered daily it is set to look to a seven day period. and you have a corresponding process to 'ignore' all the batches already imported. So if there is a retrieval error, then the next daily request will capture all completed batches to then be queued for retrieval.

Authorizations:
apiKey
header Parameters
x-api-key
required
string

Your Moonpull api key generated in the app

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new batch

Submit a new batch to Moonpull

Development work - Compulsory fields and field names

Currently (2025Q1) the only compulsory field is the affiliate URL. However, there is development work to make all of the following compulsory:

  • Affiliate Link - link
  • Network name - userDefinedNetwork
  • Country code - countryCode
  • merchant name - userDefinedMerchant

The development work will include more error checking and responses on errors.

Further Notes

We recognise that the field names of userDefinedNetwork and userDefinedMerchant are confusing.

The field userDefinedNetwork is NOT one that the user can choose. See below.

The field userDefinedMerchant is one that the user can specify in their own format.

Network name - userDefinedNetwork

If the network name that is specified is one you don't have access to, or it is spelt incorrectly (including being blank), the link is failed at the time of audit, not at the time of submission therefore you would see 'failed status' in the platform and/or the Publisher Report. The network names for your account should be as specified in the 'Single Link Submit' dropdown in the platform.

Country code

This needs to be in the 2-digit ISO code format. The supported countries are available from Moonpull. Alternatively, the current list may be seen from the options available in the 'Single Link Submit' Dropdown in the platform.

Authorizations:
apiKey
header Parameters
x-api-key
required
string

Your Moonpull api key generated in the app

Request Body schema: application/json
name
string
description
string
queue
string
Array of objects (Link)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "queue": "a",
  • "links": [
    ]
}

Response samples

Content type
application/json
{
  • "batchId": "123e4567-e89b-12d3-a456-426614174000"
}

Get batch details

Get details of a batch and if it's finished or not

Authorizations:
apiKey
path Parameters
batchId
required
string <uuid>

The uuid of the batch

header Parameters
x-api-key
required
string

Your Moonpull api key generated in the app

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "isComplete": true
}

Client

Client related endpoints

Get client info

Returns information about the client. Includes the user email for the api key, maximum batch size and remaining audit count.

Authorizations:
apiKey
header Parameters
x-api-key
required
string

Your Moonpull api key generated in the app

Responses

Response samples

Content type
application/json
{
  • "company": "string",
  • "user": "string",
  • "maxBatchSize": 0,
  • "remainingAudits": 0
}

Reports

Report related endpoints

Get enterprise reports

Get a csv response of audit reports

Authorizations:
apiKey
query Parameters
from
required
string <date>

The start date for the reports

to
required
string <date>

The end date for the reports

deleted
boolean

Whether to include deleted reports

header Parameters
x-api-key
required
string

Your Moonpull api key generated in the app

Responses

Response samples

Content type
application/json
{
  • "errorMessage": "Invalid from/to date(s)"
}

Get enterprise reports for a batch

Get a csv or json response of audit reports for a batch

Authorizations:
apiKey
path Parameters
batchId
required
string <uuid>

The uuid of the batch

query Parameters
json
boolean

Whether to return json response

header Parameters
x-api-key
required
string

Your Moonpull api key generated in the app

Responses

Response samples

Content type
No sample

Get publisher reports for a batch

Get a json response of audit reports for a batch

Authorizations:
apiKey
path Parameters
batchId
required
string <uuid>

The uuid of the batch

query Parameters
json
boolean

Whether to return json response

header Parameters
x-api-key
required
string

Your Moonpull api key generated in the app

Responses

Response samples

Content type
application/json
[
  • {
    }
]