Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Delete invite

client.admin.organization.invites.delete(inviteID, options?): InviteDeleteResponse { id, deleted, object }
DELETE
/organization/invites/{invite_id}

Delete an invite. If the invite has already been accepted, it cannot be deleted.

Parameters
inviteID: string
Returns
InviteDeleteResponse { id, deleted, object }
id: string
deleted: boolean
object: "organization.invite.deleted"

The object type, which is always organization.invite.deleted

Delete invite

import OpenAI from 'openai';

const client = new OpenAI({
  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted
});

const invite = await client.admin.organization.invites.delete('invite_id');

console.log(invite.id);
{
    "object": "organization.invite.deleted",
    "id": "invite-abc",
    "deleted": true
}
Returns Examples
{
    "object": "organization.invite.deleted",
    "id": "invite-abc",
    "deleted": true
}