Source: https://datafa.st/docs/api/account/account/retrieve
Markdown source: https://datafa.st/docs/api/account/account/retrieve.md
Description: Return the authenticated account profile and plan details.

# Get account

`GET https://datafa.st/api/v1/admin/account`

Return the authenticated account profile, plan status, and billing cycle dates. Use this to verify a token works or to display account context in CLI tools and AI agents.

When authenticated with a `df_` website key, the response also includes `websiteId` for the scoped website.

## Request

This endpoint does not require any path, query, or body parameters.

## Response

Returns a JSON object with `status: "success"` and endpoint-specific fields in `data`.

#### Response fields

| Field | Type | Description |
| --- | --- | --- |
| `data[]._id` | string | User ObjectId. |
| `data[].name` | string\|null | Human-readable name for the resource or event. The exact meaning depends on the endpoint. |
| `data[].email` | string | Account email. |
| `data[].image` | string\|null | Profile image URL. |
| `data[].hasAccess` | boolean | Whether the account has paid access. |
| `data[].planType` | string\|null | Current plan type. |
| `data[].isFreeTrialActive` | boolean | Whether the free trial is active. |
| `data[].freeTrialStartAt` | string\|null | Free trial start timestamp. |
| `data[].billingCycleStartAt` | string\|null | Current billing cycle start. |
| `data[].billingCycleEndAt` | string\|null | Current billing cycle end. |
| `data[].websiteId` | string | Website ObjectId used by account tokens to choose which website to query or manage. Only present when authenticated with a single-site website API key. |

### Authentication

Use a `dft_` account token with `analytics:read`.

### Errors

**401** — Invalid or missing token.

**403** — Account does not have API access.

See [API errors](/docs/api#errors) for the standard error envelope, auth failures, validation errors, permission errors, and rate limits.

## Code examples

### Example request

```bash
curl -X GET "https://datafa.st/api/v1/admin/account" \
  -H "Authorization: Bearer dft_xxx"
```

### Success response

```json
{
  "status": "success",
  "data": [{
    "_id": "665f0b3c4d2e1a0012345678",
    "name": "Jane Doe",
    "email": "jane@example.com",
    "image": "https://example.com/avatar.png",
    "hasAccess": true,
    "planType": "pro",
    "isFreeTrialActive": false,
    "freeTrialStartAt": "2026-05-01T00:00:00.000Z",
    "billingCycleStartAt": "2026-05-01T00:00:00.000Z",
    "billingCycleEndAt": "2026-06-01T00:00:00.000Z",
    "createdAt": "2026-01-01T00:00:00.000Z"
  }]
}
```
