{"openapi":"3.0.3","info":{"title":"WeInc API","version":"1.0.0","description":"REST API for WeInc, the AI website builder: manage clients, website projects, templates, plans, analytics, and webhooks programmatically.\n\nAuthentication: `Authorization: Bearer wk_...` (self-serve API key from https://weinc-coastside.vercel.app/agency/api on the free plan).\nRate 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`.\nVersioning: 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://weinc-coastside.vercel.app/developers/versioning\nMCP server (Streamable HTTP) for AI agents: https://weinc-coastside.vercel.app/api/mcp, manifest at https://weinc-coastside.vercel.app/.well-known/mcp.","contact":{"name":"WeInc support","email":"hey@we.inc","url":"https://weinc-coastside.vercel.app/contact"},"termsOfService":"https://weinc-coastside.vercel.app/terms","x-rate-limit":{"quota":100,"windowSeconds":60,"headers":["RateLimit-Policy","RateLimit","X-RateLimit-Limit","X-RateLimit-Remaining","X-RateLimit-Reset","Retry-After"]},"x-deprecation-policy":"https://weinc-coastside.vercel.app/developers/versioning"},"externalDocs":{"description":"WeInc developer portal","url":"https://weinc-coastside.vercel.app/developers"},"servers":[{"url":"https://weinc-coastside.vercel.app/api/v1","description":"API v1"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key generated from your agency dashboard. Pass as `Authorization: Bearer wk_...`"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}}},"Client":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"name":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"status":{"type":"string","enum":["invited","active","suspended","churned"]},"plan_id":{"type":"string","nullable":true},"payment_status":{"type":"string","enum":["none","active","past_due","canceled"]},"created_at":{"type":"string","format":"date-time"}}},"Project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid","nullable":true},"org_client_id":{"type":"string","format":"uuid","nullable":true,"description":"The agency client this project belongs to, if any"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","archived"]},"template":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"is_public":{"type":"boolean"},"subdomain":{"type":"string","nullable":true},"custom_domain":{"type":"string","nullable":true},"custom_domain_status":{"type":"string","nullable":true},"published_url":{"type":"string","nullable":true,"description":"The live website address. Null until the project is published."},"last_published_at":{"type":"string","format":"date-time","nullable":true},"preview_image_url":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"last_opened_at":{"type":"string","format":"date-time","nullable":true}}},"Template":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string"},"thumbnail_url":{"type":"string","nullable":true},"is_public":{"type":"boolean"},"is_featured":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"Plan":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"price":{"type":"number"},"interval":{"type":"string","enum":["monthly","yearly"]},"max_sites":{"type":"integer"},"max_ai_messages_daily":{"type":"integer"},"can_export_code":{"type":"boolean"},"can_use_custom_domain":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"Analytics":{"type":"object","properties":{"totalViews":{"type":"integer"},"uniqueVisitors":{"type":"integer"},"topPages":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"views":{"type":"integer"}}}},"topReferrers":{"type":"array","items":{"type":"object","properties":{"referrer":{"type":"string"},"views":{"type":"integer"}}}},"dailyViews":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"views":{"type":"integer"}}}},"deviceBreakdown":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string"},"views":{"type":"integer"}}}}}},"Webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}}},"parameters":{"LimitParam":{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":100},"description":"Number of records to return (max 100)"},"OffsetParam":{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Number of records to skip"}},"responses":{"Unauthorized":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"API key lacks required permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded (100 req/min per API key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/clients":{"get":{"operationId":"listClients","summary":"List clients","tags":["Clients"],"responses":{"200":{"description":"Client list","content":{"application/json":{"schema":{"type":"object","properties":{"clients":{"type":"array","items":{"$ref":"#/components/schemas/Client"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"List 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 API key's organization; a key never sees another organization's clients."},"post":{"operationId":"createAClient","summary":"Create a client","tags":["Clients"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"},"company":{"type":"string"},"plan_id":{"type":"string","format":"uuid"}}}}}},"responses":{"201":{"description":"Client created","content":{"application/json":{"schema":{"type":"object","properties":{"client":{"$ref":"#/components/schemas/Client"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Create 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 attached to a plan with `plan_id`. Returns the new client record."}},"/clients/{clientId}":{"get":{"operationId":"getClientDetails","summary":"Get client details","tags":["Clients"],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Client details","content":{"application/json":{"schema":{"type":"object","properties":{"client":{"$ref":"#/components/schemas/Client"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Fetch one client by id, including status, plan and payment status. Returns 404 if the client does not belong to the calling organization."},"patch":{"operationId":"updateAClient","summary":"Update a client","tags":["Clients"],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"company":{"type":"string"},"status":{"type":"string","enum":["invited","active","suspended","churned"]},"plan_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Client updated","content":{"application/json":{"schema":{"type":"object","properties":{"client":{"$ref":"#/components/schemas/Client"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Update 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":{"get":{"operationId":"listProjects","summary":"List projects","tags":["Projects"],"parameters":[{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OffsetParam"},{"name":"client_id","in":"query","schema":{"type":"string","format":"uuid"},"description":"Filter by client ID"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Case-insensitive partial match on the project name"},{"name":"status","in":"query","schema":{"type":"string"},"description":"Filter by status"}],"responses":{"200":{"description":"Project list","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"total":{"type":"integer"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"List 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. Supports pagination (`limit`, `offset`) and filtering by client or status. `published_url` is the live address of a published site."},"post":{"operationId":"createAProjectForAClient","summary":"Create a project for a client","tags":["Projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["client_email","name"],"properties":{"client_email":{"type":"string","format":"email"},"name":{"type":"string"},"description":{"type":"string"},"template_id":{"type":"string","format":"uuid","description":"Clone files from an org template"}}}}}},"responses":{"201":{"description":"Project created","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"},"builder_url":{"type":"string","format":"uri"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Create 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 can then be built through the builder, `Build with URL`, or the MCP tools. Returns the new project."}},"/projects/{projectId}":{"get":{"operationId":"getProjectDetails","summary":"Get project details","tags":["Projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Project details","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Fetch one project by id, including publish state, subdomain, custom domain and preview image. Returns 404 for projects outside the caller's scope."},"patch":{"operationId":"updateAProject","summary":"Update a project","tags":["Projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"}}}}}},"responses":{"200":{"description":"Project updated","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Update 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."},"delete":{"operationId":"deleteAProject","summary":"Delete a project","tags":["Projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Project deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"},"id":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Permanently delete a project and unpublish its site. This cannot be undone; archive with PATCH `status: archived` to keep the files. Returns 204 on success."}},"/templates":{"get":{"operationId":"listOrgTemplates","summary":"List org templates","tags":["Templates"],"responses":{"200":{"description":"Template list","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/Template"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"List the organization's private templates (snapshots of projects that new client sites can start from). Does not include WeInc's public template catalogue."},"post":{"operationId":"createATemplate","summary":"Create a template","tags":["Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"source_project_id":{"type":"string","format":"uuid","description":"Snapshot files from an existing project"},"is_public":{"type":"boolean","default":false}}}}}},"responses":{"201":{"description":"Template created","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/Template"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Create a template for the organization, optionally snapshotting the files of an existing project (`source_project_id`). Templates can be marked public within the organization so every client can start from them."}},"/templates/{templateId}":{"get":{"operationId":"getTemplateDetails","summary":"Get template details","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Template details","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/Template"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Fetch one template by id, including its category and whether it is shared with all of the organization's clients."},"patch":{"operationId":"updateATemplate","summary":"Update a template","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"thumbnail_url":{"type":"string","format":"uri"},"is_public":{"type":"boolean"},"is_featured":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Template updated","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/Template"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Update a template's name, description, category or `is_public` flag. The captured files are not changed. Returns the updated template."},"delete":{"operationId":"deleteATemplate","summary":"Delete a template","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Template deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"},"id":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Delete a template. Projects already created from it are unaffected. Returns 204 on success."}},"/plans":{"get":{"operationId":"listClientPlans","summary":"List client plans","tags":["Plans"],"responses":{"200":{"description":"Plan list","content":{"application/json":{"schema":{"type":"object","properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"List the client-facing plans the organization sells (name, price, interval, limits). Plans are billed to clients through the organization's Stripe Connect account."},"post":{"operationId":"createAClientPlan","summary":"Create a client plan","tags":["Plans"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","price"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"price":{"type":"number","minimum":0},"interval":{"type":"string","enum":["monthly","yearly"],"default":"monthly"},"max_sites":{"type":"integer","default":3},"max_ai_messages_daily":{"type":"integer","default":50},"can_export_code":{"type":"boolean","default":false},"can_use_custom_domain":{"type":"boolean","default":false}}}}}},"responses":{"201":{"description":"Plan created","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/Plan"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Create a client-facing plan with a price, billing interval and feature limits. The plan becomes available to attach to clients immediately. Returns the new plan."}},"/plans/{planId}":{"get":{"operationId":"getPlanDetails","summary":"Get plan details","tags":["Plans"],"parameters":[{"name":"planId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Plan details","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/Plan"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Fetch one client-facing plan by id, including its price, billing interval, feature limits and whether it is active."},"patch":{"operationId":"updateAPlan","summary":"Update a plan","tags":["Plans"],"parameters":[{"name":"planId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"price":{"type":"number"},"interval":{"type":"string","enum":["monthly","yearly"]},"max_sites":{"type":"integer"},"max_ai_messages_daily":{"type":"integer"},"can_export_code":{"type":"boolean"},"can_use_custom_domain":{"type":"boolean"},"is_default":{"type":"boolean"},"is_active":{"type":"boolean"},"sort_order":{"type":"integer"}}}}}},"responses":{"200":{"description":"Plan updated","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/Plan"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Update a plan's name, price, interval, limits or active flag. Existing subscriptions keep their current price until renewed. Returns the updated plan."}},"/analytics":{"get":{"operationId":"getAggregatedAnalytics","summary":"Get aggregated analytics","tags":["Analytics"],"parameters":[{"name":"days","in":"query","schema":{"type":"integer","default":30,"maximum":365},"description":"Number of days to look back"},{"name":"project_id","in":"query","schema":{"type":"string","format":"uuid"},"description":"Filter analytics for a specific project"}],"responses":{"200":{"description":"Analytics data","content":{"application/json":{"schema":{"type":"object","properties":{"analytics":{"$ref":"#/components/schemas/Analytics"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Aggregated 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 project with `project_id`."}},"/webhooks":{"get":{"operationId":"listWebhookEndpoints","summary":"List webhook endpoints","tags":["Webhooks"],"responses":{"200":{"description":"Webhook list","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"List the webhook endpoints registered by the organization and the events each one subscribes to."},"post":{"operationId":"registerAWebhookEndpoint","summary":"Register a webhook endpoint","tags":["Webhooks"],"description":"The webhook secret is returned only in the creation response. Store it securely to verify webhook signatures.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["client.created","client.updated","project.created","project.published","payment.received","form.submitted"]},"minItems":1}}}}}},"responses":{"201":{"description":"Webhook created (includes secret)","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","properties":{"secret":{"type":"string","description":"HMAC secret for verifying payloads. Shown only on creation."}}}]}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhooks/{webhookId}":{"get":{"operationId":"getWebhookDetails","summary":"Get webhook details","tags":["Webhooks"],"parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Webhook details","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Fetch one webhook endpoint by id, including its URL, subscribed events and active flag. The signing secret is not returned again."},"patch":{"operationId":"updateAWebhook","summary":"Update a webhook","tags":["Webhooks"],"parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["client.created","client.updated","project.created","project.published","payment.received","form.submitted"]}},"is_active":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Webhook updated","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Update a webhook endpoint's URL, subscribed events or active flag. Returns the updated endpoint."},"delete":{"operationId":"deleteAWebhook","summary":"Delete a webhook","tags":["Webhooks"],"parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Webhook deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"},"id":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"description":"Delete a webhook endpoint. Pending deliveries to it are dropped. Returns 204 on success."}}}}