Scaleway logo
Commands

Documentation for `scw tem`

The CLI documentation pages are currently under construction

The content is up to date. We're making improvements to the site over the next few weeks for a better experience.

This API allows you to manage your Transactional Email services.

Blocklist

This section allows you to manage the blocklist of your emails.

Bulk create blocklists

Create multiple blocklists in a specific Project or Organization using the region parameter.

Usage:

TerminalCode
scw tem blocklists create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
domain-idDomain ID linked to the blocklist
emails.{index}Email blocked by the blocklist
typeType of blocklistOne of: unknown_type, mailbox_full, mailbox_not_found
reasonReason to block the email
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Delete a blocklist

You must specify the blocklist you want to delete by the region and blocklist_id.

Usage:

TerminalCode
scw tem blocklists delete <blocklist-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
blocklist-idID of the blocklist to deleteRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

List blocklists

Retrieve the list of blocklists.

Usage:

TerminalCode
scw tem blocklists list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-by(Optional) List blocklist corresponding to specific criteriaOne of: created_at_desc, created_at_asc, ends_at_desc, ends_at_asc
domain-id(Optional) Filter by a domain ID
email(Optional) Filter by an email address
type(Optional) Filter by a blocklist typeOne of: unknown_type, mailbox_full, mailbox_not_found
custom(Optional) Filter by custom blocklist (true) or automatic Transactional Email blocklist (false)
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, all

Domain management commands

This section lists your domains, shows you to manage them, and gives you information about them.

Domain DNS check

Perform an immediate DNS check of a domain using the region and domain_id parameters.

Usage:

TerminalCode
scw tem domain check <domain-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
domain-idID of the domain to checkRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Register a domain in a project

You must specify the region, project_id and domain_name to register a domain in a specific Project.

Usage:

TerminalCode
scw tem domain create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
domain-nameFully qualified domain dame
accept-tosDeprecated. Accept Scaleway's Terms of ServiceDeprecated
autoconfigActivate auto-configuration of the domain's DNS zone
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Get information about a domain

Retrieve information about a specific domain using the region and domain_id parameters. Monitor your domain's reputation and improve average and bad reputation statuses, using your domain's Email activity tab on the Scaleway consoleOpen in new context to get a more detailed report. Check out our dedicated documentationOpen in new context to improve your domain's reputation.

Usage:

TerminalCode
scw tem domain get <domain-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
domain-idID of the domainRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Display SPF, DKIM, DMARC and MX records status and potential errors

Display SPF, DKIM, DMARC and MX records status and potential errors, including the found records to make debugging easier.

Usage:

TerminalCode
scw tem domain get-last-status <domain-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
domain-idID of the domain to get records statusRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

List domains

Retrieve domains in a specific Project or in a specific Organization using the region parameter.

Usage:

TerminalCode
scw tem domain list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-id(Optional) ID of the Project in which to list the domains
status.{index}(Optional) List domains under specific statusesOne of: unknown, checked, unchecked, invalid, locked, revoked, pending, autoconfiguring
name(Optional) Names of the domains to list
organization-id(Optional) ID of the Organization in which to list the domains
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, all

Delete a domain

You must specify the domain you want to delete by the region and domain_id. Deleting a domain is permanent and cannot be undone.

Usage:

TerminalCode
scw tem domain revoke <domain-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
domain-idID of the domain to deleteRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Update a domain

Update a domain auto-configuration.

Usage:

TerminalCode
scw tem domain update <domain-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
domain-idID of the domain to updateRequired
autoconfig(Optional) If set to true, activate auto-configuration of the domain's DNS zone
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Email management commands

This section lists your emails and shows you how to manage them.

Cancel an email

You can cancel the sending of an email if it has not been sent yet. You must specify the region and the email_id of the email you want to cancel.

Usage:

TerminalCode
scw tem email cancel <email-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
email-idID of the email to cancelRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Send an email

You must specify the region, the sender and the recipient's information and the project_id to send an email from a checked domain.

Usage:

TerminalCode
scw tem email create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
from.emailEmail address
from.name(Optional) Name displayed
to.{index}.emailEmail address
to.{index}.name(Optional) Name displayed
cc.{index}.emailEmail address
cc.{index}.name(Optional) Name displayed
bcc.{index}.emailEmail address
bcc.{index}.name(Optional) Name displayed
subjectSubject of the email
textText content
htmlHTML content
project-idProject ID to use. If none is passed the default project ID will be used
attachments.{index}.nameFilename of the attachment
attachments.{index}.typeMIME type of the attachment
attachments.{index}.contentContent of the attachment encoded in base64
send-beforeMaximum date to deliver the email
additional-headers.{index}.keyEmail header key
additional-headers.{index}.valueEmail header value
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Get an email

Retrieve information about a specific email using the email_id and region parameters.

Usage:

TerminalCode
scw tem email get <email-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
email-idID of the email to retrieveRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Email statuses

Get information on your emails' statuses.

Usage:

TerminalCode
scw tem email get-statistics [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-id(Optional) Number of emails for this Project
domain-id(Optional) Number of emails sent from this domain (must be coherent with the project_id and the organization_id)
since(Optional) Number of emails created after this date
until(Optional) Number of emails created before this date
mail-from(Optional) Number of emails sent with this sender's email address
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

List emails

Retrieve the list of emails sent from a specific domain or for a specific Project or Organization. You must specify the region.

Usage:

TerminalCode
scw tem email list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-id(Optional) ID of the Project in which to list the emails
domain-id(Optional) ID of the domain for which to list the emails
message-id(Optional) ID of the message for which to list the emails
since(Optional) List emails created after this date
until(Optional) List emails created before this date
mail-from(Optional) List emails sent with this sender's email address
mail-toDeprecated. List emails sent to this recipient's email addressDeprecated
mail-rcpt(Optional) List emails sent to this recipient's email address
statuses.{index}(Optional) List emails with any of these statusesOne of: unknown, new, sending, sent, failed, canceled
subject(Optional) List emails with this subject
search(Optional) List emails by searching to all fields
order-by(Optional) List emails corresponding to specific criteriaOne of: created_at_desc, created_at_asc, updated_at_desc, updated_at_asc, status_desc, status_asc, mail_from_desc, mail_from_asc, mail_rcpt_desc, mail_rcpt_asc, subject_desc, subject_asc
flags.{index}(Optional) List emails containing only specific flagsOne of: unknown_flag, soft_bounce, hard_bounce, spam, mailbox_full, mailbox_not_found, greylisted, send_before_expiration, blocklisted
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, all

Offer subscriptions management commands

This section allows you to manage and get information about your project offer subscriptions.

Get information about subscribed offers

Retrieve information about the offers you are subscribed to using the project_id and region parameters.

Usage:

TerminalCode
scw tem offer-subscriptions list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
offer-name(Optional) Name of the offer associated with the ProjectOne of: unknown_name, essential, scale
organization-idOrganization ID to use. If none is passed the default organization ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, all

Update a subscribed offer

Update a subscribed offer.

Usage:

TerminalCode
scw tem offer-subscriptions update [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
nameName of the offer-subscriptionOne of: unknown_name, essential, scale
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Project offers management commands

This section allows you to manage and get get subscribed information about your project email offer.

List the available offers.

Retrieve the list of the available and free-of-charge offers you can subscribe to.

Usage:

TerminalCode
scw tem offers list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Pool management commands

This section allows you to manage and get information about your sending pools.

Get information about a sending pool.

Retrieve information about a sending pool, including its creation status and configuration parameters.

Usage:

TerminalCode
scw tem pools list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, all

Project consumption management commands

Project consumption allow you to see your project consumption.

Get project resource consumption.

Get project resource consumption.

Usage:

TerminalCode
scw tem project-consumption get [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Project settings management commands

Project settings allow you to manage the configuration of your projects.

Project settings allow you to manage the configuration of your projects.

Usage:

TerminalCode
scw tem project-settings

Webhook management commands

Webhooks enable real-time communication and automation between systems by sending messages through all protocols supported by SNS, such as HTTP, HTTPS, and Serverless Functions, allowing for immediate updates and actions based on specific events. This feature is in beta. You can request quotas from the Scaleway betas pageOpen in new context.

Create a Webhook

Create a new Webhook triggered by a list of event types and pushed to a Scaleway SNS ARN.

Usage:

TerminalCode
scw tem webhook create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
domain-idID of the Domain to watch for triggering events
project-idProject ID to use. If none is passed the default project ID will be used
nameName of the Webhook
event-types.{index}List of event types that will trigger an eventOne of: unknown_type, email_queued, email_dropped, email_deferred, email_delivered, email_spam, email_mailbox_not_found, email_blocklisted, blocklist_created
sns-arnScaleway SNS ARN topic to push the events to
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Delete a Webhook

You must specify the Webhook you want to delete by the region and webhook_id. Deleting a Webhook is permanent and cannot be undone.

Usage:

TerminalCode
scw tem webhook delete <webhook-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
webhook-idID of the Webhook to deleteRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Get information about a Webhook

Retrieve information about a specific Webhook using the webhook_id and region parameters.

Usage:

TerminalCode
scw tem webhook get <webhook-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
webhook-idID of the Webhook to checkRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

List Webhooks

Retrieve Webhooks in a specific Project or in a specific Organization using the region parameter.

Usage:

TerminalCode
scw tem webhook list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-by(Optional) List Webhooks corresponding to specific criteriaOne of: created_at_desc, created_at_asc
project-id(Optional) ID of the Project for which to list the Webhooks
domain-id(Optional) ID of the Domain for which to list the Webhooks
organization-id(Optional) ID of the Organization for which to list the Webhooks
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, all

List Webhook triggered events

Retrieve the list of Webhook events triggered from a specific Webhook or for a specific Project or Organization. You must specify the region.

Usage:

TerminalCode
scw tem webhook list-events [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-by(Optional) List Webhook events corresponding to specific criteriaOne of: created_at_desc, created_at_asc
webhook-idID of the Webhook linked to the eventsRequired
email-idID of the email linked to the events
event-types.{index}List of event types linked to the eventsOne of: unknown_type, email_queued, email_dropped, email_deferred, email_delivered, email_spam, email_mailbox_not_found, email_blocklisted, blocklist_created
statuses.{index}List of event statusesOne of: unknown_status, sending, sent, failed
project-idID of the webhook Project
domain-idID of the domain to watch for triggering events
organization-idID of the webhook Organization
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, all

Update a Webhook

Update a Webhook events type, SNS ARN or name.

Usage:

TerminalCode
scw tem webhook update [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
webhook-idID of the Webhook to updateRequired
nameName of the Webhook to update
event-types.{index}List of event types to updateOne of: unknown_type, email_queued, email_dropped, email_deferred, email_delivered, email_spam, email_mailbox_not_found, email_blocklisted, blocklist_created
sns-arnScaleway SNS ARN topic to update
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par