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

invitation_id

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

code

string

OK on success.

msg

string

OK on success.

data.accepted

boolean

Whether the invitation was accepted.

Error response

{
  "code": "NOT_FOUND",
  "msg": "Not found",
  "data": null
}

Field

Type

Description

code

string

Error code.

msg

string

Human-readable error message.

data

null

null in an error response.

Next steps

List workspaces to confirm that the workspace is accessible.

Last updated on