Download OpenAPI specification:
Submit and retrieve reviews, as well as aggregate statistics about reviews.
| pems required | Array of strings or null List of issuer public keys to get information about. Query allowing for retrieval of information about multiple subjects or issuers. |
| subs required | Array of strings or null <uri> [ items <uri > ] A map from Review identifiers ( List of subject URIs to get information about. |
{- "pems": [
- "string"
],
}{- "issuers": {
- "property1": {
- "count": 0,
- "credibility": 0,
- "did": "string"
}, - "property2": {
- "count": 0,
- "credibility": 0,
- "did": "string"
}
}, - "subjects": {
- "property1": {
- "confirmed_count": 0,
- "count": 0,
- "opinion_count": 0,
- "positive_count": 0,
- "quality": 0,
- "rating": 0,
}, - "property2": {
- "confirmed_count": 0,
- "count": 0,
- "opinion_count": 0,
- "positive_count": 0,
- "quality": 0,
- "rating": 0,
}
}
}The aggregator accepts a claimed pair of subjects once the
credibility-weighted support of the claim and its ratings reaches the
threshold. It writes each member of a class with the URI that names the
class, and members with one canonical_sub are one subject.
Without sub, the route returns every row in pages ordered by sub. The
next page starts after the last sub of the previous one, and a page
shorter than limit is the last. The JSON dump holds every row as well.
| sub | string <uri> Example: sub=https://nytimes.com The members of the classes this subject belongs to. A |
| after | string Rows whose |
| limit | integer <int64> [ 1 .. 1000 ] Most rows to return, from 1 to 1000, 1000 by default. |
{- "aggregated_at": 0,
}/reviews?bbox=xmin,ymin,xmax,ymax returns the same reviews and accepts
every other filter of /reviews, along with limit and offset.
The box spans xmin to xmax in longitude and ymin to ymax in
latitude, and -180, -90, 180, 90 covers the whole world. The response
holds at most the 1000 most recently signed reviews of places inside the
box, or 500 as N-Triples, each in its latest version. The other filters
are the defaults of /reviews, so claims stay out, and so do reviews of
test subjects unless examples is true.
| xmin required | number <float> Minimum longitude |
| ymin required | number <float> Minimum latitude |
| xmax required | number <float> Maximum longitude |
| ymax required | number <float> Maximum latitude |
| examples | boolean Include reviews of test subjects, as |
{- "issuers": {
- "property1": {
- "count": 0,
- "credibility": 0,
- "did": "string"
}, - "property2": {
- "count": 0,
- "credibility": 0,
- "did": "string"
}
}, - "maresi_subjects": {
- "property1": {
- "confirmed_count": 0,
- "count": 0,
- "opinion_count": 0,
- "positive_count": 0,
- "quality": 0,
- "rating": 0,
}, - "property2": {
- "confirmed_count": 0,
- "count": 0,
- "opinion_count": 0,
- "positive_count": 0,
- "quality": 0,
- "rating": 0,
}
}, - "reviews": [
- {
- "did": "string",
- "jwt": "string",
- "kid": "string",
- "original_sub": "string",
- "payload": {
- "action": { },
- "iat": 0,
- "images": { },
- "metadata": { },
- "opinion": { },
- "rating": { },
}, - "signature": "string"
}
]
}| pem required | string Example: -----BEGIN PUBLIC KEY-----MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDo6mN4kY6YFhpvF0u3hfVWD1RnDElPweX3U3KiUAx0dVeFLPAmeKdQY3J5agY3VspnHo1p/wH9hbZ63qPbCr6g==-----END PUBLIC KEY----- Request aggregate information about the reviewer. |
{- "count": 0,
- "credibility": 0,
- "did": "string"
}| signature required | string Example: PDSpnKtHioXykdBCMA15y5cLuYrRbSexscvySt_ryjppDWaW1I1AijjWercZE6K-cbS18bCwSmgIPqRIuL-cow Signature of the review being requested. |
{- "did": "string",
- "jwt": "string",
- "kid": "string",
- "original_sub": "string",
- "payload": {
- "action": { },
- "iat": 0,
- "images": { },
- "metadata": { },
- "opinion": { },
- "rating": { },
}, - "signature": "string"
}| q | string Example: q=restaurants in zurich Search for reviews that have this string in |
| signature | string Review with this |
| signature_prefix | string Example: signature_prefix=dBjftJeZ Reviews whose |
| kid | string Example: kid=-----BEGIN PUBLIC KEY-----MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDo6mN4kY6YFhpvF0u3hfVWD1RnDElPweX3U3KiUAx0dVeFLPAmeKdQY3J5agY3VspnHo1p/wH9hbZ63qPbCr6g==-----END PUBLIC KEY----- Reviews by issuer with the following PEM public key. |
| did | string Example: did=did:plc:z72i7hdynmk6r22z27h6tvur Reviews by every key bound to the identity with this DID. |
| alias | string Example: alias=bsky.app Reviews by every key bound to the identity that verified this alias, given without its scheme. |
| iat | integer <int64> Reviews issued at this UNIX time. |
| gt_iat | integer <int64> Reviews with UNIX timestamp greater than this. |
| scheme | string Example: scheme=geo Reviews of subjects with this URI scheme. |
| sub | string <uri> Reviews of the given subject URI. For a |
| bbox | string Example: bbox=5.9,45.8,10.5,47.8 Reviews of places inside this box, written |
| rating | integer <int16> [ 0 .. 100 ] Reviews with the given rating. |
| opinion | string Reviews with the given opinion. |
| limit | integer <int64> >= 1 Maximum number of reviews to return. Without it, a response holds at most 1000 reviews as JSON, 3000 as CSV and 500 as N-Triples. A limit above 3500 for JSON and N-Triples or above 7000 for CSV fails with status 400, and a response over 5.8 MB fails with status 413. |
| offset | integer <int64> >= 0 Number of reviews to skip before returning results. Used for pagination. Must be non-negative. |
| opinionated | boolean Only reviews which either contain or do not contain an opinion. |
| examples | boolean Include reviews of test subjects: pages on |
| min_credibility | number <float> [ 0 .. 1 ] Example: min_credibility=0.4 Reviews whose reviewer has a credibility of at least this value. The reviewer is the identity the key was bound to when the review was signed, else the key. A reviewer without a stored credibility fails. |
| issuers | boolean Include aggregate information about review issuers. |
| maresi_subjects | boolean Include aggregate information about reviews of returned reviews. |
| latest_edits_only | boolean For edited reviews, return only the most recent version (true by default) |
| action | string Example: action=equivalence Reviews with this action: |
{- "issuers": {
- "property1": {
- "count": 0,
- "credibility": 0,
- "did": "string"
}, - "property2": {
- "count": 0,
- "credibility": 0,
- "did": "string"
}
}, - "maresi_subjects": {
- "property1": {
- "confirmed_count": 0,
- "count": 0,
- "opinion_count": 0,
- "positive_count": 0,
- "quality": 0,
- "rating": 0,
}, - "property2": {
- "confirmed_count": 0,
- "count": 0,
- "opinion_count": 0,
- "positive_count": 0,
- "quality": 0,
- "rating": 0,
}
}, - "reviews": [
- {
- "did": "string",
- "jwt": "string",
- "kid": "string",
- "original_sub": "string",
- "payload": {
- "action": { },
- "iat": 0,
- "images": { },
- "metadata": { },
- "opinion": { },
- "rating": { },
}, - "signature": "string"
}
]
}| gt_iat | integer <int64> Count reviews with a UNIX timestamp greater than this. Without it, reviews of any date count. |
{- "clients": {
- "https://mangrove.reviews/search": 80,
- "https://mapcomplete.org/food.html": 120
}
}| sub required | string Example: https://nytimes.com Request aggregate information about the subject. |
{- "confirmed_count": 0,
- "count": 0,
- "opinion_count": 0,
- "positive_count": 0,
- "quality": 0,
- "rating": 0,
}Submit a Mangrove Review as a JWT in the request body, as plain text. The server handles it as PUT /submit/{jwt_review} handles the JWT of its path, and the description of that operation gives the format and the payload types.
A browser sends a POST with a text/plain body without a CORS preflight, so a submission costs one request. A body is free of the length limit of a URL, so a review of any allowed length fits. Leading and trailing whitespace of the body is ignored.
JWT string in format header.payload.signature.
Submit a Mangrove Review as a JWT. The system automatically detects the operation type based on the payload structure.
Standard JWT format: header.payload.signature
Header must include:
alg: "ES256" (ECDSA P-256)typ: "JWT"kid: Public key in PEM formatPayload is one of these types (see Payload schema in the API documentation):
sub (non-maresi), rating)sub (maresi), rating)sub (maresi), opinion)sub (maresi), action: "edit", same key)sub (maresi), action: "delete", same key)sub (maresi), action: "report_abuse")sub, action: "equivalence", opinion containing the target subject URI of the scheme of sub)sub (DID), action: "identity", a DID document that lists the key)sub (DID), action: "profile", a key bound to the DID). Its metadata holds only nickname, given_name, family_name, gender, birthdate as a year of four digits, and client_id. The latest profile by iat is the current one, and GET /identity/{id} returns it. A profile must be dated after the current one and change its detailsSignature: ECDSA P-256 signature using the private key corresponding to the public key in header.
urn:maresi:{signature}): Reference existing reviews for interactions and actions. A maresi URI must name an original review, and the server refuses one that names an editiat fields must be non-negative Unix timestamps at most one hour after server time| jwt_review required | string <JWT> Example: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ii0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFcDc4Zms1eUNqYmlZYXZ5UjZGQ2xxcTlBRkJUaXpBSG1ZdU9rcTR3cy9aYmdleG41SVQ2bi83NGt2YlZ0UGxNc3A5Z2luTysxMVZ4ZUorbVFJQ1pZamc9PS0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLSIsImp3ayI6IntcImNydlwiOlwiUC0yNTZcIixcImV4dFwiOnRydWUsXCJrZXlfb3BzXCI6W1widmVyaWZ5XCJdLFwia3R5XCI6XCJFQ1wiLFwieFwiOlwicDc4Zms1eUNqYmlZYXZ5UjZGQ2xxcTlBRkJUaXpBSG1ZdU9rcTR3c19aWVwiLFwieVwiOlwiNEhzWi1TRS1wXy0tSkwyMWJUNVRMS2ZZSXB6dnRkVmNYaWZwa0NBbVdJNFwifSJ9.eyJpYXQiOjE1ODA5MTAwMjIsInN1YiI6Imh0dHBzOi8vbWFuZ3JvdmUucmV2aWV3cyIsInJhdGluZyI6NzUsIm9waW5pb24iOiJHcmVhdCB3ZWJzaXRlIGZvciByZXZpZXdzLiIsIm1ldGFkYXRhIjp7Im5pY2tuYW1lIjoiam9objEyMyIsImNsaWVudF9pZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6MzAwMCJ9fQ.7xQtIlHuDdCVioyztj8i3zJ8dk3oCSfKr6VCR5RtBn6sBcqvpfyvs13PlKGJoamKzx8xUgQTQJjRPv5s91-VLQ JWT string in format |
This endpoint dumps all reviews from the database to S3 in three formats:
Returns a list of results with S3 keys and presigned download URLs valid for 7 days.
Requires X-API-Key header with valid API key.
[- {
- "download_url": "string",
- "key": "string",
- "record_count": 0
}
]A dump holds every record the database stores:
kid is the key of the author.The backup job writes a new dump once a day, and this endpoint serves the
most recent one. The Accept header picks the format:
application/json (default): the shape of a /reviews response, with
reviews, and issuers and maresi_subjects set to null. Each record
carries its action. A record whose sub is a maresi URN names an
original review and carries original_sub, the subject of that review.
The versions of a review are the review and the edits whose sub names
it, and the latest version has the largest iat, then signature. A
comment, reaction, delete or report belongs to the review its sub
names. An identities array holds every reviewer identity the server
knows: did, source, the last resolved document, and the log of a
did:plc in the shape of /identity/{id}/log, empty for a did:web. A
fork rebuilds every identity and its key bindings from this file alone. The server
increments format_version whenever the shape of a section or the
meaning of a field changes. aggregated_at is the unix time in seconds
at which the aggregator last committed its scores. Three more sections
hold the results of that aggregation:equivalences: the members of the accepted equivalence classes, as
/equivalences returns them. Members with one canonical_sub are one
subject, and a client shows their reviews together. A later
aggregation can name a class by another member, so a client regroups
the members from each dump instead of keeping canonical_sub as an
identifier.credibility: the credibility of each reviewer from 0 to 1, keyed by
their DID when an identity claim bound their key, else by the key. A
key that becomes bound changes its entry to the DID. The documents in
identities bind keys to DIDs.subjects: sub, quality (0 to 10000) and confidence of each
subject the aggregator scored.text/csv: one row per record. A browser asks for text/html and gets
this format.application/n-triples: the records as RDF triples.CSV and N-Triples leave out claims and deletes.
The response is a 307 redirect to a download link that expires after 7
days. Use curl -L to follow it.
| Accept | string or null Dump format to retrieve: application/json (default), text/csv, text/html, application/n-triples |
| id required | string Example: did:plc:z72i7hdynmk6r22z27h6tvur A did:plc or did:web identifier, or a verified alias without its scheme, such as |
| fresh | boolean Ask the sources again instead of answering from the cache, when the last resolution is more than a minute old. |
{- "aliases": [
- "string"
], - "did": "string",
- "document": { },
- "profile": { },
- "source": "string"
}| id required | string The did:plc identifier the operations belong to. |
Signed did:plc operations, oldest first. The genesis operation must be included or stored already. The body may be at most 8 KB and an identity may have at most 100 operations.
[- { }
]{ }Replay the registry log of the DID to the PLC directory, so AT Protocol software resolves the identity. Each operation carries its own signature and the log is public at GET /identity/{id}/log, so any client may ask. The replay skips the operations the directory holds, and a second call completes a replay the directory interrupted.
| id required | string Example: did:plc:z72i7hdynmk6r22z27h6tvur A did:plc identifier. |
{- "did": "string",
- "url": "string"
}