Skip to content

Ask an organisation holding this CRM to invite you

POST
/auth/access-requests
curl --request POST \
--url https://api.sloose.com/auth/access-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "zohoOrgId": "example", "orgId": "example" }'

Made from a CRM tab by a person whose Zoho sign-in proved THIS CRM within the last day (the same test the frame route makes), to an organisation the frame route names as holding it — through a listed connection it has not disconnected. Anything else is refused without saying why an organisation is not askable: an unlisted holder and an organisation that holds nothing answer alike.

One open request per organisation and address. Asking again finds the open request and sends nothing; a request made now mails each of the organisation’s owner and administrators once, with one link to People, where approving makes the ordinary invitation at the role chosen there — an operator unless another is. A request lapses after seven days, like an invitation.

Session only. Limited to a handful per session and a few more per CRM an hour (429 RATE_LIMITED, with retryAfterSeconds and Retry-After).

Media typeapplication/json
object
zohoOrgId
required

The CRM the tab is in, as the widget SDK reports it: its zgid.

string
>= 1 characters
orgId
required

The organisation being asked: one the frame route named as holding this CRM.

string
>= 1 characters
Examplegenerated
{
"zohoOrgId": "example",
"orgId": "example"
}

Already asked: the open request.

Media typeapplication/json
object
request
required
object
id
required
string
orgId
required
string
orgName
required

The organisation asked, as somebody outside it is shown its name: “a team” when the name could be read as Sloose, as an invitation does.

string
status
required

open until an administrator approves it, or it lapses (7 days); approved once the invitation is on its way.

string
Allowed values: open approved
requestedAt
required
string
expiresAt
required
string
joined
required

Whether the person is a member of the organisation now — the invitation accepted — which is what a tab waiting on the request is waiting for.

boolean
Example
{
"request": {
"status": "open"
}
}

Asked. The administrators have been mailed.

Media typeapplication/json
object
request
required
object
id
required
string
orgId
required
string
orgName
required

The organisation asked, as somebody outside it is shown its name: “a team” when the name could be read as Sloose, as an invitation does.

string
status
required

open until an administrator approves it, or it lapses (7 days); approved once the invitation is on its way.

string
Allowed values: open approved
requestedAt
required
string
expiresAt
required
string
joined
required

Whether the person is a member of the organisation now — the invitation accepted — which is what a tab waiting on the request is waiting for.

boolean
Example
{
"request": {
"status": "open"
}
}

The request — its body or its query — did not match the schema. issues carries the Zod issue list.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No bearer, or one that no longer resolves: a session that is unknown or expired (code: AUTH_REQUIRED), or an API token that was revoked or expired (TOKEN_REVOKED, TOKEN_EXPIRED), whose organisation is gone (ORG_NOT_FOUND) or whose member or user row is (MEMBERSHIP_GONE).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The session’s Zoho sign-in has not proved this CRM in the last day (code: CRM_NOT_PROVED): sign in with Zoho, choosing this CRM’s organisation. Or an API token was used (code: SESSION_REQUIRED), or the session is a staff member’s view of an organisation, which does not act as the person outside it (code: STAFF_VIEW).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No organisation this person may ask holds this CRM by that id (code: NOT_ASKABLE) — whether it holds nothing, is closed, or would rather not be named.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Already a member of that organisation (code: ALREADY_MEMBER), or an invitation to it is already waiting in their mail (code: ALREADY_INVITED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Too many requests (code: RATE_LIMITED, with retryAfterSeconds).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No administrator could be emailed (code: NOT_DELIVERED): nothing was asked, and asking again tries again.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com