How do I create a collection via API?

Creating the Collection

You can create a collection by sending a POST request to /collections with a template uid (unique ID) and a list of template modifications you want to apply. Some examples of these modifications are: changing the text, changing the images, or changing the colors.

Retrieving the Collection 

You can poll the GET request to the /collections/:uid endpoint for status updates and retrieve the collection referenced by its uid.

Using a Webhooks

By using a webhook, you can be notified when the collection is rendered. Use the webhook_url parameter to tell Bannerbear where to POST the collection, once the rendering is completed. The collection will be posted to your webhook as JSON.

Using a synchronous request

As an alternative to polling the GET endpoint or using webhooks, you can generate collections synchronously. This is where your API request is held open until the media file has finished generating. The API will then respond with the completed image object. To make a synchronous request ↗, use the synchronous base URL ( https://sync.api.bannerbear.com ). The API required attributes / parameters function the same as normal.

Check the API Reference ↗ page for more information on this.

Have a question?

Contact our customer support team anytime via chat or email