導覽

API 文件

列出範本

用一次 API 呼叫找出工作區的範本 ID。加上 includeLayers,還能取得要在 modifications 中傳送的圖層名稱。

GET https://api.bannerify.co/v1/templates

List the templates of the workspace that owns the API key. Add includeLayers to get the layers of each template, with the names that modifications use.

Query parameters

NameTypeDescription
apiKey (required)stringYour API key. Create one on the API Keys page of the dashboard, and keep it on the server.
includeLayersboolean or stringSet to true to include the layers of each template. A layer name is the value you send as name in a modification.
embedUserIdstringThe user id that your server signs in the embed token. Lists the templates of that embed user instead of the workspace templates.

Responses

  • 200: The templates of the workspace.
  • 400: The request cannot be processed. BAD_REQUEST means a field is invalid, the API key is unknown, or a signed URL has a wrong signature. FETCH_IMAGE_ERROR means Bannerify could not download an image from a src URL. A rate limit on the PDF and stored endpoints also uses status 400 with the code TOO_MANY_REQUESTS. Read error.code to tell them apart.
  • 404: The template does not exist.
  • 500: The server could not finish the request. INTERNAL_SERVER_ERROR means an unexpected failure, such as a render error or a failed upload to your S3 bucket. USAGE_EXCEEDED means your workspace reached its daily or monthly generation limit, and RATE_LIMITED means the API key sent too many requests. Read error.code to tell them apart.