Skip to main content

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" }
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)

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" | "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

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" | "project.created" | "project.published" | "payment.received" | "form.submitted"[]
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"

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)