Get template Ad details

This API returns the details around the marketing template Ad account.

Request Parameters

Key

Description

Value

Data type

Required/Optional

Constraints

Authorization

Access Token for the application

{{PARTNER_APP_TOKEN}}

String

Required

Should be a valid Partner App Access Token

appId

App ID for which the ad details are required

{{App_ID}}

String

Required

  • The Id should be a valid app Id of Gupshup.
  • The App must be associated with the account that owns the PARTNER_APP_TOKEN being used.

TemplateId

Marketing template ID for which the ad details are required

{{templateId}}

String

Required

Valid Marketing Template Id

Sample Request

curl --location 'https://partner.gupshup.io/partner/app/:appId/template/:templateId/ads' \
--header 'Accept: application/json' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}'

Sample Response

{
 "status":"success",
 "template_ad_details":
    {
     "ad_account_id":"3242596802542159",
     "ad_adset_id":"120215865443300592",
     "ad_campaign_id":"120215865319530592",
     "ad_id":"120215865446460592",
     "category":"MARKETING",
     "id":"939035207269681"
     }
}

Status Codes


Status Code

Response

Comments

Success

200

{

"status":"success","template_ad_details": { "ad_account_id":"3242596802542159", "ad_adset_id":"120215865443300592", "ad_campaign_id":"120215865319530592", "ad_id":"120215865446460592", "category":"MARKETING", "id":"939035207269681" } }

Error

400

{

"status": "error","message": "MM lite is not enabled for this app" }

400

{ "status":"error", "message":"Invalid template id provided." }

401

{ "status":"error", "message":"Unauthorised access to the resource. Please review request parameters and headers and retry" }

Language
Credentials
Header
Click Try It! to start a request and see the response here!