# Sending Profile

Your sending profile is used to manage email authentication such as DKIM, DMARC and SPF along with branded link URLs and bounce addresses. SMTPD has an opinionated sending setup that brings better deliverability.

{% hint style="warning" %}
Sending Profiles are critical to email deliverability and are continuously validated by the SMTPD platform. If any DNS records are removed OR incorrectly altered, your sending profile will be set into a "pending" and all sending will fail for any messages linked to that sending profile.
{% endhint %}

## Create sending profile

<mark style="color:green;">`POST`</mark> `https://api.smtpd.dev/api/v1/profile/email`

This endpoint allows you to create a new sending profile, you can add as many sending profiles as needed. Every sending profile is continuously validated, if any DNS records are missing the sending profile will be placed into a `pending` state, if that remains for longer than 72hrs the sending profile will be disabled and eventually deleted.&#x20;

#### Headers

| Name           | Type   | Description             |
| -------------- | ------ | ----------------------- |
| Authentication | string | `Bearer {access_token}` |

#### Request Body

| Name                            | Type   | Description                                           |
| ------------------------------- | ------ | ----------------------------------------------------- |
| link\_domain\_default\_redirect | string | The default redirect destination for the link\_domain |
| bounce\_domain                  | string | The reply-to address domain                           |
| link\_domain                    | string | The domain used for the branded links                 |
| sending\_domain                 | string | The domain used in the "from address"                 |
| profile\_name                   | string | The name of the Sending Profile                       |

{% tabs %}
{% tab title="202 You new sending profile has been enqueued for creation. You'll need to poll the GET setup endpoint with the `profile_id` to receive the DNS records once creation has completed." %}

```
{
  "profile_id": "d1378ab7-e919-11ea-81e4-0a58a9feac2a",
  "profile_name": "default",
  "state": "creating"
}
```

{% endtab %}
{% endtabs %}

## Get sending profile domain setup details

<mark style="color:blue;">`GET`</mark> `https://api.smtpd.dev/api/v1/profile/email/:id/setup`

This endpoint allows you to get the sending profile domain setup details by ID

#### Path Parameters

| Name | Type   | Description                |
| ---- | ------ | -------------------------- |
| id   | string | ID of the sending profile. |

#### Headers

| Name           | Type   | Description             |
| -------------- | ------ | ----------------------- |
| Authentication | string | `Bearer {access_token}` |

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

```
{
  "profile_id": "7c82bb2c-ede3-11ea-8215-0a58a9feac2a",
  "profile_name": "default",
  "dns_records": [
    {
      "name": "1h09YTLxhfFx7RivB3QmrH7WaJ9._domainkey.hello.yoursendingdomain.com",
      "type": "CNAME",
      "value": "1h09YTLxhfFx7RivB3QmrH7WaJ9.dkim.smtpd.dev",
      "validation_state": "pending"
    },
    {
      "name": "_amazonses.hello.yoursendingdomain.com",
      "type": "TXT",
      "value": "4ewMcIYic7jCen+qREXsi2j1lBQqT+pVN6WlR6YlMPU=",
      "validation_state": "active"
    },
    {
      "name": "1h09YaQg3pLnAGsb1MHhkZN3RNA._domainkey.hello.yoursendingdomain.com",
      "type": "CNAME",
      "value": "1h09YaQg3pLnAGsb1MHhkZN3RNA.dkim.smtpd.dev",
      "validation_state": "pending"
    },
    {
      "name": "1h09YdNi2ukvX4Vzi9OLYjpaALE._domainkey.hello.yoursendingdomain.com",
      "type": "CNAME",
      "value": "1h09YdNi2ukvX4Vzi9OLYjpaALE.dkim.smtpd.dev",
      "validation_state": "pending"
    },
    {
      "name": "_amazonses.bounce.hello.yoursendingdomain.com",
      "type": "TXT",
      "value": "LcpcfI8N1Tfu1B0+s4gMt2G7/4Ad5vMGjIk64x8hYN8=",
      "validation_state": "active"
    },
    {
      "name": "bounce.hello.yoursendingdomain.com",
      "type": "MX",
      "value": "feedback-smtp.us-east-1.amazonses.com",
      "validation_state": "active"
    },
    {
      "name": "bounce.hello.yoursendingdomain.com",
      "type": "TXT",
      "value": "v=spf1 include:amazonses.com ~all",
      "validation_state": "active"
    },
    {
      "name": "_amazonses.go.yoursendingdomain.com",
      "type": "TXT",
      "value": "C96Xp4B+iPxHNCcQ5xEfMyqOwzI=",
      "validation_state": "pending"
    },
    {
      "name": "go.yoursendingdomain.com",
      "type": "CNAME",
      "value": "l.smtpdgo.com",
      "validation_state": "active"
    }
  ],
  "state": "pending",
  "created_at_utc": 1599137189,
  "modified_at_utc": 1599137191
}
```

{% endtab %}

{% tab title="404 " %}

```
{
  "code": 40401,
  "message": "Resource ID provided is invalid"
}
```

{% endtab %}
{% endtabs %}

## Verify sending profile domain setup

<mark style="color:orange;">`PUT`</mark> `https://api.smtpd.dev/api/v1/profile/email/:id/verify`

This endpoint enqueues a verification task for the sending profile.

#### Path Parameters

| Name | Type   | Description               |
| ---- | ------ | ------------------------- |
| id   | string | ID of the sending profile |

#### Headers

| Name           | Type   | Description             |
| -------------- | ------ | ----------------------- |
| Authentication | string | `Bearer {access_token}` |

{% tabs %}
{% tab title="202 This request will enqueue a verification task which will update " %}

```
```

{% endtab %}
{% endtabs %}

## Get sending profile by ID

<mark style="color:blue;">`GET`</mark> `https://api.smtpd.dev/api/v1/profile/email/:id`

This endpoint allows you to get a sending profile by ID.

#### Path Parameters

| Name | Type   | Description                |
| ---- | ------ | -------------------------- |
| id   | string | ID of the sending profile. |

#### Headers

| Name           | Type   | Description             |
| -------------- | ------ | ----------------------- |
| Authentication | string | `Bearer {access_token}` |

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

```
{
  "profile_id": "ce26304e-e916-11ea-9063-3af9d3cba4ef",
  "profile_name": "default",
  "sending_domain": "hello.yoursendingdomain.com",
  "link_domain": "go.yoursendingdomain.com",
  "link_domain_default_redirect": "https://google.com",
  "bounce_domain": "bounce.hello.yoursendingdomain.com",
  "state": "active",
  "created_at_utc": 1598609474,
  "modified_at_utc": 1598609476
}
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="404 " %}

```
{
  "code": 40401,
  "message": "Resource ID provided is invalid"
}
```

{% endtab %}
{% endtabs %}

## Get all sending profiles

<mark style="color:blue;">`GET`</mark> `https://api.smtpd.dev/api/v1/profile/email`

This endpoint allows you to all the sending profiles for an account.

#### Headers

| Name           | Type   | Description             |
| -------------- | ------ | ----------------------- |
| Authentication | string | `Bearer {access_token}` |

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

```
[
  {
    "profile_id": "ce26304e-e916-11ea-9063-3af9d3cba4ef",
    "profile_name": "default",
    "sending_domain": "hello.yoursendingdomain.com",
    "link_domain": "go.yoursendingdomain.com",
    "link_domain_default_redirect": "https://google.com",
    "bounce_domain": "bounce.hello.yoursendingdomain.com",
    "state": "active",
    "created_at_utc": 1598609474,
    "modified_at_utc": 1598609476
  },
  {
    "profile_id": "7c6d545c-edbd-11ea-86ce-3af9d3cba4ef",
    "profile_name": "default",
    "sending_domain": "hello.yoursendingdomain.com",
    "link_domain": "go.yoursendingdomain.com",
    "bounce_domain": "bounce.hello.yoursendingdomain.com",
    "state": "failed",
    "created_at_utc": 1599120868,
    "modified_at_utc": 1599120870
  }
]
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.smtpd.dev/api/sending-profile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
