Search people you can invite
const url = 'https://calendar.work.optidata.cloud/api/search/invitables?search=jane';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://calendar.work.optidata.cloud/api/search/invitables?search=jane' \ --header 'Authorization: Bearer <token>'Autocomplete over everyone the caller can invite to an event or share a calendar with: users of the tenant, groups, and guests already known from earlier events.
Filter by kind with either models (only these kinds) or -models
(every kind except these). Sending both is rejected.
Results carry optiworkIdentifier, which is what attendees[]. optiworkIdentifier and members[].optiworkIdentifier expect elsewhere in
this API. Responses may be cached for up to an hour.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”Text to match against name and e-mail address.
Restrict the search to these kinds. Repeat once per kind
(models[]=user&models[]=group). Cannot be combined with -models[].
Exclude these kinds from the search. Cannot be combined with
models[].
Maximum number of matches to return.
Responses
Section titled “ Responses ”Matching people, groups and guests.
object
Somebody or something the caller may invite.
object
user is somebody with an Optiwork account in the tenant, group a user
group, and guest an address outside it.
Send this back as attendees[].optiworkIdentifier or
members[].optiworkIdentifier.
Examples
{ "invitables": [ { "email": "jane.doe@acme.example", "name": "Jane Doe", "type": "user", "avatar_url": null, "id": "75", "zimbra_id": null, "optiworkIdentifier": "9e926fb1-e1ff-4fc9-81a1-5740f10ba57f" }, { "email": "engineering@acme.example", "name": "Engineering", "type": "group", "avatar_url": null, "id": "12", "zimbra_id": null, "optiworkIdentifier": null }, { "email": "contractor@partner.example", "name": "Alex Contractor", "type": "guest", "avatar_url": null, "id": "1117", "zimbra_id": null, "optiworkIdentifier": null } ]}Missing, malformed or expired authentication key.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The request body or query string failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The event title field is required.", "errors": { "title": [ "The event title field is required." ] }}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}