API reference

Members

Members endpoints.

MethodPathSummary
GET/v1/account/groups/{groupId}/staff-loginsThe 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-repsThe 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}/availabilityA 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/crmWhere 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/crmKeep 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-phoneThe phone a transfer to a member rings, beside the staff they are on
PUT/v1/account/reps/{userId}/direct-phoneSet 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

NameTypeRequiredDescription
groupIdstring (grp_… ID)YesID (grp_…)

Response 200

FieldTypeRequiredDescription
loginsarray<StaffLogin>Yes—
logins[].emailstringYes—
logins[].statusenumYesOne of: "invited", "active", "deactivated".
logins[].upcomingMeetingsintegerYes—
logins[].userIdstring (usr_… ID)YesID (usr_…)

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
groupIdstring (grp_… ID)YesID (grp_…)

Response 200

FieldTypeRequiredDescription
repsarray<TransferRep>Yes—
reps[].directPhonestring | nullYes—
reps[].emailstringYes—
reps[].namestring | nullYes—
reps[].takingCallsbooleanYes—
reps[].userIdstring (usr_… ID)YesID (usr_…)

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
userIdstring (usr_… ID)YesID (usr_…)

Response 200

FieldTypeRequiredDescription
groupsarray<object>Yes—
groups[].idstring (grp_… ID)YesID (grp_…)
groups[].namestringYes—
groups[].timeZonestringYes—
matchEmailstring | nullYes—
primaryGroupIdstring (grp_… ID) | nullYes—
schedulesarray<AvailabilitySchedule>Yes—
schedules[].chosenbooleanYes—
schedules[].hoursobjectYes—
schedules[].hours.overridesarray<object>YesUp to 366 items.
schedules[].hours.overrides[].datestring (date)Yes—
schedules[].hours.overrides[].windowsarray<object>YesUp to 12 items.
schedules[].hours.timeZonestringYes—
schedules[].hours.weeklyarray<object>YesUp to 50 items.
schedules[].hours.weekly[].daysarray<enum>YesItems: "mon", "tue", "wed", "thu", "fri", "sat", "sun".
schedules[].hours.weekly[].endstring | constantYes—
schedules[].hours.weekly[].startstringYesPattern: ^([01]\d|2[0-3]):[0-5]\d$.
schedules[].idstring (avs_… ID)YesID (avs_…)
schedules[].isDefaultbooleanYes—
schedules[].namestringYes—
schedules[].updatedAtstring (date-time)Yes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
userIdstring (usr_… ID)YesID (usr_…)
scheduleIdstring (avs_… ID)YesID (avs_…)

Request body

application/json, required.

FieldTypeRequiredDescription
hoursobjectYes—
hours.overridesarray<object>YesUp to 366 items.
hours.overrides[].datestring (date)Yes—
hours.overrides[].windowsarray<object>YesUp to 12 items.
hours.overrides[].windows[].endstringYesPattern: ^([01]\d|2[0-3]):[0-5]\d$.
hours.overrides[].windows[].startstringYesPattern: ^([01]\d|2[0-3]):[0-5]\d$.
hours.timeZonestringYes—
hours.weeklyarray<object>YesUp to 50 items.
hours.weekly[].daysarray<enum>YesItems: "mon", "tue", "wed", "thu", "fri", "sat", "sun".
hours.weekly[].endstring | enumYes—
hours.weekly[].startstringYesPattern: ^([01]\d|2[0-3]):[0-5]\d$.
namestringYes1–60 characters.

Response 200

FieldTypeRequiredDescription
scheduleAvailabilityScheduleYes—
schedule.chosenbooleanYes—
schedule.hoursobjectYes—
schedule.hours.overridesarray<object>YesUp to 366 items.
schedule.hours.overrides[].datestring (date)Yes—
schedule.hours.overrides[].windowsarray<object>YesUp to 12 items.
schedule.hours.timeZonestringYes—
schedule.hours.weeklyarray<object>YesUp to 50 items.
schedule.hours.weekly[].daysarray<enum>YesItems: "mon", "tue", "wed", "thu", "fri", "sat", "sun".
schedule.hours.weekly[].endstring | constantYes—
schedule.hours.weekly[].startstringYesPattern: ^([01]\d|2[0-3]):[0-5]\d$.
schedule.idstring (avs_… ID)YesID (avs_…)
schedule.isDefaultbooleanYes—
schedule.namestringYes—
schedule.updatedAtstring (date-time)Yes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
userIdstring (usr_… ID)YesID (usr_…)

Response 200

FieldTypeRequiredDescription
optionsarray<object>Yes—
options[].connectionIdstring (conn_… ID)YesID (conn_…)
options[].namestringYes—
providerenum | nullYesOne of: "google", "microsoft", "crm".
workingbooleanYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
userIdstring (usr_… ID)YesID (usr_…)

Request body

application/json, required.

FieldTypeRequiredDescription
connectionIdstring (conn_… ID)YesID (conn_…)

Response 200

FieldTypeRequiredDescription
providerenumYesOne of: "crm".

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
userIdstring (usr_… ID)YesID (usr_…)

Response 200

FieldTypeRequiredDescription
directPhonestring | nullYesPattern: ^\+[1-9]\d\{6,14\}$.

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
userIdstring (usr_… ID)YesID (usr_…)

Request body

application/json, required.

FieldTypeRequiredDescription
directPhonestring | nullYesPattern: ^\+[1-9]\d\{6,14\}$.

Response 200

FieldTypeRequiredDescription
directPhonestring | nullYesPattern: ^\+[1-9]\d\{6,14\}$.

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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"
}'