Integrate Wigo into your product

Let your members create websites right inside your own system: create users, sign them in with single sign-on, create/publish sites and receive webhooks when things change. Download the OpenAPI 3 spec to generate a client.

Quick start (5 minutes)

  1. Register as a partner (a verified email is required) — you enter the sandbox immediately and receive a wgk_test_… key (shown only once, so save it).
  2. Try a call:
curl https://trywigo.com/v1/ping \
  -H "Authorization: Bearer wgk_test_xxxxxxxx"
  1. Create a user, get a login link and send the user into Wigo:
# 1) create/update a member (idempotent by external_id)
curl -X PUT https://trywigo.com/v1/users/member-123 \
  -H "Authorization: Bearer $WIGO_KEY" -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","name":"Nguyễn Văn A"}'

# 2) ONE-TIME login link (expires in 60 seconds)
curl -X POST https://trywigo.com/v1/users/member-123/login-links \
  -H "Authorization: Bearer $WIGO_KEY" -H "Content-Type: application/json" \
  -d '{"redirect":"/#/my-site"}'
# → {"url":"https://trywigo.com/sso/…","expires_in":60}  — redirect the user's browser to this url

Authentication

Send the header Authorization: Bearer <key> on every /v1/* request from your server (never put the key in code that runs in the browser). Wigo stores only a hash of the key; if you lose a key, revoke it and create a new one in the partner portal (up to 5 keys per mode). Rate limit: 120 requests/minute/key.

Sandbox and Production

Sandbox (wgk_test_…)Production (wgk_live_…)
How to get itSelf-register, use immediatelyFill in legal entity details → request production → Wigo admin approves → buy a seat plan
User entitlementsSame as the free trial plan (1 site, no AI, badge + noindex, auto-cleanup)Same as the matching individual plan (Basic/Professional); users see no payment reminders
QuotaUp to 50 usersBased on the number of seats purchased

The two modes are completely separate: test keys cannot see live users and vice versa.

Users

PUT/v1/users/{external_id} — create or update. Body: email (required when creating), name, plan (basic|pro, production only; defaults to an available Professional seat). Returns 201 when created, 200 when the user already exists.

GET/v1/users/{external_id} · DELETE/v1/users/{external_id} (removes the user from the partner: the seat is released, entitlements expire, and sites enter the 15/30/45-day expiry lifecycle) · GET/v1/usage (number of users and seats).

Account safety: an email that already has an independent Wigo account is rejected (email_in_use) — a partner cannot take over someone else's account. Users newly created through the API must accept Wigo's Terms on their first visit.

Single sign-on (SSO)

POST/v1/users/{external_id}/login-links — returns {"url", "expires_in":60}. Redirect the user to url: Wigo exchanges the link for a login session and then sends them to redirect (in the form /#/path, default /#/my-site). The link is single-use and expires after 60 seconds; reused/expired links ⇒ a friendly notice page. Partner verification is your API key itself.

Sites and publishing

RequestDescription
GET /v1/users/{external_id}/sitesList the user's sites
POST /v1/users/{external_id}/sitesCreate a site: {"name":"Quán A","template":"quan-ca-phe"} (template is optional). Reaching the plan limit ⇒ 409 site_limit
POST /v1/sites/{id}/deployPublish a site: {"subdomain":"quan-a"} ⇒ 202 {"job_id","version"}; the site runs at https://quan-a.trywigo.com and you receive the site.deployed webhook

Webhooks

Set an HTTPS address in the partner portal or via PUT /v1/webhook {"url":"https://…"} (returns the signing secret whsec_…); POST /v1/webhook/test sends a test event. Addresses pointing into internal networks are rejected. Wigo sends a JSON POST:

{ "id": "evt-uuid", "type": "site.deployed", "created": "2026-10-30T03:00:00Z", "livemode": false,
  "data": { "user": { "external_id": "member-123", "email": "[email protected]" },
            "site": { "id": "…", "name": "Quán A", "subdomain": "quan-a", "url": "https://quan-a.trywigo.com", "version": 1 } } }
EventWhen
user.created · user.removedA user is created / removed through the API
user.entitlement_changedEntitlements start/stop being valid (renewal, no seats left, partner returned to sandbox)
site.created · site.deployed · site.deletedA user creates / publishes / deletes a site
webhook.testYou click "Send test"

Verifying the signature

Header X-Wigo-Signature: t=<unix>,v1=<hex> where v1 = HMAC-SHA256(secret, "<t>." + <raw body>). Verify the signature against the raw body and reject the request if t differs by more than 5 minutes.

// Node.js
const crypto = require("crypto");
function verify(rawBody, header, secret) {
  const [t, v1] = header.split(",").map((p) => p.split("=")[1]);
  if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const mac = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(v1));
}
# Python
import hmac, hashlib, time
def verify(raw_body: bytes, header: str, secret: str) -> bool:
    t, v1 = [p.split("=", 1)[1] for p in header.split(",")]
    if abs(time.time() - int(t)) > 300: return False
    mac = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(mac, v1)
<?php // PHP
function verify(string $raw, string $header, string $secret): bool {
  [$t, $v1] = array_map(fn($p) => explode("=", $p, 2)[1], explode(",", $header));
  if (abs(time() - (int)$t) > 300) return false;
  return hash_equals(hash_hmac("sha256", "$t.$raw", $secret), $v1);
}

Delivery: respond with a 2xx status within 10 seconds to acknowledge receipt. Failures are retried after 1 minute → 5 minutes → 30 minutes → 2 hours → 12 hours (up to 6 attempts including the first); view the log and click "Resend" in the partner portal. Events may arrive duplicated or out of order — handle them idempotently by id.

Seats and entitlements (production)

Each production user occupies 1 seat and receives the same entitlements as the matching individual plan. Buy seats yearly (minimum 100 seats, tiered discounts) in the partner portal. When seats run out ⇒ 409 seat_limit. When a seat expires or the partner is returned to sandbox ⇒ the user receives the user.entitlement_changed webhook (active:false) and enters the expiry lifecycle (view-only after 15 days, site suspended after 30 days, cleaned up after 45 days) — they can buy an individual plan themselves to keep their site.

Errors and limits

Errors return JSON {"error":"code","message":"…"}:

HTTPerrorMeaning
400bad_request, bad_url, bad_redirectInvalid data
401missing, invalidKey missing/incorrect/revoked
403suspended, not_livePartner suspended / production key not yet activated
404not_foundUser/site not found (or belongs to another partner)
409email_in_use, seat_limit, user_limit, site_limit, no_webhookConflict / quota exceeded
429—More than 120 requests/minute/key

Changelog

Need integration support: [email protected].