Skip to main content

Designs

Use these endpoints to find the designs on your account and to learn which layers and fields you can change when you create an image. All three are GET requests on https://api.okzest.com/v1, and all return JSON.

There are no REST endpoints to create, edit or delete a design. Do that in the OKZest editor.

Authentication and errors​

Send your API key in the x-api-key header on every request. A missing, empty or wrong key returns 401 with an application/problem+json body:

{"type":"https://tools.ietf.org/html/rfc9110#section-15.5.2","title":"Unauthorized","status":401,"traceId":"00-...-...-03"}

A key belongs to one company. If the key is linked to a user, it only sees designs in projects that user can read. A design you cannot see behaves exactly like one that does not exist.

Other errors on these endpoints are a 400 with a plain-text sentence, not JSON. They are listed under each endpoint. Check your key first with GET /v1/whoami, described in Getting started.

The design object​

List designs and get design both return design objects with these fields.

FieldTypeDescription
design_idstringUse this as design_id when you create an image.
namestringThe display name of the design.
urlstringThe public image URL, https://media.okzest.com/img?c=<company_id>&i=<design_id>. Merge-tag values are added as query parameters.
optional_url_paramsarray or nullThe merge tags the design accepts, as items such as {"id": "first_name", "merge_tag": ""}.
billing_cycle_open_countintegerRenders counted this billing cycle.
lifetime_open_countintegerRenders counted since the design was created.
created_datestringISO 8601 date with offset.
last_updated_datestring or nullISO 8601 date with offset.

project_id and project_name also appear in the object but are not populated today, so do not rely on them. For merge-tag syntax, see the merge tags reference.

List designs​

GET https://api.okzest.com/v1/images

Returns the designs you can see, newest first, as an array of design objects. Without any query parameters you get every design.

Query parameterTypeDescription
pageSizeintegerHow many designs to return per page. Must be 1 or more. Without it, every design is returned.
pageNumberintegerWhich page to return, starting at 1. Must be 1 or more. Default 1. Only used with pageSize.

A page past the last one is an empty array.

curl -s https://api.okzest.com/v1/images -H "x-api-key: $OKZEST_API_KEY"

A successful call returns 200 with application/json:

[{"design_id":"KaHn-_h98UeJXEdb4hxGvg","name":"Docs demo - text and image merge tags","url":"https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg","project_id":"","project_name":null,"optional_url_params":[{"id":"first_name","merge_tag":""},{"id":"offer","merge_tag":""},{"id":"photo","merge_tag":""}],"billing_cycle_open_count":42,"lifetime_open_count":42,"created_date":"2026-11-12T17:16:04.7265376+00:00","last_updated_date":"2026-11-12T17:17:08.4028586+00:00"}]
StatusContent-TypeBodyWhen
400text/plainNo designs foundThe account has no visible designs. An empty account returns a 400, not an empty array.
400text/plainpageSize must be 1 or more. or pageNumber must be 1 or more.pageSize or pageNumber is below 1.
401application/problem+jsonAs aboveBad or missing key.

Get design​

GET https://api.okzest.com/v1/images/{id}

Returns one design. id is the design id.

curl -s https://api.okzest.com/v1/images/KaHn-_h98UeJXEdb4hxGvg -H "x-api-key: $OKZEST_API_KEY"

A successful call returns 200 with application/json. The body is a single design object:

{"design_id":"KaHn-_h98UeJXEdb4hxGvg","name":"Docs demo - text and image merge tags","url":"https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg","project_id":"","project_name":null,"optional_url_params":[{"id":"first_name","merge_tag":""},{"id":"offer","merge_tag":""},{"id":"photo","merge_tag":""}],"billing_cycle_open_count":73,"lifetime_open_count":73,"created_date":"2026-11-12T17:16:04.7265376+00:00","last_updated_date":"2026-11-12T17:22:08.5177787+00:00"}
StatusContent-TypeBodyWhen
400text/plainInvalid design id provided.The id is unknown or not visible to your key. This is a 400, not a 404.
401application/problem+jsonAs aboveBad or missing key.

Get design fields​

GET https://api.okzest.com/v1/images/{designId}/fields

Returns the fields you can set when you create an image from this design.

curl -s https://api.okzest.com/v1/images/KaHn-_h98UeJXEdb4hxGvg/fields -H "x-api-key: $OKZEST_API_KEY"

A successful call returns 200 with an array of field objects:

FieldTypeDescription
keystringThe field name, such as format or layers[].text.
labelstringA readable name. Layer fields end with the layer id in brackets, for example Text (first_name).
typestringstring, integer, number or boolean.
choicesarray or nullAllowed values, when the field has a fixed set.

The list starts with six general fields: width, height, background.image_url, background.color, format and quality. Then, for each layer, a layers[].layer_id entry whose choices holds that layer's id, followed by the keys you can override on that layer.

[{"key":"width","label":"Canvas Width","type":"integer","choices":null},{"key":"height","label":"Canvas Height","type":"integer","choices":null},{"key":"background.image_url","label":"Background Image URL","type":"string","choices":null},{"key":"background.color","label":"Background Color","type":"string","choices":null},{"key":"format","label":"Output Format","type":"string","choices":null},{"key":"quality","label":"Output Quality (1-100)","type":"integer","choices":null},{"key":"layers[].layer_id","label":"Layer ID (first_name)","type":"string","choices":["first_name"]}]

The list above is shortened. A design with several layers returns many more entries.

note

Treat the first six entries as a catalogue, not a copy of the request body. A create request has no top-level width or height. Set the canvas size with background.width and background.height, which are strings.

StatusContent-TypeBodyWhen
400text/plainInvalid design_idThe id is unknown or not visible to your key.
401application/problem+jsonAs aboveBad or missing key.

JavaScript sample​

Node 18 or later. This lists your designs, then gets one design and its fields.

const base = "https://api.okzest.com/v1";
const headers = { "x-api-key": process.env.OKZEST_API_KEY };
const designId = process.env.OKZEST_DESIGN_ID;

async function getJson(path) {
const res = await fetch(`${base}${path}`, { headers });
const text = await res.text();
console.log(path, res.status, text.slice(0, 120));
return res.ok ? JSON.parse(text) : null;
}

await getJson("/images");
await getJson(`/images/${designId}`);
await getJson(`/images/${designId}/fields`);

Next steps​