# Account settings

> Read and change the account’s names, language, theme, email choices and default carrier, and see what verification still needs.

Source: https://docs.b7r.app/settings

> Ids, names and times in the examples are samples. Read the real values from the API.

> The email, the phone, the password, identity documents, your API keys and their spending cap, the bank account and the updates address are changed in the app only. No body here takes them.

## Read the settings

`GET /v1/settings`

`feature_intros` lists the feature introductions shown now, and whether you saw each.

Key: A key with the `settings:read` area.

Answer:

- `full_name` (string or null, required): The person behind the account.
- `brand_name` (string or null, required): The brand on your labels.
- `avatar_url` (string or null, required)
- `logo_url` (string or null, required)
- `default_carrier_id` (string (uuid) or null, required): The carrier new orders ship with unless an order names another (GET /v1/carriers).
- `language` (string, required): One of `ar`, `en`.
- `theme` (string, required): One of `light`, `dark`, `system`.
- `email_subscriptions` (object, required): The email categories you receive.
  - `welcome_drip` (boolean, required)
  - `marketing` (boolean, required)
  - `order_activity` (boolean, required)
- `setup_steps_hidden` (boolean, required)
- `first_order_celebrated` (boolean, required)
- `feature_intros` (array of object, required): The feature introductions shown now, and whether you saw each.
  - `key` (string, required)
  - `seen` (boolean, required)

Errors: `unauthorized` (401), `area_forbidden` (403), `account_inactive` (403), `connection_disabled` (403), `https_required` (403), `invalid_request` (400), `rate_limited` (429), `internal_error` (500), `upstream_unavailable` (502), `api_unavailable` (503), `request_expired` (503), `service_unavailable` (503), `upstream_timeout` (504). See [Errors](https://docs.b7r.app/errors).

Request:

```bash
curl https://api.b7r.app/v1/settings \
  -H "Authorization: Bearer $B7R_API_KEY"
```

```javascript
const res = await fetch("https://api.b7r.app/v1/settings", {
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
  },
});
const data = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.b7r.app/v1/settings",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
    },
    timeout=30,
)
data = res.json()
```

Answer (200 OK):

```json
{
  "full_name": "Sara Ahmed",
  "brand_name": "My brand",
  "avatar_url": null,
  "logo_url": null,
  "default_carrier_id": "7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a",
  "language": "ar",
  "theme": "light",
  "email_subscriptions": {
    "welcome_drip": true,
    "marketing": false,
    "order_activity": true
  },
  "setup_steps_hidden": true,
  "first_order_celebrated": true,
  "feature_intros": [
    {
      "key": "creator_stores_launch",
      "seen": true
    }
  ]
}
```

## Change the settings

`PATCH /v1/settings`

Send only the settings you change, at least one. Every field is checked before any is saved: a name the app would refuse, a carrier that is not offered (`unknown_carrier`; see [Carriers](https://docs.b7r.app/carriers)) or an introduction no longer shown refuses the whole change. The answer is the settings after the change.

A new `default_carrier_id` changes the shipping fee of the orders that follow; an order already placed keeps its fee. `setup_steps_hidden`, `first_order_celebrated` and `feature_intros_seen` only take `true`.

A new profile picture or logo: upload it first ([`POST /v1/uploads`](https://docs.b7r.app/files), purpose `avatar` or `brand_logo`, JPEG, PNG or WebP up to 2 MB and 8192 pixels a side) and name it in `avatar_upload_id` or `logo_upload_id`. It is stored in the format and at the size you sent, re-encoded with its metadata removed (EXIF, including any GPS position). An upload that cannot be used refuses the change at its field with `upload_not_found`, `upload_not_received`, `upload_type_mismatch` or `upload_size_mismatch`. If a retry answers `upload_not_found` for an image you sent, read `GET /v1/settings` first: it may already be applied.

Each changed setting is recorded in your activity log, naming the key. Your keys share `settings_writes_per_minute` (`GET /v1/me?include=limits`).

A 503 may have applied some fields. Send the same body again; each field is set, not toggled.

Key: A key with the `settings:write` area. Send `Content-Type: application/json`, and `If-Match` with the `ETag` of your last read; `Idempotency-Key` is optional.

Body:

- `full_name` (string): 3 to 64.
- `brand_name` (string): At most 100.
- `default_carrier_id` (string (uuid))
- `language` (string): One of `ar`, `en`.
- `theme` (string): One of `light`, `dark`, `system`.
- `email_subscriptions` (object)
  - `welcome_drip` (boolean)
  - `marketing` (boolean)
  - `order_activity` (boolean)
- `setup_steps_hidden` (constant): Always `true`.
- `first_order_celebrated` (constant): Always `true`.
- `feature_intros_seen` (array of string): 1 to 10 items.
- `avatar_upload_id` (string (uuid))
- `logo_upload_id` (string (uuid))

Answer:

- `full_name` (string or null, required): The person behind the account.
- `brand_name` (string or null, required): The brand on your labels.
- `avatar_url` (string or null, required)
- `logo_url` (string or null, required)
- `default_carrier_id` (string (uuid) or null, required): The carrier new orders ship with unless an order names another (GET /v1/carriers).
- `language` (string, required): One of `ar`, `en`.
- `theme` (string, required): One of `light`, `dark`, `system`.
- `email_subscriptions` (object, required): The email categories you receive.
  - `welcome_drip` (boolean, required)
  - `marketing` (boolean, required)
  - `order_activity` (boolean, required)
- `setup_steps_hidden` (boolean, required)
- `first_order_celebrated` (boolean, required)
- `feature_intros` (array of object, required): The feature introductions shown now, and whether you saw each.
  - `key` (string, required)
  - `seen` (boolean, required)

Errors: `unauthorized` (401), `area_forbidden` (403), `account_inactive` (403), `connection_disabled` (403), `https_required` (403), `invalid_request` (400), `idempotency_key_required` (400), `request_too_large` (413), `unsupported_media_type` (415), `rate_limited` (429), `internal_error` (500), `upstream_unavailable` (502), `api_unavailable` (503), `request_expired` (503), `service_unavailable` (503), `upstream_timeout` (504), `idempotency_mismatch` (409), `idempotency_in_flight` (409). See [Errors](https://docs.b7r.app/errors).

Request:

```bash
curl -X PATCH https://api.b7r.app/v1/settings \
  -H "Authorization: Bearer $B7R_API_KEY" \
  -H "If-Match: $ETAG" \
  -H "Content-Type: application/json" \
  -d '{
    "brand_name": "My brand",
    "default_carrier_id": "7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a",
    "email_subscriptions": {
      "marketing": false
    }
  }'
```

```javascript
const res = await fetch("https://api.b7r.app/v1/settings", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
    "If-Match": etag, // the ETag header of your last read
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "brand_name": "My brand",
    "default_carrier_id": "7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a",
    "email_subscriptions": {
      "marketing": false
    }
  }),
});
const data = await res.json();
```

```python
import os, requests

res = requests.patch(
    "https://api.b7r.app/v1/settings",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
        "If-Match": etag,  # the ETag header of your last read
    },
    json={
        "brand_name": "My brand",
        "default_carrier_id": "7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a",
        "email_subscriptions": {
            "marketing": False
        }
    },
    timeout=30,
)
data = res.json()
```

Answer (200 OK):

```json
{
  "full_name": "Sara Ahmed",
  "brand_name": "My brand",
  "avatar_url": null,
  "logo_url": null,
  "default_carrier_id": "7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a",
  "language": "ar",
  "theme": "light",
  "email_subscriptions": {
    "welcome_drip": true,
    "marketing": false,
    "order_activity": true
  },
  "setup_steps_hidden": true,
  "first_order_celebrated": true,
  "feature_intros": [
    {
      "key": "creator_stores_launch",
      "seen": true
    }
  ]
}
```

## Read the verification state

`GET /v1/verification`

What blocks you, if anything: `needs` says whether the email, the phone and the documents are done, waiting for review or missing. `verified` means nothing blocks your orders or store connections; a requirement under review still shows `status: pending` on its own row.

Each requirement shown to you comes with its state and, when rejected, the reason’s code: a rejection without a code reads `rejection_reason_code: null`, and its reason is read in the app. No document number, file or note is in the answer, and documents are sent in the app.

Key: A key with the `settings:read` area.

Answer:

- `status` (string, required): verified: nothing blocks you. unverified: something is missing. pending_review: a document waits for B7R. One of `verified`, `unverified`, `pending_review`.
- `needs` (object, required)
  - `email` (string, required): One of `ok`, `needed`, `in_review`.
  - `phone` (string, required): One of `ok`, `needed`, `in_review`.
  - `documents` (string, required): One of `ok`, `needed`, `in_review`.
- `requirements` (array of object, required): Each requirement shown to you, without any document data. Submitting one is done in the app.
  - `key` (string, required)
  - `required` (boolean, required)
  - `status` (string, required): One of `not_required`, `not_submitted`, `pending`, `approved`, `rejected`.
  - `submitted_at` (string or null, required)
  - `reviewed_at` (string or null, required)
  - `rejection_reason_code` (string or null, required)

Errors: `unauthorized` (401), `area_forbidden` (403), `account_inactive` (403), `connection_disabled` (403), `https_required` (403), `invalid_request` (400), `rate_limited` (429), `internal_error` (500), `upstream_unavailable` (502), `api_unavailable` (503), `request_expired` (503), `service_unavailable` (503), `upstream_timeout` (504). See [Errors](https://docs.b7r.app/errors).

Request:

```bash
curl https://api.b7r.app/v1/verification \
  -H "Authorization: Bearer $B7R_API_KEY"
```

```javascript
const res = await fetch("https://api.b7r.app/v1/verification", {
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
  },
});
const data = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.b7r.app/v1/verification",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
    },
    timeout=30,
)
data = res.json()
```

Answer (200 OK):

```json
{
  "status": "pending_review",
  "needs": {
    "email": "ok",
    "phone": "ok",
    "documents": "in_review"
  },
  "requirements": [
    {
      "key": "national_id",
      "required": true,
      "status": "pending",
      "submitted_at": "2026-11-25T10:00:00.000Z",
      "reviewed_at": null,
      "rejection_reason_code": null
    }
  ]
}
```
