# API reference: Profile

> The Profile endpoints (4 operations), generated from the OpenAPI document (https://faraatarjomeh.com/api/v1/openapi.json). For task-level walkthroughs use the guides; for error handling use /api/v1/docs/errors. The full reference: /api/v1/docs/reference.

## At a glance

- Auth on every call: `Authorization: Bearer $FARA_API_KEY`
- `scope`: `read` for GET/HEAD, `write` for the rest
- **spends Fara**: the call holds or charges Fara; get the price first and send `Idempotency-Key`
- Path parameters in the examples are shell variables (`$JOB_ID`, `$ID` …)
- Errors: `application/problem+json` with a stable `code` (not repeated per endpoint below)

## Index

- **Profile**: [GET /api/v1/profile](#getProfile), [GET /api/v1/profile/usage](#getUsageStats), [GET /api/v1/profile/credits](#getCreditHistory), [GET /api/v1/dashboard/stats](#getDashboardStats)

## Profile

Profile, usage, and dashboard numbers.

<a id="getProfile"></a>
### GET /api/v1/profile

Get your profile **Deprecated.**

- operationId `getProfile` · scope `read` · free

**Deprecated** for API keys: use GET /api/v1/account. Answers carry `Deprecation` and `Sunset` headers; from 2026-09-29 API keys get 410 `GONE`.

**Response `200`**

[`Profile`](#schema-profile)

**Responses**

- `200` Profile. (`application/json`)
- Errors: `401`, `403`, `404`, `429`, `503` — problem+json, see /api/v1/docs/errors

**Example**

```bash
curl -sS -X GET "https://faraatarjomeh.com/api/v1/profile" \
  -H "Authorization: Bearer $FARA_API_KEY"
```

<a id="getUsageStats"></a>
### GET /api/v1/profile/usage

Get translation usage totals **Deprecated.**

- operationId `getUsageStats` · scope `read` · free

**Deprecated** for API keys: use GET /api/v1/account/transactions. Answers carry `Deprecation` and `Sunset` headers; from 2026-09-29 API keys get 410 `GONE`.

**Response `200`**

[`UsageStats`](#schema-usage-stats)

**Responses**

- `200` Usage. (`application/json`)
- Errors: `401`, `403`, `429`, `503` — problem+json, see /api/v1/docs/errors

**Example**

```bash
curl -sS -X GET "https://faraatarjomeh.com/api/v1/profile/usage" \
  -H "Authorization: Bearer $FARA_API_KEY"
```

<a id="getCreditHistory"></a>
### GET /api/v1/profile/credits

Get the balance and ledger (page-based) **Deprecated.**

- operationId `getCreditHistory` · scope `read` · free

**Deprecated** for API keys: use GET /api/v1/account/transactions. Answers carry `Deprecation` and `Sunset` headers; from 2026-09-29 API keys get 410 `GONE`.

Older, page-based view of the ledger. New code should use GET /api/v1/account/transactions.

**Parameters**

| Name | In | Type | Required | Notes |
|---|---|---|---|---|
| `page` | query | integer | no | Page number, starting at 1. — default: `1`; min 1 |
| `limit` | query | integer | no | Items per page (1-100). — default: `20`; min 1; max 100 |

**Response `200`**

[`CreditsHistory`](#schema-credits-history)

**Responses**

- `200` Balance and one page. (`application/json`)
- Errors: `400`, `401`, `403`, `404`, `429`, `503` — problem+json, see /api/v1/docs/errors

**Example**

```bash
curl -sS -X GET "https://faraatarjomeh.com/api/v1/profile/credits" \
  -H "Authorization: Bearer $FARA_API_KEY"
```

<a id="getDashboardStats"></a>
### GET /api/v1/dashboard/stats

Get dashboard numbers **Deprecated.**

- operationId `getDashboardStats` · scope `read` · free

**Deprecated** for API keys: use GET /api/v1/account. Answers carry `Deprecation` and `Sunset` headers; from 2026-09-29 API keys get 410 `GONE`.

**Response `200`**

[`DashboardStats`](#schema-dashboard-stats)

**Responses**

- `200` Numbers. (`application/json`)
- Errors: `401`, `403`, `429`, `503` — problem+json, see /api/v1/docs/errors

**Example**

```bash
curl -sS -X GET "https://faraatarjomeh.com/api/v1/dashboard/stats" \
  -H "Authorization: Bearer $FARA_API_KEY"
```

## Schemas

Named request and response objects used above. Nested objects are flattened as `parent.child`; arrays as `parent[].child`.

<a id="schema-credits-history"></a>
### CreditsHistory

| Field | Type | Required | Notes |
|---|---|---|---|
| `balance` | number | yes |  |
| `chargebackLiability` | number | no |  |
| `lifetimeTopup` | number | no |  |
| `lifetimeUsage` | number | no |  |
| `lastTransactionAt` | string \| null | no | may be null |
| `transactions` | object[] | yes |  |
| `total` | integer | no |  |
| `page` | integer | no |  |
| `limit` | integer | no |  |
| `totalPages` | integer | no |  |

<a id="schema-dashboard-stats"></a>
### DashboardStats

| Field | Type | Required | Notes |
|---|---|---|---|
| `jobs` | object | no | Counts of your translation jobs by status. |
| `usage` | object | no | Words and Fara used. |
| `recentJobs` | object[] | no |  |
| `trends` | object | no |  |
| `trends.daily` | object[] | no |  |
| `user` | object | no |  |
| `user.email` | string | no |  |
| `user.role` | string | no |  |
| `user.isAdmin` | boolean | no |  |
| `meta` | object | no |  |
| `meta.generatedAt` | string \| null | no | may be null |
| `meta.cacheExpiry` | integer | no |  |

<a id="schema-profile"></a>
### Profile

Your account profile (email, name, verification flags, Fara totals, and settings). Secrets are never included.

_Free-form object._

<a id="schema-usage-stats"></a>
### UsageStats

| Field | Type | Required | Notes |
|---|---|---|---|
| `totals` | object | no |  |
| `totals.totalTranslations` | integer | no |  |
| `totals.completedTranslations` | integer | no |  |
| `totals.totalWords` | integer | no |  |
| `totals.totalCost` | number | no | Fara. |
| `totals.totalParagraphs` | integer | no |  |
| `monthly` | object[] | no | Last 12 months. |
| `monthly[].year` | integer | no |  |
| `monthly[].month` | integer | no |  |
| `monthly[].translations` | integer | no |  |
| `monthly[].words` | integer | no |  |
| `monthly[].cost` | number | no |  |
