# Revoke a pending invite

`DELETE https://api.mothership.com/beta/users/invites/{inviteId}`

Sandbox: `https://sandbox.api.mothership.com/beta/users/invites/{inviteId}`

Revokes a pending invite, so its link stops working and the person can't join with it. It can't be undone; invite them again to send a new email. An invite that was already accepted can't be revoked. Requires the `organization:user.create` permission.

## Authorization

Send your API token as a Bearer token: `Authorization: Bearer <token>`.

## Path parameters

- `inviteId` (string, required): ID of the pending invite, from List pending invites.

## Responses

### 200

The revoked invite is wrapped inside an object named "data"

- `data` (object, required)
  - `id` (string, required): ID of the invite.
  - `email` (string, required): Email address the invite was sent to.
  - `firstName` (string, required)
  - `lastName` (string, required, nullable)
  - `role` (string, required): Role the person gets once they accept the invite. `manager`: Manage all features for your organization. `shipper`: Book shipments. Read-access to other features. `accountant`: Manage and edit billing. View-only for other features. `viewer`: View-only account access. Nobody is invited as an owner. One of: `manager`, `shipper`, `accountant`, `viewer`.
  - `createdAt` (string<date-time>, required): When the invite was sent.
  - `expiresAt` (string<date-time>, required): When the invite link stops working.
  - `expired` (boolean, required): True when the invite link has expired. The person can't accept it; revoke it and invite them again.

### 404

No pending invite with the given id exists for the caller organization

- `code` (number, required) One of: `100`, `101`, `200`, `201`, `202`, `203`, `204`, `205`, `206`, `300`, `301`, `302`, `303`, `304`, `305`, `307`, `400`, `401`, `402`, `403`, `404`, `405`, `406`, `407`, `408`, `409`, `410`, `411`, `412`, `413`, `414`, `415`, `416`, `417`, `422`, `429`, `500`, `501`, `502`, `503`, `504`, `505`.
- `type` (string, required) One of: `UNKNOWN`, `NOT_FOUND`, `SERVER_ERROR`, `UNAUTHENTICATED`, `MISSING_PERMISSION`, `INVALID_REQUEST`, `RATE_LIMIT_EXCEEDED`, `CARGO_TOO_LARGE`, `NO_RATES_FOUND`, `QUOTE_NOT_PURCHASABLE`, `PAYMENT_REQUIRED`, `PAYMENT_FAILED`.
- `message` (string, required)
- `metadata` (object, optional)

### 409

The invite was already accepted

- `code` (number, required) One of: `100`, `101`, `200`, `201`, `202`, `203`, `204`, `205`, `206`, `300`, `301`, `302`, `303`, `304`, `305`, `307`, `400`, `401`, `402`, `403`, `404`, `405`, `406`, `407`, `408`, `409`, `410`, `411`, `412`, `413`, `414`, `415`, `416`, `417`, `422`, `429`, `500`, `501`, `502`, `503`, `504`, `505`.
- `type` (string, required) One of: `UNKNOWN`, `NOT_FOUND`, `SERVER_ERROR`, `UNAUTHENTICATED`, `MISSING_PERMISSION`, `INVALID_REQUEST`, `RATE_LIMIT_EXCEEDED`, `CARGO_TOO_LARGE`, `NO_RATES_FOUND`, `QUOTE_NOT_PURCHASABLE`, `PAYMENT_REQUIRED`, `PAYMENT_FAILED`.
- `message` (string, required)
- `metadata` (object, optional)

## Example request

```bash
curl --request DELETE \
  --url 'https://sandbox.api.mothership.com/beta/users/invites/inviteId' \
  --header "Authorization: Bearer $MOTHERSHIP_API_TOKEN" \
  --header 'Accept: application/json'
```

## Example response (200)

```json
{
  "data": {
    "id": "3f1c2a9e-5b7d-4e8a-9c61-2d4f8b0e7a15",
    "email": "logistics@example.com",
    "firstName": "Dana",
    "lastName": "Reyes",
    "role": "manager",
    "createdAt": "2026-03-19T17:00:00.000Z",
    "expiresAt": "2026-03-19T17:00:00.000Z",
    "expired": true
  }
}
```