Accept a workspace invitation¶
Accept a workspace invitation sent to the current identity.
POST https://moi.matrixorigin.cn/newmoi/workspaces/invitations/{invitation_id}/accept
Before you call¶
First list workspaces to confirm that the current identity has a pending workspace invitation. Prepare a personal access token. You do not need to enter a workspace before calling this API.
Path parameter¶
Replace $AI_STUDIO_API_KEY and $INVITATION_ID with actual values.
curl -X POST "https://moi.matrixorigin.cn/newmoi/workspaces/invitations/$INVITATION_ID/accept" \
-H "X-API-Key: $AI_STUDIO_API_KEY"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
ID of the invitation to accept. |
Successful response¶
On success, the API returns 200. data.accepted is true when the invitation has been accepted.
{
"code": "OK",
"msg": "OK",
"data": {
"accepted": true
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
boolean |
Whether the invitation was accepted. |
Error response¶
{
"code": "NOT_FOUND",
"msg": "Not found",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code. |
|
string |
Human-readable error message. |
|
null |
|
Next steps¶
List workspaces to confirm that the workspace is accessible.