Contact Repository
API Contract
REST
/api/v1/contacts
9 endpoints
GET
/api/v1/contacts/api/v1/contacts
Fetch all contacts for an org
Public
Response Example
{
"data": [
{
"id": "usr_01J3K8X",
"full_name": "Ane Berg",
"email": "ane.berg@org.no",
"org_id": "org_abc123",
"role": "peer_mentor",
"is_active": true,
"created_at": "2025-09-14T08:22:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 84
}
}
GET
/api/v1/contacts/api/v1/contacts/:id
Fetch a single contact by ID
Public
Response Example
{
"id": "usr_01J3K8X",
"full_name": "Ane Berg",
"email": "ane.berg@org.no",
"org_id": "org_abc123",
"role": "peer_mentor",
"is_active": true,
"created_at": "2025-09-14T08:22:00Z"
}
POST
/api/v1/contacts/api/v1/contacts
Create a contact record
Public
Request Example
{
"full_name": "Lars Haugen",
"email": "lars.haugen@org.no",
"role": "coordinator",
"org_id": "org_abc123"
}
Response Example
{
"id": "usr_02M5T9Y",
"full_name": "Lars Haugen",
"email": "lars.haugen@org.no",
"role": "coordinator",
"org_id": "org_abc123",
"is_active": true,
"created_at": "2026-01-10T11:04:00Z"
}
PUT
/api/v1/contacts/api/v1/contacts/:id
Update a contact record
Public
Request Example
{
"email": "lars.h@org.no",
"is_active": false
}
Response Example
{
"id": "usr_02M5T9Y",
"full_name": "Lars Haugen",
"email": "lars.h@org.no",
"role": "coordinator",
"org_id": "org_abc123",
"is_active": false,
"updated_at": "2026-03-01T09:15:00Z"
}
DELETE
/api/v1/contacts/api/v1/contacts/:id
Delete a contact record
Public
Response Example
{
"success": true,
"deleted_id": "usr_02M5T9Y"
}
GET
/api/v1/contacts/api/v1/contacts/peer-mentors
Fetch all peer mentors for an org
Public
Response Example
{
"data": [
{
"id": "pm_88A1C",
"full_name": "Silje Dahl",
"email": "silje.dahl@org.no",
"specialty": "Integration",
"org_id": "org_abc123",
"available": true
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 12
}
}
GET
/api/v1/contacts/api/v1/contacts/peer-mentors/:id
Fetch a single peer mentor by ID
Public
Response Example
{
"id": "pm_88A1C",
"full_name": "Silje Dahl",
"email": "silje.dahl@org.no",
"specialty": "Integration",
"org_id": "org_abc123",
"available": true,
"created_at": "2025-08-01T07:00:00Z"
}
GET
/api/v1/contacts/api/v1/contacts/search
Fetch contacts matching a search query within an org
Public
Response Example
{
"data": [
{
"id": "usr_01J3K8X",
"full_name": "Ane Berg",
"email": "ane.berg@org.no"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 3
}
}
GET
/api/v1/contacts/api/v1/contacts/peer-mentors/search
Fetch peer mentors matching a search query within an org
Public
Response Example
{
"data": [
{
"id": "pm_88A1C",
"full_name": "Silje Dahl",
"specialty": "Integration"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2
}
}