Whether two departments see each other, and which rule decides (admin)
const url = 'https://api.vexarn.dev/api/org/visibility/departments?a=example&b=example';const options = { method: 'GET', headers: {cookie: '__Host-vexarn.session_token=<__Host-vexarn.session_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://api.vexarn.dev/api/org/visibility/departments?a=example&b=example' \ --cookie __Host-vexarn.session_token=<__Host-vexarn.session_token>Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Both directions with their reasons
object
open: everyone sees everyone except where a barrier stands. closed: people see only those who share a department line with them (the same department, or any department above or below theirs) and departments a permission rule allows. People in no department are never restricted.
same_line: the same department, or one above the other (always visible). no_rule_open: open mode, no barrier. barrier / barrier_inherited: a barrier on these departments or above them. allowed / allowed_inherited: closed mode, a permission on them or above them. closed_default: closed mode, no permission.
object
The rule that decides, for barrier* and allowed*: set on these departments (the pair itself, or departments above it when inherited).
object
object
object
same_line: the same department, or one above the other (always visible). no_rule_open: open mode, no barrier. barrier / barrier_inherited: a barrier on these departments or above them. allowed / allowed_inherited: closed mode, a permission on them or above them. closed_default: closed mode, no permission.
object
The rule that decides, for barrier* and allowed*: set on these departments (the pair itself, or departments above it when inherited).
object
object
object
Example
{ "mode": "open", "reasonAB": { "code": "same_line", "rule": { "from": { "name": "Marketing" }, "to": { "name": "Marketing" } } }, "reasonBA": { "code": "same_line", "rule": { "from": { "name": "Marketing" }, "to": { "name": "Marketing" } } }}Invalid parameters or body (validation_error)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}No session
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Your role is below admin (forbidden, recorded in the security log), or a change came from another origin than the web app (forbidden_origin)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}A personal account (not_in_organization), or no such department in it (department_not_found)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Too many requests from this user or client address
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Headers
Section titled “Headers”Seconds until the rate limit window resets