Search invitations using structured filters
const url = 'https://api.toriiauth.eu/api/server/v1/invitations/search?limit=20&cursor=01931a73-8b00-7000-8000-000000000000';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"statuses":["PENDING"],"emailSearch":"@example.com","publicMetadata":{"tenant":{"id":"acme"},"tags":["municipal"]},"privateMetadata":{"source":{"system":"crm"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://api.toriiauth.eu/api/server/v1/invitations/search?limit=20&cursor=01931a73-8b00-7000-8000-000000000000' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "statuses": [ "PENDING" ], "emailSearch": "@example.com", "publicMetadata": { "tenant": { "id": "acme" }, "tags": [ "municipal" ] }, "privateMetadata": { "source": { "system": "crm" } } }'Returns invitations matching every supplied filter. Status values are ORed within the status set. Email and both metadata filters are ANDed with it. Metadata uses PostgreSQL JSONB containment: nested objects may have additional keys, arrays may have additional values in any order, and JSON value types are significant. Private metadata may filter results but is never returned in the summary page.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Maximum number of items in the returned page, from 1 through 100.
Example
20Cursor from the previous page’s nextCursor.
Example
01931a73-8b00-7000-8000-000000000000Request Bodyrequired
Section titled “Request Bodyrequired”All supplied dimensions are combined with AND semantics. Status values are ORed. Metadata values use JSONB containment.
object
Return invitations having any supplied lifecycle status.
Literal case-insensitive email substring, at most 320 characters.
Example
@example.comPublic metadata that each result must contain.
Example
{ "tenant": { "id": "acme" }, "tags": [ "municipal" ]}Private metadata that each result must contain. This bag is never returned by search.
Example
{ "source": { "system": "crm" }}Responses
Section titled “Responses”Page of matching invitation summaries without metadata.
A single page of results in a cursor-paginated list. Pass nextCursor as the cursor query parameter to fetch the following page.
object
Items in this page, in stable order.
object
Cursor to pass to fetch the next page. Null when this is the last page.
True if more pages are available (equivalent to nextCursor != null).
Example
{ "items": [ { "status": "PENDING" } ], "nextCursor": "01931a73-8b00-7000-8000-000000000000", "hasMore": true}Malformed or unknown filters, blank or overlong email search, metadata over 8 KB, a body over 24 KiB, an invalid cursor, or a limit outside 1 through 100.
object
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}Missing or invalid secret key.
object
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}