Using TypeScript? Check out our GraphQL SDK for a fully typed client.
As well as creating outbound emails in the UI you can also send them with the sendNewEmail API. This is useful for proactively reaching out about issues.
Mutation
mutation sendNewEmail($input: SendNewEmailInput!) { sendNewEmail(input: $input) { email { id } error { message type code } }}
Variables
{ "input": { "customerId": "c_01GTC6ZHCMAGR06FMPN9VY5J95", "threadId": "th_01HD44FHMCDSSWE38N14FSYV6K", "subject": "Your account has a problem", "textContent": "The plain text version of your email goes here.", "markdownContent": "The markdown **version** of your _email_ goes here." }}