LettermintLettermint
  • Knowledge base
  • Community
  • Changelog
  • Support
  • Documentation
  • Sending API
  • Team API
  • MCP server
Get started
Send email
Receive email
Manage
    Handle API tokens securely
    Projects and routes
    Domains
    Webhooks
    Teams
      Team API
        IntroductionQuickstartManage member accessTeam API referenceTeam API workflowsTeam API tokens
      Team rolesTeam membersSecurity
      Single sign-on
      SCIM provisioningSpend limits
Resources
Team API

Team API workflows

Use these workflows to automate common team administration tasks with the official Lettermint SDKs.

Prerequisites

Before you start:

  1. Create a Team API token.
  2. Store it in LETTERMINT_TEAM_TOKEN.
  3. Grant only the read and write abilities that the workflow needs.
  4. Install an official SDK, or use cURL.

Add and assign a domain

This workflow adds a domain, starts DNS verification, and assigns the domain to a project. Add each DNS record that has required_for_verification set to true before you run the verification step.

The final request returns the updated domain-to-project assignment. DNS verification remains pending until all required records resolve.

Start DKIM updates for existing domains from the domain's DNS page in the dashboard. The Team API does not start or manage this update. Keep the current DKIM TXT record until the dashboard confirms the change.

Provision a project

Use this sequence when you provision an application environment:

  1. Create a project with projects.create.
  2. Create a route with projects.createRoute.
  3. Create a webhook with webhooks.create.
  4. Store the returned Project API token in LETTERMINT_PROJECT_TOKEN.

The Team API quickstart contains a complete six-language project example. See the Team API reference for the route and webhook request schemas.

Monitor message delivery

Use messages.list to filter messages by status, project, route, recipient, or date. Then use messages.events with a message ID to retrieve its delivery history.

The Messages API is read-only. Use a Project API token and the Sending API to send email.

Manage suppressions

Use suppressions.create, suppressions.list, and suppressions.delete to manage suppression entries. The Suppressions guide contains complete examples for all official SDKs and cURL.

Production guidance

  • Store tokens in environment variables or a secrets manager.
  • Grant only the abilities that each integration needs.
  • Use cursor-based pagination for large result sets.
  • Log request IDs and timestamps for troubleshooting.
  • Retry temporary failures with exponential backoff.
  • Remove tokens that are no longer used.

Team API tokens can access team resources. Never expose them in client-side code, public repositories, or logs.

Next steps

  • Team API quickstart - Run your first requests.
  • Manage member access - Assign roles and project access.
  • Team API reference - Review endpoint schemas.
Team API referenceTeam API tokens
On this page
  • Prerequisites
  • Add and assign a domain
  • Provision a project
  • Monitor message delivery
  • Manage suppressions
  • Production guidance
  • Next steps
import { Lettermint } from "lettermint"; const api = Lettermint.api(process.env.LETTERMINT_TEAM_TOKEN!); const domain = await api.domains.create({ domain: "example.com" }); await api.domains.verifyDnsRecords(domain.id); await api.domains.updateProjects(domain.id, { project_ids: ["project-id"], });
Go
Java