> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dintero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API clients and grants

> Create API clients and delegate grants on a merchant account using the Dintero Partner API.

Include the merchant access token from the [merchant account API access](/docs/partners/partners-merchant-api-access.md) flow as the `Authorization` header in your requests.

Creating an API client is a two-step process: create the client, then delegate grants to it.

**1. Create the API client**

See the [Create client API](/partners/clients/aid_auth_clients_post.md) for full reference.

```bash wrap Request theme={null}
curl -X POST https://api.dintero.com/v1/accounts/T11200001/auth/clients \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "API client for e-commerce",
    "description": "Created by partner",
    "client_id": "ecom-123"
  }'
```

```json wrap Response theme={null}
{
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "API client for e-commerce",
    "description": "Created by partner",
    "client_id": "ecom-123",
    "client_secret": "JYCRP/x7iBGWA1fun0J9laH5sEg5cP9g/4QivhfGzm4"
}
```

**2. Create client grants**

See the [Create client grant API](/partners/grants/aid_auths_client_grants_post.md) for full reference.

Use the `id` from the previous step as the `client_id` value.

```bash wrap Request theme={null}
curl -X POST https://api.dintero.com/v1/accounts/T11200001/auth/client-grants \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "audience": "https://api.dintero.com/v1/accounts/T11200001",
    "scope": [
      "checkout:admin"
    ],
    "type": "client_credentials"
  }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.