Skip to main content

WeInc API reference

REST API for WeInc, the AI website builder: manage clients, website projects, templates, plans, analytics, and webhooks programmatically. Authentication: `Authorization: Bearer wk_...` (self-serve API key from https://my.we.inc/agency/api on the free plan). Rate limit: 100 requests per minute per credential. Every response carries `RateLimit-Policy`, `RateLimit`, `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`; a 429 carries `Retry-After`. Versioning: the version is in the URL path (/api/v1). Breaking changes ship in a new path version; a retiring version sends `Deprecation` and `Sunset` headers at least 12 months ahead. Policy: https://my.we.inc/developers/versioning MCP server (Streamable HTTP) for AI agents: https://my.we.inc/api/mcp, manifest at https://my.we.inc/.well-known/mcp. Test mode: a key created with test: true (wk_test_...) reaches only the sandbox projects it creates; their store checkout runs in Stripe test mode, they publish with noindex and their webhooks carry test: true. AI turns still cost real credits, inside the key's own monthly cap (default 200). Headless build (no browser): create a client, activate it, create a project, run AI turns, deploy, load products and cap credits, all over this API. Walkthrough: https://my.we.inc/docs/api/headless

Version 1.0.0. Machine-readable OpenAPI document: /api/v1/docs. Overview and other ways to integrate: /docs/api.

Base URL

https://my.we.inc/api/v1

Authentication

Every request needs an organization API key, created in your WeInc dashboard. Send it as a bearer token:

curl https://my.we.inc/api/v1/projects \
  -H "Authorization: Bearer wk_your_key_here"

Requests without a valid key return 401. Keys are scoped to one organization and see only that organization's data.

Errors

Every failure returns a JSON object with a single error field holding a human-readable message. The field is always present on an error response.

{ "error": "Unauthorized" }
StatusMeaning
400The request was malformed or a field failed validation.
401Missing or invalid API key.
403The key is valid but lacks the permission this endpoint needs.
404No such record, or it belongs to another organization.
415Content-Type must be application/json on writes.
429Rate limit exceeded. See Rate limits below.
500Something failed on our side. Safe to retry.

Pagination

List endpoints paginate with limit and offset query parameters. limit defaults to 50 and caps at 100; offset defaults to 0. Each list response also returns total, the number of records matching the query, so a client knows when to stop: keep requesting while offset + limit < total.

curl "https://my.we.inc/api/v1/projects?limit=25&offset=50" \
  -H "Authorization: Bearer wk_your_key_here"

{ "projects": [ … ], "total": 137 }

Rate limits

100 requests per minute per credential. Exceeding it returns 429 with a Retry-After header giving the seconds to wait.

Endpoints

get /clients

List clients

Responses

  • 200 Client list
  • 401 Unauthorized
  • 403 Forbidden
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/clients" \
  -H "Authorization: Bearer wk_your_key_here"

post /clients

Create a client

Request body

FieldTypeNotes
emailstring (email)
namestring
companystring
plan_idstring (uuid)

Responses

  • 201 Client created
  • 400 Validation error
  • 401 Unauthorized
  • 403 Forbidden
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/clients" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /clients/{clientId}

Get client details

Parameters

ParameterInTypeNotes
clientId*pathstring (uuid)

Responses

  • 200 Client details
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/clients/{clientId}" \
  -H "Authorization: Bearer wk_your_key_here"

patch /clients/{clientId}

Update a client

Parameters

ParameterInTypeNotes
clientId*pathstring (uuid)

Request body

FieldTypeNotes
namestring
companystring
status"invited" | "active" | "suspended" | "churned"
plan_idstring (uuid)
monthly_credit_capinteger (nullable)Monthly AI credit limit for this client (null removes it). Enforced before each AI turn with a 402 `client_credit_cap`.

Responses

  • 200 Client updated
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X PATCH "https://my.we.inc/api/v1/clients/{clientId}" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /projects

List projects

Parameters

ParameterInTypeNotes
limitqueryintegerNumber of records to return (max 100)
offsetqueryintegerNumber of records to skip
client_idquerystring (uuid)Filter by client ID
qquerystringCase-insensitive partial match on the project name
statusquerystringFilter by status

Responses

  • 200 Project list
  • 401 Unauthorized
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects" \
  -H "Authorization: Bearer wk_your_key_here"

post /projects

Create a project for a client

Request body

FieldTypeNotes
client_emailstring (email)
namestring
descriptionstring
template_idstring (uuid)Clone files from an org template

Responses

  • 201 Project created
  • 400 Validation error
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/projects" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /projects/{projectId}

Get project details

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Responses

  • 200 Project details
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}" \
  -H "Authorization: Bearer wk_your_key_here"

patch /projects/{projectId}

Update a project

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Request body

FieldTypeNotes
namestring
descriptionstring
statusstring

Responses

  • 200 Project updated
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X PATCH "https://my.we.inc/api/v1/projects/{projectId}" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

delete /projects/{projectId}

Delete a project

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Responses

  • 200 Project deleted
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X DELETE "https://my.we.inc/api/v1/projects/{projectId}" \
  -H "Authorization: Bearer wk_your_key_here"

get /templates

List org templates

Responses

  • 200 Template list
  • 401 Unauthorized
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/templates" \
  -H "Authorization: Bearer wk_your_key_here"

post /templates

Create a template

Request body

FieldTypeNotes
namestring
descriptionstring
categorystring
source_project_idstring (uuid)Snapshot files from an existing project
is_publicboolean

Responses

  • 201 Template created
  • 400 Validation error
  • 401 Unauthorized
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/templates" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /templates/{templateId}

Get template details

Parameters

ParameterInTypeNotes
templateId*pathstring (uuid)

Responses

  • 200 Template details
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/templates/{templateId}" \
  -H "Authorization: Bearer wk_your_key_here"

patch /templates/{templateId}

Update a template

Parameters

ParameterInTypeNotes
templateId*pathstring (uuid)

Request body

FieldTypeNotes
namestring
descriptionstring
categorystring
thumbnail_urlstring (uri)
is_publicboolean
is_featuredboolean

Responses

  • 200 Template updated
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X PATCH "https://my.we.inc/api/v1/templates/{templateId}" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

delete /templates/{templateId}

Delete a template

Parameters

ParameterInTypeNotes
templateId*pathstring (uuid)

Responses

  • 200 Template deleted
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X DELETE "https://my.we.inc/api/v1/templates/{templateId}" \
  -H "Authorization: Bearer wk_your_key_here"

get /plans

List client plans

Responses

  • 200 Plan list
  • 401 Unauthorized
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/plans" \
  -H "Authorization: Bearer wk_your_key_here"

post /plans

Create a client plan

Request body

FieldTypeNotes
namestring
descriptionstring
pricenumber
interval"monthly" | "yearly"
max_sitesinteger
max_ai_messages_dailyinteger
can_export_codeboolean
can_use_custom_domainboolean

Responses

  • 201 Plan created
  • 400 Validation error
  • 401 Unauthorized
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/plans" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /plans/{planId}

Get plan details

Parameters

ParameterInTypeNotes
planId*pathstring (uuid)

Responses

  • 200 Plan details
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/plans/{planId}" \
  -H "Authorization: Bearer wk_your_key_here"

patch /plans/{planId}

Update a plan

Parameters

ParameterInTypeNotes
planId*pathstring (uuid)

Request body

FieldTypeNotes
namestring
descriptionstring
pricenumber
interval"monthly" | "yearly"
max_sitesinteger
max_ai_messages_dailyinteger
can_export_codeboolean
can_use_custom_domainboolean
is_defaultboolean
is_activeboolean
sort_orderinteger

Responses

  • 200 Plan updated
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X PATCH "https://my.we.inc/api/v1/plans/{planId}" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /analytics

Get aggregated analytics

Parameters

ParameterInTypeNotes
daysqueryintegerNumber of days to look back
project_idquerystring (uuid)Filter analytics for a specific project

Responses

  • 200 Analytics data
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/analytics" \
  -H "Authorization: Bearer wk_your_key_here"

get /webhooks

List webhook endpoints

Responses

  • 200 Webhook list
  • 401 Unauthorized
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/webhooks" \
  -H "Authorization: Bearer wk_your_key_here"

post /webhooks

Register a webhook endpoint

The webhook secret is returned only in the creation response. Store it securely to verify webhook signatures.

Request body

FieldTypeNotes
urlstring (uri)
events"client.created" | "client.updated" | "plan.created" | "store.order.created" | "store.order.paid" | "store.order.canceled" | "product.low_stock" | "deploy.succeeded" | "deploy.failed" | "turn.completed" | "turn.failed"[]

Responses

  • 201 Webhook created (includes secret)
  • 400 Validation error
  • 401 Unauthorized
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/webhooks" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /webhooks/{webhookId}

Get webhook details

Parameters

ParameterInTypeNotes
webhookId*pathstring (uuid)

Responses

  • 200 Webhook details
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/webhooks/{webhookId}" \
  -H "Authorization: Bearer wk_your_key_here"

patch /webhooks/{webhookId}

Update a webhook

Parameters

ParameterInTypeNotes
webhookId*pathstring (uuid)

Request body

FieldTypeNotes
urlstring (uri)
events"client.created" | "client.updated" | "plan.created" | "store.order.created" | "store.order.paid" | "store.order.canceled" | "product.low_stock" | "deploy.succeeded" | "deploy.failed" | "turn.completed" | "turn.failed"[]
is_activeboolean

Responses

  • 200 Webhook updated
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X PATCH "https://my.we.inc/api/v1/webhooks/{webhookId}" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

delete /webhooks/{webhookId}

Delete a webhook

Parameters

ParameterInTypeNotes
webhookId*pathstring (uuid)

Responses

  • 200 Webhook deleted
  • 401 Unauthorized
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X DELETE "https://my.we.inc/api/v1/webhooks/{webhookId}" \
  -H "Authorization: Bearer wk_your_key_here"

post /projects/{projectId}/chat

Run an AI turn

Send a build or change instruction to the AI for one project, exactly as the builder chat does (same prompts, same credit charge, files saved on our servers). With `async: true` returns 202 + turnId immediately; poll GET /projects/{projectId}/turns/{turnId}. With `wait: true` holds up to ~85s and returns the finished turn, else 202. Without either, streams the raw builder output as text. An org API key needs `write` and may only act on its clients' projects. 402 codes: `insufficient_credits`, `org_credit_cap`, `client_credit_cap`, `needs_trial`.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Request body

FieldTypeNotes
messagestringThe instruction. Send this OR messages.
messagesobject[]
asyncboolean
waitboolean
conversationIdstring (uuid)Continue a specific conversation.
newConversationbooleanStart a new conversation instead of continuing the latest.
mode"build" | "chat"chat = answer only, no file changes.
imageAssetUrlstring (uri)

Responses

  • 200 Finished turn (wait) or a text stream (default)
  • 202 Turn running; poll the returned URL
  • 400 BadRequest
  • 401 Unauthorized
  • 402 Out of credits or over a cap
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/projects/{projectId}/chat" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /projects/{projectId}/turns/{turnId}

Get an AI turn

Poll a turn started with POST /projects/{projectId}/chat. `status` moves from running to completed or failed; a completed turn carries the AI's summary, the files it changed and the credits it settled at. Kept for 3 days.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)
turnId*pathstring

Responses

  • 200 The turn
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/turns/{turnId}" \
  -H "Authorization: Bearer wk_your_key_here"

get /projects/{projectId}/deploy

Get deploy status

Poll a deploy started with POST /projects/{projectId}/deploy. Each poll advances the job; when the build completes this call publishes it and returns `ready` with the live `url`. Errors carry `stage` (install, build, publish, timeout) and a message.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)
job*querystring

Responses

  • 200 Job status
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/deploy" \
  -H "Authorization: Bearer wk_your_key_here"

post /projects/{projectId}/deploy

Deploy a project

Build the project's current files on our build service and publish it to its live URL (and its connected custom domain). Returns 202 with a jobId; poll GET /projects/{projectId}/deploy?job=… every 3-5 seconds until status is `ready` (with `url`) or `error`.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Request body

FieldTypeNotes
basePathstringVite base path; omit for root.

Responses

  • 202 Build started
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 409 Nothing built yet (run an AI turn first)
  • 429 RateLimited
  • 503 Server building is switched off
Example request
curl -X POST "https://my.we.inc/api/v1/projects/{projectId}/deploy" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /projects/{projectId}/products

List store products

Every product in the project's store, any status, with its variants (prices in cents, stock counts).

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Responses

  • 200 Products
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/products" \
  -H "Authorization: Bearer wk_your_key_here"

post /projects/{projectId}/products

Bulk upsert store products

Create or update up to 200 products in one call. Each product matches an existing one by handle (given or derived from the title), then by any variant SKU; variants match by SKU, then title. Returns one result per item (created, updated or error with the reason); one bad item never fails the rest.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Request body

FieldTypeNotes
productsobject[]

Responses

  • 200 Per-item results
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/projects/{projectId}/products" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

patch /projects/{projectId}/products

Update stock levels

Set absolute stock counts for up to 500 variants, each named by sku or variant_id. Setting a count turns stock tracking on unless track_inventory is false. Returns one result per update.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Request body

FieldTypeNotes
inventoryobject[]

Responses

  • 200 Per-update results
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X PATCH "https://my.we.inc/api/v1/projects/{projectId}/products" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

delete /projects/{projectId}/products

Delete store products

Delete products (and their variants) by id or handle, up to 200 per call. Returns which ids were deleted and which were not found.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Request body

FieldTypeNotes
idsstring[]
handlesstring[]

Responses

  • 200 Result
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X DELETE "https://my.we.inc/api/v1/projects/{projectId}/products" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

post /clients/{clientId}/activate

Send a client invitation

Send (or re-send) the client's invitation email. The client signs in or signs up, verifies their email and accepts; only then is their account linked to your organization and can you create projects for them. Accounts are never created or linked on the client's behalf. The response is the same whether or not the address already has a WeInc account; poll GET /clients/{clientId} until status is active.

Parameters

ParameterInTypeNotes
clientId*pathstring (uuid)

Responses

  • 200 Invitation state
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 409 Client is suspended or churned
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/clients/{clientId}/activate" \
  -H "Authorization: Bearer wk_your_key_here"

get /usage

Get AI credit usage

AI credits used by your clients on your organization's projects, per client and per project, over a date range (default: this UTC month so far, at most 366 days). Each client also shows its monthly_credit_cap. Set or clear a cap with PATCH /clients/{clientId} { monthly_credit_cap }.

Parameters

ParameterInTypeNotes
clientIdquerystring (uuid)
fromquerystring (date-time)
toquerystring (date-time)

Responses

  • 200 Usage report
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/usage" \
  -H "Authorization: Bearer wk_your_key_here"

get /projects/{projectId}/store/orders

List store orders

The client site's storefront orders, newest first, with line items. Filter by status and a created_at range; page with limit (max 100) and offset. Amounts are in minor units (cents). Not the same as GET /orders, which lists your organization's own plan sales.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)
statusquery"pending" | "paid" | "fulfilled" | "canceled" | "refunded"
fromquerystring (date-time)
toquerystring (date-time)
limitqueryinteger
offsetqueryinteger

Responses

  • 200 Orders
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/store/orders" \
  -H "Authorization: Bearer wk_your_key_here"

get /projects/{projectId}/store/orders/{orderId}

Get a store order

One storefront order with its line items, customer, shipping address and totals (cents).

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)
orderId*pathstring (uuid)

Responses

  • 200 Order
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/store/orders/{orderId}" \
  -H "Authorization: Bearer wk_your_key_here"

post /projects/{projectId}/store/orders/{orderId}/cancel

Cancel an unpaid store order

Cancel a pending (unpaid) order, such as a bank debit that will not complete, and send store.order.canceled. Paid orders cannot be canceled through the API (409 order_paid); the store owner handles those in their own Stripe dashboard.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)
orderId*pathstring (uuid)

Responses

  • 200 Canceled
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 409 Paid or already canceled
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/projects/{projectId}/store/orders/{orderId}/cancel" \
  -H "Authorization: Bearer wk_your_key_here"

get /projects/{projectId}/store/customers

List store customers

The site's shoppers, one per email, with order count and total spent (cents). Filter by exact email; page with limit (max 100) and offset.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)
emailquerystring
limitqueryinteger
offsetqueryinteger

Responses

  • 200 Customers
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/store/customers" \
  -H "Authorization: Bearer wk_your_key_here"

get /projects/{projectId}/files

List project files

The project's source files as paths and sizes. ?path=src/App.tsx returns one file's content; ?include=content returns every file with its content.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)
pathquerystring
includequery"content"

Responses

  • 200 Files
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/files" \
  -H "Authorization: Bearer wk_your_key_here"

patch /projects/{projectId}/files

Write project files

Write or delete source files without an AI turn, so no credits are used. Body { files: { path: content | null } } (null deletes); other files are untouched. Up to 200 files and 1 MB per file per call. The current files are saved first as a restorable snapshot (snapshotId). The builder's own save guards apply. Deploy afterwards to go live. Org API key with write permission.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Request body

FieldTypeNotes
filesobject
messagestring

Responses

  • 200 Saved
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X PATCH "https://my.we.inc/api/v1/projects/{projectId}/files" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

put /projects/{projectId}/files

Replace project files

Same as PATCH /projects/{projectId}/files (writes the listed files, deletes those set to null, keeps the rest); offered for clients that only send PUT.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Request body

FieldTypeNotes
filesobject

Responses

  • 200 Saved
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X PUT "https://my.we.inc/api/v1/projects/{projectId}/files" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

post /projects/{projectId}/estimate

Estimate an AI turn's credits

A credit range (low/typical/high = 25th/50th/90th percentile) for the next AI turn on this project, from what similar turns actually settled at: this project's own edits when it has at least 5, otherwise recent turns across the platform (first builds: first turns of new projects). It is an estimate, not a quote. upfrontHold is what must be available when a turn starts.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Request body

FieldTypeNotes
messagestring

Responses

  • 200 Estimate
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/projects/{projectId}/estimate" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /projects/{projectId}/export

Export a project

One JSON document with the project's source files, store products, orders and customers (up to 10,000 each) and the rows of its WeInc Cloud database tables (up to 200 rows per table, 50 tables; `truncated` marks a cut). Internal, account and credential tables and secret-looking columns (password, hash, secret, token…) are left out.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Responses

  • 200 Export
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/export" \
  -H "Authorization: Bearer wk_your_key_here"

post /projects/{projectId}/transfer

Transfer a project to another client

Move the project, with its conversations, history, store and Cloud backend, to another of your clients who has an account and isn't removed, suspended or churned. Connected-service credentials, purchases and credit history stay with the old owner (reconnect integrations after a transfer). Org API key with write permission.

Parameters

ParameterInTypeNotes
projectId*pathstring (uuid)

Request body

FieldTypeNotes
toClientIdstring (uuid)

Responses

  • 200 Moved
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
  • 503 Migration pending
Example request
curl -X POST "https://my.we.inc/api/v1/projects/{projectId}/transfer" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /projects/{projectId}/cloud/roles

List site roles

The generated site's roles (e.g. staff, manager), each with per-table permissions and member user ids. WeInc Cloud enforces them on every data call; a site with no roles behaves exactly as before.

Parameters

ParameterInTypeNotes
projectId*pathstring

Responses

  • 200 Roles
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 409 The project has no active WeInc Cloud backend yet
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/cloud/roles" \
  -H "Authorization: Bearer wk_your_key_here"

put /projects/{projectId}/cloud/roles/{role}

Create or replace a site role

Define a role and its per-table permissions (read, insert, update, delete). On a table with any role permissions, a role's read/update/delete reach every member's rows, and only roles with insert (or a site admin) may add rows; everyone keeps their own rows. Optional write rules per table: columns (fields the role may write) and values ({ field: [allowed values] }); a write must fit the rules of one role that grants it, and a refused write gets 403. The reserved role "member" holds rules only, for everyone without a granting role. Up to 20 roles per site, 100 tables per role.

Parameters

ParameterInTypeNotes
projectId*pathstring
role*pathstring

Request body

FieldTypeNotes
tablesobject

Responses

  • 200 Saved
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 409 The project has no active WeInc Cloud backend yet
  • 429 RateLimited
Example request
curl -X PUT "https://my.we.inc/api/v1/projects/{projectId}/cloud/roles/{role}" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

delete /projects/{projectId}/cloud/roles/{role}

Delete a site role

Remove a role, its table permissions and every member's assignment. Tables left without role permissions return to the default rules.

Parameters

ParameterInTypeNotes
projectId*pathstring
role*pathstring

Responses

  • 200 Deleted
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 409 The project has no active WeInc Cloud backend yet
  • 429 RateLimited
Example request
curl -X DELETE "https://my.we.inc/api/v1/projects/{projectId}/cloud/roles/{role}" \
  -H "Authorization: Bearer wk_your_key_here"

post /projects/{projectId}/cloud/roles/{role}/members

Give a site member a role

Assign an existing role to someone who signed up on the generated site, by email or by site user id. The account must already exist on the site.

Parameters

ParameterInTypeNotes
projectId*pathstring
role*pathstring

Request body

FieldTypeNotes
emailstring
user_idstring

Responses

  • 200 Assigned
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 409 The project has no active WeInc Cloud backend yet
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/projects/{projectId}/cloud/roles/{role}/members" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

delete /projects/{projectId}/cloud/roles/{role}/members/{userId}

Take a role from a site member

Remove a role from one site member. Their own rows stay theirs; only the role's wider access is gone.

Parameters

ParameterInTypeNotes
projectId*pathstring
role*pathstring
userId*pathstring

Responses

  • 200 Removed
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 409 The project has no active WeInc Cloud backend yet
  • 429 RateLimited
Example request
curl -X DELETE "https://my.we.inc/api/v1/projects/{projectId}/cloud/roles/{role}/members/{userId}" \
  -H "Authorization: Bearer wk_your_key_here"

get /projects/{projectId}/domains

List project domains

The project's custom domains and its subdomain, each with its verification status and the DNS records the domain owner must add.

Parameters

ParameterInTypeNotes
projectId*pathstring

Responses

  • 200 Domains
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/domains" \
  -H "Authorization: Bearer wk_your_key_here"

post /projects/{projectId}/domains

Connect a domain

Connect a custom domain ({ domain }) or a subdomain ({ subdomain }). Returns the DNS records to add. A root domain needs wwwFallback: true to connect its www form. When your org API key adds it to one of your clients' projects, your client settings decide whether custom domains are allowed (no WeInc plan needed), up to 100 custom domains per organization. Sandbox projects cannot have domains.

Parameters

ParameterInTypeNotes
projectId*pathstring

Request body

FieldTypeNotes
domainstring
subdomainstring
wwwFallbackboolean

Responses

  • 200 Connected
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 409 Needs a choice or not allowed for this project
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/projects/{projectId}/domains" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

delete /projects/{projectId}/domains

Remove a domain

Remove a custom domain or subdomain from the project (?domain=www.example.com), including its routing and Cloudflare hostname cleanup, exactly as the builder does. Live org keys only, for your clients' projects; test keys cannot add or remove domains.

Parameters

ParameterInTypeNotes
projectId*pathstring
domain*querystring

Responses

  • 200 Removed
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X DELETE "https://my.we.inc/api/v1/projects/{projectId}/domains" \
  -H "Authorization: Bearer wk_your_key_here"

get /projects/{projectId}/store/connect

Get Stripe payments status

The store's Stripe account status, refreshed from Stripe: whether onboarding is complete and charges are enabled.

Parameters

ParameterInTypeNotes
projectId*pathstring

Responses

  • 200 Status
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/store/connect" \
  -H "Authorization: Bearer wk_your_key_here"

post /projects/{projectId}/store/connect

Start Stripe payments onboarding

Returns a Stripe-hosted onboarding link (url) for the merchant. This is the one manual step in a headless store: the merchant opens it and completes Stripe's form; no WeInc login is needed. Links expire within minutes, so create one when the merchant is ready. Sandbox projects onboard in Stripe test mode.

Parameters

ParameterInTypeNotes
projectId*pathstring

Request body

FieldTypeNotes
store_namestring
return_urlstring
refresh_urlstring

Responses

  • 200 Onboarding link
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 409 Sandbox project and test mode unavailable
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/projects/{projectId}/store/connect" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

get /projects/{projectId}/store/discounts

List discount codes

Every discount code of the project's store, as the builder's Store panel shows them. Money is in minor units (cents).

Parameters

ParameterInTypeNotes
projectId*pathstring

Responses

  • 200 discount codes
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/store/discounts" \
  -H "Authorization: Bearer wk_your_key_here"

post /projects/{projectId}/store/discounts

Create a discount code

Create a discount code with the same fields and validation as the builder's Store panel. Money is in minor units (cents).

Parameters

ParameterInTypeNotes
projectId*pathstring

Request body

FieldTypeNotes
codestring
type"percent" | "fixed" | "free_shipping"
valueintegerPercent (0-100) or cents
min_subtotalinteger
usage_limitinteger (nullable)
starts_atstring (nullable)
ends_atstring (nullable)
activeboolean

Responses

  • 201 Created
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/projects/{projectId}/store/discounts" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

patch /projects/{projectId}/store/discounts/{itemId}

Update a discount code

Change any of a discount code's fields; the rest stay as they are. Validated like creation.

Parameters

ParameterInTypeNotes
projectId*pathstring
itemId*pathstring

Request body

FieldTypeNotes
codestring
type"percent" | "fixed" | "free_shipping"
valueintegerPercent (0-100) or cents
min_subtotalinteger
usage_limitinteger (nullable)
starts_atstring (nullable)
ends_atstring (nullable)
activeboolean

Responses

  • 200 Updated
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X PATCH "https://my.we.inc/api/v1/projects/{projectId}/store/discounts/{itemId}" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

delete /projects/{projectId}/store/discounts/{itemId}

Delete a discount code

Remove a discount code from the store. Orders already placed keep the amounts they were charged.

Parameters

ParameterInTypeNotes
projectId*pathstring
itemId*pathstring

Responses

  • 200 Deleted
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X DELETE "https://my.we.inc/api/v1/projects/{projectId}/store/discounts/{itemId}" \
  -H "Authorization: Bearer wk_your_key_here"

get /projects/{projectId}/store/shipping-rates

List shipping rates

Every shipping rate of the project's store, as the builder's Store panel shows them. Money is in minor units (cents).

Parameters

ParameterInTypeNotes
projectId*pathstring

Responses

  • 200 shipping rates
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/store/shipping-rates" \
  -H "Authorization: Bearer wk_your_key_here"

post /projects/{projectId}/store/shipping-rates

Create a shipping rate

Create a shipping rate with the same fields and validation as the builder's Store panel. Money is in minor units (cents).

Parameters

ParameterInTypeNotes
projectId*pathstring

Request body

FieldTypeNotes
namestring
priceintegercents
min_subtotalinteger (nullable)
max_subtotalinteger (nullable)
activeboolean
positioninteger

Responses

  • 201 Created
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X POST "https://my.we.inc/api/v1/projects/{projectId}/store/shipping-rates" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

patch /projects/{projectId}/store/shipping-rates/{itemId}

Update a shipping rate

Change any of a shipping rate's fields; the rest stay as they are. Validated like creation.

Parameters

ParameterInTypeNotes
projectId*pathstring
itemId*pathstring

Request body

FieldTypeNotes
namestring
priceintegercents
min_subtotalinteger (nullable)
max_subtotalinteger (nullable)
activeboolean
positioninteger

Responses

  • 200 Updated
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X PATCH "https://my.we.inc/api/v1/projects/{projectId}/store/shipping-rates/{itemId}" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

delete /projects/{projectId}/store/shipping-rates/{itemId}

Delete a shipping rate

Remove a shipping rate from the store. Orders already placed keep the amounts they were charged.

Parameters

ParameterInTypeNotes
projectId*pathstring
itemId*pathstring

Responses

  • 200 Deleted
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X DELETE "https://my.we.inc/api/v1/projects/{projectId}/store/shipping-rates/{itemId}" \
  -H "Authorization: Bearer wk_your_key_here"

get /projects/{projectId}/store/settings

Get store settings

Currency, automatic tax, whether checkout is open, and the Stripe account status (null settings when the store has never been set up).

Parameters

ParameterInTypeNotes
projectId*pathstring

Responses

  • 200 Settings
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X GET "https://my.we.inc/api/v1/projects/{projectId}/store/settings" \
  -H "Authorization: Bearer wk_your_key_here"

patch /projects/{projectId}/store/settings

Update store settings

Set currency (an ISO 4217 code Stripe supports; on a store with products it needs confirm_currency_change: true, because prices are relabelled, not converted), tax_enabled (Stripe automatic tax) and checkout_open (true = active, false = disabled), or store_status directly.

Parameters

ParameterInTypeNotes
projectId*pathstring

Request body

FieldTypeNotes
currencystring
confirm_currency_changeboolean
tax_enabledboolean
checkout_openboolean
store_status"draft" | "active" | "disabled"

Responses

  • 200 Settings
  • 400 BadRequest
  • 401 Unauthorized
  • 403 Forbidden
  • 404 NotFound
  • 429 RateLimited
Example request
curl -X PATCH "https://my.we.inc/api/v1/projects/{projectId}/store/settings" \
  -H "Authorization: Bearer wk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ … }'

Object reference

Error

FieldTypeNotes
errorstring

Client

FieldTypeNotes
idstring (uuid)
emailstring (email)
namestring (nullable)
companystring (nullable)
status"invited" | "active" | "suspended" | "churned"
plan_idstring (nullable)
payment_status"none" | "active" | "past_due" | "canceled"
created_atstring (date-time)

Project

FieldTypeNotes
idstring (uuid)
user_idstring (uuid)
org_idstring (uuid, nullable)
org_client_idstring (uuid, nullable)The agency client this project belongs to, if any
namestring
descriptionstring (nullable)
status"active" | "archived"
templatestring (nullable)
tagsstring[]
starredboolean
is_publicboolean
subdomainstring (nullable)
custom_domainstring (nullable)
custom_domain_statusstring (nullable)
published_urlstring (nullable)The live website address. Null until the project is published.
last_published_atstring (date-time, nullable)
preview_image_urlstring (nullable)
created_atstring (date-time)
updated_atstring (date-time)
last_opened_atstring (date-time, nullable)

Template

FieldTypeNotes
idstring (uuid)
org_idstring (uuid)
namestring
descriptionstring (nullable)
categorystring
thumbnail_urlstring (nullable)
is_publicboolean
is_featuredboolean
created_atstring (date-time)

Plan

FieldTypeNotes
idstring (uuid)
namestring
descriptionstring (nullable)
pricenumber
interval"monthly" | "yearly"
max_sitesinteger
max_ai_messages_dailyinteger
can_export_codeboolean
can_use_custom_domainboolean
is_activeboolean
created_atstring (date-time)

Analytics

FieldTypeNotes
totalViewsinteger
uniqueVisitorsinteger
topPagesobject[]
topReferrersobject[]
dailyViewsobject[]
deviceBreakdownobject[]

Webhook

FieldTypeNotes
idstring (uuid)
urlstring (uri)
eventsstring[]
is_activeboolean
created_atstring (date-time)