WeInc

WeInc API

REST API for WeInc, the AI website builder: manage clients, website projects, templates, plans, analytics, and webhooks programmatically. Authentication:…

Developer tools#development

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

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

Endpoints 64

Clients

  • GETList clients/clientsList the clients (end customers) of the calling organization. Each client owns one or more website projects and may be on a plan. Results are scoped to the…
  • POSTCreate a client/clientsCreate a client under the calling organization. The email must be unique within the organization; the client is created in the invited state and can be…
  • GETGet client details/clients/:clientIdFetch one client by id, including status, plan and payment status. Returns 404 if the client does not belong to the calling organization.
  • PATCHUpdate a client/clients/:clientIdUpdate a client's name, company, plan or status. Only the fields present in the body change; omitted fields keep their values. Returns the updated client.

Projects

  • GETList projects/projectsList website projects visible to the caller: an organization key sees its clients' projects, an OAuth connector token sees the signed-in user's own projects.…
  • POSTCreate a project for a client/projectsCreate a website project for one of the organization's clients, optionally seeded from a template. The project starts empty (or as a copy of the template) and…
  • GETGet project details/projects/:projectIdFetch one project by id, including publish state, subdomain, custom domain and preview image. Returns 404 for projects outside the caller's scope.
  • DELETEDelete a project/projects/:projectIdPermanently delete a project and unpublish its site. This cannot be undone; archive with PATCH status: archived to keep the files. Returns 204 on success.
  • PATCHUpdate a project/projects/:projectIdUpdate a project's name, description, tags or status (active or archived). Does not change the site's files or publish state. Returns the updated project.

Templates

  • GETList org templates/templatesList the organization's private templates (snapshots of projects that new client sites can start from). Does not include WeInc's public template catalogue.
  • POSTCreate a template/templatesCreate a template for the organization, optionally snapshotting the files of an existing project (source_project_id). Templates can be marked public within…
  • GETGet template details/templates/:templateIdFetch one template by id, including its category and whether it is shared with all of the organization's clients.
  • DELETEDelete a template/templates/:templateIdDelete a template. Projects already created from it are unaffected. Returns 204 on success.
  • PATCHUpdate a template/templates/:templateIdUpdate a template's name, description, category or is_public flag. The captured files are not changed. Returns the updated template.

Plans

  • GETList client plans/plansList the client-facing plans the organization sells (name, price, interval, limits). Plans are billed to clients through the organization's Stripe Connect…
  • POSTCreate a client plan/plansCreate a client-facing plan with a price, billing interval and feature limits. The plan becomes available to attach to clients immediately. Returns the new…
  • GETGet plan details/plans/:planIdFetch one client-facing plan by id, including its price, billing interval, feature limits and whether it is active.
  • PATCHUpdate a plan/plans/:planIdUpdate a plan's name, price, interval, limits or active flag. Existing subscriptions keep their current price until renewed. Returns the updated plan.

Analytics

  • GETGet aggregated analytics/analyticsAggregated traffic analytics (page views, unique visitors, top pages) for all of the organization's published sites over the last days days, or for a single…

Webhooks

  • GETList webhook endpoints/webhooksList the webhook endpoints registered by the organization and the events each one subscribes to.
  • POSTRegister a webhook endpoint/webhooksThe webhook secret is returned only in the creation response. Store it securely to verify webhook signatures.
  • GETGet webhook details/webhooks/:webhookIdFetch one webhook endpoint by id, including its URL, subscribed events and active flag. The signing secret is not returned again.
  • DELETEDelete a webhook/webhooks/:webhookIdDelete a webhook endpoint. Pending deliveries to it are dropped. Returns 204 on success.
  • PATCHUpdate a webhook/webhooks/:webhookIdUpdate a webhook endpoint's URL, subscribed events or active flag. Returns the updated endpoint.
  • POSTRun an AI turn/projects/:projectId/chatSend 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).…
  • GETGet an AI turn/projects/:projectId/turns/:turnIdPoll 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…
  • GETGet deploy status/projects/:projectId/deploy?job=stringPoll a deploy started with POST /projects/{projectId}/deploy. Each poll advances the job; when the build completes this call publishes it and returns ready…
  • POSTDeploy a project/projects/:projectId/deployBuild 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…
  • GETList store products/projects/:projectId/productsEvery product in the project's store, any status, with its variants (prices in cents, stock counts).
  • POSTBulk upsert store products/projects/:projectId/productsCreate 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;…
  • DELETEDelete store products/projects/:projectId/productsDelete products (and their variants) by id or handle, up to 200 per call. Returns which ids were deleted and which were not found.
  • PATCHUpdate stock levels/projects/:projectId/productsSet 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.…
  • POSTSend a client invitation/clients/:clientId/activateSend (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…
  • GETGet AI credit usage/usageAI 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…
  • GETList store orders/projects/:projectId/store/ordersThe 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…
  • GETGet a store order/projects/:projectId/store/orders/:orderIdOne storefront order with its line items, customer, shipping address and totals (cents).
  • POSTCancel an unpaid store order/projects/:projectId/store/orders/:orderId/cancelCancel 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…
  • GETList store customers/projects/:projectId/store/customersThe site's shoppers, one per email, with order count and total spent (cents). Filter by exact email; page with limit (max 100) and offset.
  • GETList project files/projects/:projectId/filesThe 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.
  • PUTReplace project files/projects/:projectId/filesSame as PATCH /projects/{projectId}/files (writes the listed files, deletes those set to null, keeps the rest); offered for clients that only send PUT.
  • PATCHWrite project files/projects/:projectId/filesWrite or delete source files without an AI turn, so no credits are used. Body { files: { path: content | null } } (null deletes); other files are untouched.…
  • POSTEstimate an AI turn's credits/projects/:projectId/estimateA 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…
  • GETExport a project/projects/:projectId/exportOne 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…
  • POSTTransfer a project to another client/projects/:projectId/transferMove 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…
  • GETList site roles/projects/:projectId/cloud/rolesThe 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…
  • PUTCreate or replace a site role/projects/:projectId/cloud/roles/:roleDefine 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…
  • DELETEDelete a site role/projects/:projectId/cloud/roles/:roleRemove a role, its table permissions and every member's assignment. Tables left without role permissions return to the default rules.
  • POSTGive a site member a role/projects/:projectId/cloud/roles/:role/membersAssign 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.
  • DELETETake a role from a site member/projects/:projectId/cloud/roles/:role/members/:userIdRemove a role from one site member. Their own rows stay theirs; only the role's wider access is gone.
  • GETList project domains/projects/:projectId/domainsThe project's custom domains and its subdomain, each with its verification status and the DNS records the domain owner must add.
  • POSTConnect a domain/projects/:projectId/domainsConnect a custom domain ({ domain }) or a subdomain ({ subdomain }). Returns the DNS records to add. A root domain needs wwwFallback: true to connect its www…
  • DELETERemove a domain/projects/:projectId/domains?domain=stringRemove a custom domain or subdomain from the project (?domain=www.example.com), including its routing and Cloudflare hostname cleanup, exactly as the builder…
  • GETGet Stripe payments status/projects/:projectId/store/connectThe store's Stripe account status, refreshed from Stripe: whether onboarding is complete and charges are enabled.
  • POSTStart Stripe payments onboarding/projects/:projectId/store/connectReturns 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…
  • GETList discount codes/projects/:projectId/store/discountsEvery discount code of the project's store, as the builder's Store panel shows them. Money is in minor units (cents).
  • POSTCreate a discount code/projects/:projectId/store/discountsCreate a discount code with the same fields and validation as the builder's Store panel. Money is in minor units (cents).
  • DELETEDelete a discount code/projects/:projectId/store/discounts/:itemIdRemove a discount code from the store. Orders already placed keep the amounts they were charged.
  • PATCHUpdate a discount code/projects/:projectId/store/discounts/:itemIdChange any of a discount code's fields; the rest stay as they are. Validated like creation.
  • GETList shipping rates/projects/:projectId/store/shipping-ratesEvery shipping rate of the project's store, as the builder's Store panel shows them. Money is in minor units (cents).
  • POSTCreate a shipping rate/projects/:projectId/store/shipping-ratesCreate a shipping rate with the same fields and validation as the builder's Store panel. Money is in minor units (cents).
  • DELETEDelete a shipping rate/projects/:projectId/store/shipping-rates/:itemIdRemove a shipping rate from the store. Orders already placed keep the amounts they were charged.
  • PATCHUpdate a shipping rate/projects/:projectId/store/shipping-rates/:itemIdChange any of a shipping rate's fields; the rest stay as they are. Validated like creation.
  • GETGet store settings/projects/:projectId/store/settingsCurrency, automatic tax, whether checkout is open, and the Stripe account status (null settings when the store has never been set up).
  • PATCHUpdate store settings/projects/:projectId/store/settingsSet currency (an ISO 4217 code Stripe supports; on a store with products it needs confirm_currency_change: true, because prices are relabelled, not…

API details

Base URL
https://my.we.inc/api/v1
Authentication
A bearer token in the Authorization header
Operations
64 operations on 36 pathsGET 26POST 17PATCH 10DELETE 9PUT 2
Main resources
Projects 5Templates 5Webhooks 5Clients 4Plans 4Analytics 1
Response formats
application/json
Description format
OpenAPI 3.0.3, API version 1.0.0

How to test the WeInc API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the WeInc API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses A bearer token in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “List clients” (GET /clients), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the WeInc API?

REST API for WeInc, the AI website builder: manage clients, website projects, templates, plans, analytics, and webhooks programmatically. Authentication:… It is listed under Developer tools and has 64 endpoints.

Who publishes the WeInc API?

It is listed from WeInc's public API description (an OpenAPI document), not published by WeInc on Swastik Codes. Anyone who controls my.we.inc can claim the profile by adding a DNS TXT record.

What is the base URL of the WeInc API?

Requests go to https://my.we.inc/api/v1. Endpoint paths are added to this base URL.

How do I authenticate with the WeInc API?

With A bearer token in the Authorization header.

How many endpoints does the WeInc API have?

64 operations on 36 paths (26 GET, 17 POST, 10 PATCH, 9 DELETE, 2 PUT). The largest groups are Projects, Templates, Webhooks, Clients.

Is forking the WeInc API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.