# acceptAccountInvitation

```graphql
mutation AcceptAccountInvitation($input: AcceptAccountInvitationInput!) {
  acceptAccountInvitation(input: $input) {
    id
    slug
    name
    kind
    createdAt
    updatedAt
    membership {
      role
      capabilities
    }
  }
}
```

Accept account invitation.

## Arguments

| Name          | Type                          | Required | Description                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------- | ----------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input`       | AcceptAccountInvitationInput! | Yes      |                                                                                                                                                                                                                                                                                                                                                                                                         |
| `input.token` | String!                       | Yes      | Invitation acceptance token. Requires a user session; API keys are refused. Fresh acceptance requires the matching current email. Repeating acceptance returns the existing membership for the same accepting user, if that membership still exists. Unknown or revoked tokens return 404; a fresh request with a mismatched email returns 403. Expired or no longer authorized invitations return 409. |

## Variables

```json
{
  "input": {
    "token": "stringstringstringst"
  }
}
```

## Responses

| Status | Description                                   |
| ------ | --------------------------------------------- |
| 200    | The Account! in data.acceptAccountInvitation. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation AcceptAccountInvitation($input: AcceptAccountInvitationInput!) {\n  acceptAccountInvitation(input: $input) {\n    id\n    slug\n    name\n    kind\n    createdAt\n    updatedAt\n    membership {\n      role\n      capabilities\n    }\n  }\n}",
  "variables": {
    "input": {
      "token": "stringstringstringst"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "acceptAccountInvitation": {
      "id": "string",
      "slug": "string",
      "name": "string",
      "kind": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "membership": {
        "role": "string",
        "capabilities": [
          "string"
        ]
      }
    }
  }
}
```
