Accept a pending workspace invitation with POST /api/v1/me/invites/accept. Requires a signed-in user, in the web app or the CLI; API keys are not accepted and MCP cannot call it. The invitation must match your verified email.
Request
The body takes one of 2 shapes.
| Body field | Type | Required |
|---|---|---|
token |
string | Yes (shape 1) |
inviteId |
UUID | Yes (shape 2) |
Response
- HTTP 200:
WorkspaceInviteAcceptedwithworkspace,membership.
The OpenAPI document has each field’s type.
Examples
const accepted = await client.me.acceptInvite({ inviteId });Create this client with a signed-in person’s accessToken, not an apiKey.
The Python SDK authenticates with a workspace API key, which this operation does not accept, so it has no method for it.
curl -X POST "https://pubnio.com/api/v1/me/invites/accept" \
-H "Authorization: Bearer $PUBNIO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"inviteId":"'"$INVITE_ID"'"}'pnio profile invites accept "$INVITE_ID"async () => {
const inviteId = "<inviteId>";
const response = await codemode.request({
method: "POST",
path: "/api/v1/me/invites/accept",
body: { inviteId: inviteId },
});
return response.data;
};Errors
It declares no problem of its own.
It declares the problems every Your invitations operation and most operations declare.
Idempotency
No key, so a retried POST is not deduplicated. Read the current state before you retry.
Limits
- API keys and MCP cannot call it. A signed-in person runs it from the CLI after
pnio auth loginor in the web app.