# Add Account

**POST** `/v1/accounts`

Creates a seller or buyer account record.

## Authentication required

This is a **user-authenticated write**. Send the logged-in user's `auth_key`
returned from the Login or Verify endpoint as the Bearer token:

```http
Authorization: Bearer <user-auth_key>
Content-Type: application/json
X-TRADLY-AGENT: 3
```

Do **not** use a tenant publishable key, secret key, or tenant OAuth token as
the Bearer credential for this endpoint. Those credentials are suitable for
tenant-level and public API access, but account creation is authorized by the
current user's session token.

## Request example

```bash
curl -X POST "https://api.tradly.app/v1/accounts" \
  -H "Authorization: Bearer <user-auth_key>" \
  -H "Content-Type: application/json" \
  -H "X-TRADLY-AGENT: 3" \
  -d '{
    "account": {
      "name": "Acme Supplies",
      "slug": "acme-supplies",
      "web_address": "",
      "description": "Wholesale supplies",
      "category_id": [1],
      "images": [],
      "type": "accounts"
    }
  }'
```

The response returns the account created for the authenticated user. A `412`
with error code `753` (`Action not allowed`) commonly means the request used
tenant credentials instead of the logged-in user's Bearer token.
