# Accept an invitation

> The invitations.accept operation: POST /api/v1/invitations/accept in the REST API and the invitations_accept tool in the MCP server.

Accepts an invitation: you become a member of the organization with the invitation's role and scope.
You must be signed in with the address the invitation was sent to, and the invitation must be pending
(not accepted, revoked or older than 7 days). Live-mode access follows the role (developers start
without it). Returns the new membership and the organization, whose console is `/console/{slug}`.

**Who can call it:** any signed-in user holding the token from the invitation link.

## At a glance

- **REST:** `POST /api/v1/invitations/accept`
- **MCP tool:** `invitations_accept`
- **Operation ID:** `invitations.accept`
- **Scope:** Platform
- **Permission:** `account:write`
- **Risk tier:** `write`
- **Dry run:** Supported (send `Ownrecord-Dry-Run: true`)
- **Idempotency:** `Idempotency-Key` required
- **Modes:** Test and live
- **Authentication:** API key with the `account:write` scope
- **Since:** M1

## Request

### Body

A JSON object (`Content-Type: application/json`):

| Field   | Type   | Required | Description |
| ------- | ------ | -------- | ----------- |
| `token` | string | Yes      |             |

## Response

`200 OK` with a JSON object:

| Field                       | Type                                                                                                         | Description |
| --------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------- |
| `membership`                | object                                                                                                       |             |
| `membership.id`             | `mem_…` ID                                                                                                   |             |
| `membership.object`         | `"membership"`                                                                                               |             |
| `membership.orgId`          | `org_…` ID                                                                                                   |             |
| `membership.userId`         | `usr_…` ID                                                                                                   |             |
| `membership.role`           | one of `org_owner`, `org_admin`, `billing_admin`, `finance`, `tax_manager`, `support`, `developer`, `viewer` |             |
| `membership.scope`          | object                                                                                                       |             |
| `membership.livemodeAccess` | boolean                                                                                                      |             |
| `membership.invitedBy`      | `usr_…` ID or null                                                                                           |             |
| `membership.user`           | object or null                                                                                               |             |
| `membership.createdAt`      | date-time                                                                                                    |             |
| `membership.updatedAt`      | date-time                                                                                                    |             |
| `organization`              | object                                                                                                       |             |
| `organization.id`           | `org_…` ID                                                                                                   |             |
| `organization.slug`         | string                                                                                                       |             |
| `organization.name`         | string                                                                                                       |             |

## Examples

### Accept an invitation to a brand

```http
POST /api/v1/invitations/accept
Authorization: Bearer or_test_…
Idempotency-Key: 3f1c9a52-7d0e-4b8f-9a61-0c2d5e8b7f14
Content-Type: application/json

{
  "token": "ExampleOnlyNotARealInvitationToken000000000"
}
```

Response (`200`):

```json
{
  "membership": {
    "id": "mem_01m4tx5nj8emwbyf7y9vcf47x6",
    "object": "membership",
    "orgId": "org_01m4tx5nj7ekd958x53w4bntcg",
    "userId": "usr_01m4tx5nj8emwbyf7y9vcf47xb",
    "role": "developer",
    "scope": {
      "type": "brand",
      "brandId": "brd_01m4tx5nj8emwbyf7y9vcf47x4"
    },
    "livemodeAccess": false,
    "invitedBy": "usr_01m4tx5nj8emwbyf7y9vcf47xa",
    "user": {
      "email": "dev@acme.example",
      "name": "Dana Developer"
    },
    "createdAt": "2026-10-13T12:00:00.000Z",
    "updatedAt": "2026-10-13T12:00:00.000Z"
  },
  "organization": {
    "id": "org_01m4tx5nj7ekd958x53w4bntcg",
    "slug": "acme",
    "name": "Acme"
  }
}
```

## Errors

| Code                                                                                                       | HTTP status | When                                                                   | What to do                                                                                                                  |
| ---------------------------------------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [`validation_failed`](https://ownrecord.io/docs/reference/errors.md#validation_failed)                     | 400         | The token is malformed.                                                | Fix the fields listed in `details.issues` and send the request again.                                                       |
| [`invitation_invalid`](https://ownrecord.io/docs/reference/errors.md#invitation_invalid)                   | 404         | No invitation has this token, or what it grants no longer exists.      | Check that you opened the whole link from the invitation email, or ask the person who invited you to send a new invitation. |
| [`invitation_expired`](https://ownrecord.io/docs/reference/errors.md#invitation_expired)                   | 409         | The invitation is older than 7 days.                                   | Ask the person who invited you to send a new invitation.                                                                    |
| [`invitation_revoked`](https://ownrecord.io/docs/reference/errors.md#invitation_revoked)                   | 409         | The invitation was revoked.                                            | Ask the person who invited you to send a new invitation.                                                                    |
| [`invitation_already_accepted`](https://ownrecord.io/docs/reference/errors.md#invitation_already_accepted) | 409         | The invitation was already accepted.                                   | Open the console to see your organizations. Each invitation works once.                                                     |
| [`invitation_email_mismatch`](https://ownrecord.io/docs/reference/errors.md#invitation_email_mismatch)     | 403         | You're signed in with another address than the invited one.            | Sign out, then sign in with the address the invitation was sent to. Or ask for an invitation to your own address.           |
| [`membership_exists`](https://ownrecord.io/docs/reference/errors.md#membership_exists)                     | 409         | You already have a membership at this scope.                           | Change the role of the existing membership instead of adding another one.                                                   |
| [`entitlement_required`](https://ownrecord.io/docs/reference/errors.md#entitlement_required)               | 403         | The organization's `members.max` is reached.                           | Upgrade the organization's plan, or remove something to get back under the limit.                                           |
| [`version_conflict`](https://ownrecord.io/docs/reference/errors.md#version_conflict)                       | 409         | The invitation changed at the same time (for example, it was revoked). | Fetch the object again and retry the change.                                                                                |
| [`permission_denied`](https://ownrecord.io/docs/reference/errors.md#permission_denied)                     | 403         | The caller isn't a signed-in user.                                     | Ask an organization owner or admin for a role or scope that allows this action.                                             |

It can also return these [common errors](https://ownrecord.io/docs/reference.md#common-errors): [`api_version_unsupported`](https://ownrecord.io/docs/reference/errors.md#api_version_unsupported), [`invalid_json`](https://ownrecord.io/docs/reference/errors.md#invalid_json), [`unsupported_media_type`](https://ownrecord.io/docs/reference/errors.md#unsupported_media_type), [`authentication_required`](https://ownrecord.io/docs/reference/errors.md#authentication_required), [`api_key_invalid`](https://ownrecord.io/docs/reference/errors.md#api_key_invalid), [`resource_not_found`](https://ownrecord.io/docs/reference/errors.md#resource_not_found), [`idempotency_key_required`](https://ownrecord.io/docs/reference/errors.md#idempotency_key_required), [`idempotency_key_reused`](https://ownrecord.io/docs/reference/errors.md#idempotency_key_reused), [`idempotency_in_progress`](https://ownrecord.io/docs/reference/errors.md#idempotency_in_progress), [`rate_limited`](https://ownrecord.io/docs/reference/errors.md#rate_limited), [`internal_error`](https://ownrecord.io/docs/reference/errors.md#internal_error).
