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

# Add access

> Restrict your API key to your own domains.

Adds domains that are allowed to use your business's API key. Once domains are set, the key only works on those domains — this protects your credits if the key is copied from your site.

## Path parameters

**business\_id** `integer` *required*

ID of the business.

## Body

**sites** `string[]` *required*

List of your domains, for example `["https://first-domain.com", "https://second-domain.app"]`.

## Response

**status** `boolean`

`true` when the domains are added.

**data** `object`

The business, including `access_list` with every allowed domain.

```bash cURL theme={null}
curl --request POST 'https://core.getfaceage.com/api/v1/business/{business_id}/access' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer your_secret_key' \
  --data-raw '{
    "sites": [
      "https://first-domain.com",
      "https://second-domain.app"
    ]
  }'
```

```json 200 theme={null}
{
  "status": true,
  "data": {
    "id": 9823,
    "user_id": 5078,
    "name": "my beauty salon",
    "main_domain": "mybeauty-salon.com",
    "site": "https://www.mybeauty-salon.com",
    "country_id": 22,
    "business_size": "medium",
    "token": "Wdroi9WuX8klSeb6zbN0",
    "status": "active",
    "created_at": "2024-03-16T11:41:41.000000Z",
    "updated_at": "2024-03-16T11:43:00.000000Z",
    "access_list": [
      {
        "id": 309,
        "business_id": 9823,
        "site": "https://first-domain.com",
        "created_at": "2024-03-17T06:48:23.000000Z",
        "updated_at": "2024-03-17T06:48:23.000000Z"
      },
      {
        "id": 310,
        "business_id": 9823,
        "site": "https://second-domain.app",
        "created_at": "2024-03-17T06:48:23.000000Z",
        "updated_at": "2024-03-17T06:48:23.000000Z"
      }
    ]
  }
}
```

```json 401 Invalid business theme={null}
{
  "status": false,
  "message": "Id is not valid"
}
```

```json 401 Unauthorized theme={null}
{
  "message": "Unauthenticated."
}
```


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