Contact RLS Query Builder
API Contract
REST
/api/v1/internal/contact-queries
2 endpoints
POST
/api/v1/internal/contact-queries/api/v1/internal/contact-queries/contacts
Build and execute an RLS-scoped contact query
Public
Request Example
{
"role": "coordinator",
"org_id": "org_abc123",
"search_term": "ane",
"page": 1,
"limit": 20
}
Response Example
{
"data": [
{
"id": "usr_01J3K8X",
"full_name": "Ane Berg",
"email": "ane.berg@org.no",
"role": "peer_mentor",
"org_id": "org_abc123"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1
}
}
POST
/api/v1/internal/contact-queries/api/v1/internal/contact-queries/peer-mentors
Build and execute an RLS-scoped peer mentor query
Public
Request Example
{
"role": "new_employee",
"org_id": "org_abc123",
"search_term": "",
"page": 1,
"limit": 20
}
Response Example
{
"data": [
{
"id": "pm_88A1C",
"full_name": "Silje Dahl",
"specialty": "Integration",
"org_id": "org_abc123"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 8
}
}