mementom Developer

Mementom Partner API

API Reference

REST endpoints for connecting an anonymous customer relationship, requesting a protected action, and consuming a signed decision.

See this API in the Aster demo
Version
v1
Base URL
https://mementom.app/api/v1
Format
application/json

Start here

What Mementom does

Mementom lets a person privately prove that they are the same person a company has seen before—or that they have the right to complete one exact action—without giving that company their name, email address, private image, or private phrase.

The person creates a private key ring from images and phrases they choose. A company can then ask Mementom one clear question at the moment it matters. Mementom checks the person privately and returns only the result the company needs.

The central idea

What is a challenge?

A challenge is one time-limited request from a company asking a person to prove that they have the right to do one exact thing.

That might mean signing in, entering a protected part of a site, taking a sensitive action, authorizing an action on the person’s behalf, receiving chosen personalization, or continuing a prior session or experience. A challenge can also require proof of the right to authorize a real-world event, such as allowing a technician into a home.

A challenge is not the person’s identity, an open-ended login, or permission to do anything else. It is bound to the action and context the company describes when it creates the challenge.

One challenge, from beginning to end

  1. The company sets up

    It registers its application and names the kinds of requests it will make with challenge tags.

  2. The person connects

    The company starts a connection. The person chooses Mementom, and the company keeps only the anonymous relationship Mementom returns.

  3. The company asks

    At the moment of need, it creates one challenge that says exactly what is being requested and what it applies to.

  4. Mementom checks privately

    Inside the secure Mementom window, Mementom presents a private phrase. The person submits the matching key-ring image as proof of right. The company cannot see or access the window, phrase, image, or proof data.

  5. The company gets one result

    It retrieves the decision, confirms it matches the request, and uses it once before taking the action.

Plain-language glossary

The words used in this API

These names describe the pieces of the relationship. Select any linked term to jump to the API operation that creates or uses it.

Overview

Authentication

Partner requests use an HTTP Bearer credential issued when Mementom provisions a vendor. Send the credential only from backend services over HTTPS.

The credential has the form {vendorId}.{clientSecret}. Mementom authenticates it and derives the vendor scope. Do not repeat vendorId in request bodies unless an endpoint explicitly documents the field.

Headers

HeaderRequiredValue
AuthorizationYesBearer {vendorCredential}
Content-TypePOSTapplication/json

Overview

Object IDs

IDs are opaque strings. Store them exactly as returned. Prefixes identify the object type; they do not grant access.

PrefixObjectCreated by
vnd_VendorVendor provisioning
app_ApplicationCreate application
pol_Assurance policyCreate assurance policy
rkey_Response keyCreate response key
ctag_Challenge tagCreate challenge tag
vsub_Vendor-scoped anonymous subjectConnection code exchange
chal_ChallengeCreate challenge
result_Decision resultCompleted challenge

Overview

Errors

The API uses standard HTTP response status codes and returns a stable machine-readable error value. A human-readable message may also be present.

StatusMeaning
400Invalid request or unavailable ceremony state
401Missing or invalid vendor credential
404Resource is unavailable in the authenticated vendor scope
409Version, idempotency, lifecycle, or consumption conflict
500Unexpected service error

Idempotency

gateRequestId is the idempotency key for creating a challenge. Replaying an identical request returns the same challenge. Reusing the ID with changed bindings returns 409 gate_request_conflict.

POST/applications

Create an application

Registers one web, native, service, or device application under the authenticated vendor.

Body parameters

ParameterTypeRequired
displayNamestringYes
applicationTypeenumYes
redirectUrisstring[]Yes
allowedOriginsstring[]Yes
brandingobjectNo
POST/assurance-policies

Create an assurance policy

Defines the minimum number of complete memkey proofs required for a relationship and the number of complete-key proofs required for recovery. Two distinct image-and-phrase pairs remain two memkeys even when they use the same image.

Body parameters

ParameterTypeRequired
namestringYes
minimumMemkeysintegerYes
recoveryProofsintegerNo
POST/response-keys

Create a response key

Registers the RSA public JWK Mementom uses to encrypt decisions. Keep the corresponding private key in the partner backend.

Body parameters

ParameterTypeRequired
applicationIdstringNo
publicJwkRSA JWKYes
POST/challenge-tags

Create a challenge tag

Creates a reusable protected-action type. Runtime challenge requests use the returned challengeTagId, not the human-readable key.

Body parameters

ParameterTypeRequired
keystringYes
displayNamestringYes
descriptionstringYes
coverageCountintegerNo
minimumMemkeysintegerNo
retryLimitintegerNo
distinctFromAccessbooleanNo
responseKeyIdstringYes
networkPolicyIdstringNo
GET/challenge-tags

List challenge tags

Returns every challenge tag owned by the authenticated vendor.

POST/connection-requests

Create a connection request

Starts a one-use Mementom connection ceremony. Persist the cryptographic state before opening the returned consumerUrl.

If establishing the relationship is also the first exact protected action, include authorization. The person then provides one Mementom proof; exchanging the returned code creates the anonymous session and returns a resultId for that same action. Omit it when connection and authorization are separate moments.

Body parameters

ParameterTypeRequired
applicationIdstringYes
policyIdstringYes
returnUriURIYes
visiblePurposestringYes
requestedRightsstring[]Yes
visibleConsequencestringYes
statestringYes
opaqueCustomerReferencestringNo
authorizationobjectNo
POST/connections/session

Exchange a connection code

After validating the callback state, exchange the one-use code for a short-lived Mementom session and a durable vendor-scoped subject ID.

When the connection request carried an authorization object, this response also includes resultId. Retrieve, verify, and consume it through the normal decision flow; do not create a second challenge for the same action.

Body parameters

ParameterTypeRequired
applicationIdstringYes
codestringYes
POST/connections/remove

Remove a connection

Terminates the vendor relationship for one vendorSubjectId and invalidates its active sessions, challenges, decisions, and entitlements.

POST/challenges

Create a challenge

Creates one protected action bound to an application, session, anonymous subject, challenge type, application state, and exact resource digest.

Body parameters

ParameterTypeRequired
applicationIdstringYes
sessionIdstringYes
challengeTagIdstringYes
gateRequestIdstringYes
statestringYes
actionstringYes
resourceDigestSHA-256 digestYes
visibleDetailsobjectYes
returnUriURIYes

visibleDetails

PropertyTypeRequired
actionLabelstringNo
resourceSummarystringYes
consequencestringYes
expiresAtISO 8601No
POST/decisions/retrieve

Retrieve a decision

Returns the encrypted decision envelope associated with the opaque result ID. The result must belong to the authenticated vendor and must not be expired.

Body parameters

ParameterTypeRequired
resultIdstringYes
POST/decisions/consume

Consume a decision

Atomically consumes a verified decision. The SDK normally performs retrieval, decryption, signature verification, binding verification, and consumption through handleResult.

Body parameters

ParameterTypeRequired
resultIdstringYes
noncestringYes
POST/entitlements/grant

Grant an entitlement

Allows one vendor-scoped subject to use one challenge tag. expiresAt is optional.

POST/entitlements/remove

Remove an entitlement

Removes access to one challenge tag and invalidates stale decisions for that entitlement.

POST/webhooks

Create a webhook endpoint

Registers an HTTPS receiver. The HMAC-SHA256 signing secret is returned once. Verify the raw request body with the timestamp and signature headers before processing an event.

Body parameters

ParameterTypeRequired
endpointUrlHTTPS URIYes

Delivery headers

HeaderValue
mementom-event-idUnique event ID
mementom-timestampUnix timestamp
mementom-signaturev1={base64url HMAC}
GET/events

List vendor events

Returns up to 100 recent events for the authenticated vendor, including decision.available and connection lifecycle events.

GET/audit

List audit events

Returns sanitized audit events for the authenticated vendor. Pass connectionId as an optional query parameter to filter the result.

All operations

Endpoint index

MethodPathPurpose
POST/applicationsCreate an application
POST/assurance-policiesCreate an assurance policy
POST/assurance-policies/updateUpdate policy with optimistic versioning
POST/response-keysCreate a decision response key
POST/response-keys/rotateRotate or compromise a response key
POST/network-policiesCreate a network policy
POST/challenge-tagsCreate a challenge tag
GET/challenge-tagsList challenge tags
POST/challenge-tags/updateUpdate challenge-tag configuration
POST/challenge-tags/lifecycleSuspend, activate, or retire a tag
POST/connection-requestsCreate a connection ceremony
POST/connections/sessionExchange a one-use connection code
POST/connections/removeRemove a vendor relationship
POST/entitlements/grantGrant access to a challenge tag
POST/entitlements/removeRemove access to a challenge tag
POST/challengesCreate a protected action
POST/decisions/retrieveRetrieve an encrypted decision
POST/decisions/consumeAtomically consume a decision
POST/forced-challenge-campaignsCreate a forced-challenge campaign
POST/forced-challenge-campaigns/activateActivate a scheduled campaign
POST/webhooksRegister a webhook endpoint
GET/eventsList vendor events
GET/auditList sanitized audit events