Skip to main content
Both hosts use Entra ID bearer tokens. The tenant comes only from the token (tid); no route, query or body value can select a tenant in the customer-facing API.

Valedo.API

GET /api/v1/signature

GET /api/admin/tenant

Templates and rules

Templates and rules live in the Cosmos DB config container of the caller’s tenant. Reads are allowed in every readable lifecycle state, including the retrieval period; changes are refused in the retrieval period (tenant_read_only). Valedo.Admin includes every Valedo.User permission. Concurrency. Every template and rule response carries an eTag. PUT requires it in the If-Match header: a missing header returns 400 validation_failed, a stale one returns 409 concurrency_conflict. Read the document again and retry. Templates. Request body of POST and PUT (SaveTemplateRequest): A new template is a draft with currentVersion 0. Publishing (immutable versions and the compiled snapshot) is not part of these endpoints yet, so PUT edits the working copy and leaves status and currentVersion unchanged. DELETE returns 409 template_in_use while any rule selects the template. Rules. Request body of POST and PUT (SaveRuleRequest): Only these fields exist so far; sender, schedule and condition rules (README §5.2) are added with the rule engine.

POST /api/marketplace/webhook

Called by Microsoft Marketplace, never by customers. Authorization is a separate bearer scheme: aud = the Valedo Marketplace app ID, tid = the publisher tenant, appid or azp = 20e940b3-4c77-4b0b-9a53-9e16a1b010a7 (Marketplace SaaS API). The body is read tolerantly (only id, action, subscriptionId) and stored as is; the Worker confirms it with Get Operation before acting (README §4.8). The body contains email addresses and is never logged.

Publisher API

The Publisher API is a separate host and token audience, restricted to users of the publisher’s own Entra tenant with publisher roles (Valedo.Publisher.Admin, Valedo.Publisher.Support, Valedo.Publisher.Finance). Tokens are issued for api://{Publisher Console app ID}/access_as_user. Tenant IDs in routes are accepted on this host only, because it is the one place allowed to read across customers.

GET /api/publisher/tenants

GET /api/publisher/tenants/

GET /api/publisher/marketplace-events

Reads the raw webhook events Valedo.API stored in the publisher container, so staff can find events that need a person.

GET /api/publisher/marketplace-events/

eventId is the Marketplace operation ID.

Errors

Errors are RFC 7807 ProblemDetails with a stable snake_case errorCode and a traceId. The constants live in src/Valedo.Domain/Exceptions/ErrorCodes.cs; the HTTP mapping is in src/Valedo.Api/Middleware/GlobalExceptionHandler.cs. New codes are added together with the feature that raises them, and documented here.

OpenAPI

The Valedo.API emits its OpenAPI document to src/Valedo.Api/openapi/Valedo.Api.json on build. Only Valedo.API paths appear there; the /healthz probes are documented on this page.