Skip to content

Decline a pending workspace invitation

PubNio API me.invites.decline: decline a pending workspace invitation. Request fields, examples in five clients, errors, and idempotency.

Decline a pending workspace invitation with POST /api/v1/me/invites/{inviteId}/decline. 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

Parameter In Type Required
inviteId path UUID Yes

Response

  • HTTP 200: WorkspaceInviteDeclined with declined, remoteRevocationPending.

The OpenAPI document has each field’s type.

Examples

const declined = await client.me.declineInvite(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/$INVITE_ID/decline" \
  -H "Authorization: Bearer $PUBNIO_TOKEN"
pnio profile invites decline "$INVITE_ID"
async () => {
  const inviteId = "<inviteId>";
  const response = await codemode.request({
    method: "POST",
    path: `/api/v1/me/invites/${inviteId}/decline`,
  });
  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 login or in the web app.

Type to search…

↑↓ navigate↵ selectEsc close