API reference
Members
Members endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /v1/account/groups/{groupId}/staff-logins | The account's logins, for the staff editor's Login picker and warnings: an entry linked to no active login, and a deactivated login with meetings still to come in this group (ADR 0088) |
GET | /v1/account/groups/{groupId}/transfer-reps | The account's active members a group's human backup can name, with whether a transfer can ring them (ADR 0136) |
GET | /v1/account/reps/{userId}/availability | A member's hours, beside the staff they are on |
PUT | /v1/account/reps/{userId}/availability/{scheduleId} | Change a member's schedule. Audited, and the member is told by email |
GET | /v1/account/reps/{userId}/calendar/crm | Where a member's meetings go now (their own calendar, the CRM, or nowhere yet), and the CRMs that can keep them |
PUT | /v1/account/reps/{userId}/calendar/crm | Keep a member's meetings in the CRM. Refused when they use their own calendar: only they can switch that |
GET | /v1/account/reps/{userId}/direct-phone | The phone a transfer to a member rings, beside the staff they are on |
PUT | /v1/account/reps/{userId}/direct-phone | Set or clear the phone a transfer to a member rings (owners and admins; audited) |
The account's logins, for the staff editor's Login picker and warnings: an entry linked to no active login, and a deactivated login with meetings still to come in this group (ADR 0088)#
GET /v1/account/groups/{groupId}/staff-logins
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupId | string (grp_… ID) | Yes | ID (grp_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
logins | array<StaffLogin> | Yes | — |
logins[].email | string | Yes | — |
logins[].status | enum | Yes | One of: "invited", "active", "deactivated". |
logins[].upcomingMeetings | integer | Yes | — |
logins[].userId | string (usr_… ID) | Yes | ID (usr_…) |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/groups/{groupId}/staff-logins" \
-H "Authorization: Bearer $ACCESS_TOKEN"The account's active members a group's human backup can name, with whether a transfer can ring them (ADR 0136)#
GET /v1/account/groups/{groupId}/transfer-reps
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupId | string (grp_… ID) | Yes | ID (grp_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
reps | array<TransferRep> | Yes | — |
reps[].directPhone | string | null | Yes | — |
reps[].email | string | Yes | — |
reps[].name | string | null | Yes | — |
reps[].takingCalls | boolean | Yes | — |
reps[].userId | string (usr_… ID) | Yes | ID (usr_…) |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/groups/{groupId}/transfer-reps" \
-H "Authorization: Bearer $ACCESS_TOKEN"A member's hours, beside the staff they are on#
GET /v1/account/reps/{userId}/availability
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
userId | string (usr_… ID) | Yes | ID (usr_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
groups | array<object> | Yes | — |
groups[].id | string (grp_… ID) | Yes | ID (grp_…) |
groups[].name | string | Yes | — |
groups[].timeZone | string | Yes | — |
matchEmail | string | null | Yes | — |
primaryGroupId | string (grp_… ID) | null | Yes | — |
schedules | array<AvailabilitySchedule> | Yes | — |
schedules[].chosen | boolean | Yes | — |
schedules[].hours | object | Yes | — |
schedules[].hours.overrides | array<object> | Yes | Up to 366 items. |
schedules[].hours.overrides[].date | string (date) | Yes | — |
schedules[].hours.overrides[].windows | array<object> | Yes | Up to 12 items. |
schedules[].hours.timeZone | string | Yes | — |
schedules[].hours.weekly | array<object> | Yes | Up to 50 items. |
schedules[].hours.weekly[].days | array<enum> | Yes | Items: "mon", "tue", "wed", "thu", "fri", "sat", "sun". |
schedules[].hours.weekly[].end | string | constant | Yes | — |
schedules[].hours.weekly[].start | string | Yes | Pattern: ^([01]\d|2[0-3]):[0-5]\d$. |
schedules[].id | string (avs_… ID) | Yes | ID (avs_…) |
schedules[].isDefault | boolean | Yes | — |
schedules[].name | string | Yes | — |
schedules[].updatedAt | string (date-time) | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/reps/{userId}/availability" \
-H "Authorization: Bearer $ACCESS_TOKEN"Change a member's schedule. Audited, and the member is told by email#
PUT /v1/account/reps/{userId}/availability/{scheduleId}
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
userId | string (usr_… ID) | Yes | ID (usr_…) |
scheduleId | string (avs_… ID) | Yes | ID (avs_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
hours | object | Yes | — |
hours.overrides | array<object> | Yes | Up to 366 items. |
hours.overrides[].date | string (date) | Yes | — |
hours.overrides[].windows | array<object> | Yes | Up to 12 items. |
hours.overrides[].windows[].end | string | Yes | Pattern: ^([01]\d|2[0-3]):[0-5]\d$. |
hours.overrides[].windows[].start | string | Yes | Pattern: ^([01]\d|2[0-3]):[0-5]\d$. |
hours.timeZone | string | Yes | — |
hours.weekly | array<object> | Yes | Up to 50 items. |
hours.weekly[].days | array<enum> | Yes | Items: "mon", "tue", "wed", "thu", "fri", "sat", "sun". |
hours.weekly[].end | string | enum | Yes | — |
hours.weekly[].start | string | Yes | Pattern: ^([01]\d|2[0-3]):[0-5]\d$. |
name | string | Yes | 1–60 characters. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
schedule | AvailabilitySchedule | Yes | — |
schedule.chosen | boolean | Yes | — |
schedule.hours | object | Yes | — |
schedule.hours.overrides | array<object> | Yes | Up to 366 items. |
schedule.hours.overrides[].date | string (date) | Yes | — |
schedule.hours.overrides[].windows | array<object> | Yes | Up to 12 items. |
schedule.hours.timeZone | string | Yes | — |
schedule.hours.weekly | array<object> | Yes | Up to 50 items. |
schedule.hours.weekly[].days | array<enum> | Yes | Items: "mon", "tue", "wed", "thu", "fri", "sat", "sun". |
schedule.hours.weekly[].end | string | constant | Yes | — |
schedule.hours.weekly[].start | string | Yes | Pattern: ^([01]\d|2[0-3]):[0-5]\d$. |
schedule.id | string (avs_… ID) | Yes | ID (avs_…) |
schedule.isDefault | boolean | Yes | — |
schedule.name | string | Yes | — |
schedule.updatedAt | string (date-time) | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X PUT "$ANSWERSTACK_API_URL/v1/account/reps/{userId}/availability/{scheduleId}" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"hours": {
"timeZone": "string",
"weekly": [
{
"days": [
"mon"
],
"start": "string",
"end": "string"
}
],
"overrides": [
{
"date": "2026-01-15",
"windows": [
{
"start": "string",
"end": "string"
}
]
}
]
}
}'Where a member's meetings go now (their own calendar, the CRM, or nowhere yet), and the CRMs that can keep them#
GET /v1/account/reps/{userId}/calendar/crm
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
userId | string (usr_… ID) | Yes | ID (usr_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
options | array<object> | Yes | — |
options[].connectionId | string (conn_… ID) | Yes | ID (conn_…) |
options[].name | string | Yes | — |
provider | enum | null | Yes | One of: "google", "microsoft", "crm". |
working | boolean | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/reps/{userId}/calendar/crm" \
-H "Authorization: Bearer $ACCESS_TOKEN"Keep a member's meetings in the CRM. Refused when they use their own calendar: only they can switch that#
PUT /v1/account/reps/{userId}/calendar/crm
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
userId | string (usr_… ID) | Yes | ID (usr_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
connectionId | string (conn_… ID) | Yes | ID (conn_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
provider | enum | Yes | One of: "crm". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X PUT "$ANSWERSTACK_API_URL/v1/account/reps/{userId}/calendar/crm" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"connectionId": "conn_2ZPh7XbT0v9Ao4iJ3qK1mN8sRgE"
}'The phone a transfer to a member rings, beside the staff they are on#
GET /v1/account/reps/{userId}/direct-phone
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
userId | string (usr_… ID) | Yes | ID (usr_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
directPhone | string | null | Yes | Pattern: ^\+[1-9]\d\{6,14\}$. |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/reps/{userId}/direct-phone" \
-H "Authorization: Bearer $ACCESS_TOKEN"Set or clear the phone a transfer to a member rings (owners and admins; audited)#
PUT /v1/account/reps/{userId}/direct-phone
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
userId | string (usr_… ID) | Yes | ID (usr_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
directPhone | string | null | Yes | Pattern: ^\+[1-9]\d\{6,14\}$. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
directPhone | string | null | Yes | Pattern: ^\+[1-9]\d\{6,14\}$. |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X PUT "$ANSWERSTACK_API_URL/v1/account/reps/{userId}/direct-phone" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"directPhone": "string"
}'