Authentication
Every documented developer API call carries a secret Bearer token. Secret keys are minted in your console and shown once at creation. Store them in your backend secret manager, never in client code. The key dialog defaults to this server-safe key type.
curl https://proseid.com/api/v1/schemas \ -H "Authorization: Bearer proseid_sk_..." \ -H "Content-Type: application/json"
Missing, invalid, or revoked tokens return 401 Unauthorized. A valid token that lacks the endpoint's validate, records, proof, schemas, or flows scope returns 403 Forbidden. Rate-limited requests return 429 with a Retry-After header.
{
"error": {
"code": "validation_failed",
"message": "the document did not pass validation",
"details": { ... }
}
}Idempotency
Pass an Idempotency-Key header when creating or updating a schema, or creating a Flow, to make network retries safe. The same key and same request body returns the original resource; the same key with different content returns 409 idempotency_conflict.
curl https://proseid.com/api/v1/schemas \ -H "Authorization: Bearer proseid_sk_..." \ -H "Idempotency-Key: order_8f3a9b2c" \ -H "Content-Type: application/json" \ -d '{"schema":{...complete schema body...},"message":"Initial private release"}'
- → Use a unique key per logical operation (order ID, claim ID, etc.) — not per HTTP retry.
- → Same key + different body returns 409 Conflict.
- → Keys are scoped to your API key. Two separate keys can use the same Idempotency-Key independently.
Create and update private releases
Management calls use a secret key with the schemas scope. Send one complete schema body to create its first runnable private release. Send one complete higher-version body to update it. ProseID performs validation, change preparation, and private publication as one operation while retaining the same immutable version history as the workspace.
The API key decides the organization; an orgId is never trusted from the request. API-created schemas and API-published updates are always private and can be used immediately by Flows owned by that organization. Passing "visibility": "public" returns public_visibility_not_allowed. Public Registry publication remains a deliberate workspace action.
POST /api/v1/schemas validates and privately releases the schema, then returns its internal schema_id and version.
PUT /api/v1/schemas/{schema_id} validates and privately releases one complete next version without exposing working-draft internals.
POST /api/v1/schemas Idempotency-Key: customer-eu-policy-v1 { "schema": { "protocol": "Proseid_v1.0", "schema_id": "acme/can-i-use-ai-eu", "version": "1.0.0", "metadata": { ... }, "definitions": { ... }, "state_model": { ... }, "logic_tree": [ ... ] }, "message": "Initial company AI policy", "changelog": "Initial private release" } → { "schema_id": "schema-document-id", "id": "schema-document-id", "version": "1.0.0", "visibility": "private", "status": "published", "compatible_surfaces": ["determination"], "duplicate": false }
PUT /api/v1/schemas/{schema_id} Idempotency-Key: customer-eu-policy-v2 { "schema": { ...complete schema body with version 1.1.0... }, "expected_current_version": "1.0.0", "message": "Apply the revised company AI policy", "changelog": "Updated tool and information safeguards" } → { "schema_id": "schema-document-id", "version": "1.1.0", "visibility": "private", "status": "published", "compatible_surfaces": ["determination"], "duplicate": false }
The replacement body must use the next valid numbered or date-based version. ProseID creates the internal working copy, change entry, and immutable private release through one idempotent API operation. A working version already open in the workspace returns working_version_exists instead of being overwritten. If a release loses compatibility, a Flow following latest is kept on its preceding compatible version.
Common stable errors include schema_details_incomplete, invalid_schema_version, schema_version_changed, working_version_exists, schema_not_runnable, public_visibility_not_allowed, and review_open. Release failures include actionable engine and renderer issues in error.details.issues when available.
Turn a published schema into a reusable Flow
Call POST /api/v1/flows with a secret key carrying the flows scope. Pass the schema_id returned by schema creation. The schema must already be published, and it may be public from any publisher or private and owned by the API key’s organization. flow_type is required and must be form, guided_assessment, determination, or checklist; it must also be compatible with that exact release.
POST /api/v1/flows Idempotency-Key: customer-eu-determination { "schema_id": "schema-document-id", "schema_version": "latest", "flow_type": "determination", "title": "Can I use AI?", "internal_label": "Customer portal · production", "slug": "can-i-use-ai", "visibility": "unlisted", "completion_access": "open", "presentation_theme": "light", "embed_attribution": "full", "embed_origins": ["https://app.example.com"], "signing_mode": "none", "deliver_webhook": true, "metadata": { "workspace_id": "workspace_8f3a9b2c" } } → { "flow_id": "flow-document-id", "flow": "acme/can-i-use-ai", "flow_type": "determination", "status": "active", "pricing": { ...frozen price... }, "duplicate": false }
completion_access accepts issued_link (browser-bound recipient links), open (the stable hosted URL may submit), or embed_only (only exact websites in embed_origins, authenticated with a publishable key, may submit). An embed_only Flow with no allowed origins is safely unavailable until websites are added from its Flow details page.
Configure one HTTPS endpoint in Workspace → Webhooks. ProseID generates the organization signing secret on the server and shows it once. Flow creation accepts only deliver_webhook: true; webhook_url and webhook_secret are rejected. If the organization endpoint is not configured, enabling delivery returns webhook_not_configured. Email delivery remains per Flow and uses deliver_email plus email_to.
The server derives the publisher route from the organization and freezes the trusted base rate, publisher fee, signing cost, and attribution mode. Request-supplied prices and publisher identities are ignored.
The returned schema_id is the internal ProseID document ID used by Flow creation. It is different from the publisher-qualified logical schema.schema_id stored inside the schema body. Save the returned value. Flow creation returns the canonical flow_id used by the SDK and a separate publisher/slug address for the hosted Flow. The slug must contain only lowercase letters, numbers, and dashes, start and end with a letter or number, and be no longer than 64 characters. Oversized slugs return invalid_flow_slug_length; malformed slugs return invalid_flow_slug_format. Optional internal_label is private workspace text of up to 80 characters for distinguishing similarly named Flows; it is never copied into the public Flow. Optional metadata is a bounded 4KB JSON object fixed to the Flow and returned as flow_metadata in every completion webhook, which is useful for a customer workspace ID.
Run the rules that applied on that date
A schema may contain continuous temporal_map periods. Send effective_at as a real YYYY-MM-DD date to validate historical answers without creating a record. Hosted and embedded completions bind the current UTC date supplied by their server manifest; a Flow left open across midnight must reload.
ProseID issues today's date in the server manifest and binds it to the completion. A Flow left open across UTC midnight reloads before it can complete against stale rules.
Your trusted backend may supply a present or past date to the free validation endpoint. Final records are created only by hosted or embedded Flows, which bind their server-issued effective date into the record and signed proof.
Time periods must be ordered, continuous, and non-overlapping; only the final period may have an open end. Rules without a rule-set assignment apply during every period. An invalid map or uncovered date fails closed.
Validate without creating a record
Call POST /api/v1/validate/{publisher}/{slug} to run an answer document against the schema currently bound to a published Flow. This route uses the validate scope and is free: it creates no record, proof, delivery, or debit.
POST /api/v1/validate/acme/employee-onboarding { "responses": { "full_name": "Dana Lee", "start_date": "2026-07-01" }, "effective_at": "2026-07-01" }
{
"valid": true,
"status": "READY",
"definitions": { ... },
"effective_at": "2026-07-01",
"temporal_context": { "logic_version": "rules_2026", "valid_range": ["2026-01-01", null] },
"issues": []
}{ "error": {
"code": "validation_failed",
"details": {
"status": "INCOMPLETE",
"issues": [ ... ]
}
} }Know what failed before you retry
Every handled non-2xx /api/v1/* response uses the same error.code, error.message, and optional error.details envelope. Branch on the stable code, not the human message. The table covers the current server endpoints; individual sections describe endpoint-specific constraints. A state-hiding endpoint may return a different HTTP status for the same stable code—for example, an unavailable Flow is concealed during validation but reported as a conflict when issuing a link.
invalid_request · invalid_flow_type · invalid_schema · prepare_message_required · invalid_changelog · invalid_webhook_configuration · invalid_delivery_email · invalid_embed_origin · invalid_metadata · invalid_effective_date · invalid_record_ids · reason_required · invalid_idempotency_key Correct the request fields, release message, delivery configuration, metadata, record IDs, or idempotency key before retrying.
unauthorized · publishable_key_not_allowed Replace or correct the credential. Server endpoints require a secret key.
forbidden · publisher_mismatch · public_visibility_not_allowed Use a correctly scoped key from the owning organization. Public schema publication remains workspace-only.
schema_not_found · flow_not_found · flow_unpublished · record_not_found · proof_unavailable · flow_link_not_found · organization_not_found Confirm the identifier, ownership and release state. Missing and cross-tenant resources deliberately return the same response.
idempotency_conflict · schema_details_incomplete · invalid_schema_version · schema_version_changed · working_version_exists · schema_not_runnable · private_schema_required · schema_deprecated · review_open · release_not_found · flow_unpublished · schema_unavailable · schema_incompatible · flow_link_taken · webhook_not_configured · signing_unavailable · record_unavailable · already_completed Resolve the resource state or version conflict before retrying. Reuse an idempotency key only with the identical request.
payload_too_large Reduce the request body below the endpoint limit.
validation_failed · flow_misconfigured · schema_unavailable Correct the answers or Flow configuration. Validation details identify the affected fields when available.
rate_limited Wait for the Retry-After interval, then retry with backoff.
upstream_unavailable · schema_unavailable A required dependency or release read failed. Retry with bounded exponential backoff.
not_configured · deletion_unavailable Wait for service recovery before retrying the operation.
Retrieve the completed record
Call GET /api/v1/records/{recordId} with the records scope. The server confirms that the key belongs to the record's organization and decrypts the response fields from KMS-backed storage. A missing, foreign, pending-deletion, or deleted record returns the same 404 record_not_found response.
GET /api/v1/records/k9Zx7Qm3nR8pT2vB1cY5wJ { "recordId": "k9Zx7Qm3nR8pT2vB1cY5wJ", "status": "completed", "flow_id": "8f3a9b2c1d4e", "schema_id": "employee-onboarding", "schema_version": "3.0.0", "effective_at": "2026-07-01", "logic_version": "rules_2026", "temporal_range": ["2026-01-01", null], "publisher": "acme", "signed": false, "costMicrons": 200, "completedAt": "2026-07-15T18:42:11.000Z", "responses": { "full_name": "Dana Lee", "start_date": "2026-07-01" }, "metadata": { "orderId": "order_8f3a9b2c" } }
Schedule customer-directed deletion
Call POST /api/v1/records/deletions with the records scope to schedule up to 100 records owned by the API-key organization. Access ends immediately. The protected contents enter the standard 30-day recovery window and are then permanently purged by the deletion worker. The permanent Record ID continues to resolve at /records/{id} to a payload-free lifecycle tombstone with the completion time where retained, deletion time and deletion reference. It never exposes or verifies the deleted contents. Repeating the request for an already scheduled record is safe.
POST /api/v1/records/deletions { "record_ids": ["k9Zx7Qm3nR8pT2vB1cY5wJ"], "reason": "Customer workspace deleted" } → 202 { "status": "scheduled", "deletion_due_at": "2026-08-28T…" }
Resolve a schema release
Call GET /api/v1/schemas/{schemaId} with the schemas scope. Add ?version=3.0.0 to pin an immutable release; without it, the route resolves the current version. Public releases are readable by any organization key. Private and draft schemas are readable only by their owning organization.
The response includes convenient top-level projections of the release metadata: description, language, legalReferences, and jurisdictions. The canonical schema body retains its own metadata object; neither copy becomes a respondent input.
GET /api/v1/schemas/schema-document-id?version=3.0.0 { "id": "schema-document-id", "title": "Employee onboarding", "publisher": "acme", "version": "3.0.0", "description": "A 72-hour personal-data-breach notification workflow.", "language": "en", "legalReferences": [{ "instrument": "Regulation (EU) 2016/679 (GDPR)", "provision": "Article 33", "source_url": "https://eur-lex.europa.eu/eli/reg/2016/679/oj" }], "jurisdictions": ["SE", "EEA"], "published": true, "visibility": "public", "deprecated": false, "maintenanceStatus": "maintained", "lineage": null, "schema": { ...canonical schema body... } }
Verify without trusting our API
Call GET /api/v1/records/{recordId}/proof with the proof scope. Current proofs use an ES256 signature whose private key stays inside Google Cloud KMS. The proof's kid selects a public key from our public JWKS. Save that public key set to verify later without calling ProseID. Add ?format=pdf to download the server-rendered proof certificate instead of JSON.
{ "proof_version": 2, "issuer": "https://proseid.com", "canonicalization": "proseid-json-v2", "alg": "ES256", "kid": "public-key-thumbprint", "jwks_uri": "https://proseid.com/.well-known/proseid-jwks.json", "signed_at": "2026-07-15T18:42:11.000Z", "record_id": "…", "flow_id": "…", "schema_id": "employee-onboarding", "schema_version": "3.0.0", "effective_at": "2026-07-01", "logic_version": "rules_2026", "temporal_range": ["2026-01-01", null], "publisher": "acme", "status": "READY", "responses_hash": "…", "output_hash": "…", "completed_at": "2026-07-15T18:42:11.000Z", "signing_provider": "", "signing_reference": "", "signature": "…" }
The kid is part of the signed envelope. When ProseID rotates its signing key, the JWKS retains old public keys so historical proof-v2 records continue to verify.
Webhook delivery
A newly created Flow starts at a $0.20 base price per completed record (200 microns). A registry publisher fee, future provider-backed signing charge, or embedded hidden-attribution surcharge may increase the clearly presented total. The accepted pricing breakdown is frozen on the Flow, so later price changes cannot reprice it. Validation through /api/v1/validate/{publisher}/{slug} is free. When an opted-in Flow completes, ProseID immediately POSTs to the organization webhook endpoint with a 10-second timeout. A transient failure enters the durable retry queue. Poll GET /api/v1/records/{id} as the source of truth—delivery is separate from completion and billing.
{ "event": "record.completed", "event_version": 1, "test": false, "record_id": "k9Zx7Qm3nR8pT2vB1cY5wJ", "flow_id": "8f3a9b2c1d4e", "flow_type": "guided_assessment", "interface_language": "en", "schema_id": "employee-onboarding", "schema_version": "3.0.0", "effective_at": "2026-07-01", "logic_version": "rules_2026", "temporal_range": ["2026-01-01", null], "publisher": "acme", "signed": false, "signing_mode": "none", "signing_provider": null, "cost_microns": 200, "source": "hosted", "completed_at": "2026-07-15T18:42:11.000Z", "flow_metadata": { "workspace_id": "workspace_8f3a9b2c" }, "metadata": null, "responses": { ...Flow answers... }, "signature": null }
Verify the request came from us using the X-Proseid-Signature header — an HMAC-SHA256 of the raw body keyed with your organization webhook secret. X-Proseid-Event is record.completed. Workspace → Webhooks can send the same full payload with test: true, actual fields from one of the organization’s published Flows, and a test record ID. It shows the final HTTP status and response preview, creates no record, and uses no balance.
- → Unsigned completions use signing_mode "none". Basic typed-name signatures use signing_mode "basic" and remain at the Flow’s frozen standard price (currently $0.20 for new Flows).
- → Each organization has exactly one endpoint and one signing secret. ProseID generates the secret server-side, stores it encrypted, and shows it only when first created or rotated. Owners, administrators, and developers manage it in Workspace → Webhooks; individual Flows only opt in or out.
- → Retries use backoff — roughly 2 min, then 10 min, 1 h, 6 h, and 24 h after the first attempt (6 attempts total). After the last attempt, delivery is marked permanently failed and the organization is notified.
- → Respond 2xx within 10s. Anything else (or a timeout) counts as failed and triggers a retry.
The endpoint and signing secret are configured once per organization; each Flow opts in or out. A record is billed the moment it completes, whether or not webhook delivery succeeds. If you'd rather not use webhooks, GET /api/v1/records/{id} remains the source of truth.
Flow links
Instead of POSTing answers yourself, issue a browser-bound link your end user opens and completes. New hosted Flows require these one-time links by default, so a shareable public preview cannot submit or use your balance; opening completion to anyone with the stable link is an explicit Flow setting. The first browser to open an issued link claims it; only that browser can finish it. Flows configured as embed_only never accept or issue one-time links—the Flow Links API returns flow_embed_only. The hosted Flow uses the experience selected by its publisher—Standard Form, Guided Assessment, Determination or Compliance Checklist—shows the remaining time, and saves unfinished work in that browser, so a refresh or resent link does not erase it. Nothing is billed until they confirm; the Flow’s frozen per-completion price covers the whole experience, including an entire checklist.
POST /api/v1/flow-links { "flow": "acme/employee-onboarding", "recipient_email": "[email protected]", "send_email": true, "expires_in_days": 14 } → { "token": "…", "url": "https://proseid.com/flow-links/…", "status": "pending", "emailed": true }
Poll GET /api/v1/flow-links/{token} for its stored state (pending → opened → completed | cancelled). The response also returns the authoritative expiresAt deadline; expired links are rejected when opened but are not rewritten to a stored expired status. Once completed, the response returns the completedRecordId you read through GET /api/v1/records/{id}.
GET /api/v1/flow-links/{token} → { "token": "…", "status": "completed", "flowId": "8f3a9b2c1d4e", "url": "https://proseid.com/flow-links/…", "recipientEmail": "[email protected]", "completedRecordId": "k9Zx7Qm3nR8pT2vB1cY5wJ", "expiresAt": "2026-07-29T18:42:11.000Z", "createdAt": "2026-07-15T18:42:11.000Z" }
DELETE /api/v1/flow-links/{token} → { "token": "…", "status": "cancelled" }
- → Cancel works even after the link has been opened; an in-progress respondent gets a clean cancelled screen. A completed link cannot be cancelled (409).
- → expires_in_days is optional (default 14, clamped to 1–365). Past expiresAt the link stops working even though its stored status remains pending or opened.
- → Use flow_id instead of flow when you have the internal Flow document ID. recipient_name is optional. The complete request body may not exceed 8KB.
- → When send_email is true, recipient_email must be valid. The response reports emailed and, when delivery fails, email_error; the link is still created so you can share its url yourself.
- → All three calls use the records scope and only ever touch your own org’s links.