Team
List, invite and deactivate team members.
POST
/v1/team/invites/Invite team memberGET/v1/team/members/List team membersPOST/v1/team/members/{member_id}/deactivate/Deactivate team memberInvite team member
POST
team:writeIdempotency-Key required/v1/team/invites/Parameters
| Name | In | Type | Notes |
|---|---|---|---|
Idempotency-Keyrequired | header | string (uuid) | UUID4 identifying one intended write. Reuse it only when retrying that same write. |
Request body
| Field | Type | Notes |
|---|---|---|
emailrequired | string (email) | max length 254 |
member_typerequired | string | one of SETTER, CLOSER, MANAGER, FINANCE, ASSISTANT |
Response fields (201)
| Field | Type | Notes |
|---|---|---|
member_id | string | read-only |
status | string | read-only |
Responses
201Success400The request is invalid.401Authentication is missing, invalid, or revoked.403The authenticated identity lacks the required scope or capability.404The resource is unavailable or not visible to this organization.409The write conflicts with current state or an identical request is still running.422The write contains fields outside its closed input schema.429The request-rate budget is exhausted.
Example request
curl
curl -X POST "https://api.themochi.app/v1/team/invites/" \
-H "Authorization: Bearer $MOCHI_API_KEY" \
-H "Idempotency-Key: $(uuidgen | tr A-Z a-z)" \
-H "Content-Type: application/json" \
-d '{"email":"string","member_type":"SETTER"}'List team members
GET
team:read/v1/team/members/Response fields (200)
| Field | Type | Notes |
|---|---|---|
datarequired | object[] | — |
data[].accepted_at | string (date-time) | null | read-only |
data[].email | string | read-only |
data[].first_name | string | read-only |
data[].is_active | boolean | read-only |
data[].language | string | read-only |
data[].last_name | string | read-only |
data[].member_id | string | read-only |
data[].member_type | string | read-only |
next_cursorrequired | string | null | — |
Responses
200Success400The request is invalid.401Authentication is missing, invalid, or revoked.403The authenticated identity lacks the required scope or capability.404The resource is unavailable or not visible to this organization.429The request-rate budget is exhausted.
Example request
curl
curl -X GET "https://api.themochi.app/v1/team/members/" \
-H "Authorization: Bearer $MOCHI_API_KEY"Deactivate team member
POST
team:writeIdempotency-Key required/v1/team/members/{member_id}/deactivate/Parameters
| Name | In | Type | Notes |
|---|---|---|---|
member_idrequired | path | integer | — |
Idempotency-Keyrequired | header | string (uuid) | UUID4 identifying one intended write. Reuse it only when retrying that same write. |
Response fields (201)
| Field | Type | Notes |
|---|---|---|
member_id | string | read-only |
status | string | read-only |
Responses
201Success400The request is invalid.401Authentication is missing, invalid, or revoked.403The authenticated identity lacks the required scope or capability.404The resource is unavailable or not visible to this organization.409The write conflicts with current state or an identical request is still running.422The write contains fields outside its closed input schema.429The request-rate budget is exhausted.
Example request
curl
curl -X POST "https://api.themochi.app/v1/team/members/<member_id>/deactivate/" \
-H "Authorization: Bearer $MOCHI_API_KEY" \
-H "Idempotency-Key: $(uuidgen | tr A-Z a-z)"