> For the complete documentation index, see [llms.txt](https://developers.copyfactory.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.copyfactory.io/api/premises/list-all-premises.md).

# List all premises

## Will fetch a list of profiles.

<mark style="color:blue;">`GET`</mark> `https://app.copyfactory.io/api/v2/premises/list/`

An array with all profiles. Each entry in the array is a separate profile object.

#### Query Parameters

| Name          | Type   | Description                                                                               |
| ------------- | ------ | ----------------------------------------------------------------------------------------- |
| profile\_id   | String | The profile ID to further filter results.                                                 |
| premise\_type | String | The premise type to further filter results. The options are either "email" or "sentence". |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Copyfactory API key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
	"data": [{
	'id': 502,
	'premise_name': 'Subject line generator',
	'required_variables': ['client_name', 'how_client_helps'],
	'profile_name': 'APP',
	'premise_type': 'email'
}, {
	'id': 529,
	'premise_name': 'Short follow up email',
	'required_variables': ['client_name', 'client_value_proposition', 'how_client_helps', 'product_name'],
	'profile_name': 'APP',
	'premise_type': 'email'
}, {
	'id': 530,
	'premise_name': 'A relevant question',
	'required_variables': ['client_value_proposition'],
	'profile_name': 'APP',
	'premise_type': 'email'
}, {
	'id': 531,
	'premise_name': 'Section: Value section',
	'required_variables': ['client_name', 'client_value_proposition', 'how_client_helps'],
	'profile_name': 'APP',
	'premise_type': 'email'
}, {
	'id': 543,
	'premise_name': 'Section: A relevant question',
	'required_variables': ['client_value_proposition'],
	'profile_name': 'APP',
	'premise_type': 'email'
}]
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Shell" %}

```
curl --location --request GET 'https://app.copyfactory.io/api/v2/premises/list/' \
--header 'Authorization: API-KEY'
```

{% endtab %}

{% tab title="Python" %}

```
import requests

url = "https://app.copyfactory.io/api/v2/premises/list/"

headers = {
  'Authorization': 'API-KEY'
}

response = requests.request("GET", url, headers=headers)

print(response.text)

```

{% endtab %}
{% endtabs %}
