Skip to content

Start building

Jump toEmail
All endpoints

Email

Email providers, templates and the delivery log.

get/v1/email_deliveries

List deliveries

Needs notification.manage

Newest first. q searches the hint, type, provider and message ID; filters (each repeatable): status, type, provider_kind (platform for the relay), provider (emp_…), test (test/live), plus created.

Query parameters

  • statusstring[]
  • typestring[]
  • provider_kindstring[]
  • providerstring[]
  • teststring[]
  • limitinteger

    Rows per page, 1 to 200.

    Default50at least 1at most 200
  • cursorstring
  • qstring

    Search: rows whose name (or the list's other searchable text) contains this, any case.

    at most 200 characters
  • orderstring

    Sort field; a leading - sorts down. Each list names the fields it sorts by.

    at most 64 charactersmatches ^-?[a-z_]+$
  • includestring[]

    total_count (counted up to 10,000) and facets (a count per filter value).

    One oftotal_countfacets
  • created_afterstring

    Only rows created at or after this time (RFC 3339).

    date-time
  • created_beforestring

    Only rows created at or before this time (RFC 3339).

    date-time
  • updated_afterstring

    Only rows last changed at or after this time (RFC 3339).

    date-time
  • updated_beforestring

    Only rows last changed at or before this time (RFC 3339).

    date-time

Response200

  • objectstring
    list
  • dataEmailDelivery[]
    21 fields
    • idstring
    • objectstring
      email_delivery
    • attemptsinteger
    • created_atstring or null
    • custom_templateboolean
    • digest_countinteger
    • duration_msinteger or null
    • errorstring or null
    • fell_backboolean
    • link_onlyboolean
    • message_idstring or null
    • notification_idstring or null
    • provider_idstring or null
    • provider_kindstring
    • provider_namestring or null
    • recipient_hintstring
    • statusstring
      One ofsentfailedsuppressedrate_limitedskipped
    • testboolean
    • typestring
    • recipientstring or null
    • subjectstring or null
  • has_moreboolean
  • next_cursorstring or null
  • facetsmap<string, map<string, integer>> or null
  • peoplemap<string, ActorRef> or null
    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • total_countinteger or null
  • total_count_exactboolean or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/email_deliveries?limit=20" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "id": "eml_01jcekn5yqh6nhjfrf1q5xwth8",
      "object": "email_delivery",
      "attempts": 2,
      "created_at": "2026-11-10T09:30:00.000Z",
      "custom_template": true,
      "digest_count": 2,
      "duration_ms": 840,
      "error": null,
      "fell_back": true,
      "link_only": true,
      "message_id": "msg_01jc7qh04g97wt3q32g0wny446",
      "notification_id": "ntf_01jcgbfa525gz2943pdr7ahcby",
      "provider_id": "provider id",
      "provider_kind": "provider kind",
      "provider_name": "provider name",
      "recipient": "recipient",
      "recipient_hint": "recipient hint",
      "status": "sent",
      "subject": "subject",
      "test": true,
      "type": "type"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
get/v1/email_delivery

Delivery settings

Needs notification.manage

Response200

  • objectstring
    email_delivery_settings
  • categoriesEmailCategory[]
    2 fields
    • keystring
    • labelstring
  • failed_24hinteger
  • link_onlyboolean
  • link_only_enforcedboolean
  • platform_fallbackboolean
  • platform_from_addressstring
  • sent_24hinteger
  • sharedEmailSharedProvider[]
    4 fields
    • from_addressstring
    • kindstring
      One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
    • namestring
    • organizationstring or null
  • shared_providersboolean

Status codes

  • 200Successful Response
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/email_delivery" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "email_delivery_settings",
  "categories": [
    {
      "key": "key",
      "label": "label"
    }
  ],
  "failed_24h": 2,
  "link_only": true,
  "link_only_enforced": true,
  "platform_fallback": true,
  "platform_from_address": "platform from address",
  "sent_24h": 2,
  "shared": [
    {
      "from_address": "from address",
      "kind": "smtp",
      "name": "Support triage",
      "organization": "organization"
    }
  ],
  "shared_providers": true
}
get/v1/email_provider_kinds

List kinds

Needs notification.manage

Response200

  • objectstring
    list
  • dataEmailProviderKind[]
    7 fields
    • configEmailProviderField[]
      8 fields
      • hintstring
      • kindstring
        One oftextnumberselectemail
      • labelstring
      • namestring
      • optionsEmailFieldOption[]
        2 fields
        • labelstring
        • valuestring
      • placeholderstring
      • requiredboolean
      • defaultany
    • descriptionstring
    • docs_urlstring
    • kindstring
      One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
    • namestring
    • secret_hintstring
    • secret_labelstring
  • has_moreboolean
  • next_cursorstring or null
  • facetsmap<string, map<string, integer>> or null
  • peoplemap<string, ActorRef> or null
    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • total_countinteger or null
  • total_count_exactboolean or null

Status codes

  • 200Successful Response
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/email_provider_kinds" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "config": [
        {
          "default": {},
          "hint": "hint",
          "kind": "text",
          "label": "label",
          "name": "Support triage",
          "options": [],
          "placeholder": "placeholder",
          "required": true
        }
      ],
      "description": "Reads new support email and drafts a reply.",
      "docs_url": "https://example.com",
      "kind": "smtp",
      "name": "Support triage",
      "secret_hint": "secret hint",
      "secret_label": "secret label"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
get/v1/email_providers

List providers

Needs notification.manage

Response200

  • objectstring
    list
  • dataEmailProvider[]
    25 fields
    • idstring
    • objectstring
      email_provider
    • categoriesstring[]
    • configobject

      Any JSON object.

    • created_atstring or null
    • created_bystring or null
    • failed_totalinteger
    • from_addressstring
    • from_namestring or null
    • healthstring
      One ofunknownhealthyunhealthy
    • health_changed_atstring or null
    • health_reasonstring or null
    • kindstring
      One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
    • last_checked_atstring or null
    • last_used_atstring or null
    • namestring
    • priorityinteger
    • reply_tostring or null
    • row_versioninteger
    • secret_hintstring or null
    • sent_totalinteger
    • share_with_childrenboolean
    • statusstring
      One ofpendingactivedisabled
    • updated_atstring or null
    • updated_bystring or null
  • has_moreboolean
  • next_cursorstring or null
  • facetsmap<string, map<string, integer>> or null
  • peoplemap<string, ActorRef> or null
    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • total_countinteger or null
  • total_count_exactboolean or null

Status codes

  • 200Successful Response
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/email_providers" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "id": "emp_01jc7xge0tesk38g3qxjfrf1q5",
      "object": "email_provider",
      "categories": [
        "category"
      ],
      "config": {},
      "created_at": "2026-11-10T09:30:00.000Z",
      "created_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
      "failed_total": 2,
      "from_address": "from address",
      "from_name": "from name",
      "health": "unknown",
      "health_changed_at": "2026-11-10T09:30:00.000Z",
      "health_reason": null,
      "kind": "smtp",
      "last_checked_at": "2026-11-10T09:30:00.000Z",
      "last_used_at": "2026-11-10T09:30:00.000Z",
      "name": "Support triage",
      "priority": 2,
      "reply_to": "reply to",
      "row_version": 4,
      "secret_hint": "secret hint",
      "sent_total": 2,
      "share_with_children": true,
      "status": "pending",
      "updated_at": "2026-11-10T09:30:00.000Z",
      "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
post/v1/email_providers

Create provider

Needs notification.manage

The provider exists once its secret worked: a failed check leaves no row and answers 422 with the reason on /secret.

Request bodyProviderCreate

  • from_addressstringRequired
    at least 3 charactersat most 320 characters
  • kindstringRequired
    One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
  • namestringRequired
    at least 1 charactersat most 200 characters
  • secretstringRequired
    at least 1 charactersat most 4000 characters
  • categoriesstring[]
    at most 20 items
  • configobject

    Any JSON object.

  • from_namestring or null
    at most 200 characters
  • priorityinteger or null
    at least 0at most 10000
  • reply_tostring or null
    at most 320 characters
  • share_with_childrenboolean
    Defaultfalse

Response201

  • idstring
  • objectstring
    email_provider
  • categoriesstring[]
  • configobject

    Any JSON object.

  • created_atstring or null
  • created_bystring or null
  • failed_totalinteger
  • from_addressstring
  • from_namestring or null
  • healthstring
    One ofunknownhealthyunhealthy
  • health_changed_atstring or null
  • health_reasonstring or null
  • kindstring
    One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
  • last_checked_atstring or null
  • last_used_atstring or null
  • namestring
  • priorityinteger
  • reply_tostring or null
  • row_versioninteger
  • secret_hintstring or null
  • sent_totalinteger
  • share_with_childrenboolean
  • statusstring
    One ofpendingactivedisabled
  • updated_atstring or null
  • updated_bystring or null

Status codes

  • 201Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/email_providers" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from_address": "from address",
    "kind": "smtp",
    "name": "Support triage",
    "secret": "secret"
  }'
Response · 201
JSON
{
  "id": "emp_01jc7xge0tesk38g3qxjfrf1q5",
  "object": "email_provider",
  "categories": [
    "category"
  ],
  "config": {},
  "created_at": "2026-11-10T09:30:00.000Z",
  "created_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
  "failed_total": 2,
  "from_address": "from address",
  "from_name": "from name",
  "health": "unknown",
  "health_changed_at": "2026-11-10T09:30:00.000Z",
  "health_reason": null,
  "kind": "smtp",
  "last_checked_at": "2026-11-10T09:30:00.000Z",
  "last_used_at": "2026-11-10T09:30:00.000Z",
  "name": "Support triage",
  "priority": 2,
  "reply_to": "reply to",
  "row_version": 4,
  "secret_hint": "secret hint",
  "sent_total": 2,
  "share_with_children": true,
  "status": "pending",
  "updated_at": "2026-11-10T09:30:00.000Z",
  "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
}
post/v1/email_providers/order

Order providers

Needs notification.manage

Request bodyProviderOrder

  • idsstring[]Required
    at most 100 items

Response200

  • objectstring
    list
  • dataEmailProvider[]
    25 fields
    • idstring
    • objectstring
      email_provider
    • categoriesstring[]
    • configobject

      Any JSON object.

    • created_atstring or null
    • created_bystring or null
    • failed_totalinteger
    • from_addressstring
    • from_namestring or null
    • healthstring
      One ofunknownhealthyunhealthy
    • health_changed_atstring or null
    • health_reasonstring or null
    • kindstring
      One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
    • last_checked_atstring or null
    • last_used_atstring or null
    • namestring
    • priorityinteger
    • reply_tostring or null
    • row_versioninteger
    • secret_hintstring or null
    • sent_totalinteger
    • share_with_childrenboolean
    • statusstring
      One ofpendingactivedisabled
    • updated_atstring or null
    • updated_bystring or null
  • has_moreboolean
  • next_cursorstring or null
  • facetsmap<string, map<string, integer>> or null
  • peoplemap<string, ActorRef> or null
    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • total_countinteger or null
  • total_count_exactboolean or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/email_providers/order" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      "id"
    ]
  }'
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "id": "emp_01jc7xge0tesk38g3qxjfrf1q5",
      "object": "email_provider",
      "categories": [
        "category"
      ],
      "config": {},
      "created_at": "2026-11-10T09:30:00.000Z",
      "created_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
      "failed_total": 2,
      "from_address": "from address",
      "from_name": "from name",
      "health": "unknown",
      "health_changed_at": "2026-11-10T09:30:00.000Z",
      "health_reason": null,
      "kind": "smtp",
      "last_checked_at": "2026-11-10T09:30:00.000Z",
      "last_used_at": "2026-11-10T09:30:00.000Z",
      "name": "Support triage",
      "priority": 2,
      "reply_to": "reply to",
      "row_version": 4,
      "secret_hint": "secret hint",
      "sent_total": 2,
      "share_with_children": true,
      "status": "pending",
      "updated_at": "2026-11-10T09:30:00.000Z",
      "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
get/v1/email_templates

List email templates

Needs notification.manage

Every email, whether this organization has its own version, whether the platform has one (what this organization gets otherwise) and whether the platform locked it.

Response200

  • objectstring
    list
  • dataEmailTemplateSummary[]
    12 fields
    • objectstring
      email_template_summary
    • categorystring
    • customizedboolean
    • enabledboolean
    • localesstring[]
    • severitystring or null
      One ofinfoactionwarningcritical
    • titlestring
    • typestring
    • updated_atstring or null
    • updated_bystring or null
    • lockedboolean
      Defaultfalse
    • platform_customizedboolean
      Defaultfalse
  • has_moreboolean
  • next_cursorstring or null
  • facetsmap<string, map<string, integer>> or null
  • peoplemap<string, ActorRef> or null
    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • total_countinteger or null
  • total_count_exactboolean or null

Status codes

  • 200Successful Response
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/email_templates" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "object": "email_template_summary",
      "category": "category",
      "customized": true,
      "enabled": true,
      "locales": [
        "en"
      ],
      "locked": false,
      "platform_customized": false,
      "severity": "info",
      "title": "Support triage",
      "type": "type",
      "updated_at": "2026-11-10T09:30:00.000Z",
      "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
get/v1/email_deliveries/{delivery_id}

Get delivery

Needs notification.manage

One email, with the address and subject opened for an admin.

Path parameters

  • delivery_idstringRequired

Response200

  • idstring
  • objectstring
    email_delivery
  • attemptsinteger
  • created_atstring or null
  • custom_templateboolean
  • digest_countinteger
  • duration_msinteger or null
  • errorstring or null
  • fell_backboolean
  • link_onlyboolean
  • message_idstring or null
  • notification_idstring or null
  • provider_idstring or null
  • provider_kindstring
  • provider_namestring or null
  • recipient_hintstring
  • statusstring
    One ofsentfailedsuppressedrate_limitedskipped
  • testboolean
  • typestring
  • recipientstring or null
  • subjectstring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/email_deliveries/eml_01jcekn5yqh6nhjfrf1q5xwth8" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "id": "eml_01jcekn5yqh6nhjfrf1q5xwth8",
  "object": "email_delivery",
  "attempts": 2,
  "created_at": "2026-11-10T09:30:00.000Z",
  "custom_template": true,
  "digest_count": 2,
  "duration_ms": 840,
  "error": null,
  "fell_back": true,
  "link_only": true,
  "message_id": "msg_01jc7qh04g97wt3q32g0wny446",
  "notification_id": "ntf_01jcgbfa525gz2943pdr7ahcby",
  "provider_id": "provider id",
  "provider_kind": "provider kind",
  "provider_name": "provider name",
  "recipient": "recipient",
  "recipient_hint": "recipient hint",
  "status": "sent",
  "subject": "subject",
  "test": true,
  "type": "type"
}
get/v1/email_providers/{provider_id}

Get provider

Needs notification.manage

Path parameters

  • provider_idstringRequired

Response200

  • idstring
  • objectstring
    email_provider
  • categoriesstring[]
  • configobject

    Any JSON object.

  • created_atstring or null
  • created_bystring or null
  • failed_totalinteger
  • from_addressstring
  • from_namestring or null
  • healthstring
    One ofunknownhealthyunhealthy
  • health_changed_atstring or null
  • health_reasonstring or null
  • kindstring
    One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
  • last_checked_atstring or null
  • last_used_atstring or null
  • namestring
  • priorityinteger
  • reply_tostring or null
  • row_versioninteger
  • secret_hintstring or null
  • sent_totalinteger
  • share_with_childrenboolean
  • statusstring
    One ofpendingactivedisabled
  • updated_atstring or null
  • updated_bystring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/email_providers/emp_01jc7xge0tesk38g3qxjfrf1q5" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "id": "emp_01jc7xge0tesk38g3qxjfrf1q5",
  "object": "email_provider",
  "categories": [
    "category"
  ],
  "config": {},
  "created_at": "2026-11-10T09:30:00.000Z",
  "created_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
  "failed_total": 2,
  "from_address": "from address",
  "from_name": "from name",
  "health": "unknown",
  "health_changed_at": "2026-11-10T09:30:00.000Z",
  "health_reason": null,
  "kind": "smtp",
  "last_checked_at": "2026-11-10T09:30:00.000Z",
  "last_used_at": "2026-11-10T09:30:00.000Z",
  "name": "Support triage",
  "priority": 2,
  "reply_to": "reply to",
  "row_version": 4,
  "secret_hint": "secret hint",
  "sent_total": 2,
  "share_with_children": true,
  "status": "pending",
  "updated_at": "2026-11-10T09:30:00.000Z",
  "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
}
patch/v1/email_providers/{provider_id}

Update provider

Needs notification.manage

from_name and reply_to take "" to clear. A changed server, region or domain is checked with the stored secret at once, so health tells the truth.

Path parameters

  • provider_idstringRequired

Request bodyProviderPatch

  • categoriesstring[] or null
    at most 20 items
  • configobject or null

    Any JSON object.

  • from_addressstring or null
    at least 3 charactersat most 320 characters
  • from_namestring or null
    at most 200 characters
  • namestring or null
    at least 1 charactersat most 200 characters
  • priorityinteger or null
    at least 0at most 10000
  • reply_tostring or null
    at most 320 characters
  • row_versioninteger or null
  • share_with_childrenboolean or null
  • statusstring or null
    One ofactivedisabled

Response200

  • idstring
  • objectstring
    email_provider
  • categoriesstring[]
  • configobject

    Any JSON object.

  • created_atstring or null
  • created_bystring or null
  • failed_totalinteger
  • from_addressstring
  • from_namestring or null
  • healthstring
    One ofunknownhealthyunhealthy
  • health_changed_atstring or null
  • health_reasonstring or null
  • kindstring
    One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
  • last_checked_atstring or null
  • last_used_atstring or null
  • namestring
  • priorityinteger
  • reply_tostring or null
  • row_versioninteger
  • secret_hintstring or null
  • sent_totalinteger
  • share_with_childrenboolean
  • statusstring
    One ofpendingactivedisabled
  • updated_atstring or null
  • updated_bystring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X PATCH "https://api.mydeepagents.com/v1/email_providers/emp_01jc7xge0tesk38g3qxjfrf1q5" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 200
JSON
{
  "id": "emp_01jc7xge0tesk38g3qxjfrf1q5",
  "object": "email_provider",
  "categories": [
    "category"
  ],
  "config": {},
  "created_at": "2026-11-10T09:30:00.000Z",
  "created_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
  "failed_total": 2,
  "from_address": "from address",
  "from_name": "from name",
  "health": "unknown",
  "health_changed_at": "2026-11-10T09:30:00.000Z",
  "health_reason": null,
  "kind": "smtp",
  "last_checked_at": "2026-11-10T09:30:00.000Z",
  "last_used_at": "2026-11-10T09:30:00.000Z",
  "name": "Support triage",
  "priority": 2,
  "reply_to": "reply to",
  "row_version": 4,
  "secret_hint": "secret hint",
  "sent_total": 2,
  "share_with_children": true,
  "status": "pending",
  "updated_at": "2026-11-10T09:30:00.000Z",
  "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
}
delete/v1/email_providers/{provider_id}

Delete provider

Needs notification.manage

Path parameters

  • provider_idstringRequired

Response204

Answers 204 with no body.

Status codes

  • 204Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X DELETE "https://api.mydeepagents.com/v1/email_providers/emp_01jc7xge0tesk38g3qxjfrf1q5" \
  -H "Authorization: Bearer $MDA_API_KEY"
post/v1/email_providers/{provider_id}/check

Check provider

Needs notification.manage

Path parameters

  • provider_idstringRequired

Response200

  • objectstring
    email_task_result
  • attemptsinteger
  • codestring or null
  • customboolean
  • messagestring or null
  • message_idstring or null
  • okboolean
  • provider_kindstring or null
  • provider_namestring or null
  • to_hintstring or null
  • providerEmailProvider or null
    25 fields
    • idstring
    • objectstring
      email_provider
    • categoriesstring[]
    • configobject

      Any JSON object.

    • created_atstring or null
    • created_bystring or null
    • failed_totalinteger
    • from_addressstring
    • from_namestring or null
    • healthstring
      One ofunknownhealthyunhealthy
    • health_changed_atstring or null
    • health_reasonstring or null
    • kindstring
      One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
    • last_checked_atstring or null
    • last_used_atstring or null
    • namestring
    • priorityinteger
    • reply_tostring or null
    • row_versioninteger
    • secret_hintstring or null
    • sent_totalinteger
    • share_with_childrenboolean
    • statusstring
      One ofpendingactivedisabled
    • updated_atstring or null
    • updated_bystring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/email_providers/emp_01jc7xge0tesk38g3qxjfrf1q5/check" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "email_task_result",
  "attempts": 2,
  "code": "code",
  "custom": true,
  "message": "Summarise today's open tickets.",
  "message_id": "msg_01jc7qh04g97wt3q32g0wny446",
  "ok": true,
  "provider": {
    "id": "emp_01jc7xge0tesk38g3qxjfrf1q5",
    "object": "email_provider",
    "categories": [
      "category"
    ],
    "config": {},
    "created_at": "2026-11-10T09:30:00.000Z",
    "created_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
    "failed_total": 2,
    "from_address": "from address",
    "from_name": "from name",
    "health": "unknown",
    "health_changed_at": "2026-11-10T09:30:00.000Z",
    "health_reason": null,
    "kind": "smtp",
    "last_checked_at": "2026-11-10T09:30:00.000Z",
    "last_used_at": "2026-11-10T09:30:00.000Z",
    "name": "Support triage",
    "priority": 2,
    "reply_to": "reply to",
    "row_version": 4,
    "secret_hint": "secret hint",
    "sent_total": 2,
    "share_with_children": true,
    "status": "pending",
    "updated_at": "2026-11-10T09:30:00.000Z",
    "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
  },
  "provider_kind": "provider kind",
  "provider_name": "provider name",
  "to_hint": "to hint"
}
put/v1/email_providers/{provider_id}/secret

Replace secret

Needs notification.manage

The old secret stays until the new one passes the check.

Path parameters

  • provider_idstringRequired

Request bodySecretBody

  • secretstringRequired
    at least 1 charactersat most 4000 characters

Response200

  • idstring
  • objectstring
    email_provider
  • categoriesstring[]
  • configobject

    Any JSON object.

  • created_atstring or null
  • created_bystring or null
  • failed_totalinteger
  • from_addressstring
  • from_namestring or null
  • healthstring
    One ofunknownhealthyunhealthy
  • health_changed_atstring or null
  • health_reasonstring or null
  • kindstring
    One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
  • last_checked_atstring or null
  • last_used_atstring or null
  • namestring
  • priorityinteger
  • reply_tostring or null
  • row_versioninteger
  • secret_hintstring or null
  • sent_totalinteger
  • share_with_childrenboolean
  • statusstring
    One ofpendingactivedisabled
  • updated_atstring or null
  • updated_bystring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X PUT "https://api.mydeepagents.com/v1/email_providers/emp_01jc7xge0tesk38g3qxjfrf1q5/secret" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "secret": "secret"
  }'
Response · 200
JSON
{
  "id": "emp_01jc7xge0tesk38g3qxjfrf1q5",
  "object": "email_provider",
  "categories": [
    "category"
  ],
  "config": {},
  "created_at": "2026-11-10T09:30:00.000Z",
  "created_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
  "failed_total": 2,
  "from_address": "from address",
  "from_name": "from name",
  "health": "unknown",
  "health_changed_at": "2026-11-10T09:30:00.000Z",
  "health_reason": null,
  "kind": "smtp",
  "last_checked_at": "2026-11-10T09:30:00.000Z",
  "last_used_at": "2026-11-10T09:30:00.000Z",
  "name": "Support triage",
  "priority": 2,
  "reply_to": "reply to",
  "row_version": 4,
  "secret_hint": "secret hint",
  "sent_total": 2,
  "share_with_children": true,
  "status": "pending",
  "updated_at": "2026-11-10T09:30:00.000Z",
  "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
}
post/v1/email_providers/{provider_id}/test

Send provider test

Needs notification.manage

A test email through this provider, to you or to to.

Path parameters

  • provider_idstringRequired

Request bodyTestBody

  • tostring or null
    at most 320 characters

Response200

  • objectstring
    email_task_result
  • attemptsinteger
  • codestring or null
  • customboolean
  • messagestring or null
  • message_idstring or null
  • okboolean
  • provider_kindstring or null
  • provider_namestring or null
  • to_hintstring or null
  • providerEmailProvider or null
    25 fields
    • idstring
    • objectstring
      email_provider
    • categoriesstring[]
    • configobject

      Any JSON object.

    • created_atstring or null
    • created_bystring or null
    • failed_totalinteger
    • from_addressstring
    • from_namestring or null
    • healthstring
      One ofunknownhealthyunhealthy
    • health_changed_atstring or null
    • health_reasonstring or null
    • kindstring
      One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
    • last_checked_atstring or null
    • last_used_atstring or null
    • namestring
    • priorityinteger
    • reply_tostring or null
    • row_versioninteger
    • secret_hintstring or null
    • sent_totalinteger
    • share_with_childrenboolean
    • statusstring
      One ofpendingactivedisabled
    • updated_atstring or null
    • updated_bystring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/email_providers/emp_01jc7xge0tesk38g3qxjfrf1q5/test" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "to"
  }'
Response · 200
JSON
{
  "object": "email_task_result",
  "attempts": 2,
  "code": "code",
  "custom": true,
  "message": "Summarise today's open tickets.",
  "message_id": "msg_01jc7qh04g97wt3q32g0wny446",
  "ok": true,
  "provider": {
    "id": "emp_01jc7xge0tesk38g3qxjfrf1q5",
    "object": "email_provider",
    "categories": [
      "category"
    ],
    "config": {},
    "created_at": "2026-11-10T09:30:00.000Z",
    "created_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
    "failed_total": 2,
    "from_address": "from address",
    "from_name": "from name",
    "health": "unknown",
    "health_changed_at": "2026-11-10T09:30:00.000Z",
    "health_reason": null,
    "kind": "smtp",
    "last_checked_at": "2026-11-10T09:30:00.000Z",
    "last_used_at": "2026-11-10T09:30:00.000Z",
    "name": "Support triage",
    "priority": 2,
    "reply_to": "reply to",
    "row_version": 4,
    "secret_hint": "secret hint",
    "sent_total": 2,
    "share_with_children": true,
    "status": "pending",
    "updated_at": "2026-11-10T09:30:00.000Z",
    "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
  },
  "provider_kind": "provider kind",
  "provider_name": "provider name",
  "to_hint": "to hint"
}
get/v1/email_templates/{template_type}

Get email template

Needs notification.manage

One email: this organization's version, what it says without one (the platform's version where it has one, part by part, else the built-in default), the platform's version itself, and whether the platform locked the email to it.

Path parameters

  • template_typestringRequired

Query parameters

  • localestring
    Default"en"

Response200

  • objectstring
    email_template_detail
  • categorystring
  • defaultEmailTemplateParts
    3 fields
    • html_bodystring or null
    • subjectstring or null
    • text_bodystring or null
  • localestring
  • sampleobject

    Any JSON object.

  • templateEmailTemplate or null
    11 fields
    • idstring
    • objectstring
      email_template
    • enabledboolean
    • html_bodystring or null
    • localestring
    • row_versioninteger
    • subjectstring or null
    • text_bodystring or null
    • typestring
    • updated_atstring or null
    • updated_bystring or null
  • titlestring
  • typestring
  • variablesEmailTemplateVariable[]
    3 fields
    • descriptionstring
    • labelstring
      One ofsafecontentcommon
    • namestring
  • lockedboolean
    Defaultfalse
  • platformEmailTemplateParts or null
    3 fields
    • html_bodystring or null
    • subjectstring or null
    • text_bodystring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/email_templates/invitation" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "email_template_detail",
  "category": "category",
  "default": {
    "html_body": "html body",
    "subject": "subject",
    "text_body": "text body"
  },
  "locale": "en",
  "locked": false,
  "platform": {
    "html_body": "html body",
    "subject": "subject",
    "text_body": "text body"
  },
  "sample": {},
  "template": {
    "id": "id",
    "object": "email_template",
    "enabled": true,
    "html_body": "html body",
    "locale": "en",
    "row_version": 4,
    "subject": "subject",
    "text_body": "text body",
    "type": "type",
    "updated_at": "2026-11-10T09:30:00.000Z",
    "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
  },
  "title": "Support triage",
  "type": "type",
  "variables": [
    {
      "description": "Reads new support email and drafts a reply.",
      "label": "safe",
      "name": "Support triage"
    }
  ]
}
put/v1/email_templates/{template_type}

Save email template

Needs notification.manage

Path parameters

  • template_typestringRequired

Request bodyTemplateBody

  • enabledboolean
    Defaulttrue
  • html_bodystring or null
    at most 200000 characters
  • localestring
    Default"en"
  • subjectstring or null
    at most 500 characters
  • text_bodystring or null
    at most 20000 characters

Response200

  • idstring
  • objectstring
    email_template
  • enabledboolean
  • html_bodystring or null
  • localestring
  • row_versioninteger
  • subjectstring or null
  • text_bodystring or null
  • typestring
  • updated_atstring or null
  • updated_bystring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X PUT "https://api.mydeepagents.com/v1/email_templates/invitation" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "html_body": "html body",
    "locale": "en",
    "subject": "subject",
    "text_body": "text body"
  }'
Response · 200
JSON
{
  "id": "id",
  "object": "email_template",
  "enabled": true,
  "html_body": "html body",
  "locale": "en",
  "row_version": 4,
  "subject": "subject",
  "text_body": "text body",
  "type": "type",
  "updated_at": "2026-11-10T09:30:00.000Z",
  "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
}
delete/v1/email_templates/{template_type}

Reset email template

Needs notification.manage

Path parameters

  • template_typestringRequired

Query parameters

  • localestring
    Default"en"

Response204

Answers 204 with no body.

Status codes

  • 204Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X DELETE "https://api.mydeepagents.com/v1/email_templates/invitation" \
  -H "Authorization: Bearer $MDA_API_KEY"
post/v1/email_templates/{template_type}/preview

Preview email template

Needs notification.manage

The draft rendered exactly as delivery would, with example values. Nothing is saved; a draft that does not parse answers 422 with the field.

Path parameters

  • template_typestringRequired

Request bodyPreviewBody

  • digest_countinteger
    Default1at least 1at most 10000
  • for_typestring or null
  • html_bodystring or null
    at most 200000 characters
  • link_onlyboolean or null
  • localestring
    Default"en"
  • routestring or null
    One ofownplatform
  • subjectstring or null
    at most 500 characters
  • text_bodystring or null
    at most 20000 characters

Response200

  • objectstring
    email_preview
  • customboolean
  • htmlstring
  • link_onlyboolean
  • routestring
    One ofownplatform
  • subjectstring
  • textstring
  • warningstring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/email_templates/invitation/preview" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 200
JSON
{
  "object": "email_preview",
  "custom": true,
  "html": "html",
  "link_only": true,
  "route": "own",
  "subject": "subject",
  "text": "text",
  "warning": "warning"
}
post/v1/email_templates/{template_type}/test

Send template test

Needs notification.manage

The draft, sent with example values to you (or to to, through the organization's own providers only).

Path parameters

  • template_typestringRequired

Request bodyTemplateTestBody

  • for_typestring or null
  • html_bodystring or null
    at most 200000 characters
  • localestring
    Default"en"
  • provider_idstring or null
  • subjectstring or null
    at most 500 characters
  • text_bodystring or null
    at most 20000 characters
  • tostring or null
    at most 320 characters

Response200

  • objectstring
    email_task_result
  • attemptsinteger
  • codestring or null
  • customboolean
  • messagestring or null
  • message_idstring or null
  • okboolean
  • provider_kindstring or null
  • provider_namestring or null
  • to_hintstring or null
  • providerEmailProvider or null
    25 fields
    • idstring
    • objectstring
      email_provider
    • categoriesstring[]
    • configobject

      Any JSON object.

    • created_atstring or null
    • created_bystring or null
    • failed_totalinteger
    • from_addressstring
    • from_namestring or null
    • healthstring
      One ofunknownhealthyunhealthy
    • health_changed_atstring or null
    • health_reasonstring or null
    • kindstring
      One ofsmtpsessendgridmailgunpostmarkresendbrevosparkpostmailjetmailtrap
    • last_checked_atstring or null
    • last_used_atstring or null
    • namestring
    • priorityinteger
    • reply_tostring or null
    • row_versioninteger
    • secret_hintstring or null
    • sent_totalinteger
    • share_with_childrenboolean
    • statusstring
      One ofpendingactivedisabled
    • updated_atstring or null
    • updated_bystring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/email_templates/invitation/test" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 200
JSON
{
  "object": "email_task_result",
  "attempts": 2,
  "code": "code",
  "custom": true,
  "message": "Summarise today's open tickets.",
  "message_id": "msg_01jc7qh04g97wt3q32g0wny446",
  "ok": true,
  "provider": {
    "id": "emp_01jc7xge0tesk38g3qxjfrf1q5",
    "object": "email_provider",
    "categories": [
      "category"
    ],
    "config": {},
    "created_at": "2026-11-10T09:30:00.000Z",
    "created_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
    "failed_total": 2,
    "from_address": "from address",
    "from_name": "from name",
    "health": "unknown",
    "health_changed_at": "2026-11-10T09:30:00.000Z",
    "health_reason": null,
    "kind": "smtp",
    "last_checked_at": "2026-11-10T09:30:00.000Z",
    "last_used_at": "2026-11-10T09:30:00.000Z",
    "name": "Support triage",
    "priority": 2,
    "reply_to": "reply to",
    "row_version": 4,
    "secret_hint": "secret hint",
    "sent_total": 2,
    "share_with_children": true,
    "status": "pending",
    "updated_at": "2026-11-10T09:30:00.000Z",
    "updated_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn"
  },
  "provider_kind": "provider kind",
  "provider_name": "provider name",
  "to_hint": "to hint"
}

Build with us

Ready for your first call?

Early access is open. Tell us what you want your agents to do, and we will help you get your first key.