See the Queries page for a presentation of this resource.
Create an SMTP configuration
input - SmtpInput Data of the SMTP configuration
GraphQL
mutation CreateSmtp($input: SmtpInput!) {
CreateSmtp(input: $input) {
id
email
host
port
active
created_at
user_profile_id
}
}
Variables (JSON)
{
"input": {
"email": "[email protected] ",
"password": "******",
"host": "smtp.example.com",
"port": 587,
"active": true
}
}
JSON
{
"data": {
"CreateSmtp": {
"id": 100045,
"email": "[email protected] ",
"host": "smtp.example.com",
"port": 587,
"active": true,
"created_at": "2025-01-01T00:00:00Z",
"user_profile_id": 42
}
}
}
Update an SMTP configuration
id - ID Id of the SMTP configuration
input - SmtpInput Data of the SMTP configuration
GraphQL
mutation UpdateSmtp($id: ID!, $input: SmtpInput!) {
UpdateSmtp(id: $id, input: $input) {
id
email
host
port
active
created_at
user_profile_id
}
}
Variables (JSON)
{
"id": 100045,
"input": {
"email": "[email protected] ",
"password": "******",
"host": "smtp.example.com",
"port": 465,
"active": false
}
}
JSON
{
"data": {
"UpdateSmtp": {
"id": 100045,
"email": "[email protected] ",
"host": "smtp.example.com",
"port": 465,
"active": false,
"created_at": "2025-01-03T00:00:00Z",
"user_profile_id": 42
}
}
}
Disable an SMTP configuration
id - ID Id of the SMTP configuration
GraphQL
mutation DisableSmtp($id: ID!) {
DisableSmtp(id: $id) {
id
email
active
}
}
JSON
{
"data": {
"DisableSmtp": {
"id": 100045,
"email": "[email protected] ",
"active": false
}
}
}
Enable an SMTP configuration
id - ID Id of the SMTP configuration
GraphQL
mutation EnableSmtp($id: ID!) {
EnableSmtp(id: $id) {
id
email
active
}
}
JSON
{
"data": {
"EnableSmtp": {
"id": 100045,
"email": "[email protected] ",
"active": true
}
}
}
Send an email for a document
GraphQL
mutation SendEmail($email: EmailInput!) {
SendEmail(email: $email)
}
JSON
{
"data": {
"SendEmail": true
}
}
Send bulk emails for multiple documents using an email template
GraphQL
mutation SendBulkDocumentEmails($input: BulkDocumentEmailInput!) {
SendBulkDocumentEmails(input: $input)
}
Variables (JSON)
{
"input": {
"document_type": "INVOICE",
"email_template_id": 100003,
"documents": [
{
"document_id": 100001,
"to": ["[email protected] "]
},
{
"document_id": 100002,
"to": ["[email protected] "]
}
]
}
}
JSON
{
"data": {
"SendBulkDocumentEmails": 100042
}
}
Send a test email to verify SMTP configuration
to - String Recipient email address
GraphQL
mutation SendTestEmail($to: String!) {
SendTestEmail(to: $to)
}
JSON
{
"data": {
"SendTestEmail": true
}
}
email - String SMTP account email address
password - String SMTP account password
host - String SMTP server hostname
port - Int SMTP server port
active - Boolean If true, the SMTP configuration is active
document_id - ID Document identifier
document_type - String Document type (e.g., INVOICE)
bcc - [String] Blind carbon copy recipients
document_type - String Document type (e.g., INVOICE)
email_template_id - ID Email template identifier
document_id - ID Document identifier