> For the complete documentation index, see [llms.txt](https://docs.themochi.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.themochi.app/api-reference/team.md).

# Team

## POST /v1/team/invites/

>

```json
{"openapi":"3.0.3","info":{"title":"Mochi Public API","version":"1.0.0"},"servers":[{"description":"Production","url":"https://api.themochi.app"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"scheme":"bearer","type":"http"}},"parameters":{"IdempotencyKey":{"description":"UUID4 identifying one intended write. Reuse it only when retrying that same write.","in":"header","name":"Idempotency-Key","required":true,"schema":{"format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$","type":"string"}}},"schemas":{"Input_team_invite_create":{"additionalProperties":false,"properties":{"email":{"format":"email","maxLength":254,"type":"string"},"member_type":{"enum":["SETTER","CLOSER","MANAGER","FINANCE","ASSISTANT"],"type":"string"}},"required":["email","member_type"],"type":"object"},"Output_team_member_action":{"properties":{"member_id":{"readOnly":true,"type":"string"},"status":{"readOnly":true,"type":"string"}},"type":"object"},"PublicApiErrorEnvelope":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"fields":{"additionalProperties":true,"type":"object"},"message":{"type":"string"},"request_id":{"type":"string"},"retry_after":{"minimum":0,"type":"integer"},"type":{"type":"string"}},"required":["type","message","request_id"],"type":"object"}},"required":["error"],"type":"object"}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The request is invalid."},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"Authentication is missing, invalid, or revoked."},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The authenticated identity lacks the required scope or capability."},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The resource is unavailable or not visible to this organization."},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The write conflicts with current state or an identical request is still running."},"UnprocessableEntity":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The write contains fields outside its closed input schema."},"TooManyRequests":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The request-rate budget is exhausted."}}},"paths":{"/v1/team/invites/":{"post":{"operationId":"post_public_team_invite","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input_team_invite_create"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output_team_member_action"}}},"description":"Success"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"tags":["team"]}}}}
```

## POST /v1/team/members/{member\_id}/deactivate/

>

```json
{"openapi":"3.0.3","info":{"title":"Mochi Public API","version":"1.0.0"},"servers":[{"description":"Production","url":"https://api.themochi.app"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"scheme":"bearer","type":"http"}},"parameters":{"IdempotencyKey":{"description":"UUID4 identifying one intended write. Reuse it only when retrying that same write.","in":"header","name":"Idempotency-Key","required":true,"schema":{"format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$","type":"string"}}},"schemas":{"Output_team_member_action":{"properties":{"member_id":{"readOnly":true,"type":"string"},"status":{"readOnly":true,"type":"string"}},"type":"object"},"PublicApiErrorEnvelope":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"fields":{"additionalProperties":true,"type":"object"},"message":{"type":"string"},"request_id":{"type":"string"},"retry_after":{"minimum":0,"type":"integer"},"type":{"type":"string"}},"required":["type","message","request_id"],"type":"object"}},"required":["error"],"type":"object"}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The request is invalid."},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"Authentication is missing, invalid, or revoked."},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The authenticated identity lacks the required scope or capability."},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The resource is unavailable or not visible to this organization."},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The write conflicts with current state or an identical request is still running."},"UnprocessableEntity":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The write contains fields outside its closed input schema."},"TooManyRequests":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The request-rate budget is exhausted."}}},"paths":{"/v1/team/members/{member_id}/deactivate/":{"post":{"operationId":"post_public_team_member_deactivate","parameters":[{"in":"path","name":"member_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output_team_member_action"}}},"description":"Success"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"tags":["team"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.themochi.app/api-reference/team.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
