Developer

Sites

Signature, parameters, an example call and the sample response for every method in this group, generated from the contract.

Build a site the way Lida does, under the same rules: you only write inside the site zone (src/app/(site), src/site and migrations/site) and the check runs in the same isolated sandbox. You only see and edit your own sites. While Lida is working on one, writing, checking, capturing or asking her anything returns 409 site_busy. If the Builder isn't active on your account (a Lid admin turns it on), these routes return 404 sites_disabled. A blocked account gets 403 account_blocked. Your key has about 60 requests per minute across all tools.

lid.sites.list

your sites with their status, URL, custom domain, payment state and plan (billing and billing.plan; plans are chosen and paid in Lid's web). With a Lid admin's key, also the clients' sites the Lid team works on (role assistant, with the client's name in assistedFor): the assisted ones not handed over yet and the ones already handed over (assisted false), which the team keeps working on the same way

Key permission: none (read)

Works with a site key

lid.sites.list(input?, options?)

SDK
const result = await lid.sites.list();

Hand-written sample (not captured on devnet yet)

Response
{
  "sites": [
    {
      "id": "5b1e9c2a-7f3d-4e8b-a1c6-2d4f8e0b9a37",
      "kind": "store",
      "name": "Mi tienda",
      "slug": "mi-tienda",
      "status": "running",
      "published": true,
      "url": "https://mi-tienda.apps.lid.pro",
      "previewUrl": "https://mi-tienda.apps.lid.pro",
      "domain": null,
      "draftSourceHash": "c4d2a91f7e3b5d08",
      "updatedAt": "2026-09-27T12:00:00Z",
      "role": "owner",
      "assisted": false,
      "assistedFor": null,
      "billing": {
        "state": "paid",
        "coveredUntil": "2026-10-27T12:00:00Z",
        "pauseAt": null,
        "payable": true,
        "publishNeedsPayment": false,
        "price": {
          "currentCents": 2900,
          "listCents": 2900,
          "promo": false,
          "promoUntil": null,
          "yearCents": 29000,
          "yearListCents": 29000
        },
        "plan": {
          "id": "0f6c2a4e-8b1d-4c3f-9a5e-7d2b4f6a8c10",
          "name": "Pro",
          "source": "subscription",
          "period": "month",
          "priceCents": 2900,
          "renewsAt": "2026-10-27T12:00:00Z",
          "endsAt": null,
          "next": null,
          "limits": {
            "id": "0f6c2a4e-8b1d-4c3f-9a5e-7d2b4f6a8c10",
            "name": "Pro",
            "creditsPerMonth": 500,
            "messagesPerDay": 300
          },
          "credits": {
            "left": 420,
            "total": 500,
            "resetsAt": "2026-10-27T12:00:00Z"
          }
        },
        "freeDays": null
      }
    }
  ]
}

lid.sites.create

create a draft site with a name and slug (config is optional). Per user: 3 per minute, 10 per day and the account's site limit, set by Lid's admin (1 by default; 409 site_limit_reached). With a Lid admin's key, forClient (email, wallet or username) creates that client's assisted site: it belongs to them, sells their products and they get a notice (403 forbidden for other keys; 404 client_not_found). With a Lid admin's key, kind system and ownerEmail create a system app for that account: it brings its own code (lid-system.json), starts Free and the owner doesn't see it in their panel (403 admin_required with another key; 409 host_agent_outdated if the server is older than host-agent 0.14.0).

Key permission: sitio (site)

lid.sites.create(input, options?)

NameTypeRequiredSource
namestringRequiredbody
slugstringRequiredbody
configobjectOptionalbody
forClientobjectOptionalbody
kind'store' | 'system'Optionalbody
ownerEmailstringOptionalbody
SDK
const result = await lid.sites.create({
  name: '…',
  slug: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "site": {
    "id": "5b1e9c2a-7f3d-4e8b-a1c6-2d4f8e0b9a37",
    "kind": "store",
    "name": "Mi tienda",
    "slug": "mi-tienda",
    "status": "building",
    "published": false,
    "url": "https://mi-tienda.apps.lid.pro",
    "previewUrl": "https://mi-tienda.apps.lid.pro",
    "domain": null,
    "draftSourceHash": null,
    "updatedAt": "2026-09-27T12:00:00Z",
    "role": "owner",
    "assisted": false,
    "assistedFor": null,
    "config": {
      "locale": "es",
      "brand": {
        "primaryColor": "#1A2B3C",
        "font": "manrope",
        "logoUrl": null,
        "headline": "Mi tienda",
        "tagline": ""
      },
      "modules": {
        "products": true,
        "courses": true,
        "challenges": false,
        "memberships": false,
        "blog": false,
        "leads": true,
        "waitlist": false
      },
      "featuredProductIds": []
    },
    "pieces": {
      "counts": {
        "products": 4,
        "courses": 2,
        "challenges": 1,
        "memberships": 0,
        "blog": 0,
        "siteOnlyChallenges": 0
      },
      "membershipsAvailable": false,
      "usedInCode": {
        "products": true,
        "courses": false,
        "challenges": false,
        "memberships": false,
        "blog": false
      }
    },
    "version": 1,
    "lastJob": {
      "state": "running",
      "startedAt": "2026-09-27T12:00:00Z",
      "finishedAt": null,
      "logTail": []
    },
    "billingStatus": null,
    "trialEndsAt": null,
    "billing": {
      "state": "draft",
      "coveredUntil": null,
      "pauseAt": null,
      "payable": false,
      "publishNeedsPayment": true,
      "price": {
        "currentCents": 2900,
        "listCents": 2900,
        "promo": false,
        "promoUntil": null,
        "yearCents": 29000,
        "yearListCents": 29000
      },
      "plan": null,
      "freeDays": 15
    },
    "credits": null,
    "built": false,
    "createdAt": "2026-09-27T12:00:00Z",
    "clientChanges": false
  }
}

lid.sites.guide

the building guide: workflow, rules, limits, @/lid blocks, reserved routes and allowed imports. Read it before writing code

Key permission: none (read)

Works with a site key

lid.sites.guide(input?, options?)

SDK
const result = await lid.sites.guide();

Hand-written sample (not captured on devnet yet)

Response
{
  "guide": "# Construir un sitio de Lid desde tu agente\n\nTrabajas sobre el mismo borrador, el mismo sandbox y las mismas reglas que usa Lida en el Constructor.\n\n## Flujo\n\n1. `list_apps` para ver los sitios; `create_app` (name, slug) crea uno en borrador y lanza su vista previa.\n2. `list_app_files` y `read_app_file` para leer el código actual.\n…"
}

lid.sites.listPlans

the site plans the person chooses in Lid's web, cheapest first: price per month and per year, credits per month (only loaded with credits on: creditsEnabled in this response, or enabled in credits.get) and Lida messages per day, the free site's days if the account can still start one (freeDays) and where to choose (chooseUrl). These are Lid's plans for your sites, not the creator's memberships. Read only: a plan can't be subscribed, changed or canceled by API or MCP. With dollar billing (billing.unit usd in credits.get), creditsEnabled is false and creditsPerMonth is 0: each plan includes AI usage instead, shown as a percentage in sites.get

Key permission: none (read)

lid.sites.listPlans(input?, options?)

SDK
const result = await lid.sites.listPlans();

Hand-written sample (not captured on devnet yet)

Response
{
  "enabled": true,
  "plans": [
    {
      "id": "0f6c2a4e-8b1d-4c3f-9a5e-7d2b4f6a8c10",
      "name": "Pro",
      "price": {
        "currentCents": 2900,
        "listCents": 2900,
        "promo": false,
        "promoUntil": null,
        "yearCents": 29000,
        "yearListCents": 29000
      },
      "creditsPerMonth": 500,
      "messagesPerDay": 300,
      "store": {
        "monthCents": 3499,
        "yearCents": 34999,
        "appleMonthProduct": "pro.lid.site.pro.month",
        "appleYearProduct": "pro.lid.site.pro.year"
      }
    },
    {
      "id": "1a7d3b5f-9c2e-4d40-8b6f-8e3c5a7b9d21",
      "name": "Business",
      "price": {
        "currentCents": 9900,
        "listCents": 9900,
        "promo": false,
        "promoUntil": null,
        "yearCents": 99000,
        "yearListCents": 99000
      },
      "creditsPerMonth": 2000,
      "messagesPerDay": 1000,
      "store": null
    }
  ],
  "freeDays": 15,
  "chooseUrl": "https://devnet.lid.pro/dashboard/builder",
  "creditsEnabled": true
}

lid.sites.get

a site's status: whether it is published, the current version, the last job with its log, the pieces (counts and what the code uses), the payment state and plan (billing.plan: name, when it renews or ends, the scheduled change, this month's credits and the Lida messages per day), the credits each action uses (credits, with the site plan's credits in credits.plan) and, on an assisted site, whether the client left pending changes (clientChanges; they are applied in Lid's web). On a system app (admins only) it adds system (published version, seed and the state of each piece, Postgres and Redis, never secrets), releases and, only once after the job finishes, seedOutput with the seed's output; with dollar billing (billing.unit usd in credits.get), credits is null and aiBilling has who pays, the plan only as a percentage (aiBilling.plan.percentUsed, no amounts) and the estimates for a new site, a turn and an analysis

Key permission: none (read)

Works with a site key

lid.sites.get(input, options?)

NameTypeRequiredSource
idstringRequiredpath
SDK
const result = await lid.sites.get({
  id: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "site": {
    "id": "5b1e9c2a-7f3d-4e8b-a1c6-2d4f8e0b9a37",
    "kind": "store",
    "name": "Mi tienda",
    "slug": "mi-tienda",
    "status": "running",
    "published": true,
    "url": "https://mi-tienda.apps.lid.pro",
    "previewUrl": "https://mi-tienda.apps.lid.pro",
    "domain": null,
    "draftSourceHash": "c4d2a91f7e3b5d08",
    "updatedAt": "2026-09-27T12:00:00Z",
    "role": "owner",
    "assisted": false,
    "assistedFor": null,
    "config": {
      "locale": "es",
      "brand": {
        "primaryColor": "#1A2B3C",
        "font": "manrope",
        "logoUrl": "/media/logo.png",
        "headline": "Guías para vender en línea",
        "tagline": "Plantillas y cursos cortos"
      },
      "modules": {
        "products": true,
        "courses": true,
        "challenges": false,
        "memberships": false,
        "blog": false,
        "leads": true,
        "waitlist": false
      },
      "featuredProductIds": [
        "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
      ]
    },
    "pieces": {
      "counts": {
        "products": 4,
        "courses": 2,
        "challenges": 1,
        "memberships": 0,
        "blog": 0,
        "siteOnlyChallenges": 0
      },
      "membershipsAvailable": false,
      "usedInCode": {
        "products": true,
        "courses": true,
        "challenges": false,
        "memberships": false,
        "blog": false
      }
    },
    "version": 3,
    "lastJob": {
      "state": "succeeded",
      "startedAt": "2026-09-27T12:00:10Z",
      "finishedAt": "2026-09-27T12:01:30Z",
      "logTail": [
        "build ok",
        "sitio arriba"
      ]
    },
    "billingStatus": "trial",
    "trialEndsAt": "2026-10-05T10:00:00Z",
    "billing": {
      "state": "trial",
      "coveredUntil": "2026-10-05T10:00:00Z",
      "pauseAt": null,
      "payable": true,
      "publishNeedsPayment": false,
      "price": {
        "currentCents": 2900,
        "listCents": 2900,
        "promo": false,
        "promoUntil": null,
        "yearCents": 29000,
        "yearListCents": 29000
      },
      "plan": {
        "id": "0f6c2a4e-8b1d-4c3f-9a5e-7d2b4f6a8c10",
        "name": "Pro",
        "source": "subscription",
        "period": "month",
        "priceCents": 2900,
        "renewsAt": "2026-10-05T10:00:00Z",
        "endsAt": null,
        "next": null,
        "limits": {
          "id": "0f6c2a4e-8b1d-4c3f-9a5e-7d2b4f6a8c10",
          "name": "Pro",
          "creditsPerMonth": 500,
          "messagesPerDay": 300
        },
        "credits": {
          "left": 460,
          "total": 500,
          "resetsAt": "2026-10-05T10:00:00Z"
        }
      },
      "freeDays": null
    },
    "credits": {
      "costs": {
        "newSite": 50,
        "turn": 10,
        "image": 5,
        "deploy": 2
      },
      "payer": "you",
      "plan": {
        "left": 460,
        "total": 500,
        "resetsAt": "2026-10-05T10:00:00Z"
      }
    },
    "aiBilling": null,
    "built": true,
    "createdAt": "2026-09-21T09:30:00Z",
    "clientChanges": false
  }
}

lid.sites.configure

change the name or the config: brand, language, what your site uses (six switches; turning challenges off with site-only challenges needs confirmChallengesOff) and featured products

Key permission: sitio (site)

Works with a site key

lid.sites.configure(input, options?)

NameTypeRequiredSource
idstringRequiredpath
namestringOptionalbody
configobjectOptionalbody
confirmChallengesOffbooleanOptionalbody
SDK
const result = await lid.sites.configure({
  id: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "site": {
    "id": "5b1e9c2a-7f3d-4e8b-a1c6-2d4f8e0b9a37",
    "kind": "store",
    "name": "Mi tienda",
    "slug": "mi-tienda",
    "status": "running",
    "published": true,
    "url": "https://mi-tienda.apps.lid.pro",
    "previewUrl": "https://mi-tienda.apps.lid.pro",
    "domain": null,
    "draftSourceHash": "c4d2a91f7e3b5d08",
    "updatedAt": "2026-09-27T12:00:00Z",
    "role": "owner",
    "assisted": false,
    "assistedFor": null,
    "config": {
      "locale": "es",
      "brand": {
        "primaryColor": "#1A2B3C",
        "font": "manrope",
        "logoUrl": "/media/logo.png",
        "headline": "Guías para vender en línea",
        "tagline": "Plantillas y cursos cortos"
      },
      "modules": {
        "products": true,
        "courses": true,
        "challenges": false,
        "memberships": false,
        "blog": false,
        "leads": true,
        "waitlist": false
      },
      "featuredProductIds": [
        "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
      ]
    },
    "pieces": {
      "counts": {
        "products": 4,
        "courses": 2,
        "challenges": 1,
        "memberships": 0,
        "blog": 0,
        "siteOnlyChallenges": 0
      },
      "membershipsAvailable": false,
      "usedInCode": {
        "products": true,
        "courses": true,
        "challenges": false,
        "memberships": false,
        "blog": false
      }
    },
    "version": 3,
    "lastJob": {
      "state": "succeeded",
      "startedAt": "2026-09-27T12:00:10Z",
      "finishedAt": "2026-09-27T12:01:30Z",
      "logTail": [
        "build ok",
        "sitio arriba"
      ]
    },
    "billingStatus": "active",
    "trialEndsAt": "2026-10-05T10:00:00Z",
    "billing": {
      "state": "paid",
      "coveredUntil": "2026-11-05T10:00:00Z",
      "pauseAt": null,
      "payable": true,
      "publishNeedsPayment": false,
      "price": {
        "currentCents": 9900,
        "listCents": 9900,
        "promo": false,
        "promoUntil": null,
        "yearCents": 99000,
        "yearListCents": 99000
      },
      "plan": {
        "id": "1a7d3b5f-9c2e-4d40-8b6f-8e3c5a7b9d21",
        "name": "Business",
        "source": "subscription",
        "period": "month",
        "priceCents": 9900,
        "renewsAt": "2026-11-05T10:00:00Z",
        "endsAt": null,
        "next": {
          "id": "0f6c2a4e-8b1d-4c3f-9a5e-7d2b4f6a8c10",
          "name": "Pro",
          "period": "month",
          "at": "2026-11-05T10:00:00Z"
        },
        "limits": {
          "id": "1a7d3b5f-9c2e-4d40-8b6f-8e3c5a7b9d21",
          "name": "Business",
          "creditsPerMonth": 2000,
          "messagesPerDay": 1000
        },
        "credits": {
          "left": 1640,
          "total": 2000,
          "resetsAt": "2026-11-05T10:00:00Z"
        }
      },
      "freeDays": null
    },
    "credits": {
      "costs": {
        "newSite": 50,
        "turn": 10,
        "image": 5,
        "deploy": 2
      },
      "payer": "you",
      "plan": {
        "left": 1640,
        "total": 2000,
        "resetsAt": "2026-11-05T10:00:00Z"
      }
    },
    "built": true,
    "createdAt": "2026-09-21T09:30:00Z",
    "clientChanges": false
  }
}

lid.sites.publish

publish the draft; returns 202 and you follow progress with get_app_status. A site without a plan returns 402 site_payment_required with the plans in details.plans: the person chooses a plan in Lid's web (it can't be subscribed by API or MCP). On a system app, with releaseId: the server builds each piece with the tests in its Dockerfile; with a failing test the previous version stays online. The response adds system with the jobId

Key permission: sitio (site)

Works with a site key

lid.sites.publish(input, options?)

NameTypeRequiredSource
idstringRequiredpath
releaseIdstringOptionalbody
confirmbooleanOptionalbody
SDK
const result = await lid.sites.publish({
  id: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "site": {
    "id": "5b1e9c2a-7f3d-4e8b-a1c6-2d4f8e0b9a37",
    "kind": "store",
    "name": "Mi tienda",
    "slug": "mi-tienda",
    "status": "building",
    "published": true,
    "url": "https://mi-tienda.apps.lid.pro",
    "previewUrl": "https://mi-tienda.apps.lid.pro",
    "domain": null,
    "draftSourceHash": "c4d2a91f7e3b5d08",
    "updatedAt": "2026-09-27T12:00:00Z",
    "role": "owner",
    "assisted": false,
    "assistedFor": null,
    "config": {
      "locale": "es",
      "brand": {
        "primaryColor": "#1A2B3C",
        "font": "manrope",
        "logoUrl": "/media/logo.png",
        "headline": "Guías para vender en línea",
        "tagline": "Plantillas y cursos cortos"
      },
      "modules": {
        "products": true,
        "courses": true,
        "challenges": false,
        "memberships": false,
        "blog": false,
        "leads": true,
        "waitlist": false
      },
      "featuredProductIds": [
        "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
      ]
    },
    "pieces": {
      "counts": {
        "products": 4,
        "courses": 2,
        "challenges": 1,
        "memberships": 0,
        "blog": 0,
        "siteOnlyChallenges": 0
      },
      "membershipsAvailable": false,
      "usedInCode": {
        "products": true,
        "courses": true,
        "challenges": false,
        "memberships": false,
        "blog": false
      }
    },
    "version": 3,
    "lastJob": {
      "state": "running",
      "startedAt": "2026-09-27T12:02:00Z",
      "finishedAt": null,
      "logTail": []
    },
    "billingStatus": "active",
    "trialEndsAt": "2026-10-05T10:00:00Z",
    "billing": {
      "state": "paid",
      "coveredUntil": "2027-09-28T10:00:00Z",
      "pauseAt": null,
      "payable": true,
      "publishNeedsPayment": false,
      "price": {
        "currentCents": 2900,
        "listCents": 2900,
        "promo": false,
        "promoUntil": null,
        "yearCents": 29000,
        "yearListCents": 29000
      },
      "plan": {
        "id": "0f6c2a4e-8b1d-4c3f-9a5e-7d2b4f6a8c10",
        "name": "Pro",
        "source": "subscription",
        "period": "year",
        "priceCents": 29000,
        "renewsAt": null,
        "endsAt": "2027-09-28T10:00:00Z",
        "next": null,
        "limits": {
          "id": "0f6c2a4e-8b1d-4c3f-9a5e-7d2b4f6a8c10",
          "name": "Pro",
          "creditsPerMonth": 500,
          "messagesPerDay": 300
        },
        "credits": {
          "left": 500,
          "total": 500,
          "resetsAt": "2026-10-28T10:00:00Z"
        }
      },
      "freeDays": null
    },
    "credits": {
      "costs": {
        "newSite": 50,
        "turn": 10,
        "image": 5,
        "deploy": 2
      },
      "payer": "you",
      "plan": {
        "left": 500,
        "total": 500,
        "resetsAt": "2026-10-28T10:00:00Z"
      }
    },
    "built": true,
    "createdAt": "2026-09-21T09:30:00Z",
    "clientChanges": false
  }
}

lid.sites.setLidaWeb

turns 'Connect my site to Lida' on or off for a site (on, capCents if you want a cap, and confirm: true): with it, the site's server asks Lida for replies with askLida from @/lid. Lid creates the credential and hands it to the sites server; the response never includes it. Each reply is paid from the site's plan and, once it runs out, from the extra usage up to capCents a month (0 = only the plan). Without confirm: true, 400 confirm_required; without an active plan, 409 site_lida_web_needs_plan

Key permission: sitio (site)

Works with a site key

lid.sites.setLidaWeb(input, options?)

NameTypeRequiredSource
idstringRequiredpath
onbooleanOptionalbody
capCentsnumberOptionalbody
confirmbooleanRequiredbody
SDK
const result = await lid.sites.setLidaWeb({
  id: '…',
  confirm: false,
});

Hand-written sample (not captured on devnet yet)

Response
{
  "on": true,
  "capCents": 1000,
  "capOffered": true,
  "needsPlan": false,
  "blocked": false,
  "assisted": false,
  "canEdit": true,
  "shrinkOnly": false,
  "key": {
    "id": 412,
    "expiresAt": "2027-02-08T12:00:00.000Z",
    "spentThisMonthCents": 0,
    "delivered": true
  }
}

lid.sites.addDomain

connect a custom domain and get the DNS records you need to create

Key permission: sitio (site)

Works with a site key

lid.sites.addDomain(input, options?)

NameTypeRequiredSource
idstringRequiredpath
domainstringRequiredbody
SDK
const result = await lid.sites.addDomain({
  id: '…',
  domain: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "domain": {
    "domain": "tienda.midominio.com",
    "status": "pending",
    "apex": false,
    "records": {
      "cname": {
        "name": "tienda.midominio.com",
        "value": "proxy.lid.pro"
      },
      "txt": {
        "name": "_lid-verify.tienda.midominio.com",
        "value": "lid-verify=9f2c41d07a6b"
      }
    },
    "verifiedAt": null,
    "lastCheckedAt": null,
    "lastError": null,
    "url": "https://tienda.midominio.com"
  }
}

lid.sites.verifyDomain

check the domain's DNS records and update its status

Key permission: sitio (site)

Works with a site key

lid.sites.verifyDomain(input, options?)

NameTypeRequiredSource
idstringRequiredpath
SDK
const result = await lid.sites.verifyDomain({
  id: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "domain": {
    "domain": "tienda.midominio.com",
    "status": "verified",
    "apex": false,
    "records": {
      "cname": {
        "name": "tienda.midominio.com",
        "value": "proxy.lid.pro"
      },
      "txt": {
        "name": "_lid-verify.tienda.midominio.com",
        "value": "lid-verify=9f2c41d07a6b"
      }
    },
    "verifiedAt": "2026-09-27T12:10:00Z",
    "lastCheckedAt": "2026-09-27T12:10:00Z",
    "lastError": null,
    "url": "https://tienda.midominio.com"
  }
}

lid.sites.listFiles

draft files with their size, the hash and the limits (80 files, 64 KB per file, 600 KB total)

Key permission: none (read)

Works with a site key

lid.sites.listFiles(input, options?)

NameTypeRequiredSource
idstringRequiredpath
SDK
const result = await lid.sites.listFiles({
  id: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "files": [
    {
      "path": "src/app/(site)/page.tsx",
      "bytes": 2140,
      "editable": true
    },
    {
      "path": "src/site/Hero.tsx",
      "bytes": 1822,
      "editable": true
    }
  ],
  "hash": "b7e15c02d9a4f631",
  "origin": "draft",
  "limits": {
    "maxFiles": 80,
    "maxFileBytes": 65536,
    "maxTotalBytes": 614400
  }
}

lid.sites.writeFiles

write and delete draft files in one batch, only inside the site zone; returns the written and deleted paths (written, deleted). With mirrored:false the draft is saved and the preview does not have it yet; check_app uploads it again. If a path or a size breaks the rules, returns 400 source_invalid with the details. Up to 2 MB per call (413 payload_too_large)

Key permission: sitio (site)

Works with a site key

lid.sites.writeFiles(input, options?)

NameTypeRequiredSource
idstringRequiredpath
filesWriteSiteFile[]Optionalbody
deletestring[]Optionalbody
SDK
const result = await lid.sites.writeFiles({
  id: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "ok": true,
  "written": [
    "src/site/Hero.tsx"
  ],
  "deleted": [
    "src/site/Viejo.tsx"
  ],
  "hash": "c4d2a91f7e3b5d08",
  "mirrored": true,
  "warnings": []
}

lid.sites.readFile

content of a draft file

Key permission: none (read)

Works with a site key

lid.sites.readFile(input, options?)

NameTypeRequiredSource
idstringRequiredpath
pathstringRequiredquery
SDK
const result = await lid.sites.readFile({
  id: '…',
  path: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "path": "src/site/Hero.tsx",
  "content": "export function Hero() {\n  return <section>…</section>;\n}\n",
  "bytes": 1822,
  "editable": true
}

lid.sites.check

check the draft like Lida does: types, site rules and a GET per page (paths are site routes); starts the preview if needed

Key permission: sitio (site)

Works with a site key

lid.sites.check(input, options?)

NameTypeRequiredSource
idstringRequiredpath
pathsstring[]Optionalbody
SDK
const result = await lid.sites.check({
  id: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "ok": false,
  "paths": [
    "/",
    "/productos"
  ],
  "typeErrors": [
    {
      "file": "src/site/Hero.tsx",
      "line": 12,
      "column": 18,
      "code": "TS2339",
      "message": "Property 'title' does not exist on type 'Props'."
    }
  ],
  "siteErrors": [],
  "routeErrors": [],
  "durationMs": 8400,
  "previewUrl": "https://preview-mi-tienda.apps.lid.pro/lid/vista-previa?pase=…&destino=/"
}

lid.sites.screenshots

desktop and mobile captures of a page, with the issues and console errors found. One at a time and up to 3 per minute (429 rate_limited with retryAfter)

Key permission: sitio (site)

Works with a site key

lid.sites.screenshots(input, options?)

NameTypeRequiredSource
idstringRequiredpath
pathstringOptionalbody
viewports'desktop' | 'mobile'[]Optionalbody
SDK
const result = await lid.sites.screenshots({
  id: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "shots": [
    {
      "path": "/",
      "viewport": "desktop",
      "status": 200,
      "issues": [],
      "consoleErrors": [],
      "image": {
        "mimeType": "image/jpeg",
        "dataBase64": "/9j/4AAQSkZJRgABAQ…"
      }
    },
    {
      "path": "/",
      "viewport": "mobile",
      "status": 200,
      "issues": [
        "El título del hero se sale de la pantalla"
      ],
      "consoleErrors": [],
      "image": {
        "mimeType": "image/jpeg",
        "dataBase64": "/9j/4AAQSkZJRgABAQ…"
      }
    }
  ]
}

lid.sites.uploadMedia

upload an image to the site from a public URL or as base64 and get its /media/… path; as base64 it takes up to 8 MB per image

Key permission: sitio (site)

Works with a site key

lid.sites.uploadMedia(input, options?)

NameTypeRequiredSource
idstringRequiredpath
urlstringOptionalbody
dataBase64stringOptionalbody
typestringOptionalbody
filenamestringOptionalbody
altstringOptionalbody
SDK
const result = await lid.sites.uploadMedia({
  id: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "name": "3f9a1c0d7b2e4a61.jpg",
  "url": "/media/3f9a1c0d7b2e4a61.jpg"
}

lid.sites.startLida

ask Lida for a change; returns 202 with the runId of her turn

Key permission: sitio (site)

Works with a site key

lid.sites.startLida(input, options?)

NameTypeRequiredSource
idstringRequiredpath
messagestringRequiredbody
locale'es' | 'en'Optionalbody
SDK
const result = await lid.sites.startLida({
  id: '…',
  message: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "runId": "0c7d4e1f-2a9b-4c3d-8e5f-6a7b8c9d0e1f"
}

lid.sites.getLidaRun

follow a Lida turn: steps, final reply and whether the check passed; with dollar billing, stop says why billing stopped the turn (cap, balance or daily)

Key permission: none (read)

Works with a site key

lid.sites.getLidaRun(input, options?)

NameTypeRequiredSource
idstringRequiredpath
runIdstringRequiredpath
SDK
const result = await lid.sites.getLidaRun({
  id: '…',
  runId: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "id": "0c7d4e1f-2a9b-4c3d-8e5f-6a7b8c9d0e1f",
  "state": "done",
  "steps": [
    {
      "kind": "plan",
      "text": "Sección de preguntas frecuentes debajo del catálogo"
    },
    {
      "kind": "write",
      "text": "Sección escrita",
      "path": "src/site/Faq.tsx",
      "ok": true
    },
    {
      "kind": "check",
      "text": "Revisión completa",
      "ok": true
    }
  ],
  "reply": "Listo: agregué las preguntas frecuentes.",
  "checkOk": true,
  "sourceHash": "d91a6e2c4b8f0357",
  "stop": null
}

lid.sites.createRelease

a new version of a system app (Lid admin keys only): with the sha256 and the exact size of the .tar.gz (with lid-system.json at its root, up to 150 MB) it returns uploadUrl, a signed upload to the private bucket that expires in 15 minutes, and howTo with the exact command. If you send manifest (the content of lid-system.json), it is validated before anything is uploaded (400 invalid_manifest with details.field). Then publish_app with releaseId

Key permission: sitio (site)

lid.sites.createRelease(input, options?)

NameTypeRequiredSource
idstringRequiredpath
sha256stringRequiredbody
sizeBytesnumberRequiredbody
commitstringOptionalbody
notestringOptionalbody
manifestobjectOptionalbody
SDK
const result = await lid.sites.createRelease({
  id: '…',
  sha256: '…',
  sizeBytes: 0,
});

Hand-written sample (not captured on devnet yet)

Response
{
  "releaseId": "0f6c2b1e-8a4d-4c3f-9e7b-5d2a1c0e9f84",
  "uploadUrl": "https://lidpro-mainnet.fly.storage.tigris.dev/private/system-releases/5b1e9c2a-7f3d-4e8b-a1c6-2d4f8e0b9a37/0f6c2b1e-8a4d-4c3f-9e7b-5d2a1c0e9f84.tar.gz?X-Amz-Signature=…",
  "expiresAt": "2026-11-02T15:15:00Z",
  "howTo": "curl -fsS -X PUT -H 'Content-Type: application/gzip' -T <archivo.tar.gz> 'https://lidpro-mainnet.fly.storage.tigris.dev/private/system-releases/…'",
  "maxBytes": 157286400
}

lid.sites.logs

the latest log lines (Lid admin keys only, 403 admin_required): on a system app, of one piece (piece is required: a piece from the manifest, postgres or redis); on a store, the store's. tail up to 500

Key permission: none (read)

lid.sites.logs(input, options?)

NameTypeRequiredSource
idstringRequiredpath
piecestringOptionalquery
tailnumberOptionalquery
SDK
const result = await lid.sites.logs({
  id: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "piece": "api",
  "lines": [
    "[api] migraciones al día",
    "[api] escuchando en :3120"
  ]
}

lid.sites.listTools

The site /admin tools this key can use

Key permission: none (read)

Works with a site key

lid.sites.listTools(input, options?)

NameTypeRequiredSource
idstringRequiredpath
localestringOptionalquery
SDK
const result = await lid.sites.listTools({
  id: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "siteId": "9f1c2a3b-4d5e-4f60-8a71-b2c3d4e5f607",
  "tools": [
    {
      "name": "site_products_list",
      "description": "The account products and courses (published, site-only, hidden and archived) with their sales, and their drafts. kind filters simple products or courses.",
      "section": "productos",
      "access": "read",
      "permission": "read",
      "inputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "simple",
              "course"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "site_listing_update",
      "description": "Changes a published product or course (pda): description, search description, image or gallery. Applied in one step with the same service as the site /admin. The name and price of something published are changed with site_lid_window_prepare. Needs \"catalogo\".",
      "section": "productos",
      "access": "write",
      "permission": "catalogo",
      "inputSchema": {
        "type": "object",
        "properties": {
          "pda": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "pda"
        ],
        "additionalProperties": false
      }
    }
  ]
}

lid.sites.callTool

Use a site tool: it reads right away or changes in one step; anything that moves money returns the link to sign it in Lid

Key permission: each tool's own (reading needs none, except people data)

Works with a site key

lid.sites.callTool(input, options?)

NameTypeRequiredSource
idstringRequiredpath
namestringRequiredpath
argsobjectOptionalbody
locale'es' | 'en'Optionalbody
SDK
const result = await lid.sites.callTool({
  id: '…',
  name: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "tool": "site_listing_update",
  "access": "write",
  "ok": true,
  "result": {
    "applied": [
      {
        "field": "listing.description",
        "target": {
          "kind": "product",
          "id": "FMuEcXLEzHYum452Zb7MhygESW7E94jXhkgCrQ11pT8n",
          "label": "Guía de café"
        },
        "result": {
          "ok": true
        }
      }
    ]
  }
}