<!-- llms.txt: https://workos.com/llms.txt -->

# Admin Portal

Hand a user off to Admin Portal for a setup flow that is too involved to reproduce in a widget.

## Create an Admin Portal link

Mint a short-lived link that starts an Admin Portal session for the token's organization, scoped to a single setup flow.

:::code-group

```graphql language="graphql" title="Mutation" tab="1"
mutation CreateAdminPortalLink($intent: AdminPortalLinkIntent!) {
  createAdminPortalLink(intent: $intent) {
    expiresAt
    intent
    link
  }
}
```

```json language="json" title="Response" tab="2"
{
  "data": {
    "createAdminPortalLink": {
      "expiresAt": "2024-01-01T00:00:00.000Z",
      "intent": "DomainVerification",
      "link": "link_example"
    }
  }
}
```

:::

### Mutation createAdminPortalLink

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `intent` | AdminPortalLinkIntent! | Yes | The Admin Portal setup flow a link is scoped to. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `expiresAt` | DateTime! | When the link stops being redeemable. |
| `intent` | AdminPortalLinkIntent! | The setup flow the link is scoped to. |
| `link` | String! | The Admin Portal URL to send the user to. It carries a bearer capability, so treat it as a secret and redirect immediately. |