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

# Invites

> Inspect and accept organization invitations.

Invitation endpoints complete the flow started by an organization owner. Invite details are public so they can be shown before sign-in; acceptance requires a matching signed-in user.

<Note>
  Invite endpoints are served at the API host root, not under `/api/v1`: `https://api.autosage.ai/invites`.
</Note>

## Endpoints

| Method | Path                   | Description                        | Auth    |
| ------ | ---------------------- | ---------------------------------- | ------- |
| `GET`  | `/invites/:token/info` | Get invitation details for display | Public  |
| `POST` | `/invites/accept`      | Accept an invitation               | \[User] |

***

### Get invitation info

`GET /invites/:token/info`

Returns the invited email, assigned role, organization name, inviter name, and expiration time. No session or API key is required.

<ParamField path="token" type="string" required>
  Invitation token from the invite link.
</ParamField>

```bash theme={null}
curl "https://api.autosage.ai/invites/INVITE_TOKEN/info"
```

Invalid, expired, accepted, or revoked tokens return an error rather than invitation details.

***

### Accept an invitation

`POST /invites/accept`

Adds the signed-in user to the organization with the role assigned by the inviter.

<ParamField body="token" type="string" required>
  Invitation token to accept.
</ParamField>

```bash theme={null}
curl -X POST "https://api.autosage.ai/invites/accept" \
  -H "Cookie: YOUR_SESSION_COOKIE" \
  -H "Content-Type: application/json" \
  -d '{ "token": "INVITE_TOKEN" }'
```

<Warning>
  The signed-in user's email must match the invitation email. Invitations expire 7 days after they are created and cannot be reused after acceptance or revocation.
</Warning>

The response includes `success`, `orgId`, and the accepted `role`.

## Next steps

<CardGroup cols={2}>
  <Card title="Invite lifecycle" icon="envelope" href="/teams/invites">
    Learn how owners send, track, and revoke invitations.
  </Card>

  <Card title="Members & roles" icon="users" href="/teams/members-roles">
    Understand the access granted after acceptance.
  </Card>

  <Card title="Organizations API" icon="building" href="/developers/api/organizations">
    Manage members and pending invitations.
  </Card>
</CardGroup>
