Skip to the page

Commands and input

How a method becomes a command, and how to give it its input.

A command

A command is opensend <group> <action>, then the ids its path needs, in order, then the input as flags. A flag is the name of the field with dashes: scheduledAt is --scheduled-at.

Shell
opensend emails list --status bounced --limit 20opensend domains update dom_02 --click-trackingopensend domains update dom_02 --click-tracking=falseopensend webhooks create --url https://example.com/hooks/mail --events email.delivered,email.bouncedopensend emails send --tags '{"category":"receipt"}' --input '{"from":"Acme <hello@mail.example.com>","to":"ada@example.com","subject":"Hi","text":"Hello"}'opensend emails list --limit 1 --all --max 2opensend emails send --help

Ids

Ids come first, in the order of the path. A run is named by its automation, then by itself:

Shell
opensend runs get auto_welcome run_01

A flag can give an id as well, and the words then fill the ids no flag gave.

Flags

Field
Text or a number
Flag
--subject "Your receipt", --limit 20
Field
A switch
Flag
--click-tracking for yes, --click-tracking=false for no
Field
A list
Flag
--to a@example.com,b@example.com, or the flag once for each value. A comma inside quotes or angle brackets stays in its value
Field
An object
Flag
--tags '{"category":"receipt"}', as JSON
  • A switch never takes the next word, so --click-tracking false is an error and not a no.
  • -- ends the flags: every word after it is an id, even one that starts with a dash.

The whole input at once

--input takes the whole input as one JSON object: as text, as @file, or as - to read it from standard input. A flag beside it wins over the same field in it.

Shell
opensend emails send --input @receipt.json --to ada@example.comcat receipt.json | opensend emails send --input -

Help

  • opensend <group> lists the actions of a group.
  • --help after a command lists its flags, marks the ones it needs and says what each is for.
  • --help --json prints the same as JSON, for a program or an agent that builds commands.
  • opensend commands lists every command.

A request of your own

api sends any request to the API with your key, for a path the commands do not cover. Its input goes in the query of a GET or a DELETE, merged with any query in the path, and in the body of the others. A DELETE asks first, as a removal does.

Shell
opensend api GET /v1/domains --input '{"limit":5}'

Every command

Emails

What it does
Send email
What it does
Send emails in a batch
What it does
Reschedule email
What it does
Cancel email
What it does
Retrieve email
What it does
List emails

Received emails

What it does
List received emails
What it does
Retrieve received email

Domains

What it does
Add domain
What it does
Verify domain
What it does
Retrieve domain
What it does
List domains
What it does
Update domain
What it does
Delete domain

Templates

What it does
Create template
What it does
Get template
What it does
List templates
What it does
Update template
What it does
Edit template design
What it does
Publish template
What it does
Send test of template
What it does
Render template design
What it does
Duplicate template
What it does
List template versions
What it does
Get template version
What it does
Restore template version
What it does
Delete template
What it does
List template starters
What it does
Get template starter

Images

What it does
Add image
What it does
Upload image
What it does
List images
What it does
Retrieve image
What it does
Delete image

Broadcasts

What it does
Create broadcast
What it does
Update broadcast
What it does
Send broadcast
What it does
Send test of broadcast
What it does
Duplicate broadcast
What it does
Retrieve broadcast
What it does
List broadcasts
What it does
Delete broadcast

Audiences

What it does
Create audience
What it does
List audiences
What it does
Retrieve audience
What it does
Rename audience
What it does
Delete audience
What it does
Add contact to audience
What it does
Remove contact from audience

Contacts

What it does
Add contact
What it does
List contacts
What it does
Retrieve contact
What it does
Update contact
What it does
Delete contact

Contact properties

What it does
Create contact property
What it does
List contact properties
What it does
Retrieve contact property
What it does
Update contact property
What it does
Delete contact property

Topics

What it does
Create topic
What it does
List topics
What it does
Retrieve topic
What it does
Update topic
What it does
Delete topic

Suppressions

What it does
Suppress an address
What it does
List suppressed addresses
What it does
Remove a suppressed address

Automations

What it does
Create automation
What it does
Update automation
What it does
Publish automation
What it does
Pause automation
What it does
Resume automation
What it does
Test automation
What it does
Enrol in automation
What it does
Duplicate automation
What it does
Retrieve automation
What it does
List automations
What it does
Delete automation

Runs

What it does
List runs
What it does
Retrieve run
What it does
Cancel run
What it does
Retry run

Events

What it does
Send event
What it does
Define event
What it does
List events
What it does
Retrieve event
What it does
Update event
What it does
Delete event

Webhooks

What it does
Add webhook
What it does
List webhooks
What it does
Update webhook
What it does
Delete webhook
What it does
Send test event
What it does
List webhook deliveries

Metrics

What it does
Retrieve metrics

Logs

What it does
List logs
What it does
Retrieve log

API keys

What it does
Create API key
What it does
Enroll existing API key
What it does
List API keys
What it does
Revoke API key

Imports

What it does
Look into another account
What it does
Start import
What it does
Retrieve import
What it does
List imports
What it does
Cancel import

Workspace

What it does
Retrieve workspace
What it does
Update workspace

Members

What it does
Invite member
What it does
List members
What it does
Update member
What it does
Remove member

Billing

What it does
List plans
What it does
Start checkout
What it does
Open billing portal
What it does
List invoices

Server

What it does
Retrieve server settings

Account

What it does
Retrieve account

Methods

What it does
List methods