# Transparency Templates

Read more about transparency templates from [Transparency Templates documentation](https://prompteasy.eu/docs/features/transparency-templates).

## List all transparency templates

`GET /v1/transparency-templates`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Responses:

- 200: A list of transparency templates.

Content type: application/json

Type: array

Items:
  Reference: [TransparencyTemplate](https://api.prompteasy.eu/docs/api/models/transparencytemplate/index.md); Type: object

- 403: Forbidden

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/transparency-templates' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/transparency-templates', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/transparency-templates',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Create a transparency template

`POST /v1/transparency-templates`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Request body: application/json (required)

Type: object

- `template` (required)
  Type: string

Responses:

- 201: Transparency template created successfully.

Content type: application/json

Type: object

Schema: [TransparencyTemplate](https://api.prompteasy.eu/docs/api/models/transparencytemplate/index.md)

- `id` (optional)
  Type: string, uuid
  
  Example:
  
  ```json
  "019e7806-337d-729c-8a2e-210308da3d02"
  ```

- `tenant_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `template` (optional)
  Type: string
  
  Example:
  
  ```json
  "This is transparency template notice text."
  ```

- `created_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2026-05-30T11:22:33+03:00"
  ```

- `updated_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2026-05-30T11:22:33+03:00"
  ```

- `is_in_vault_receipts` (optional)
  Type: boolean

- `days_until_safe_deletion` (optional)
  Type: integer

- 403: Forbidden

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/transparency-templates' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "template": "string"
}'
```

### JavaScript

```javascript
const body = `{
  "template": "string"
}`;

const response = await fetch('https://api.prompteasy.eu/v1/transparency-templates', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "template": "string"
}'''

response = requests.post(
    'https://api.prompteasy.eu/v1/transparency-templates',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## List all vaults for transparency templates tool

`GET /v1/transparency-templates/vaults`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Responses:

- 200: A list of vaults with transparency template binding info.

Content type: application/json

Type: array

Items:
  Type: object
  
  - `id` (optional)
    Type: integer
  
  - `name` (optional)
    Type: string
  
  - `transparency_template_id` (optional)
    Type: string, uuid; nullable

- 403: Forbidden

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/transparency-templates/vaults' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/transparency-templates/vaults', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/transparency-templates/vaults',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Bind a transparency template to a vault

`POST /v1/transparency-templates/vaults/{vault}/bind`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `vault` (path, integer, required)
  Type: integer

Request body: application/json (required)

Type: object

- `transparency_template_id` (required)
  Type: string, uuid

Responses:

- 200: Vault successfully bound.

- 403: Forbidden

- 404: Not Found

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/transparency-templates/vaults/0/bind' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "transparency_template_id": "550e8400-e29b-41d4-a716-446655440000"
}'
```

### JavaScript

```javascript
const body = `{
  "transparency_template_id": "550e8400-e29b-41d4-a716-446655440000"
}`;

const response = await fetch('https://api.prompteasy.eu/v1/transparency-templates/vaults/0/bind', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "transparency_template_id": "550e8400-e29b-41d4-a716-446655440000"
}'''

response = requests.post(
    'https://api.prompteasy.eu/v1/transparency-templates/vaults/0/bind',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Unbind the transparency template from a vault

`POST /v1/transparency-templates/vaults/{vault}/unbind`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `vault` (path, integer, required)
  Type: integer

Responses:

- 200: Vault successfully unbound.

- 403: Forbidden

- 404: Not Found

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/transparency-templates/vaults/0/unbind' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/transparency-templates/vaults/0/unbind', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.post(
    'https://api.prompteasy.eu/v1/transparency-templates/vaults/0/unbind',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Get details of a single transparency template

`GET /v1/transparency-templates/{template}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `template` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 200: Transparency template details

Content type: application/json

Type: object

Schema: [TransparencyTemplate](https://api.prompteasy.eu/docs/api/models/transparencytemplate/index.md)

- `id` (optional)
  Type: string, uuid
  
  Example:
  
  ```json
  "019e7806-337d-729c-8a2e-210308da3d02"
  ```

- `tenant_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `template` (optional)
  Type: string
  
  Example:
  
  ```json
  "This is transparency template notice text."
  ```

- `created_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2026-05-30T11:22:33+03:00"
  ```

- `updated_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2026-05-30T11:22:33+03:00"
  ```

- `is_in_vault_receipts` (optional)
  Type: boolean

- `days_until_safe_deletion` (optional)
  Type: integer

- 403: Forbidden

- 404: Not Found

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/transparency-templates/550e8400-e29b-41d4-a716-446655440000' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/transparency-templates/550e8400-e29b-41d4-a716-446655440000', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/transparency-templates/550e8400-e29b-41d4-a716-446655440000',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Update a transparency template

`PUT /v1/transparency-templates/{template}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `template` (path, string, uuid, required)
  Type: string, uuid

Request body: application/json (required)

Type: object

- `template` (required)
  Type: string

Responses:

- 200: Transparency template updated successfully

Content type: application/json

Type: object

Schema: [TransparencyTemplate](https://api.prompteasy.eu/docs/api/models/transparencytemplate/index.md)

- `id` (optional)
  Type: string, uuid
  
  Example:
  
  ```json
  "019e7806-337d-729c-8a2e-210308da3d02"
  ```

- `tenant_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `template` (optional)
  Type: string
  
  Example:
  
  ```json
  "This is transparency template notice text."
  ```

- `created_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2026-05-30T11:22:33+03:00"
  ```

- `updated_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2026-05-30T11:22:33+03:00"
  ```

- `is_in_vault_receipts` (optional)
  Type: boolean

- `days_until_safe_deletion` (optional)
  Type: integer

- 403: Forbidden

- 404: Not Found

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X PUT 'https://api.prompteasy.eu/v1/transparency-templates/550e8400-e29b-41d4-a716-446655440000' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "template": "string"
}'
```

### JavaScript

```javascript
const body = `{
  "template": "string"
}`;

const response = await fetch('https://api.prompteasy.eu/v1/transparency-templates/550e8400-e29b-41d4-a716-446655440000', {
  method: 'PUT',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "template": "string"
}'''

response = requests.put(
    'https://api.prompteasy.eu/v1/transparency-templates/550e8400-e29b-41d4-a716-446655440000',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Delete a transparency template

`DELETE /v1/transparency-templates/{template}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `template` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 204: No Content

- 403: Forbidden

- 404: Not Found

## Examples

### cURL

```bash
curl -X DELETE 'https://api.prompteasy.eu/v1/transparency-templates/550e8400-e29b-41d4-a716-446655440000' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/transparency-templates/550e8400-e29b-41d4-a716-446655440000', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'https://api.prompteasy.eu/v1/transparency-templates/550e8400-e29b-41d4-a716-446655440000',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```
