Lettermint Team API

Create projects, rotate their API tokens, and configure the routes that handle outbound and inbound mail.


Get report forwarding settings

GET
https://api.lettermint.co/v1
/projects/{projectId}/report-forwarding
Bearer

Returns the project's report forwarding destination and whether it has been verified.

Get report forwarding settings › path Parameters

projectId
​string · required

Get report forwarding settings › Responses

ReportForwardingResource

​ReportForwardingResource · required

Update report forwarding destination

PUT
https://api.lettermint.co/v1
/projects/{projectId}/report-forwarding
Bearer

Sets the address that receives forwarded reports and emails it a verification code. Reports are only forwarded once the destination is verified.

Update report forwarding destination › path Parameters

projectId
​string · required

Update report forwarding destination › Request Body

destination
​string · email · maxLength: 254 · pattern: ^[\x21-\x7e]+$ · required

Update report forwarding destination › Responses

ReportForwardingResource

​ReportForwardingResource · required

Disable report forwarding

DELETE
https://api.lettermint.co/v1
/projects/{projectId}/report-forwarding
Bearer

Removes the forwarding destination and cancels any pending report deliveries.

Disable report forwarding › path Parameters

projectId
​string · required

Disable report forwarding › Responses

No content

No data returned

Verify report forwarding destination

POST
https://api.lettermint.co/v1
/projects/{projectId}/report-forwarding/verify
Bearer

Confirms the destination with the code that was emailed to it.

Verify report forwarding destination › path Parameters

projectId
​string · required

Verify report forwarding destination › Request Body

code
​string · pattern: ^[0-9]{6}$ · required

Verify report forwarding destination › Responses

ReportForwardingResource

​ReportForwardingResource · required

Resend report forwarding verification code

POST
https://api.lettermint.co/v1
/projects/{projectId}/report-forwarding/resend-code
Bearer

Emails a new verification code to the destination. Only available while the destination is unverified.

Resend report forwarding verification code › path Parameters

projectId
​string · required

Resend report forwarding verification code › Responses

ReportForwardingResource

​ReportForwardingResource · required

List all projects for the team

GET
https://api.lettermint.co/v1
/projects
Bearer

List all projects for the team › query Parameters

page[size]
​integer

The number of results that will be returned per page.

Default: 30
page[cursor]
​string

The cursor to start the pagination from.

filter[search]
​string
sort
​string[]
Enum values:
name
-name
created_at
-created_at
Default: ["-created_at"]

List all projects for the team › Responses

Paginated set of ProjectListData

​ProjectListData[] · required
path
​string | null · required

Base path for paginator generated URLs.

per_page
​integer · min: 0 · required

Number of items shown per page.

next_cursor
​string | null · required

The "cursor" that points to the next set of items.

next_page_url
​string | null · uri · required
prev_cursor
​string | null · required

The "cursor" that points to the previous set of items.

prev_page_url
​string | null · uri · required

Create a new project

POST
https://api.lettermint.co/v1
/projects
Bearer

Create a new project › Request Body

name
​string · maxLength: 255 · required
smtp_enabled
​boolean
Default: false
delivery_mode
​DeliveryMode · enum
Enum values:
live
sandbox
Default: live
initial_routes
​InitialRoutes · enum
Enum values:
both
transactional
broadcast
Default: both
short_token
​boolean
Default: false
redact_email_content
​boolean
Default: false

Create a new project › Responses

ProjectCreatedData

​ProjectData · required
message
​string · required
api_token
​string

Get project details

GET
https://api.lettermint.co/v1
/projects/{projectId}
Bearer

Get project details › path Parameters

projectId
​string · required

Get project details › query Parameters

include
​string[]
Enum values:
routes
routesCount
routesExists
domains
domainsCount
domainsExists
messageStats
messageStatsCount

Get project details › Responses

ProjectData

id
​string · required
name
​string · required
delivery_mode
​DeliveryMode · enum · required
Enum values:
live
sandbox
smtp_enabled
​boolean · required
redact_email_content
​boolean · required
default_route_id
​string | null · required
token_generated_at
​string | null · date-time · required
token_last_used_at
​string | null · date-time · required
token_last_used_ip
​string | null · required
created_at
​string · required
updated_at
​string · required
​RouteData[]
routes_count
​integer
​DomainData[]
domains_count
​integer
​

Update project settings

PUT
https://api.lettermint.co/v1
/projects/{projectId}
Bearer

Update project settings › path Parameters

projectId
​string · required

Update project settings › Request Body

name
​string | null · maxLength: 255
smtp_enabled
​boolean | null
redact_email_content
​boolean | null
​
default_route_id
​string | null · uuid

Update project settings › Responses

Project updated

The project after a change, with a confirmation message.
​ProjectData · required
message
​string · required

Human-readable confirmation


Delete a project

DELETE
https://api.lettermint.co/v1
/projects/{projectId}
Bearer

Delete a project › path Parameters

projectId
​string · required

Delete a project › Responses

Project deleted

Confirmation that a request succeeded.
message
​string · required

Human-readable confirmation


deprecated

Rotate Project API token (legacy)

POST
https://api.lettermint.co/v1
/projects/{projectId}/rotate-token
Bearer

Legacy endpoint that rotates the original Project API token. Use the Project API token endpoints to list, create, or delete specific tokens.

Rotate Project API token (legacy) › path Parameters

projectId
​string · required

Rotate Project API token (legacy) › Responses

Project API token rotated

The project and its new legacy Project API token.
​ProjectData · required
new_token
​string · required

The new Project API token. It is only returned once

message
​string · required

Human-readable confirmation


List Project API tokens

GET
https://api.lettermint.co/v1
/projects/{projectId}/api-tokens
Bearer

Returns token metadata only. Token values are only returned when a token is created.

List Project API tokens › path Parameters

projectId
​string · required

List Project API tokens › query Parameters

page[size]
​integer

The number of results that will be returned per page.

Default: 30
page[cursor]
​string

The cursor to start the pagination from.

sort
​string[]
Enum values:
name
-name
created_at
-created_at
Default: ["-created_at"]

List Project API tokens › Responses

Paginated set of ProjectApiToken

​ProjectApiToken[] · required
path
​string | null · required

Base path for paginator generated URLs.

per_page
​integer · min: 0 · required

Number of items shown per page.

next_cursor
​string | null · required

The "cursor" that points to the next set of items.

next_page_url
​string | null · uri · required
prev_cursor
​string | null · required

The "cursor" that points to the previous set of items.

prev_page_url
​string | null · uri · required

Create a Project API token

POST
https://api.lettermint.co/v1
/projects/{projectId}/api-tokens
Bearer

The token is only returned once. Use it to send through the API, or as the SMTP password when SMTP is enabled for the project.

Create a Project API token › path Parameters

projectId
​string · required

Create a Project API token › Request Body

name
​string · maxLength: 255 · required

A name that identifies where the token is used

Example: Production
short_token
​boolean

Creates a shorter token for devices that limit password length

Default: false

Create a Project API token › Responses

Project API token created

The new Project API token. Its value is only returned once.
​ProjectApiTokenSecret · required

A new Project API token with its value, which is only returned once.

​required
message
​string · required

Human-readable confirmation


Delete a Project API token

DELETE
https://api.lettermint.co/v1
/projects/{projectId}/api-tokens/{tokenId}
Bearer

The token stops working immediately.

Delete a Project API token › path Parameters

projectId
​string · required
tokenId
​string · required

Delete a Project API token › Responses

Project API token deleted

Confirmation that a request succeeded.
message
​string · required

Human-readable confirmation


List routes for a project

GET
https://api.lettermint.co/v1
/projects/{projectId}/routes
Bearer

List routes for a project › path Parameters

projectId
​string · required

List routes for a project › query Parameters

page[size]
​integer

The number of results that will be returned per page.

Default: 30
page[cursor]
​string

The cursor to start the pagination from.

sort
​string[]
Enum values:
name
-name
slug
-slug
created_at
-created_at
Default: ["-created_at"]
filter[route_type]
​RouteType · enum
Enum values:
transactional
broadcast
inbound
filter[is_default]
​boolean
filter[search]
​string

Search by name or slug

List routes for a project › Responses

Paginated set of RouteListData

​RouteListData[] · required
path
​string | null · required

Base path for paginator generated URLs.

per_page
​integer · min: 0 · required

Number of items shown per page.

next_cursor
​string | null · required

The "cursor" that points to the next set of items.

next_page_url
​string | null · uri · required
prev_cursor
​string | null · required

The "cursor" that points to the previous set of items.

prev_page_url
​string | null · uri · required

Create a new route

POST
https://api.lettermint.co/v1
/projects/{projectId}/routes
Bearer

Create a new route › path Parameters

projectId
​string · required

Create a new route › Request Body

name
​string · maxLength: 255 · required
route_type
​RouteType · enum · required
Enum values:
transactional
broadcast
inbound
slug
​string | null · maxLength: 255
​
​
inbound_domain
​string | null · maxLength: 255
inbound_spam_threshold
​number | null · min: 0 · max: 10
​

Create a new route › Responses

Route created

The route after it was created or changed, with a confirmation message.
​RouteData · required
message
​string · required

Human-readable confirmation


Get route details

GET
https://api.lettermint.co/v1
/routes/{routeId}
Bearer

Get route details › path Parameters

routeId
​string · required

Get route details › query Parameters

include_machine
​boolean

Include legacy machine observations in open and click totals. Privacy opens are reported in the observed and privacy fields without this option.

include
​string[]
Enum values:
project
projectCount
projectExists
statistics

Get route details › Responses

RouteData

id
​string · required
project_id
​string · required
slug
​string · required
name
​string · required
route_type
​RouteType · enum · required
Enum values:
transactional
broadcast
inbound
is_default
​boolean · required
created_at
​string · date-time · required
updated_at
​string · date-time · required
inbound_address
​string | null

Permanent compatibility address for this inbound route (<route-uuid-without-hyphens>@inbound.lettermint.co). It keeps working alongside the catch-all route domain

inbound_route_domain
​string | null

Catch-all receiving domain for this inbound route. Mail to any address at this domain reaches the route. Null for non-inbound routes

inbound_mx_hostname
​string
inbound_domain
​string | null
inbound_domain_verified_at
​string | null · date-time
inbound_spam_threshold
​number | null
attachment_delivery
​AttachmentDelivery · enum
Enum values:
inline
url
settings
​object | null

Route settings available for this route type and team feature access

​ProjectData
webhooks_count
​integer
suppressed_recipients_count
​integer
​RouteStatisticData[]

Update route settings

PUT
https://api.lettermint.co/v1
/routes/{routeId}
Bearer

Update route settings › path Parameters

routeId
​string · required

Update route settings › Request Body

name
​string | null · maxLength: 255
​
​
inbound_domain
​string | null · maxLength: 255
inbound_spam_threshold
​number | null · min: 0 · max: 10
​

Update route settings › Responses

Route updated

The route after it was created or changed, with a confirmation message.
​RouteData · required
message
​string · required

Human-readable confirmation


Delete a route

DELETE
https://api.lettermint.co/v1
/routes/{routeId}
Bearer

Delete a route › path Parameters

routeId
​string · required

Delete a route › Responses

Route deleted

Confirmation that a request succeeded.
message
​string · required

Human-readable confirmation


Verify inbound domain for a route

POST
https://api.lettermint.co/v1
/routes/{routeId}/verify-inbound-domain
Bearer

Verify inbound domain for a route › path Parameters

routeId
​string · required

Verify inbound domain for a route › Responses

Inbound domain verified

The result of an inbound domain MX verification.
​InboundDomainVerification · required

Whether the inbound domain MX records point to Lettermint. The MX record lists are only returned when verification fails.