WeInc API reference
REST API for agencies to manage clients, projects, templates, plans, analytics, and webhooks programmatically.
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" }| Status | Meaning |
|---|---|
| 400 | The request was malformed or a field failed validation. |
| 401 | Missing or invalid API key. |
| 403 | The key is valid but lacks the permission this endpoint needs. |
| 404 | No such record, or it belongs to another organization. |
| 415 | Content-Type must be application/json on writes. |
| 429 | Rate limit exceeded. See Rate limits below. |
| 500 | Something 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
- post /clients
- get /clients/{clientId}
- patch /clients/{clientId}
- get /projects
- post /projects
- get /projects/{projectId}
- patch /projects/{projectId}
- delete /projects/{projectId}
- get /templates
- post /templates
- get /templates/{templateId}
- patch /templates/{templateId}
- delete /templates/{templateId}
- get /plans
- post /plans
- get /plans/{planId}
- patch /plans/{planId}
- get /analytics
- get /webhooks
- post /webhooks
- get /webhooks/{webhookId}
- patch /webhooks/{webhookId}
- delete /webhooks/{webhookId}
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
| Field | Type | Notes |
|---|---|---|
| string (email) | ||
| name | string | |
| company | string | |
| plan_id | string (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
| Parameter | In | Type | Notes |
|---|---|---|---|
| clientId* | path | string (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
| Parameter | In | Type | Notes |
|---|---|---|---|
| clientId* | path | string (uuid) |
Request body
| Field | Type | Notes |
|---|---|---|
| name | string | |
| company | string | |
| status | "invited" | "active" | "suspended" | "churned" | |
| plan_id | string (uuid) |
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
| Parameter | In | Type | Notes |
|---|---|---|---|
| limit | query | integer | Number of records to return (max 100) |
| offset | query | integer | Number of records to skip |
| client_id | query | string (uuid) | Filter by client ID |
| q | query | string | Case-insensitive partial match on the project name |
| status | query | string | Filter 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
| Field | Type | Notes |
|---|---|---|
| client_email | string (email) | |
| name | string | |
| description | string | |
| template_id | string (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
| Parameter | In | Type | Notes |
|---|---|---|---|
| projectId* | path | string (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
| Parameter | In | Type | Notes |
|---|---|---|---|
| projectId* | path | string (uuid) |
Request body
| Field | Type | Notes |
|---|---|---|
| name | string | |
| description | string | |
| status | string |
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
| Parameter | In | Type | Notes |
|---|---|---|---|
| projectId* | path | string (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
| Field | Type | Notes |
|---|---|---|
| name | string | |
| description | string | |
| category | string | |
| source_project_id | string (uuid) | Snapshot files from an existing project |
| is_public | boolean |
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
| Parameter | In | Type | Notes |
|---|---|---|---|
| templateId* | path | string (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
| Parameter | In | Type | Notes |
|---|---|---|---|
| templateId* | path | string (uuid) |
Request body
| Field | Type | Notes |
|---|---|---|
| name | string | |
| description | string | |
| category | string | |
| thumbnail_url | string (uri) | |
| is_public | boolean | |
| is_featured | boolean |
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
| Parameter | In | Type | Notes |
|---|---|---|---|
| templateId* | path | string (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
| Field | Type | Notes |
|---|---|---|
| name | string | |
| description | string | |
| price | number | |
| interval | "monthly" | "yearly" | |
| max_sites | integer | |
| max_ai_messages_daily | integer | |
| can_export_code | boolean | |
| can_use_custom_domain | boolean |
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
| Parameter | In | Type | Notes |
|---|---|---|---|
| planId* | path | string (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
| Parameter | In | Type | Notes |
|---|---|---|---|
| planId* | path | string (uuid) |
Request body
| Field | Type | Notes |
|---|---|---|
| name | string | |
| description | string | |
| price | number | |
| interval | "monthly" | "yearly" | |
| max_sites | integer | |
| max_ai_messages_daily | integer | |
| can_export_code | boolean | |
| can_use_custom_domain | boolean | |
| is_default | boolean | |
| is_active | boolean | |
| sort_order | integer |
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
| Parameter | In | Type | Notes |
|---|---|---|---|
| days | query | integer | Number of days to look back |
| project_id | query | string (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
| Field | Type | Notes |
|---|---|---|
| url | string (uri) | |
| events | "client.created" | "client.updated" | "project.created" | "project.published" | "payment.received" | "form.submitted"[] |
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
| Parameter | In | Type | Notes |
|---|---|---|---|
| webhookId* | path | string (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
| Parameter | In | Type | Notes |
|---|---|---|---|
| webhookId* | path | string (uuid) |
Request body
| Field | Type | Notes |
|---|---|---|
| url | string (uri) | |
| events | "client.created" | "client.updated" | "project.created" | "project.published" | "payment.received" | "form.submitted"[] | |
| is_active | boolean |
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
| Parameter | In | Type | Notes |
|---|---|---|---|
| webhookId* | path | string (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"Object reference
Error
| Field | Type | Notes |
|---|---|---|
| error | string |
Client
| Field | Type | Notes |
|---|---|---|
| id | string (uuid) | |
| string (email) | ||
| name | string (nullable) | |
| company | string (nullable) | |
| status | "invited" | "active" | "suspended" | "churned" | |
| plan_id | string (nullable) | |
| payment_status | "none" | "active" | "past_due" | "canceled" | |
| created_at | string (date-time) |
Project
| Field | Type | Notes |
|---|---|---|
| id | string (uuid) | |
| user_id | string (uuid) | |
| org_id | string (uuid, nullable) | |
| org_client_id | string (uuid, nullable) | The agency client this project belongs to, if any |
| name | string | |
| description | string (nullable) | |
| status | "active" | "archived" | |
| template | string (nullable) | |
| tags | string[] | |
| starred | boolean | |
| is_public | boolean | |
| subdomain | string (nullable) | |
| custom_domain | string (nullable) | |
| custom_domain_status | string (nullable) | |
| published_url | string (nullable) | The live website address. Null until the project is published. |
| last_published_at | string (date-time, nullable) | |
| preview_image_url | string (nullable) | |
| created_at | string (date-time) | |
| updated_at | string (date-time) | |
| last_opened_at | string (date-time, nullable) |
Template
| Field | Type | Notes |
|---|---|---|
| id | string (uuid) | |
| org_id | string (uuid) | |
| name | string | |
| description | string (nullable) | |
| category | string | |
| thumbnail_url | string (nullable) | |
| is_public | boolean | |
| is_featured | boolean | |
| created_at | string (date-time) |
Plan
| Field | Type | Notes |
|---|---|---|
| id | string (uuid) | |
| name | string | |
| description | string (nullable) | |
| price | number | |
| interval | "monthly" | "yearly" | |
| max_sites | integer | |
| max_ai_messages_daily | integer | |
| can_export_code | boolean | |
| can_use_custom_domain | boolean | |
| is_active | boolean | |
| created_at | string (date-time) |
Analytics
| Field | Type | Notes |
|---|---|---|
| totalViews | integer | |
| uniqueVisitors | integer | |
| topPages | object[] | |
| topReferrers | object[] | |
| dailyViews | object[] | |
| deviceBreakdown | object[] |
Webhook
| Field | Type | Notes |
|---|---|---|
| id | string (uuid) | |
| url | string (uri) | |
| events | string[] | |
| is_active | boolean | |
| created_at | string (date-time) |