Landing pages
A landing page is a focused, single-product conversion page. They're independent of the storefront catalogue — you can have a landing page with no live product (for upcoming launches), or one tied to a specific product for paid ads.
Sections (image carousels, fake visitors, countdowns, etc.) are managed in the dashboard at v1; the API CRUDs the parent record only. A v1.1 update will expose section CRUD too.
Plan limits
| Plan | Active landing pages |
|---|---|
| Free | 0 (one-time purchase: 1000 DZD/lifetime each) |
| Pro | 3 |
| Unlimited / Enterprise | unlimited |
The API does not enforce these on create — you may create drafts freely. The dashboard's publish flow checks limits.
GET /v1/landing-pages
List landing pages. Cursor-paginated.
Auth: platform key with landing_pages:read.
Query parameters
| Param | Type | Notes |
|---|---|---|
limit | int 1–200 | Default 50 |
cursor | string | Opaque |
status | active | draft | Filter |
Response 200
{
"data": {
"items": [
{
"id": 42,
"title": "Black T-Shirt — 30% off",
"slug": "black-tshirt-30-off",
"status": "active",
"language": "ar",
"product_id": 26,
"views": 1543,
"is_purchased": false,
"created_at": "2026-03-01 10:00:00",
"updated_at": "2026-03-15 14:22:11"
}
],
"next_cursor": null,
"has_more": false
}
}
GET /v1/landing-pages/{id}
Detail with section_count.
{
"data": {
"id": 42,
"title": "Black T-Shirt — 30% off",
"slug": "black-tshirt-30-off",
"status": "active",
"language": "ar",
"product_id": 26,
"views": 1543,
"is_purchased": false,
"meta_title": "Black T-Shirt — Cotton 200gsm — 30% off | DZBuild",
"meta_description": "Limited-time offer on our cotton black t-shirt.",
"section_count": 7,
"created_at": "2026-03-01 10:00:00",
"updated_at": "2026-03-15 14:22:11"
}
}
POST /v1/landing-pages — create
Auth: platform key with landing_pages:write. Requires Idempotency-Key.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
title | string 1–255 | ✅ | |
slug | string | Auto-derived from title if omitted | |
status | active | draft | Default draft | |
language | ar | fr | en | Default ar | |
product_id | int | Must belong to your store; the page links to this product | |
meta_title | string ≤ 255 | SEO title; defaults to title | |
meta_description | string | SEO description |
Request
curl -X POST 'https://api.dzbuild.app/v1/landing-pages' \
-H "Authorization: Bearer $DZ_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"title": "Black T-Shirt — 30% off",
"language": "ar",
"product_id": 26,
"status": "draft"
}'
Returns 201 and the same shape as GET /v1/landing-pages/{id}. The new landing page has zero sections — populate them in the dashboard.
PATCH /v1/landing-pages/{id}
Partial update.
curl -X PATCH 'https://api.dzbuild.app/v1/landing-pages/42' \
-H "Authorization: Bearer $DZ_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{ "title": "Black T-Shirt — Spring promo" }'
Renaming auto-regenerates slug only if you didn't pass slug explicitly.
POST /v1/landing-pages/{id}/publish
Convenience: flip status to active. Equivalent to PATCH ... { status: "active" }.
curl -X POST 'https://api.dzbuild.app/v1/landing-pages/42/publish' \
-H "Authorization: Bearer $DZ_KEY" \
-H "Idempotency-Key: publish-42-$(date +%s)"
DELETE /v1/landing-pages/{id}
Hard delete. Cascades remove sections.
curl -X DELETE 'https://api.dzbuild.app/v1/landing-pages/42' \
-H "Authorization: Bearer $DZ_KEY" \
-H "Idempotency-Key: del-42"
Response: { "data": { "deleted": true, "id": 42 } }.