> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dacard.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Accept or decline a team invite

> Inspect a pending invite by email, then accept or decline.

Inspect a pending invite by email (no auth required), then accept or decline (auth required). Used by the invite landing page.

## Inspect a pending invite

```bash theme={null}
curl -X GET "https://app.dacard.ai/api/teams/tm_2x1B3y/accept?email=designer@acme.com"
```

| Property       | Value                         |
| -------------- | ----------------------------- |
| **Auth**       | Not required (public preview) |
| **Idempotent** | Yes                           |

Response:

```json theme={null}
{
  "teamName": "Acme Product",
  "inviteStatus": "pending",
  "memberRole": "scorer",
  "functionScope": "design"
}
```

## Accept or decline

```bash theme={null}
curl -X POST https://app.dacard.ai/api/teams/tm_2x1B3y/accept \
  -H "Authorization: Bearer $DACARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "decision": "accept" }'
```

| Property       | Value                          |
| -------------- | ------------------------------ |
| **Auth**       | Required                       |
| **Idempotent** | Yes (second accept is a no-op) |

Body: `{ "decision": "accept" }` or `{ "decision": "decline" }`.

The caller's authenticated email must match the invited email. Mismatches return 403.

## Errors

| Status | Code                          | When                                                 |
| ------ | ----------------------------- | ---------------------------------------------------- |
| 401    | `AUTH_REQUIRED`               | POST without session.                                |
| 403    | `Email does not match invite` | Authed user's email differs from the invite's email. |
| 404    | `Team not found`              | Bad team `id`.                                       |
| 410    | `TEAM_INVITE_EXPIRED`         | Invite token aged out.                               |
| 500    | `INTERNAL_ERROR`              | Write failed.                                        |
