---
title: "Get the agency custom SMTP configuration and its last production failure"
method: GET
path: "/v2/agency-CK/{agencyId}/smtp-configuration"
tags: ["Agency Customization Kit Api Service"]
---

# Get the agency custom SMTP configuration and its last production failure

`GET /v2/agency-CK/{agencyId}/smtp-configuration`

## Request

- Base URL: `https://app.metricool.com/api`
- URL: `https://app.metricool.com/api/v2/agency-CK/{agencyId}/smtp-configuration`
- Auth: none declared

## Path parameters

- `agencyId` integer, required

## Response `200`

Ok

- JsonOkResponseAgencySmtpConfigurationDto
  - `metadata` object
  - `page` JsonPaging
    - `next` string
  - `data` AgencySmtpConfigurationDto: Agency custom SMTP configuration. The password is never returned.
    - `enabled` boolean: Whether emails are sent with the agency SMTP (true) or the Metricool server (false)
    - `configured` boolean: Whether a custom SMTP configuration is stored, even if disabled
    - `host` string: Outgoing mail server, without protocol
    - `port` integer: Server port. 465 and 2465 use implicit SSL, any other port mandatory STARTTLS
    - `user` string: Authentication user
    - `hasPassword` boolean: Whether a password is stored (shown as a placeholder in the form)
    - `from` string: Sender email
    - `fromLabel` string: Sender name. When empty, the agency name is used
    - `status` AgencySmtpStatusDto: Last failure of the agency SMTP when sending a real email
      - `errorType` 'HOST_NOT_FOUND' | 'CONNECTION' | 'ENCRYPTION' | 'AUTHENTICATION' | 'SENDER_REJECTED' | 'OTHER': Error type
      - `detail` string: Technical message returned by the server, to share with support
      - `lastFailureAt` string, date-time: Date of the last failure (UTC)

## Other responses

- `403`: The user cannot manage the agency configuration

---

[API](https://skmtc.dev/metricool/apis/metricool-api.md) · [All operations](https://skmtc.dev/metricool/apis/metricool-api/llms.txt) · [OpenAPI document](https://skmtc.dev/metricool/apis/metricool-api/revisions/aea9d9a8415a?raw)
