Create a Request
Celtra provides support for formats that are specific to certain endpoints. Apart from the main assets such as images, videos or carousels, additional data is also saved in text assets like titles, descriptions, and more.
For instance, let's take a look at two such formats - Meta Image and Meta Video Carousel.
In the provided example below, you can see that Image will have one asset for the main image and seven text assets that carry other information required for distribution to Meta.
Carousel is a collection of assets, which in this case, refers to two videos. Information related to the entire carousel is named in a similar manner as that of Image (five text assets). Each card then has its own assets, which are marked as cards.<id>.video
. Here, <id>
refers to a specific card. Each card has a main asset, which in this case is a video, and multiple text assets that are used when distributing to Meta.
Here's what your request should look like:
POST https://hub.celtra.io/api/export
Authorization: Basic <your API App ID> <your API App Secret>
Content-Type: application/json; charset=utf-8\
{
"filters": {
"designFile": {
"id": ["d1m6jqpdaglh"]
},
"output": {
"mediaLineItem": {
"formatRegistrationId": ["com.celtra.meta.image", "com.celtra.meta.carousel"]
}
}
}
}
The response will look as follows:
[
{
...,
"assets": {
"image": {
"status": "pending",
"type": "Image",
"width": 800,
"height": 800,
},
"primaryText": {
"type": "Text",
"text": "Primary text that will show on Meta"
},
"headline": {
"type": "Text",
"text": "Example headline"
},
"description": {
"type": "Text",
"text": "Example description"
},
"callToAction": {
"type": "Text",
"text": "LEARN_MORE"
},
"websiteUrl": {
"type": "Text",
"text": "https://www.celtra.com"
},
"displayLink": {
"type": "Text",
"text": "https://www.celtra.com"
},
"deeplink": {
"type": "Text",
"text": ""
}
}
},
{
...,
"assets": {
"cards.bf8a17515d06647715d11eee4bd1e926.video": {
"status": "pending",
"type": "Video",
"width": 1080,
"height": 1080,
"fps": 30,
"duration": 6000
},
"cards.80c25baa01715f80ab4b05a8b7ba382e.video": {
"status": "pending",
"type": "Video",
"width": 1080,
"height": 1080,
"fps": 30,
"duration": 6000,
},
"primaryText": {
"type": "Text",
"text": "Main Primary Text for the carousel"
},
"callToAction": {
"type": "Text",
"text": "EVENT_RSVP"
},
"websiteUrl": {
"type": "Text",
"text": "https://www.celtra.com"
},
"displayLink": {
"type": "Text",
"text": "https://www.celtra.com"
},
"deeplink": {
"type": "Text",
"text": ""
},
"cards.bf8a17515d06647715d11eee4bd1e926.headline": {
"type": "Text",
"text": "Headline of the first card"
},
"cards.bf8a17515d06647715d11eee4bd1e926.description": {
"type": "Text",
"text": "Description of the second card"
},
"cards.bf8a17515d06647715d11eee4bd1e926.websiteUrl": {
"type": "Text",
"text": "https://www.celtra.com"
},
"cards.bf8a17515d06647715d11eee4bd1e926.deeplink": {
"type": "Text",
"text": ""
},
"cards.80c25baa01715f80ab4b05a8b7ba382e.headline": {
"type": "Text",
"text": "Headline of the second card"
},
"cards.80c25baa01715f80ab4b05a8b7ba382e.description": {
"type": "Text",
"text": "Description of the second card"
},
"cards.80c25baa01715f80ab4b05a8b7ba382e.websiteUrl": {
"type": "Text",
"text": "https://www.celtra.com"
},
"cards.80c25baa01715f80ab4b05a8b7ba382e.deeplink": {
"type": "Text",
"text": ""
}
}
}
]