Command line
Every method of the API as a command, for a terminal or a script.
Get it
Usage: opensend <command> opensend login [--key <key>] [--url <address>] Save the key, and the address of a server of your own opensend logout Forget them opensend whoami Say who the key belongs to opensend methods List every command opensend <group> <action> [id] [--flags] Call the API, for example: opensend emails send --from "Acme <hello@mail.example.com>" --to ada@example.com \ --subject "Your receipt" --text "Thanks for your order." opensend domains list opensend emails get em_02c41d09b7e4 Every command takes --help, and --json with the whole input as JSON.OPENSEND_API_KEY and OPENSEND_API_URL win over what login saved.Sign in
Give the key once. It is checked with a request, then saved. On a server of your own, give its address as well, with --url. Leave the key out and the command asks for it.
opensend login --key os_...opensend whoamiopensend logout- The key and the address are saved in
~/.config/opensend/config.json, or under$XDG_CONFIG_HOMEwhen that is set. Only you can read the file. OPENSEND_API_KEYandOPENSEND_API_URLin the environment win over the saved values, which suits a script or a CI job.whoamisays who the key belongs to, andlogoutforgets the saved values.
Run a command
A command is opensend <group> <action>, then the id when the method acts on one thing, then the input as flags. A flag is the name of the field with dashes: scheduledAt is --scheduled-at.
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"}' --json '{"from":"Acme <hello@mail.example.com>","to":"ada@example.com","subject":"Hi","text":"Hello"}'opensend emails send --help- Field
- Text or a number
- Flag
--subject "Your receipt",--limit 20
- Field
- A switch
- Flag
--click-trackingfor yes,--click-tracking falsefor no
- Field
- A list
- Flag
--to a@example.com,b@example.com, or the flag once per value
- Field
- An object
- Flag
--tags '{"category":"receipt"}', as JSON
--jsontakes the whole input as one JSON object. A flag beside it wins over the same field in it.--helpafter a command lists its flags and marks the ones it needs.opensend <group>lists the actions of a group, andopensend methodslists every command.
Output
A command prints the answer of the API as JSON and ends with status 0. When it fails it prints the code and the message of the error on the error stream and ends with status 1, so a script can stop on it.
opensend emails get em_02 | jq -r .statusEvery command
Emails
- Command
opensend emails send- What it does
- Send email
- Command
opensend emails batch- What it does
- Send emails in a batch
- Command
opensend emails update- What it does
- Reschedule email
- Command
opensend emails cancel- What it does
- Cancel email
- Command
opensend emails get- What it does
- Retrieve email
- Command
opensend emails list- What it does
- List emails
Received emails
- Command
opensend inbound list- What it does
- List received emails
- Command
opensend inbound get- What it does
- Retrieve received email
Domains
- Command
opensend domains create- What it does
- Add domain
- Command
opensend domains verify- What it does
- Verify domain
- Command
opensend domains get- What it does
- Retrieve domain
- Command
opensend domains list- What it does
- List domains
- Command
opensend domains update- What it does
- Update domain
- Command
opensend domains remove- What it does
- Delete domain
Templates
- Command
opensend templates create- What it does
- Create template
- Command
opensend templates get- What it does
- Get template
- Command
opensend templates list- What it does
- List templates
- Command
opensend templates update- What it does
- Update template
- Command
opensend templates edit- What it does
- Edit template design
- Command
opensend templates publish- What it does
- Publish template
- Command
opensend templates test- What it does
- Send test of template
- Command
opensend templates render- What it does
- Render template design
- Command
opensend templates duplicate- What it does
- Duplicate template
- Command
opensend templates versions- What it does
- List template versions
- Command
opensend templates version- What it does
- Get template version
- Command
opensend templates restore- What it does
- Restore template version
- Command
opensend templates remove- What it does
- Delete template
- Command
opensend templates starters- What it does
- List template starters
- Command
opensend templates starter- What it does
- Get template starter
Images
- Command
opensend images add- What it does
- Add image
- Command
opensend images upload- What it does
- Upload image
- Command
opensend images list- What it does
- List images
- Command
opensend images get- What it does
- Retrieve image
- Command
opensend images remove- What it does
- Delete image
Broadcasts
- Command
opensend broadcasts create- What it does
- Create broadcast
- Command
opensend broadcasts update- What it does
- Update broadcast
- Command
opensend broadcasts send- What it does
- Send broadcast
- Command
opensend broadcasts test- What it does
- Send test of broadcast
- What it does
- Duplicate broadcast
- Command
opensend broadcasts get- What it does
- Retrieve broadcast
- Command
opensend broadcasts list- What it does
- List broadcasts
- Command
opensend broadcasts remove- What it does
- Delete broadcast
Audiences
- Command
opensend audiences create- What it does
- Create audience
- Command
opensend audiences list- What it does
- List audiences
- Command
opensend audiences get- What it does
- Retrieve audience
- Command
opensend audiences update- What it does
- Rename audience
- Command
opensend audiences remove- What it does
- Delete audience
- Command
opensend audiences join- What it does
- Add contact to audience
- Command
opensend audiences leave- What it does
- Remove contact from audience
Contacts
- Command
opensend contacts create- What it does
- Add contact
- Command
opensend contacts list- What it does
- List contacts
- Command
opensend contacts get- What it does
- Retrieve contact
- Command
opensend contacts update- What it does
- Update contact
- Command
opensend contacts remove- 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
- Command
opensend topics create- What it does
- Create topic
- Command
opensend topics list- What it does
- List topics
- Command
opensend topics get- What it does
- Retrieve topic
- Command
opensend topics update- What it does
- Update topic
- Command
opensend topics remove- What it does
- Delete topic
Suppressions
- Command
opensend suppressions create- What it does
- Suppress an address
- Command
opensend suppressions list- What it does
- List suppressed addresses
- Command
opensend suppressions remove- What it does
- Remove a suppressed address
Automations
- Command
opensend automations create- What it does
- Create automation
- Command
opensend automations update- What it does
- Update automation
- Command
opensend automations publish- What it does
- Publish automation
- Command
opensend automations pause- What it does
- Pause automation
- Command
opensend automations resume- What it does
- Resume automation
- Command
opensend automations test- What it does
- Test automation
- Command
opensend automations enroll- What it does
- Enrol in automation
- What it does
- Duplicate automation
- Command
opensend automations get- What it does
- Retrieve automation
- Command
opensend automations list- What it does
- List automations
- Command
opensend automations remove- What it does
- Delete automation
Runs
- Command
opensend runs list- What it does
- List runs
- Command
opensend runs get- What it does
- Retrieve run
- Command
opensend runs cancel- What it does
- Cancel run
- Command
opensend runs retry- What it does
- Retry run
Events
- Command
opensend events send- What it does
- Send event
- Command
opensend events create- What it does
- Define event
- Command
opensend events list- What it does
- List events
- Command
opensend events get- What it does
- Retrieve event
- Command
opensend events update- What it does
- Update event
- Command
opensend events remove- What it does
- Delete event
Webhooks
- Command
opensend webhooks create- What it does
- Add webhook
- Command
opensend webhooks list- What it does
- List webhooks
- Command
opensend webhooks update- What it does
- Update webhook
- Command
opensend webhooks remove- What it does
- Delete webhook
- Command
opensend webhooks test- What it does
- Send test event
- Command
opensend webhooks deliveries- What it does
- List webhook deliveries
Metrics
- Command
opensend metrics get- What it does
- Retrieve metrics
Logs
- Command
opensend logs list- What it does
- List logs
- Command
opensend logs get- What it does
- Retrieve log
API keys
- Command
opensend api-keys create- What it does
- Create API key
- Command
opensend api-keys enroll- What it does
- Enroll existing API key
- Command
opensend api-keys list- What it does
- List API keys
- Command
opensend api-keys remove- What it does
- Revoke API key
Imports
- Command
opensend imports inspect- What it does
- Look into another account
- Command
opensend imports create- What it does
- Start import
- Command
opensend imports get- What it does
- Retrieve import
- Command
opensend imports list- What it does
- List imports
- Command
opensend imports cancel- What it does
- Cancel import
Workspace
- Command
opensend workspace get- What it does
- Retrieve workspace
- Command
opensend workspace update- What it does
- Update workspace
- Command
opensend workspace close- What it does
- Close workspace
Members
- Command
opensend members invite- What it does
- Invite member
- Command
opensend members list- What it does
- List members
- Command
opensend members update- What it does
- Update member
- Command
opensend members remove- What it does
- Remove member
Billing
- Command
opensend billing plans- What it does
- List plans
- Command
opensend billing checkout- What it does
- Start checkout
- Command
opensend billing portal- What it does
- Open billing portal
- Command
opensend billing invoices- What it does
- List invoices
Server
- Command
opensend server get- What it does
- Retrieve server settings
- Command
opensend server update- What it does
- Update server settings
Account
- Command
opensend account get- What it does
- Retrieve account
Methods
- Command
opensend methods list- What it does
- List methods
Assistant
- Command
opensend ask send- What it does
- Ask the assistant
- Command
opensend ask chats- What it does
- List chats
- Command
opensend ask chat- What it does
- Retrieve chat
- Command
opensend ask save- What it does
- Keep chat
- Command
opensend ask forget- What it does
- Forget chat