API references
URL API
The URL API is the easiest way to integrate dynamic mediamask images into your application.
Constructing the URL
Construct a GET Request with query parameters to use the URL API.
Example URL Request:
https://mediamask.io/image/d0faf525-1e49-41f9-80f1-7ccf5a7994a5
?title=Headline
&background=https://mediamask.io/background.jpg
The request will return a rendered image with as mime-type: image/png and with status code 200.
Public-facing image URLs
Make sure to always use the Signed URL API or REST API when generating public-facing images, otherwise malicious actors can generate images which count towards your credits.
Template Base URL
The base URL consists of the mediamask image URL endpoint (https://mediamask.io/image/) and your template uuid (you can find it in your template settings)
Example
https://mediamask.io/image/d0faf525-1e49-41f9-80f1-7ccf5a7994a5
Dynamic Layer Query Parameters
To fill the dynamic layers of a template you can pass them via Query/GET Parameters. These parameters will be appended to the Template Base URL.
The query paramters consist of:
- Key: The API name of your placeholder (can be changed in template settings)
- Value:
- For text placeholders this is the content of the text area
- For image placeholders the url of the image
Parameters Encoding
All keys and values need to be URL encoded when sent to the api, most client handle this for you.
Example
{BASE_URL}
?title=Headline
&background=https://mediamask.io/background.jpg