# Create an account token

Create an account token with a publishable key and pass it to the Accounts v2 API to create or update an account without its data touching your server. Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens.md). In live mode, you can only create account tokens with your application’s publishable key. In test mode, you can create account tokens with your secret key or publishable key.

## Request

```curl
curl -X POST https://api.stripe.com/v2/core/account_tokens \
  -H "Authorization: Bearer <<YOUR_SECRET_KEY>>" \
  -H "Stripe-Version: 2026-07-29.dahlia" \
  --json '{
    "contact_email": "furever@example.com",
    "display_name": "Furever",
    "identity": {
        "attestations": {
            "terms_of_service": {
                "account": {
                    "shown_and_accepted": true
                }
            }
        },
        "entity_type": "company",
        "business_details": {
            "registered_name": "Furever"
        }
    }
  }'
```

### Response

```json
{
  "id": "accttok_61RS0CgWt1xBt8M1Q16RS0Cg0WSQO5ZXUVpZxZ9tAIbY",
  "object": "v2.core.account_token",
  "created": "2025-11-17T14:00:00.000Z",
  "expires_at": "2025-11-17T14:10:00.000Z",
  "livemode": true,
  "used": false
}
```

## Parameters

- `contact_email` (string, optional)
  The primary contact email address for the Account.

- `contact_phone` (string, optional)
  The default contact phone for the Account.

- `display_name` (string, optional)
  A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on any invoices sent to the Account.

- [`identity`](https://docs.stripe.com/api/v2/core/account-tokens/create.md?query=identity) (object, optional)
  Information about the company, individual, and business represented by the Account.

## Returns

Returns an [Account Token object](https://docs.stripe.com/api/v2/core/account-tokens/object.md).

## Error Codes

| HTTP status code | Code | Description |
| --- | --- | --- |
| 400 | non_connect_platform_accounts_v2_access_blocked | Needs to use the newer API version or onboard to Connect. |
| 400 | platform_registration_required | The direct merchant has not signed up for Connect and cannot create connected accounts. |
| 400 | token_must_be_created_with_publishable_key | Token must be created with publishable key. |
| 429 | account_rate_limit_exceeded | Account cannot exceed a configured concurrency rate limit on updates. |
