After you have received the API key, this section helps you to generate sessions and make API calls. It has the following topics:
Workflow
The API calling process is illustrated here:
Points to Remember
The following points are applicable for all API calls:
- Generating a Session Key – The session key is valid for 24 hours since the session generation call was made.
- Passing the General Headers – After generating the
sessionId
, every API call (except session generation call) needs to send the following information.
Header Name |
Description |
Mandatory/Optional |
Example |
accountId |
Account id of the user for which the request is being made |
Mandatory |
5a5f7a5b94e441a8b0eeef9b301eb7bd |
secretKey |
The API key you received from InMobi after account activation |
Mandatory |
d32ad3e3ff612342bfb5m28seecebf9a |
sessionId |
The session id you received after making the session generation call. |
Mandatory |
79a30e4cab6549d7af9e7a34b93e6e97 |
- Sample Error Response Code –
Generating a Session
This API is used to generate a sessionId
.
Remember the following:
- You need a valid
sessionId
to make API calls.
- Along with
HTTP StatusCode 200
, the error response code will also have a response body containing error. This happens only for this API.
Sample Error Response Code
{
"respList": [],
"error": true,
"errorList": [
{
"code": "1009",
"message": "User is not permitted to perform the action"
}
]
}
Making the API Call
Use the following details to make the call:
- URL - https://api.inmobi.com/v1.0/generatesession/generate
- Headers
Header Name |
Description |
Mandatory/Optional |
Example |
secretKey |
The API key you received from InMobi after account activation |
Mandatory |
d32ad3e3ff612342bfb5m28seecebf9a |
username |
The username you chose while signing up |
Mandatory |
kishore.bandi@inmobi.com |
password |
The password you chose while signing up |
Mandatory |
Test@Password1234 |
{
"respList": [
{
"sessionId": "79a30e4cab6549d7af9e7a34b93e6e97",
"accountId": "5a5f7a5b94e441a8b0eeef9b301eb7bd",
"subAccounts": null
}
],
"error": false,
"errorList": []
}
curl -X GET \
https://api.inmobi.com/v1.0/generatesession/generate \
-H 'password: Test@Password1234' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'username: kishore.bandi@inmobi.com'
Interpreting the Response
Use the following scenarios to determine if the call was successful:
Making Other API Calls
The other API calls can be classified into the following types:
App-based API Calls
These API calls are made to promote an app. They can be classified in the following types:
Account
JSON schema for Account
{
"$schema": "http://json-schema.org/draft-06/schema",
"type" : "object",
"properties" : {
"accountId" : {
"description" : "Account Id ",
"type" : "string"
},
"name" : {
"description" : "Name of the account",
"type" : "string"
},
"status" : {
"description" : "Status of the account",
"type" : "string",
"enum" : [ "ACTIVE", "BLOCKED", "ACTIVATION_PENDING" ]
},
"balance" : {
"description" : "Balance available in the account",
"type" : "number"
}
}
}
Use the following APIs for account-related information:
- Get Account - This API is used to fetch details about the account.
{
"accountId": "5a5f7a5b94e441a8b0eeef9b301eb7bd",
"name": "kishore.bandi@inmobi.com",
"status": "ACTIVE",
"balance": 1000
}
curl -X GET \
https://api.inmobi.com/rso/account \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
App
JSON schema for App
Use the following APIs for app-related information:
- DUMMY APP - DUMMY
Campaign
JSON schema for Campaign
{
"$schema": "http://json-schema.org/draft-06/schema",
"title": "Campaign Object",
"type" : "object",
"properties" : {
"objective" : {
"type" : "string",
"enum" : [ "PROMOTE_CONTENT" ]
},
"name" : {
"type" : "string"
},
"startTime" : {
"type" : "string",
"description" : "The Start date String in ISO-8601 Standards",
"example" : "2017-06-06T00:00:00"
},
"endTime" : {
"type" : "string",
"description" : "The End date String in ISO-8601 Standards",
"example" : "2017-07-05T23:59:59"
},
"campaignBudget" : {
"type" : "object",
"properties" : {
"budgetType" : {
"type" : "string",
"description" : "Account - The campaign will start burning from account and the money will not be transfered/dedicated separately for the campaign. Campaign - The selected amount will be transfered from account to campaign and the burn for the campaign will happen from this amount.",
"enum" : [ "ACCOUNT", "CAMPAIGN" ]
},
"totalBudget" : {
"type" : "number",
"description" : "Amount in Dollars",
"minimum": 0,
"maximum": 10000000
},
"dailyLimit" : {
"type" : "number",
"description" : "Amount in Dollars",
"minimum": 0,
"maximum": 10000000
}
},
"required" : [ "budgetType" ]
},
"frequencyCaps" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string",
"enum" : [ "RENDER", "CLICK", "VIDEO_COMPLETE" ]
},
"limit" : {
"type" : "integer",
"description" : "The max. limit (number of times) to target a user",
"maximum": 129600
},
"duration" : {
"type" : "integer",
"description" : "The Duration in minutes",
"maximum": 100
}
},
"required" : [ "type" ]
}
},
"campaignId" : {
"type" : "string",
"description" : "Response Only Field - Will not be honored in Request"
},
"status" : {
"type" : "string",
"description" : "Response Only Field - Will not be honored in Request",
"enum" : [ "DRAFT", "ACTIVE", "PAUSED", "EXPIRED", "PENDING", "REJECTED", "ARCHIVED", "ON_HOLD" ]
},
"balance" : {
"type" : "number",
"description" : "Response Only Field - Will not be honored in Request"
},
"createdOn" : {
"type" : "string",
"description" : "Response Only Field - The Create date String in ISO-8601 Standards",
"example" : "2017-07-05T23:59:59"
},
"lastModifiedOn" : {
"type" : "string",
"description" : "Response Only Field - The Last Modified date String in ISO-8601 Standards",
"example" : "2017-07-05T23:59:59"
},
"lastModifiedBy" : {
"type" : "string",
"description" : "Response Only Field - The Last Modified user"
}
},
"required" : [ "objective", "name", "startTime", "endTime", "campaignBudget" ]
}
Use the following APIs for campaign-related information:
- Create Campaign - This API is used to create a campaign.
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-05T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 10000,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "ACTIVE",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T09:21:12",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/campaigns \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-08T00:00:00",
"endTime": "2017-07-05T23:59:59.999",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 10000.0,
"dailyLimit": 500.0
}
}
- Fetch Campaign - This API is used to fetch the details of campaigns under an account.
{
"limit": 0,
"offset": 0,
"items": [
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-05T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 10000,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "ACTIVE",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T09:21:12",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
]
}
curl -X GET \
https://api.inmobi.com/rso/campaigns \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d'
- Update CampaignId - This API is used to update the details of campaigns under a specific campaignId and an accountId.
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-06T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 100,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "ACTIVE",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T10:27:42",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/campaigns/ed0f7a5ae279435ea7f0c4f35147ad87 \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest1",
"startTime": "2017-06-08T00:00:00",
"endTime": "2017-07-05T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 10000,
"dailyLimit": 500
}
}
- Fetch CampaignId - This API is used to fetch the details of campaigns under a specific campaignId and an accountId.
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-06T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 100,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "ACTIVE",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T10:27:42",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X GET \
https://api.inmobi.com/rso/campaigns/ed0f7a5ae279435ea7f0c4f35147ad87 \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d'
- Fetch Adgroups under CampaignId - This API is used to fetch adgroups under a specific campaignId and an accountId
- URL - https://api.inmobi.com/rso/campaigns/{campaignId}/adgroups
- Headers - Refer to Passing the General Headers section.
- URI Parameters - DUMMY
Parameter Name |
Description |
Mandatory/Optional |
Example |
CampaignId |
The campaignId whose details needs to be updated |
Mandatory |
DUMMY |
- Query Parameters - DUMMY
Query Name |
Description |
Mandatory/Optional |
Example |
pageNum |
The page number from where the list needs to be retrieved |
Optional |
5 |
maxRecords |
The maximum number of records to be retrieved from the selected page |
Optional |
57 |
- HTTP Method - GET
- Failure Scenario - Refer to Sample Error Response Code section.
{
"limit": 1,
"offset": 1,
"items": [
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-05T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-09T08:45:09",
"lastModifiedBy": "M10N"
}
]
}
curl -X GET \
https://api.inmobi.com/rso/campaigns/ed0f7a5ae279435ea7f0c4f35147ad87/adgroups \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Creatives under CampaignId - This API is used to fetch creatives under a specific campaignId and an accountId
- URL - https://api.inmobi.com/rso/campaigns/{campaignId}/ads
- Headers - Refer to Passing the General Headers section.
- URI Parameters - DUMMY
Parameter Name |
Description |
Mandatory/Optional |
Example |
CampaignId |
The campaignId whose details needs to be updated |
Mandatory |
DUMMY |
- Query Parameters - DUMMY
Query Name |
Description |
Mandatory/Optional |
Example |
pageNum |
The page number from where the list needs to be retrieved |
Optional |
5 |
maxRecords |
The maximum number of records to be retrieved from the selected page |
Optional |
57 |
- HTTP Method - GET
- Failure Scenario - Refer to Sample Error Response Code section.
{
"limit": 1,
"offset": 1,
"items": [
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "PENDING",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/rso",
"imageAsset": {
"url": "http://i.l.inmobicdn.net/banners/FileData/36ca3863a6a24a6f8d9a92016c796c68.jpeg",
"assetId": 2320981
},
"lastModifiedOn": "2017-06-12T12:11:13"
}
]
}
curl -X GET \
https://api.inmobi.com/rso/campaigns/ed0f7a5ae279435ea7f0c4f35147ad87/ads \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Archive CampaignId - This API is used to archive (soft delete) the details of campaigns under a specific campaignId and an accountId.
{
"objective": "PROMOTE_CONTENT",
"name": "Test1",
"startTime": "2017-06-12T00:00:00",
"endTime": "2017-07-05T23:59:59",
"campaignBudget": {
"budgetType": "ACCOUNT",
"totalBudget": 0,
"dailyLimit": 500
},
"campaignId": "dcb989192e8347888917c8babf704df3",
"status": "ARCHIVED",
"balance": 0,
"createdOn": "2017-06-12T10:03:08",
"lastModifiedOn": "2017-06-12T10:03:52",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X DELETE \
https://api.inmobi.com/rso/campaigns/dcb989192e8347888917c8babf704df3 \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Reactivate Campaign - This API is used to reactivate a campaign after it has expired.
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-11T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 100,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "ARCHIVED",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T10:27:42",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/campaigns/ed0f7a5ae279435ea7f0c4f35147ad87/reactivate \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"endDate" : "2017-07-11T23:59:59"
}
- Deallocate Campaign - This API is used to transfer the money allocated to this campaign back to the account. The budget type should be Campaign.
curl -X POST \
https://api.inmobi.com/rso/campaigns/dcb989192e8347888917c8babf704df3/deallocate \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Change Campaign Status - This API is used to change the status of a campaign. It can be used to pause a running campaign, activate a paused campaign, and archive a campaign, among others.
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-06T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 100,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "PAUSED",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T10:27:42",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/campaigns/status \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"entityId" : "ed0f7a5ae279435ea7f0c4f35147ad87",
"newStatus" : "PAUSED"
}
Adgroup
JSON schema for Adgroup
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the Ad Group"
},
"campaignId": {
"type": "string",
"description": "Campaign Id under which this Ad Group needs to be created"
},
"startTime": {
"type": "string",
"description": "Date in string using ISO-8601 Standard"
},
"endTime": {
"type": "string",
"description": "Date in string using ISO-8601 Standard"
},
"status": {
"type": "string",
"description": "Response Only Field - Date in string using ISO-8601 Standard",
"enum": [
"DRAFT",
"ACTIVE",
"PAUSED",
"EXPIRED",
"PENDING",
"REJECTED",
"ARCHIVED",
"ON_HOLD"
]
},
"clickDestination": {
"type": "string",
"description": "The Final Page which needs to be displayed when user clicks on the Ad"
},
"adGroupId": {
"type": "string",
"description": "Response Only Field"
},
"clickAction": {
"type": "string",
"enum": [
"URL"
]
},
"objective": {
"type": "string",
"description": "Response Only Field - Derived from Campaign",
"enum": [
"PROMOTE_CONTENT"
]
},
"targeting": {
"type": "object",
"description": "Targeting Information of the corresponding AdGroup",
"properties": {
"geoTargeting": {
"type": "object",
"properties": {
"geoTargetingDetails": {
"type": "array",
"items": {
"type": "object",
"description": "Geo Targeting Information of the corresponding AdGroup",
"properties": {
"countryId": {
"type": "integer",
"description": "Country Id which needs to be Targeted"
},
"stateIds": {
"type": "array",
"items": {
"type": "integer"
},
"description": "State Id which needs to be Targeted"
},
"cityIds": {
"type": "array",
"items": {
"type": "integer"
},
"description": "City Id which needs to be Targeted"
},
"zipIds": {
"type": "array",
"description": "Zips Id which needs to be Targeted",
"items": {
"type": "integer"
}
},
"carrierIds": {
"type": "array",
"description": "Carrier Id which needs to be Targeted",
"items": {
"type": "integer"
}
},
"latLongList": {
"type": "array",
"items": {
"type": "object",
"description": "Lat-Long based targeting",
"properties": {
"name": {
"type": "string"
},
"latitude": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"longitude": {
"type": "number",
"minimum": -180,
"maximum": 180
},
"radius": {
"type": "number",
"minimum": 0
}
},
"required": ["name", "latitude", "longitude", "radius"]
}
},
"required": ["countryId"]
}
}
}
},
"deviceTargeting": {
"type": "object",
"properties": {
"handsetTargetingList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"manufacturerId": {
"type": "integer",
"description": "The ManufacturerId that needs to be included/excluded"
},
"handsetIdList": {
"type": "array",
"description": "List of Handset Ids that needs to be included/excluded",
"items": {
"type": "integer"
}
},
"exclude": {
"type": "boolean",
"description": "Indicates if the selected targeting needs to be included or excluded. Default - false"
}
},
"required": ["manufacturerId"]
}
},
"deviceTypeList": {
"type": "array",
"description": "What type of devices needs to be selected for Targeting. Default - ALL",
"items": {
"type": "string",
"enum": [
"SMART_PHONE",
"TABLET"
]
}
},
"ostargetingList": {
"type": "array",
"description": "Target based on User's Operating System",
"items": {
"type": "object",
"properties": {
"osId": {
"type": "integer",
"description": "OS Id that needs to be included"
},
"minVersion": {
"type": "number",
"description": "Minimum version of the OS that needs to be targeted"
},
"maxVersion": {
"type": "number",
"description": "Maximum version of the OS that needs to be targeted"
},
"exclude": {
"type": "boolean",
"description": "Indicates if the selected targeting needs to be included or excluded. Default - false"
}
},
"required": ["osId"]
}
}
}
},
"userTargeting": {
"type": "object",
"description": "The Segments retrieved must be set in this list of lists using CNF form.
Note : The more segments residing inside AND notation in CNF notation, the lesser would be the reach of Users.
Example : If we want to target all users who are either Shopping Enthusiasts or Business Professional or Technology Enthusiasts but definetely have to be a Cab Riders then the input would be [["Shopping","Business","Technology"],["Cab Riders"]]
(Of Course, the values here need to be segment Ids)",
"properties": {
"segmentIds": {
"type": "array",
"example": "",
"items": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"required": ["segmentIds"]
},
"scheduleTargeting": {
"type": "object",
"description": "Target based on Time",
"properties": {
"schedules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"dayOfWeek": {
"type": "string",
"enum": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
]
},
"ranges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "integer",
"description": "Start hour from when the AdGroup Should be selected for targeting in a day",
"minimum": 0,
"maximum": 23
},
"end": {
"type": "integer",
"description": "End hour till when the AdGroup Should be selected for targeting in a day",
"minimum": 0,
"maximum": 23
}
},
"required": ["start", "end"]
}
}
},
"required": ["dayOfWeek", "ranges"]
},
"maxRecords": "7"
}
}
}
}
},
"pricing": {
"type": "object",
"description": "Pricing related information of an Ad Group",
"properties": {
"priceType": {
"type": "string",
"enum": [
"CPC",
"CPM",
"VCPM"
]
},
"bidValue": {
"type": "number",
"minimum": 0
},
"dailySpendLimit": {
"type": "number"
}
},
"required": ["priceType", "bidValue"]
},
"frequencyCaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"RENDER",
"CLICK",
"VIDEO_COMPLETE"
]
},
"limit": {
"type": "integer",
"description": "The max. limit (number of times) to target a user",
"maximum": 129600
},
"duration": {
"type": "integer",
"description": "The Duration in minutes",
"maximum": 100
}
},
"required": ["type"]
}
},
"createdOn": {
"type": "string",
"description": "Response Only Field - The Create date String in ISO-8601 Standards",
"example": "2017-07-05T23:59:59"
},
"lastModifiedOn": {
"type": "string",
"description": "Response Only Field - The Create date String in ISO-8601 Standards",
"example": "2017-07-05T23:59:59"
},
"lastModifiedBy": {
"type": "string",
"description": "Response Only Field - The Last Modified user"
}
},
"required": ["name", "campaignId", "startTime", "clickDestination", "pricing"]
}
}
Use the following APIs for adgroup-related information:
- Create Adgroup - This API is used to create an adgroup
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-05T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-09T08:43:08",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/adgroups \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"clickDestination": "https://www.inmobi.com/",
"clickAction": "URL",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000.0
}
}
- Get Adgroup - This API is used to get details of an adgroup
{
"limit": 1,
"offset": 1,
"items": [
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-05T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-09T08:45:09",
"lastModifiedBy": "M10N"
}
]
}
curl -X GET \
https://api.inmobi.com/rso/adgroups \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d'
- Get Adgroup - This API is used to get details of an adgroup
- URL - https://api.inmobi.com/rso/adgroups
- Headers - Refer to Passing the General Headers section.
- URI Parameters - DUMMY
Parameter Name |
Description |
Mandatory/Optional |
Example |
AdgroupId |
The adgroupId whose details needs to be updated |
Mandatory |
DUMMY |
- Query Parameters - DUMMY
Query Name |
Description |
Mandatory/Optional |
Example |
pageNum |
The page number from where the list needs to be retrieved |
Optional |
5 |
maxRecords |
The maximum number of records to be retrieved from the selected page |
Optional |
57 |
- HTTP Method - POST
- Failure Scenario - Refer to Sample Error Response Code section.
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-11T18:33:46",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/adgroups/a59e83f1605d4c078347da495002d1c6/ \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-d '{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-09T08:45:09",
"lastModifiedBy": "M10N"
}
- Fetch AdgroupId - This API is used to fetch details of an adgroup under a specific adgroupId and a campaignId
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-11T18:33:46",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X GET \
https://api.inmobi.com/rso/adgroups/a59e83f1605d4c078347da495002d1c6 \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d'
- Archive AdgroupId - This API is used to archive (soft delete) details of an adgroup under a specific adgroupId.
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "ARCHIVED",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-11T18:33:46",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X DELETE \
https://api.inmobi.com/rso/adgroups/a59e83f1605d4c078347da495002d1c6/ \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Creatives from an AdgroupId - This API is used to fetch a collection of creatives under a specific adgroupId and an accountId.
- URL - https://api.inmobi.com/rso/adgroups/{adgroupId}/ads
- Headers - Refer to Passing the General Headers section.
- URI Parameters - DUMMY
Parameter Name |
Description |
Mandatory/Optional |
Example |
AdgroupId |
The adgroupId whose details needs to be updated |
Mandatory |
DUMMY |
- Query Parameters - DUMMY
Query Name |
Description |
Mandatory/Optional |
Example |
pageNum |
The page number from where the list needs to be retrieved |
Optional |
5 |
maxRecords |
The maximum number of records to be retrieved from the selected page |
Optional |
57 |
- HTTP Method - GET
- Failure Scenario - Refer to Sample Error Response Code section.
{
"limit": 1,
"offset": 1,
"items": [
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "PENDING",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/rso",
"imageAsset": {
"url": "http://i.l.inmobicdn.net/banners/FileData/36ca3863a6a24a6f8d9a92016c796c68.jpeg",
"assetId": 2320981
},
"lastModifiedOn": "2017-06-12T12:11:13"
}
]
}
curl -X GET \
https://api.inmobi.com/rso/adgroups/ed0f7a5ae279435ea7f0c4f35147ad87/ads \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Reactivate an AdgroupId - This API is used to reactivate an adgroup following its expiry.
{
"name": "61408876-0d7b-484a-8615-a658ad0de0fc",
"campaignId": "37e03eeb7f2443fcbb61c2017135591e",
"startTime": "2017-07-08T07:20:34",
"endTime": "2017-07-09T06:30:05",
"status": "ACTIVE",
"clickDestination": "http://www.inmobi.com",
"adGroupId": "cfdeb113c987486ca98bbaaea3ac7302",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 5,
"dailySpendLimit": 200
},
"createdOn": "2017-07-06T12:45:30",
"lastModifiedOn": "2017-07-07T18:32:44",
"lastModifiedBy": "ankit"
}
curl -X POST \
https://api.inmobi.com/rso/adgroups/ed0f7a5ae279435ea7f0c4f35147ad87/reactivate \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"endDate" : "2017-07-11T23:59:59"
}
- Change Adgroup Status - This API is used to change the status of an adgroup. It can be used to pause a running adgroup, activate a paused adgroup, and archive an adgroup, among others.
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "PAUSED",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-11T18:33:46",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/adgroups/status/ \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-d '{
"entityId" : "a59e83f1605d4c078347da495002d1c6",
"newStatus" : "PAUSED"
}
Creative
JSON schema for Creative
{
"$schema": "http://json-schema.org/draft-06/schema",
"type" : "object",
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the Ad"
},
"adGroupId" : {
"type" : "string",
"description" : "AdGroup under which this Ad needs to be created"
},
"adId" : {
"type" : "string",
"description" : "Response Only Field - The Ad Id that has been created/updated"
},
"status" : {
"type" : "string",
"enum" : [ "DRAFT", "ACTIVE", "PAUSED", "EXPIRED", "PENDING", "REJECTED", "ARCHIVED", "ON_HOLD" ],
"description" : "Response Only Field - The Status of the Ad"
},
"adFormat" : {
"type" : "string",
"enum" : [ "BANNER", "INTERSTITIAL", "RICHMEDIA" ],
"description" : "Format of the Ad that is being created"
},
"trackingCodes" : {
"type" : "array",
"description" : "List of tracker that needs to be attached for the Ad",
"items" : {
"type" : "object",
"properties" : {
"value" : {
"type" : "string",
"description" : "The URL/Script of the tracker for the Ad"
},
"mode" : {
"type" : "string",
"enum" : [ "URL", "SCRIPT" ],
"description" : "The type against which tracker value can be validated"
},
"eventType" : {
"type" : "string",
"enum" : [ "CLICK", "IMPRESSION" ],
"description" : "The type of tracker"
}
},
"required" : [ "value", "mode", "eventType" ]
}
},
"landingUrl" : {
"type" : "string",
"description" : "The Final page that needs to be displayed to user on clicking the Ad",
"maxSize" : 2048
},
"imageAsset" : {
"type" : "object",
"description" : "Image Asset Details of an Ad - Should be present in Create Ad call alone. Once created, asset of an Ad cannot be updated.",
"properties" : {
"assetId" : {
"type" : "integer",
"description" : "The Asset Id obtained by calling upload asset."
},
"url" : {
"type" : "string",
"description" : "Response Only Field - The url of the asset where its uploaded."
}
},
"required" : [ "assetId" ]
},
"richMediaAsset" : {
"type" : "object",
"description" : "Rich Media Details of an Ad - Should be present in Create Ad call alone. Once created, asset of an Ad cannot be updated.",
"properties" : {
"content" : {
"type" : "string",
"description" : "Content/Script of Rich Media Ad"
},
"dimension" : {
"type" : "object",
"description" : "Dimension's of Ad - Required Parameter for non-sprout Ads",
"properties" : {
"height" : {
"type" : "integer",
"description" : "The Height of an Ad."
},
"width" : {
"type" : "integer",
"description" : "The Width of an Ad."
}
}
},
"creativeType" : {
"type" : "string",
"description" : "Type of the Ad - Required Parameter for non-sprout Ads",
"enum" : [ "EXPANDABLE", "INTERSTITIAL", "RICH_BANNER" ]
},
"contentProvider" : {
"type" : "string",
"description" : "Content Provider of the RM Script - Required Parameter for non-sprout Ads",
"enum" : [ "SPROUT", "SELF", "OTHERS", "ADDROID", "CELTRA", "CRISP", "DOUBLECLICK", "FLASHTALKING", "FLITE", "MEDIALETS", "MEDIAMIND", "SIMPLYTICS", "VOXEL", "AARKI", "ADFORM", "ADMOTION", "ADOBE", "BLUESTREAK", "BONZAI", "EYEBLASTER", "EYEWONDER", "FIKSU", "GOLDSPOT", "GREYSSTIPE", "INNOVID", "JUSTAD", "MEDIABRIX", "NUANCE", "PHLUANT", "POINTROLL", "QUANTCAST", "RHYTHM", "SPARKFLOW", "SPONGECELL", "TELEMETRY", "TRUST_METRICS", "VDOPIA", "VINDICO" ]
},
"demandCapabilities" : {
"type" : "array",
"description" : "Capabilities Ad supports - Required Parameter for non-sprout Ads",
"items" : {
"type" : "string",
"enum" : [ "AUDIO", "VIDEO", "ORIENTATION", "HTML5", "JS", "AUDIO_AUTOPLAY", "VIDEO_AUTOPLAY", "PLAYABLE", "MOAT", "NATIVE_VAST_V3" ]
}
},
"altText" : {
"type" : "string",
"description" : "Alternate Text if the Ad is not available"
}
}
},
"lastModifiedOn" : {
"type" : "string",
"description" : "Response Only Field - The Last Modified date String in ISO-8601 Standards",
"example" : "2017-07-05T23:59:59"
}
},
"required" : [ "name", "adGroupId", "adFormat" ]
}
Use the following APIs for creative-related information:
- Create Creative - This API is used to create a collection of creatives under a specific accountId.
- URL - https://api.inmobi.com/rso/ads
- Headers - Refer to Passing the General Headers section.
- Query Parameters - DUMMY
Query Name |
Description |
Mandatory/Optional |
Example |
pageNum |
The page number from where the list needs to be retrieved |
Optional |
5 |
maxRecords |
The maximum number of records to be retrieved from the selected page |
Optional |
57 |
- HTTP Method - POST
- Failure Scenario - Refer to Sample Error Response Code section.
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "PENDING",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/",
"imageAsset": {
"url": "http://i.l.inmobicdn.net/banners/FileData/36ca3863a6a24a6f8d9a92016c796c68.jpeg",
"assetId": 2320981
},
"lastModifiedOn": "2017-06-12T11:11:25"
}
curl -X POST \
https://api.inmobi.com/rso/ads \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-d '{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adFormat": "BANNER",
"landingUrl": "https://www.inmobi.com/",
"imageAsset": {
"assetId": 2320981
}
}
}
- Fetch AdId - This API is used to fetch the creative corresponding to a specific adId.
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "ON_HOLD",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/",
"imageAsset": {
"assetId": 2320981,
"url" : "http://i.l.inmobicdn.net/banners/FileData/36ca3863a6a24a6f8d9a92016c796c68.jpeg"
},
"lastModifiedOn": "2017-06-12T11:23:03"
}
curl -X GET \
https://api.inmobi.com/rso/ads/225e28ad52a845dea7d8b08ce7d6b819 \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Archive AdId - This API is used to archive (soft delete) the creative corresponding to a specific adId.
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "ARCHIVED",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-11T18:33:46",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X DELETE \
https://api.inmobi.com/rso/adgroups/a59e83f1605d4c078347da495002d1c6/ \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Creative Basic Entity - This API is used to fetch the basic entity of the creative corresponding to a specific adId and an accountId.
- URL - https://api.inmobi.com/rso/ads/{adId}/basic
- Headers - Refer to Passing the General Headers section.
- JSON Schema for Creative Basic Entity
{
"$schema": "http://json-schema.org/draft-06/schema",
"type" : "object",
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the Ad"
},
"adGroupId" : {
"type" : "string",
"description" : "Response Only Field - AdGroup under which this Ad needs to be created"
},
"adId" : {
"type" : "string",
"description" : "Response Only Field - The Ad Id that has been created/updated"
},
"status" : {
"type" : "string",
"enum" : [ "DRAFT", "ACTIVE", "PAUSED", "EXPIRED", "PENDING", "REJECTED", "ARCHIVED", "ON_HOLD" ],
"description" : "Response Only Field - The Status of the Ad"
},
"adFormat" : {
"type" : "string",
"enum" : [ "BANNER", "INTERSTITIAL", "RICHMEDIA" ],
"description" : "Response Only Field - Format of the Ad that is being created"
},
"trackingCodes" : {
"type" : "array",
"description" : "List of tracker that needs to be attached for the Ad",
"items" : {
"type" : "object",
"properties" : {
"value" : {
"type" : "string",
"description" : "The URL/Script of the tracker for the Ad"
},
"mode" : {
"type" : "string",
"enum" : [ "URL", "SCRIPT" ],
"description" : "The type against which tracker value can be validated"
},
"eventType" : {
"type" : "string",
"enum" : [ "CLICK", "IMPRESSION" ],
"description" : "The type of tracker"
}
},
"required" : [ "value", "mode", "eventType" ]
}
},
"landingUrl" : {
"type" : "string",
"description" : "The Final page that needs to be displayed to user on clicking the Ad",
"maxSize" : 2048
},
"lastModifiedOn" : {
"type" : "string",
"description" : "Response Only Field - The Last Modified date String in ISO-8601 Standards",
"example" : "2017-07-05T23:59:59"
}
},
"required" : [ "name", "adGroupId", "adFormat" ]
}
- URI Parameters - DUMMY
Parameter Name |
Description |
Mandatory/Optional |
Example |
AdId |
The adId whose details needs to be updated |
Mandatory |
DUMMY |
- HTTP Method - GET
- Failure Scenario - Refer to Sample Error Response Code section.
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "ON_HOLD",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/",
"lastModifiedOn": "2017-06-12T11:23:03"
}
curl -X GET \
https://api.inmobi.com/rso/ads/225e28ad52a845dea7d8b08ce7d6b819/basic \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Update Creative Basic Entity - This API is used to update the details of the basic entity of a creative under a specific adId and an accountId.
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "PENDING",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/rso",
"lastModifiedOn": "2017-06-12T12:10:07"
}
curl -X POST \
https://api.inmobi.com/rso/ads/225e28ad52a845dea7d8b08ce7d6b819/basic \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-d '{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adFormat": "BANNER",
"landingUrl": "https://www.inmobi.com/rso"
}
- Change Creative Status - This API is used to change the status of a creative. It can be used to pause a running creative, activate a paused creative, and archive a creative, among others.
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "PAUSED",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/",
"imageAsset": {
"assetId": 2320981
},
"lastModifiedOn": "2017-06-12T11:23:03"
}
curl -X POST \
https://api.inmobi.com/rso/ads/status \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-d '{
"entityId":"225e28ad52a845dea7d8b08ce7d6b819",
"newStatus":"PAUSED"
}
Asset
Use the following APIs for asset-related information:
- Upload Images - This API is used to upload images with content-type "multipart/form-data". The image is present under
formDataParam_name
as "file".
{
"assetId": 2320981,
"name": "320x50.jpg",
"assetType": "IMAGE",
"assetUrl": "http://i.l.inmobicdn.net/banners/FileData/36ca3863a6a24a6f8d9a92016c796c68.jpeg",
"dimension": {
"height": 50,
"width": 320
},
"sizeInBytes": 8866
}
curl -X POST \
https://api.inmobi.com/rso/assets/images \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-H 'userid: kishore.bandi@inmobi.com' \
-F file=@320x50.jpg
Brand-based API Calls
These API calls are made to promote brands
Account
JSON schema for Account
{
"$schema": "http://json-schema.org/draft-06/schema",
"type" : "object",
"properties" : {
"accountId" : {
"description" : "Account Id ",
"type" : "string"
},
"name" : {
"description" : "Name of the account",
"type" : "string"
},
"status" : {
"description" : "Status of the account",
"type" : "string",
"enum" : [ "ACTIVE", "BLOCKED", "ACTIVATION_PENDING" ]
},
"balance" : {
"description" : "Balance available in the account",
"type" : "number"
}
}
Use the following APIs for account-related information:
- Get Account - This API is used to fetch details about the account.
{
"accountId": "5a5f7a5b94e441a8b0eeef9b301eb7bd",
"name": "kishore.bandi@inmobi.com",
"status": "ACTIVE",
"balance": 1000
}
curl -X GET \
https://api.inmobi.com/rso/account \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
Campaign
JSON schema for Campaign
{
"$schema": "http://json-schema.org/draft-06/schema",
"title": "Campaign Object",
"type" : "object",
"properties" : {
"objective" : {
"type" : "string",
"enum" : [ "PROMOTE_CONTENT" ]
},
"name" : {
"type" : "string"
},
"startTime" : {
"type" : "string",
"description" : "The Start date String in ISO-8601 Standards",
"example" : "2017-06-06T00:00:00"
},
"endTime" : {
"type" : "string",
"description" : "The End date String in ISO-8601 Standards",
"example" : "2017-07-05T23:59:59"
},
"campaignBudget" : {
"type" : "object",
"properties" : {
"budgetType" : {
"type" : "string",
"description" : "Account - The campaign will start burning from account and the money will not be transfered/dedicated separately for the campaign. Campaign - The selected amount will be transfered from account to campaign and the burn for the campaign will happen from this amount.",
"enum" : [ "ACCOUNT", "CAMPAIGN" ]
},
"totalBudget" : {
"type" : "number",
"description" : "Amount in Dollars",
"minimum": 0,
"maximum": 10000000
},
"dailyLimit" : {
"type" : "number",
"description" : "Amount in Dollars",
"minimum": 0,
"maximum": 10000000
}
},
"required" : [ "budgetType" ]
},
"frequencyCaps" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string",
"enum" : [ "RENDER", "CLICK", "VIDEO_COMPLETE" ]
},
"limit" : {
"type" : "integer",
"description" : "The max. limit (number of times) to target a user",
"maximum": 129600
},
"duration" : {
"type" : "integer",
"description" : "The Duration in minutes",
"maximum": 100
}
},
"required" : [ "type" ]
}
},
"campaignId" : {
"type" : "string",
"description" : "Response Only Field - Will not be honored in Request"
},
"status" : {
"type" : "string",
"description" : "Response Only Field - Will not be honored in Request",
"enum" : [ "DRAFT", "ACTIVE", "PAUSED", "EXPIRED", "PENDING", "REJECTED", "ARCHIVED", "ON_HOLD" ]
},
"balance" : {
"type" : "number",
"description" : "Response Only Field - Will not be honored in Request"
},
"createdOn" : {
"type" : "string",
"description" : "Response Only Field - The Create date String in ISO-8601 Standards",
"example" : "2017-07-05T23:59:59"
},
"lastModifiedOn" : {
"type" : "string",
"description" : "Response Only Field - The Last Modified date String in ISO-8601 Standards",
"example" : "2017-07-05T23:59:59"
},
"lastModifiedBy" : {
"type" : "string",
"description" : "Response Only Field - The Last Modified user"
}
},
"required" : [ "objective", "name", "startTime", "endTime", "campaignBudget" ]
}
Use the following APIs for campaign-related information:
- Create Campaign - This API is used to create a campaign.
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-05T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 10000,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "ACTIVE",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T09:21:12",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/campaigns \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-08T00:00:00",
"endTime": "2017-07-05T23:59:59.999",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 10000.0,
"dailyLimit": 500.0
}
}
- Fetch Campaign - This API is used to fetch the details of campaigns under an account.
{
"limit": 0,
"offset": 0,
"items": [
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-05T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 10000,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "ACTIVE",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T09:21:12",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
]
}
curl -X GET \
https://api.inmobi.com/rso/campaigns \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d'
- Update CampaignId - This API is used to update the details of campaigns under a specific campaignId and an accountId.
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-06T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 100,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "ACTIVE",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T10:27:42",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/campaigns/ed0f7a5ae279435ea7f0c4f35147ad87 \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest1",
"startTime": "2017-06-08T00:00:00",
"endTime": "2017-07-05T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 10000,
"dailyLimit": 500
}
}
- Fetch CampaignId - This API is used to fetch the details of campaigns under a specific campaignId and an accountId.
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-06T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 100,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "ACTIVE",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T10:27:42",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X GET \
https://api.inmobi.com/rso/campaigns/ed0f7a5ae279435ea7f0c4f35147ad87 \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d'
- Fetch Adgroups under CampaignId - This API is used to fetch adgroups under a specific campaignId and an accountId
- URL - https://api.inmobi.com/rso/campaigns/{campaignId}/adgroups
- Headers - Refer to Passing the General Headers section.
- URI Parameters - DUMMY
Parameter Name |
Description |
Mandatory/Optional |
Example |
CampaignId |
The campaignId whose details needs to be updated |
Mandatory |
DUMMY |
- Query Parameters - DUMMY
Query Name |
Description |
Mandatory/Optional |
Example |
pageNum |
The page number from where the list needs to be retrieved |
Optional |
5 |
maxRecords |
The maximum number of records to be retrieved from the selected page |
Optional |
57 |
- HTTP Method - GET
- Failure Scenario - Refer to Sample Error Response Code section.
{
"limit": 1,
"offset": 1,
"items": [
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-05T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-09T08:45:09",
"lastModifiedBy": "M10N"
}
]
}
curl -X GET \
https://api.inmobi.com/rso/campaigns/ed0f7a5ae279435ea7f0c4f35147ad87/adgroups \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Creatives under CampaignId - This API is used to fetch creatives under a specific campaignId and an accountId
- URL - https://api.inmobi.com/rso/campaigns/{campaignId}/ads
- Headers - Refer to Passing the General Headers section.
- URI Parameters - DUMMY
Parameter Name |
Description |
Mandatory/Optional |
Example |
CampaignId |
The campaignId whose details needs to be updated |
Mandatory |
DUMMY |
- Query Parameters - DUMMY
Query Name |
Description |
Mandatory/Optional |
Example |
pageNum |
The page number from where the list needs to be retrieved |
Optional |
5 |
maxRecords |
The maximum number of records to be retrieved from the selected page |
Optional |
57 |
- HTTP Method - GET
- Failure Scenario - Refer to Sample Error Response Code section.
{
"limit": 1,
"offset": 1,
"items": [
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "PENDING",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/rso",
"imageAsset": {
"url": "http://i.l.inmobicdn.net/banners/FileData/36ca3863a6a24a6f8d9a92016c796c68.jpeg",
"assetId": 2320981
},
"lastModifiedOn": "2017-06-12T12:11:13"
}
]
}
curl -X GET \
https://api.inmobi.com/rso/campaigns/ed0f7a5ae279435ea7f0c4f35147ad87/ads \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Archive CampaignId - This API is used to archive (soft delete) the details of campaigns under a specific campaignId and an accountId.
{
"objective": "PROMOTE_CONTENT",
"name": "Test1",
"startTime": "2017-06-12T00:00:00",
"endTime": "2017-07-05T23:59:59",
"campaignBudget": {
"budgetType": "ACCOUNT",
"totalBudget": 0,
"dailyLimit": 500
},
"campaignId": "dcb989192e8347888917c8babf704df3",
"status": "ARCHIVED",
"balance": 0,
"createdOn": "2017-06-12T10:03:08",
"lastModifiedOn": "2017-06-12T10:03:52",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X DELETE \
https://api.inmobi.com/rso/campaigns/dcb989192e8347888917c8babf704df3 \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Reactivate Campaign - This API is used to reactivate a campaign after it has expired.
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-11T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 100,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "ARCHIVED",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T10:27:42",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/campaigns/ed0f7a5ae279435ea7f0c4f35147ad87/reactivate \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"endDate" : "2017-07-11T23:59:59"
}
- Deallocate Campaign - This API is used to transfer the money allocated to this campaign back to the account. The budget type should be Campaign.
curl -X POST \
https://api.inmobi.com/rso/campaigns/dcb989192e8347888917c8babf704df3/deallocate \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Change Campaign Status - This API is used to change the status of a campaign. It can be used to pause a running campaign, activate a paused campaign, and archive a campaign, among others.
{
"objective": "PROMOTE_CONTENT",
"name": "InMobiAPITest",
"startTime": "2017-06-06T00:00:00",
"endTime": "2017-07-06T23:59:59",
"campaignBudget": {
"budgetType": "CAMPAIGN",
"totalBudget": 100,
"dailyLimit": 500
},
"campaignId": "b0afb8ce8cab41bd83ca2d5de5d9ffc5",
"status": "PAUSED",
"balance": 0,
"createdOn": "2017-06-06T09:21:12",
"lastModifiedOn": "2017-06-06T10:27:42",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/campaigns/status \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"entityId" : "ed0f7a5ae279435ea7f0c4f35147ad87",
"newStatus" : "PAUSED"
}
Adgroup
JSON schema for Adgroup
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the Ad Group"
},
"campaignId": {
"type": "string",
"description": "Campaign Id under which this Ad Group needs to be created"
},
"startTime": {
"type": "string",
"description": "Date in string using ISO-8601 Standard"
},
"endTime": {
"type": "string",
"description": "Date in string using ISO-8601 Standard"
},
"status": {
"type": "string",
"description": "Response Only Field - Date in string using ISO-8601 Standard",
"enum": [
"DRAFT",
"ACTIVE",
"PAUSED",
"EXPIRED",
"PENDING",
"REJECTED",
"ARCHIVED",
"ON_HOLD"
]
},
"clickDestination": {
"type": "string",
"description": "The Final Page which needs to be displayed when user clicks on the Ad"
},
"adGroupId": {
"type": "string",
"description": "Response Only Field"
},
"clickAction": {
"type": "string",
"enum": [
"URL"
]
},
"objective": {
"type": "string",
"description": "Response Only Field - Derived from Campaign",
"enum": [
"PROMOTE_CONTENT"
]
},
"targeting": {
"type": "object",
"description": "Targeting Information of the corresponding AdGroup",
"properties": {
"geoTargeting": {
"type": "object",
"properties": {
"geoTargetingDetails": {
"type": "array",
"items": {
"type": "object",
"description": "Geo Targeting Information of the corresponding AdGroup",
"properties": {
"countryId": {
"type": "integer",
"description": "Country Id which needs to be Targeted"
},
"stateIds": {
"type": "array",
"items": {
"type": "integer"
},
"description": "State Id which needs to be Targeted"
},
"cityIds": {
"type": "array",
"items": {
"type": "integer"
},
"description": "City Id which needs to be Targeted"
},
"zipIds": {
"type": "array",
"description": "Zips Id which needs to be Targeted",
"items": {
"type": "integer"
}
},
"carrierIds": {
"type": "array",
"description": "Carrier Id which needs to be Targeted",
"items": {
"type": "integer"
}
},
"latLongList": {
"type": "array",
"items": {
"type": "object",
"description": "Lat-Long based targeting",
"properties": {
"name": {
"type": "string"
},
"latitude": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"longitude": {
"type": "number",
"minimum": -180,
"maximum": 180
},
"radius": {
"type": "number",
"minimum": 0
}
},
"required": ["name", "latitude", "longitude", "radius"]
}
},
"required": ["countryId"]
}
}
}
},
"deviceTargeting": {
"type": "object",
"properties": {
"handsetTargetingList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"manufacturerId": {
"type": "integer",
"description": "The ManufacturerId that needs to be included/excluded"
},
"handsetIdList": {
"type": "array",
"description": "List of Handset Ids that needs to be included/excluded",
"items": {
"type": "integer"
}
},
"exclude": {
"type": "boolean",
"description": "Indicates if the selected targeting needs to be included or excluded. Default - false"
}
},
"required": ["manufacturerId"]
}
},
"deviceTypeList": {
"type": "array",
"description": "What type of devices needs to be selected for Targeting. Default - ALL",
"items": {
"type": "string",
"enum": [
"SMART_PHONE",
"TABLET"
]
}
},
"ostargetingList": {
"type": "array",
"description": "Target based on User's Operating System",
"items": {
"type": "object",
"properties": {
"osId": {
"type": "integer",
"description": "OS Id that needs to be included"
},
"minVersion": {
"type": "number",
"description": "Minimum version of the OS that needs to be targeted"
},
"maxVersion": {
"type": "number",
"description": "Maximum version of the OS that needs to be targeted"
},
"exclude": {
"type": "boolean",
"description": "Indicates if the selected targeting needs to be included or excluded. Default - false"
}
},
"required": ["osId"]
}
}
}
},
"userTargeting": {
"type": "object",
"description": "The Segments retrieved must be set in this list of lists using CNF form.
Note : The more segments residing inside AND notation in CNF notation, the lesser would be the reach of Users.
Example : If we want to target all users who are either Shopping Enthusiasts or Business Professional or Technology Enthusiasts but definetely have to be a Cab Riders then the input would be [["Shopping","Business","Technology"],["Cab Riders"]]
(Of Course, the values here need to be segment Ids)",
"properties": {
"segmentIds": {
"type": "array",
"example": "",
"items": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"required": ["segmentIds"]
},
"scheduleTargeting": {
"type": "object",
"description": "Target based on Time",
"properties": {
"schedules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"dayOfWeek": {
"type": "string",
"enum": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
]
},
"ranges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "integer",
"description": "Start hour from when the AdGroup Should be selected for targeting in a day",
"minimum": 0,
"maximum": 23
},
"end": {
"type": "integer",
"description": "End hour till when the AdGroup Should be selected for targeting in a day",
"minimum": 0,
"maximum": 23
}
},
"required": ["start", "end"]
}
}
},
"required": ["dayOfWeek", "ranges"]
},
"maxRecords": "7"
}
}
}
}
},
"pricing": {
"type": "object",
"description": "Pricing related information of an Ad Group",
"properties": {
"priceType": {
"type": "string",
"enum": [
"CPC",
"CPM",
"VCPM"
]
},
"bidValue": {
"type": "number",
"minimum": 0
},
"dailySpendLimit": {
"type": "number"
}
},
"required": ["priceType", "bidValue"]
},
"frequencyCaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"RENDER",
"CLICK",
"VIDEO_COMPLETE"
]
},
"limit": {
"type": "integer",
"description": "The max. limit (number of times) to target a user",
"maximum": 129600
},
"duration": {
"type": "integer",
"description": "The Duration in minutes",
"maximum": 100
}
},
"required": ["type"]
}
},
"createdOn": {
"type": "string",
"description": "Response Only Field - The Create date String in ISO-8601 Standards",
"example": "2017-07-05T23:59:59"
},
"lastModifiedOn": {
"type": "string",
"description": "Response Only Field - The Create date String in ISO-8601 Standards",
"example": "2017-07-05T23:59:59"
},
"lastModifiedBy": {
"type": "string",
"description": "Response Only Field - The Last Modified user"
}
},
"required": ["name", "campaignId", "startTime", "clickDestination", "pricing"]
}
}
Use the following APIs for adgroup-related information:
- Create Adgroup - This API is used to create an adgroup
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-05T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-09T08:43:08",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/adgroups \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"clickDestination": "https://www.inmobi.com/",
"clickAction": "URL",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000.0
}
}
- Get Adgroup - This API is used to get details of an adgroup
{
"limit": 1,
"offset": 1,
"items": [
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-05T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-09T08:45:09",
"lastModifiedBy": "M10N"
}
]
}
curl -X GET \
https://api.inmobi.com/rso/adgroups \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d'
- Get Adgroup - This API is used to get details of an adgroup
- URL - https://api.inmobi.com/rso/adgroups
- Headers - Refer to Passing the General Headers section.
- URI Parameters - DUMMY
Parameter Name |
Description |
Mandatory/Optional |
Example |
AdgroupId |
The adgroupId whose details needs to be updated |
Mandatory |
DUMMY |
- Query Parameters - DUMMY
Query Name |
Description |
Mandatory/Optional |
Example |
pageNum |
The page number from where the list needs to be retrieved |
Optional |
5 |
maxRecords |
The maximum number of records to be retrieved from the selected page |
Optional |
57 |
- HTTP Method - POST
- Failure Scenario - Refer to Sample Error Response Code section.
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-11T18:33:46",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/adgroups/a59e83f1605d4c078347da495002d1c6/ \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-d '{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-09T08:45:09",
"lastModifiedBy": "M10N"
}
- Fetch AdgroupId - This API is used to fetch details of an adgroup under a specific adgroupId and a campaignId
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "PENDING",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-11T18:33:46",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X GET \
https://api.inmobi.com/rso/adgroups/a59e83f1605d4c078347da495002d1c6 \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d'
- Archive AdgroupId - This API is used to archive (soft delete) details of an adgroup under a specific adgroupId.
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "ARCHIVED",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-11T18:33:46",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X DELETE \
https://api.inmobi.com/rso/adgroups/a59e83f1605d4c078347da495002d1c6/ \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Creatives from an AdgroupId - This API is used to fetch a collection of creatives under a specific adgroupId and an accountId.
- URL - https://api.inmobi.com/rso/adgroups/{adgroupId}/ads
- Headers - Refer to Passing the General Headers section.
- URI Parameters - DUMMY
Parameter Name |
Description |
Mandatory/Optional |
Example |
AdgroupId |
The adgroupId whose details needs to be updated |
Mandatory |
DUMMY |
- Query Parameters - DUMMY
Query Name |
Description |
Mandatory/Optional |
Example |
pageNum |
The page number from where the list needs to be retrieved |
Optional |
5 |
maxRecords |
The maximum number of records to be retrieved from the selected page |
Optional |
57 |
- HTTP Method - GET
- Failure Scenario - Refer to Sample Error Response Code section.
{
"limit": 1,
"offset": 1,
"items": [
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "PENDING",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/rso",
"imageAsset": {
"url": "http://i.l.inmobicdn.net/banners/FileData/36ca3863a6a24a6f8d9a92016c796c68.jpeg",
"assetId": 2320981
},
"lastModifiedOn": "2017-06-12T12:11:13"
}
]
}
curl -X GET \
https://api.inmobi.com/rso/adgroups/ed0f7a5ae279435ea7f0c4f35147ad87/ads \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Reactivate an AdgroupId - This API is used to reactivate an adgroup following its expiry.
{
"name": "61408876-0d7b-484a-8615-a658ad0de0fc",
"campaignId": "37e03eeb7f2443fcbb61c2017135591e",
"startTime": "2017-07-08T07:20:34",
"endTime": "2017-07-09T06:30:05",
"status": "ACTIVE",
"clickDestination": "http://www.inmobi.com",
"adGroupId": "cfdeb113c987486ca98bbaaea3ac7302",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 5,
"dailySpendLimit": 200
},
"createdOn": "2017-07-06T12:45:30",
"lastModifiedOn": "2017-07-07T18:32:44",
"lastModifiedBy": "ankit"
}
curl -X POST \
https://api.inmobi.com/rso/adgroups/ed0f7a5ae279435ea7f0c4f35147ad87/reactivate \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a \
-H 'sessionId: 3eff064e143a4fe1a326c7a13117c35d' \
-d '{
"endDate" : "2017-07-11T23:59:59"
}
- Change Adgroup Status - This API is used to change the status of an adgroup. It can be used to pause a running adgroup, activate a paused adgroup, and archive an adgroup, among others.
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "PAUSED",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-11T18:33:46",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X POST \
https://api.inmobi.com/rso/adgroups/status/ \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-d '{
"entityId" : "a59e83f1605d4c078347da495002d1c6",
"newStatus" : "PAUSED"
}
Creative
JSON schema for Creative
{
"$schema": "http://json-schema.org/draft-06/schema",
"type" : "object",
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the Ad"
},
"adGroupId" : {
"type" : "string",
"description" : "AdGroup under which this Ad needs to be created"
},
"adId" : {
"type" : "string",
"description" : "Response Only Field - The Ad Id that has been created/updated"
},
"status" : {
"type" : "string",
"enum" : [ "DRAFT", "ACTIVE", "PAUSED", "EXPIRED", "PENDING", "REJECTED", "ARCHIVED", "ON_HOLD" ],
"description" : "Response Only Field - The Status of the Ad"
},
"adFormat" : {
"type" : "string",
"enum" : [ "BANNER", "INTERSTITIAL", "RICHMEDIA" ],
"description" : "Format of the Ad that is being created"
},
"trackingCodes" : {
"type" : "array",
"description" : "List of tracker that needs to be attached for the Ad",
"items" : {
"type" : "object",
"properties" : {
"value" : {
"type" : "string",
"description" : "The URL/Script of the tracker for the Ad"
},
"mode" : {
"type" : "string",
"enum" : [ "URL", "SCRIPT" ],
"description" : "The type against which tracker value can be validated"
},
"eventType" : {
"type" : "string",
"enum" : [ "CLICK", "IMPRESSION" ],
"description" : "The type of tracker"
}
},
"required" : [ "value", "mode", "eventType" ]
}
},
"landingUrl" : {
"type" : "string",
"description" : "The Final page that needs to be displayed to user on clicking the Ad",
"maxSize" : 2048
},
"imageAsset" : {
"type" : "object",
"description" : "Image Asset Details of an Ad - Should be present in Create Ad call alone. Once created, asset of an Ad cannot be updated.",
"properties" : {
"assetId" : {
"type" : "integer",
"description" : "The Asset Id obtained by calling upload asset."
},
"url" : {
"type" : "string",
"description" : "Response Only Field - The url of the asset where its uploaded."
}
},
"required" : [ "assetId" ]
},
"richMediaAsset" : {
"type" : "object",
"description" : "Rich Media Details of an Ad - Should be present in Create Ad call alone. Once created, asset of an Ad cannot be updated.",
"properties" : {
"content" : {
"type" : "string",
"description" : "Content/Script of Rich Media Ad"
},
"dimension" : {
"type" : "object",
"description" : "Dimension's of Ad - Required Parameter for non-sprout Ads",
"properties" : {
"height" : {
"type" : "integer",
"description" : "The Height of an Ad."
},
"width" : {
"type" : "integer",
"description" : "The Width of an Ad."
}
}
},
"creativeType" : {
"type" : "string",
"description" : "Type of the Ad - Required Parameter for non-sprout Ads",
"enum" : [ "EXPANDABLE", "INTERSTITIAL", "RICH_BANNER" ]
},
"contentProvider" : {
"type" : "string",
"description" : "Content Provider of the RM Script - Required Parameter for non-sprout Ads",
"enum" : [ "SPROUT", "SELF", "OTHERS", "ADDROID", "CELTRA", "CRISP", "DOUBLECLICK", "FLASHTALKING", "FLITE", "MEDIALETS", "MEDIAMIND", "SIMPLYTICS", "VOXEL", "AARKI", "ADFORM", "ADMOTION", "ADOBE", "BLUESTREAK", "BONZAI", "EYEBLASTER", "EYEWONDER", "FIKSU", "GOLDSPOT", "GREYSSTIPE", "INNOVID", "JUSTAD", "MEDIABRIX", "NUANCE", "PHLUANT", "POINTROLL", "QUANTCAST", "RHYTHM", "SPARKFLOW", "SPONGECELL", "TELEMETRY", "TRUST_METRICS", "VDOPIA", "VINDICO" ]
},
"demandCapabilities" : {
"type" : "array",
"description" : "Capabilities Ad supports - Required Parameter for non-sprout Ads",
"items" : {
"type" : "string",
"enum" : [ "AUDIO", "VIDEO", "ORIENTATION", "HTML5", "JS", "AUDIO_AUTOPLAY", "VIDEO_AUTOPLAY", "PLAYABLE", "MOAT", "NATIVE_VAST_V3" ]
}
},
"altText" : {
"type" : "string",
"description" : "Alternate Text if the Ad is not available"
}
}
},
"lastModifiedOn" : {
"type" : "string",
"description" : "Response Only Field - The Last Modified date String in ISO-8601 Standards",
"example" : "2017-07-05T23:59:59"
}
},
"required" : [ "name", "adGroupId", "adFormat" ]
}
Use the following APIs for creative-related information:
- Create Creative - This API is used to create a collection of creatives under a specific accountId.
- URL - https://api.inmobi.com/rso/ads
- Headers - Refer to Passing the General Headers section.
- Query Parameters - DUMMY
Query Name |
Description |
Mandatory/Optional |
Example |
pageNum |
The page number from where the list needs to be retrieved |
Optional |
5 |
maxRecords |
The maximum number of records to be retrieved from the selected page |
Optional |
57 |
- HTTP Method - POST
- Failure Scenario - Refer to Sample Error Response Code section.
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "PENDING",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/",
"imageAsset": {
"url": "http://i.l.inmobicdn.net/banners/FileData/36ca3863a6a24a6f8d9a92016c796c68.jpeg",
"assetId": 2320981
},
"lastModifiedOn": "2017-06-12T11:11:25"
}
curl -X POST \
https://api.inmobi.com/rso/ads \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-d '{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adFormat": "BANNER",
"landingUrl": "https://www.inmobi.com/",
"imageAsset": {
"assetId": 2320981
}
}
}
- Fetch AdId - This API is used to fetch the creative corresponding to a specific adId.
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "ON_HOLD",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/",
"imageAsset": {
"assetId": 2320981,
"url" : "http://i.l.inmobicdn.net/banners/FileData/36ca3863a6a24a6f8d9a92016c796c68.jpeg"
},
"lastModifiedOn": "2017-06-12T11:23:03"
}
curl -X GET \
https://api.inmobi.com/rso/ads/225e28ad52a845dea7d8b08ce7d6b819 \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Archive AdId - This API is used to archive (soft delete) the creative corresponding to a specific adId.
{
"name": "InMobiAPITestAdGroup1",
"campaignId": "ed0f7a5ae279435ea7f0c4f35147ad87",
"startTime": "2017-06-09T00:00:00",
"endTime": "2017-07-04T23:59:59",
"status": "ARCHIVED",
"clickDestination": "https://www.inmobi.com/",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"clickAction": "URL",
"objective": "PROMOTE_CONTENT",
"targeting": {
"geoTargeting": {
"geoTargetingDetails": [
{
"countryId": 94
}
]
},
"deviceTargeting": {
"deviceTypeList": [
"SMART_PHONE",
"TABLET"
]
},
"scheduleTargeting": {
"schedules": [
{
"dayOfWeek": "SUNDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "MONDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "TUESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "WEDNESDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "THURSDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "FRIDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
},
{
"dayOfWeek": "SATURDAY",
"ranges": [
{
"start": 0,
"end": 23
}
]
}
]
}
},
"pricing": {
"priceType": "CPC",
"bidValue": 1.45,
"dailySpendLimit": 1000
},
"createdOn": "2017-06-09T08:43:08",
"lastModifiedOn": "2017-06-11T18:33:46",
"lastModifiedBy": "kishore.bandi@inmobi.com"
}
curl -X DELETE \
https://api.inmobi.com/rso/adgroups/a59e83f1605d4c078347da495002d1c6/ \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Creative Basic Entity - This API is used to fetch the basic entity of the creative corresponding to a specific adId and an accountId.
- URL - https://api.inmobi.com/rso/ads/{adId}/basic
- Headers - Refer to Passing the General Headers section.
- JSON Schema for Creative Basic Entity
{
"$schema": "http://json-schema.org/draft-06/schema",
"type" : "object",
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the Ad"
},
"adGroupId" : {
"type" : "string",
"description" : "Response Only Field - AdGroup under which this Ad needs to be created"
},
"adId" : {
"type" : "string",
"description" : "Response Only Field - The Ad Id that has been created/updated"
},
"status" : {
"type" : "string",
"enum" : [ "DRAFT", "ACTIVE", "PAUSED", "EXPIRED", "PENDING", "REJECTED", "ARCHIVED", "ON_HOLD" ],
"description" : "Response Only Field - The Status of the Ad"
},
"adFormat" : {
"type" : "string",
"enum" : [ "BANNER", "INTERSTITIAL", "RICHMEDIA" ],
"description" : "Response Only Field - Format of the Ad that is being created"
},
"trackingCodes" : {
"type" : "array",
"description" : "List of tracker that needs to be attached for the Ad",
"items" : {
"type" : "object",
"properties" : {
"value" : {
"type" : "string",
"description" : "The URL/Script of the tracker for the Ad"
},
"mode" : {
"type" : "string",
"enum" : [ "URL", "SCRIPT" ],
"description" : "The type against which tracker value can be validated"
},
"eventType" : {
"type" : "string",
"enum" : [ "CLICK", "IMPRESSION" ],
"description" : "The type of tracker"
}
},
"required" : [ "value", "mode", "eventType" ]
}
},
"landingUrl" : {
"type" : "string",
"description" : "The Final page that needs to be displayed to user on clicking the Ad",
"maxSize" : 2048
},
"lastModifiedOn" : {
"type" : "string",
"description" : "Response Only Field - The Last Modified date String in ISO-8601 Standards",
"example" : "2017-07-05T23:59:59"
}
},
"required" : [ "name", "adGroupId", "adFormat" ]
}
- URI Parameters - DUMMY
Parameter Name |
Description |
Mandatory/Optional |
Example |
AdId |
The adId whose details needs to be updated |
Mandatory |
DUMMY |
- HTTP Method - GET
- Failure Scenario - Refer to Sample Error Response Code section.
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "ON_HOLD",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/",
"lastModifiedOn": "2017-06-12T11:23:03"
}
curl -X GET \
https://api.inmobi.com/rso/ads/225e28ad52a845dea7d8b08ce7d6b819/basic \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Update Creative Basic Entity - This API is used to update the details of the basic entity of a creative under a specific adId and an accountId.
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "PENDING",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/rso",
"lastModifiedOn": "2017-06-12T12:10:07"
}
curl -X POST \
https://api.inmobi.com/rso/ads/225e28ad52a845dea7d8b08ce7d6b819/basic \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-d '{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adFormat": "BANNER",
"landingUrl": "https://www.inmobi.com/rso"
}'
- Change Creative Status - This API is used to change the status of a creative. It can be used to pause a running creative, activate a paused creative, and archive a creative, among others.
{
"name": "InMobiAPITestBannerAd1",
"adGroupId": "a59e83f1605d4c078347da495002d1c6",
"adId": "225e28ad52a845dea7d8b08ce7d6b819",
"status": "PAUSED",
"adFormat": "BANNER",
"trackingCodes": [],
"landingUrl": "https://www.inmobi.com/",
"imageAsset": {
"assetId": 2320981
},
"lastModifiedOn": "2017-06-12T11:23:03"
}
curl -X POST \
https://api.inmobi.com/rso/ads/status \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: application/json' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-d '{
"entityId":"225e28ad52a845dea7d8b08ce7d6b819",
"newStatus":"PAUSED"
}'
Asset
Use the following APIs for asset-related information:
- Upload Images - This API is used to upload images with content-type "multipart/form-data". The image is present under
formDataParam_name as "file".
{
"assetId": 2320981,
"name": "320x50.jpg",
"assetType": "IMAGE",
"assetUrl": "http://i.l.inmobicdn.net/banners/FileData/36ca3863a6a24a6f8d9a92016c796c68.jpeg",
"dimension": {
"height": 50,
"width": 320
},
"sizeInBytes": 8866
}
curl -X POST \
https://api.inmobi.com/rso/assets/images \
-H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \
-H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97' \
-H 'userid: kishore.bandi@inmobi.com' \
-F file=@320x50.jpg
Metadata API Calls
These API calls are made to fetch metadata information.
Note:
- Almost all metadata endpoints return a Id-Name pair as result
- Most of the endpoints support a name Query Parameter to filter specific values
JSON Schema for Handset Entity
{
"type" : "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties" : {
"handsetId" : {
"type" : "integer",
"description" : "The handset Id which InMobi needs in AdGroup Request"
},
"handsetName" : {
"type" : "string",
"description" : "The Name of the Handset"
},
"handsetModelNumber" : {
"type" : "string",
"description" : "The Model number of the Handset against which name search can be performed"
},
"handsetManufacturer" : {
"type" : "string",
"description" : "The Manufacturer of the Handset"
}
}
}
JSON Schema for City Entity
{
"type" : "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties" : {
"id" : {
"type" : "integer",
"description" : "The City Id which InMobi needs in AdGroup Request"
},
"name" : {
"type" : "string",
"description" : "The name of the City"
},
"stateId" : {
"type" : "integer",
"description" : "The state Id to which this city belongs to"
}
}
}
JSON Schema for Operating System Entity
{
"type" : "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties" : {
"osId" : {
"type" : "integer",
"description" : "The Operating System Id which InMobi needs in AdGroup Request"
},
"osName" : {
"type" : "string",
"description" : "The Operating System Name"
},
"osVersions" : {
"type" : "array",
"items" : {
"type" : "string",
"description" : "All the supported versions of this Operating System"
}
}
}
}
Metadata API calls are classified in following types:
APIs for App and Brand
- Fetch Metadata List - This API is used to fetch the list of supported metadata calls.
Note:
Note This is a relative path. These endpoints should be appended after the parent path.
{ "items": [ "/manufacturers", "/manufacturers/{manufacturerId}", "/manufacturers/{manufacturerId}/handsets", "/handsets", "/handsets/{handsetId}", "/os", "/os/{osId}", "/segments/behavioural", "/segments/demog", "/countries", "/countries/{countryId}/states", "/states/{stateId}/cities", "/countries/{countryId}/cities", "/countries/{countryId}/carriers" ] }
curl -X GET \ https://api.inmobi.com/rso/metadata \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Supported Manufacturers - This API is used to fetch the list of supported manufacturers.
Note
If a specific manufacturer name is provided in the queryParam, only the data matching with that name would be retrieved.
{ "items": [ { "id": 7, "name": "Samsung" } ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/manufacturers?name=samsung \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch ManufacturerId - This API is used to fetch the name of the manufacturer, from a manufacturerId.
{ "id": 7, "name": "Samsung" }
curl -X GET \ https://api.inmobi.com/rso/metadata/manufacturers/7 \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Handset Models from ManufacturerId - This API is used to fetch the list of handset models, from a manufacturerId.
Note
If a specific handset model is provided in the queryParam, only the data matching with that model under the given manufacturerId would be retrieved.
- URL - https://api.inmobi.com/rso/metadata/manufacturers/{manufacturerId}/handsets
- URI Parameters - DUMMY
Parameter Name |
Description |
Mandatory/Optional |
Type |
ManufacturerId |
The manufacturerId whose details need to be searched, for the handset model |
Mandatory |
String |
- HTTP Method - GET
- Query Parameters - DUMMY
Query Name |
Description |
Mandatory/Optional |
Type |
Example |
name |
The model number with which the handsets need to be searched |
Optional |
String |
SM-G930A |
- Failure Scenario - Refer to Sample Error Response Code section.
{ "items": [ { "handsetId": 60295, "handsetName": "Galaxy S7", "handsetModelNumber": "SM-G930A", "handsetManufacturer": "Samsung" }, { "handsetId": 57560, "handsetName": "Galaxy S6 Edge Plus", "handsetModelNumber": "SM-G928P", "handsetManufacturer": "Samsung" }, { "handsetId": 57324, "handsetName": "Galaxy Core Prime", "handsetModelNumber": "SM-G360V", "handsetManufacturer": "Samsung" }, { "handsetId": 49133, "handsetName": "Galaxy Tab Pro 8.4", "handsetModelNumber": "SM-T320", "handsetManufacturer": "Samsung" }, { "handsetId": 57335, "handsetName": "Gakaxt S Duos 3", "handsetModelNumber": "SM-G316ML", "handsetManufacturer": "Samsung" }, { "handsetId": 57341, "handsetName": "Galaxy Ace Style", "handsetModelNumber": "SM-G310HN", "handsetManufacturer": "Samsung" } ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/manufacturers/7/handsets \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Handset List of Manufacturer - This API is used to fetch the list of all handsets of a manufacturer, from a handset model.
Note
If a handset model is provided in the queryParam, list of all handsets from the same manufacturer matching would be retrieved.
{ "items": [ { "handsetId": 60295, "handsetName": "Galaxy S7", "handsetModelNumber": "SM-G930A", "handsetManufacturer": "Samsung" }, { "handsetId": 57560, "handsetName": "Galaxy S6 Edge Plus", "handsetModelNumber": "SM-G928P", "handsetManufacturer": "Samsung" }, { "handsetId": 57324, "handsetName": "Galaxy Core Prime", "handsetModelNumber": "SM-G360V", "handsetManufacturer": "Samsung" }, { "handsetId": 49133, "handsetName": "Galaxy Tab Pro 8.4", "handsetModelNumber": "SM-T320", "handsetManufacturer": "Samsung" }, { "handsetId": 57335, "handsetName": "Gakaxt S Duos 3", "handsetModelNumber": "SM-G316ML", "handsetManufacturer": "Samsung" }, { "handsetId": 57341, "handsetName": "Galaxy Ace Style", "handsetModelNumber": "SM-G310HN", "handsetManufacturer": "Samsung" } ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/handsets \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Handset Details from HandsetId - This API is used to fetch the details of a handset model from a handsetId.
{ "handsetId": 60295, "handsetName": "Galaxy S7", "handsetModelNumber": "SM-G930A", "handsetManufacturer": "Samsung" }
curl -X GET \ https://api.inmobi.com/rso/metadata/handsets/60295 \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Country Details - This API is used to fetch the details from a country name.
Note: If the name of a country is provided in the queryParam, only the data matching with that name would be retrieved.
{ "items": [ { "id": 11, "name": "India" }, { "id": 51, "name": "Indonesia" } ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/countries?name=ind \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch All States - This API is used to fetch the list of all states from a countryId.
{ "items": [ { "id": 28789, "name": "DELHI" }, { "id": 30044, "name": "GOA" }, { "id": 28805, "name": "KARNATAKA" } ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/countries/11/states \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch All Cities from CountryId - This API is used to fetch the list of all cities from a countryId.
{ "items": [ { "id": 30788, "name": "BANGALORE", "stateId": 28805 }, { "id": 39599, "name": "AGRA", "stateId": 29003 }, { "id": 30708, "name": "MUMBAI", "stateId": 28767 }, { "id": 39621, "name": "BELGAUM", "stateId": 28805 } ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/countries/11/cities \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch All Carriers - This API is used to fetch the list of all carriers from a countryId.
{ "items": [ { "id": 356, "name": "BSNL" }, { "id": 352, "name": "Bharti Airtel" }, { "id": 1150, "name": "Jio" }, { "id": 871, "name": "Others Mobile Carrier" }, { "id": 556, "name": "Tata Docomo" }, { "id": -11, "name": "UNKNOWN" }, { "id": 353, "name": "Vodafone Essar" }, { "id": 360, "name": "WiFi" } ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/countries/11/carriers \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch All Cities from StateId - This API is used to fetch the list of all cities from a stateId.
{ "items": [ { "id": 30788, "name": "BANGALORE", "stateId": 28805 }, { "id": 39620, "name": "MYSORE", "stateId": 28805 }, { "id": 30792, "name": "MANGALORE", "stateId": 28805 }, { "id": 39621, "name": "BELGAUM", "stateId": 28805 } ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/states/28805/cities \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch OS Details - This API is used to fetch the details of all supported operating systems.
Note:
If the name of a OS is provided in the queryParam, only the data matching with that name would be retrieved.
{ "items": [ { "osId": 3, "osName": "Android", "osVersions": [ "1.5", "7", "4.2", "4", "10.6", "1.6", "2.4", "4.1", "4.5", "3.1", "2", "3.2", "7.1", "6.1", "4.4", "1.1", "10.5", "5.2", "5.3", "2.3", "2.1", "0.5", "2.2", "5.1", "4.3", "3", "5", "6", "1", "4.01" ] } ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/os?name=android \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch OS Id Details - This API is used to fetch the details of all supported operating systems, from an osId.
{ "osId": 3, "osName": "Android", "osVersions": [ "1.5", "7", "4.2", "4", "10.6", "1.6", "2.4", "4.1", "4.5", "3.1", "2", "3.2", "7.1", "6.1", "4.4", "1.1", "10.5", "5.2", "5.3", "2.3", "2.1", "0.5", "2.2", "5.1", "4.3", "3", "5", "6", "1", "4.01" ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/os/3 \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Behavioral Segments - This API is used to fetch all the behavioral segments, based on user types.
{ "items": [ { "id": 1812918, "name": "Fashion Enthusiasts" }, { "id": 2186761, "name": "Shopping Enthusiasts" }, { "id": 3162568, "name": "Mall Visitors" }, { "id": 2991197, "name": "Shoppers" }, { "id": 2186732, "name": "Business Professional" }, { "id": 2186751, "name": "Finance App Users" }, { "id": 3542302, "name": "Business Park Employees" }, { "id": 2186737, "name": "Electronics Enthusiasts" }, { "id": 2595925, "name": "Productivity App Users" }, { "id": 3940628, "name": "Technology Enthusiasts" }, { "id": 2186738, "name": "Entertainment Enthusiasts" }, { "id": 2619751, "name": "Audio-Video Enthusiasts" }, { "id": 3640119, "name": "Gaming Enthusiasts" }, { "id": 2186763, "name": "Social Butterflies" }, { "id": 3639834, "name": "Date Seekers" }, { "id": 3939595, "name": "Amusement Park Visitors" }, { "id": 3941181, "name": "Heavy Video Content Users" }, { "id": 2186748, "name": "Home Improvement Enthusiasts" }, { "id": 3939583, "name": "Upscale Residence Dwellers" }, { "id": 2186749, "name": "Household Decision Makers" }, { "id": 2186734, "name": "Dining Out Enthusiasts" }, { "id": 3162564, "name": "QSR Enthusiasts" }, { "id": 3640094, "name": "Sports Enthusiasts" }, { "id": 1812911, "name": "Automotive Enthusiasts" }, { "id": 1812913, "name": "Health & Fitness Enthusiasts" }, { "id": 3939594, "name": "Urban Park Visitors" }, { "id": 3939596, "name": "Hospital Visitors" }, { "id": 3162572, "name": "Hotels & Lodging Regulars" }, { "id": 3537566, "name": "International Travelers" }, { "id": 3591153, "name": "Commuters (greater than 20km)" }, { "id": 3591143, "name": "Commuters (less than 5km)" }, { "id": 3591151, "name": "Commuters (between 5km to 20 km)" }, { "id": 3477812, "name": "Cab Riders" }, { "id": 3623933, "name": "Regular travel bookers" }, { "id": 3912943, "name": "Current International Travelers" }, { "id": 3615879, "name": "Frequent flyers - new" }, { "id": 3689009, "name": "University students_new" } ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/segments/behavioural \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
- Fetch Demographic Segments - This API is used to fetch all the demographic segments, based on user characteristics like age and sex, among others.
{ "items": [ { "id": 2186755, "name": "Males (inferred)" }, { "id": 2303807, "name": "Males 13-17" }, { "id": 2316005, "name": "Males 18-34 (inferred)" }, { "id": 3369499, "name": "Males 35 Plus (inferred)" }, { "id": 2186741, "name": "Females (inferred)" }, { "id": 3100290, "name": "Females 13-17" }, { "id": 2316004, "name": "Females 18-34 (inferred)" }, { "id": 3369501, "name": "Females 35 Plus (inferred)" } ] }
curl -X GET \ https://api.inmobi.com/rso/metadata/segments/demog \ -H 'accountId: 5a5f7a5b94e441a8b0eeef9b301eb7bd' \ -H 'content-type: application/json' \ -H 'secretKey: d32ad3e3ff612342bfb5m28seecebf9a' \ -H 'sessionId: 79a30e4cab6549d7af9e7a34b93e6e97'
APIs for App
These APIs are exclusively applicable for apps and fetch:
APIs for Brand
These APIs are exclusively applicable for brands and fetch: