API Documentation
This documents details how the PublisherKit API works. It is very simple to use.
Test API Access
To get started you need to create a PublisherKit account. You will find your API Key in your Workspace Settings.
To authenticate, include your API Key in the 'Authorization' header of your requests.
Response
The response from the auth endpoint will be a JSON object containing the name of the workspace:
Create Images
To create an image, make a POST request to '/create/images' with an array of images in the request body. Each image should have a 'templateID' and 'modifications' field. The limit is 5 images per request.
This endpoint is synchronous and returns the images with a file link for each image instantly.
The "name" must match the name of the element in the template.
If the element is text and you want to change it, it should be added as "text":"new text".
If you want to change an image object, it should be "src":"image url".
Response
The response from the create image endpoint will be a JSON object containing the details of the created images:
List Templates
To get all templates, make a GET request to '/api/templates'.
Response
The response from the templates endpoint will be an array of JSON objects, each containing the details of a template: