# Find smtp setting for tenant.

`GET /api/smtp/setting`

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  }
]
```

- bearer: http (bearer), header JWT. Enter JWT token

Parameters:

- `organizationId` (query, string, optional)
  Type: string

Responses:

- 200: Found tenant setting

Content type: application/json

Type: object

Schema: [CustomSmtp](https://sourcey-gauzy.pages.dev/api-reference/models/customsmtp/index.md)

- `deletedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `createdAt` (optional)
  Type: string, date-time
  
  The creation timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `updatedAt` (optional)
  Type: string, date-time
  
  The last update timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `id` (optional)
  Type: string

- `isActive` (optional)
  Type: boolean
  
  default: true

- `isArchived` (optional)
  Type: boolean
  
  default: false

- `archivedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `tenantId` (optional)
  Type: string

- `organizationId` (optional)
  Type: string

- `fromAddress` (required)
  Type: string
  
  Examples:
  
  ```json
  [
    "noreply@domain.com"
  ]
  ```

- `host` (required)
  Type: string
  
  Examples:
  
  ```json
  [
    "smtp.postmarkapp.com",
    "smtp.gmail.com"
  ]
  ```

- `port` (required)
  Type: number
  
  Examples:
  
  ```json
  [
    587,
    465
  ]
  ```

- `secure` (required)
  Type: boolean
  
  Examples:
  
  ```json
  [
    true,
    false
  ]
  ```

- `isValidate` (optional)
  Type: boolean
  
  default: false

- 401: Unauthorized

- 403: Forbidden

- 404: Record not found

## Examples

### cURL

```bash
curl -X GET 'http://localhost:3000/api/smtp/setting' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/smtp/setting', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

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

### Python

```python
import requests

response = requests.get(
    'http://localhost:3000/api/smtp/setting',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```
