Pre-launch API. The concepts described here are settled, but the API shape is not: request and response fields, parameters and defaults can still change. Build against it, and talk to your Luigi's Box contact before you put an integration into production.
const url = 'https://api.eu1.luigisbox.ai/platform/v1/banners?page=1&size=20';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.eu1.luigisbox.ai/platform/v1/banners?page=1&size=20' \ --header 'Authorization: Bearer <token>'List banners, ordered by id. Listing without organization_id spans every organization, which requires a grant that wide; name your organization instead. GET /platform/v1/me/entitlements returns the organizations your credentials reach, with their ids.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Keep only this status.
Lifecycle state of a Banner. Archived is terminal.
Keep only this status.
1-based page number.
1-based page number.
Number of items per page.
Number of items per page.
Responses
Section titled “Responses”Successful Response
object
The items on this page.
Promotional content an organization shows on its results pages, as html, metadata or both.
object
When the banner was created.
The banner as HTML markup, served as written at its own URL, scripts included. Setting it needs the platform:banner:script permission. At most 64 KB in UTF-8; a larger one is rejected with the validation error type banner_html_too_large. A banner holds html, metadata or both; one without either is rejected with banner_content_required. It refers to the banner’s images as lbx-image:<name>, e.g. <img src="lbx-image:hero.jpg">; a name without an image is rejected with banner_image_not_found.
Banner id, lbbn_ followed by six characters.
The images the html refers to, by name. At most 10 per banner, each a JPEG, PNG, GIF or WebP file of at most 1 MB and 4096 × 4096 pixels. They are uploaded as images parts of a multipart/form-data create or update, each named by the filename of its part, which the client chooses: 1 to 64 characters from A-Z a-z 0-9 _ . -. An upload the html does not name is rejected with banner_image_unused. The banner keeps only the images its html names, so html that stops naming an image removes it; a removed image stays served at its URL until the banner is archived. Ordered by name.
An image stored with a banner, which its html refers to by name.
object
The image’s media type, read from its bytes.
When the image was uploaded.
The image’s height in pixels.
Image id, kept when an upload replaces it.
The image’s name within the banner, the file name it was uploaded under.
The image’s size in bytes.
The public URL the image is served at.
The image’s width in pixels.
Metadata of the banner, a flat key-value object for the client’s own code, e.g. {"headline": "Nike -30 %", "image_url": "https://…", "target_url": "https://…"}. At most 20 keys of 1 to 64 characters from A-Z a-z 0-9 _ . : -. A value is a string of at most 2048 characters, a number or a boolean; an integer outside ±9007199254740991 is rejected with banner_metadata_integer_out_of_range. At most 64 KB in total as compact JSON in UTF-8 (banner_metadata_too_large). A string with a control character, invisible mark or bidirectional override is rejected with banner_metadata_value_unprintable, and one a browser would read as a javascript:, vbscript: or data: URL with banner_metadata_value_unsafe_url. Values are returned as written: escape them before putting them into markup.
Name of the banner, unique among the organization’s banners that are not archived.
The organization the banner belongs to.
archived is terminal: an archived banner cannot be updated.
When the banner was last changed.
The banner’s version, an opaque value that changes on every change to the banner. An update or archive names the version it is based on in If-Match, as "<version>".
1-based page number.
Number of items per page.
Total number of items across all pages.
Example
{ "items": [ { "images": [ { "content_type": "image/jpeg" } ], "status": "active" } ]}Missing or invalid credentials
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. filter_unknown_field or cursor_mismatch. Safe to branch on; reason is not. Absent when the status code says all there is to say.
Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Authenticated but not permitted
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. filter_unknown_field or cursor_mismatch. Safe to branch on; reason is not. Absent when the status code says all there is to say.
Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Request validation failed
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. filter_unknown_field or cursor_mismatch. Safe to branch on; reason is not. Absent when the status code says all there is to say.
Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Service temporarily unavailable
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. filter_unknown_field or cursor_mismatch. Safe to branch on; reason is not. Absent when the status code says all there is to say.
Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Was this page helpful?
Thanks.