Deployments.ai Docs
Command reference

deployments draft

Agent email drafts

CommandSummary
deployments draft createCreate an email draft
deployments draft showShow an email draft
deployments draft updateUpdate an email draft
deployments draft submitSubmit an email draft for approval
deployments draft approveApprove an email draft
deployments draft rejectReject an email draft
deployments draft cancelCancel an email draft
deployments draft sendSend an approved email draft

deployments draft create

Create an email draft.

deployments draft create <inbox> --to <a-b-c> --subject <subject>
  • Calls POST /v1/agent-email/inboxes/{inboxId}/drafts (SDK createAgentEmailDraft).
  • Needs an environment: --env or the saved context.
  • Sends an idempotency key. The CLI generates one per run; pass --idempotency-key to retry safely.
FlagTypeRequiredDefaultDescription
<inbox>positionalyesInbox ID
--tostring (a,b,c)yesRecipient addresses
--ccstring (a,b,c)CC addresses
--bccstring (a,b,c)BCC addresses
--subjectstringyesMessage subject
--textstringPlain-text body
--htmlstringHTML body
--reply-to-message-idstringMessage ID being replied to
--scheduled-atstringScheduled send timestamp
--metadatastring (json)Draft metadata

Also accepts the global flags.

deployments draft show

Show an email draft.

deployments draft show <id>
FlagTypeRequiredDefaultDescription
<id>positionalyesResource ID

Also accepts the global flags.

deployments draft update

Update an email draft.

deployments draft update <id>
  • Calls PATCH /v1/agent-email/drafts/{draftId} (SDK updateAgentEmailDraft).
  • Needs an environment: --env or the saved context.
  • Sends an idempotency key. The CLI generates one per run; pass --idempotency-key to retry safely.
FlagTypeRequiredDefaultDescription
<id>positionalyesResource ID
--tostring (a,b,c)Recipient addresses
--ccstring (a,b,c)CC addresses
--bccstring (a,b,c)BCC addresses
--subjectstringMessage subject
--textstringPlain-text body
--htmlstringHTML body
--scheduled-atstringScheduled send timestamp
--metadatastring (json)Draft metadata

Also accepts the global flags.

deployments draft submit

Submit an email draft for approval.

deployments draft submit <id>
  • Calls POST /v1/agent-email/drafts/{draftId}/submit (SDK submitAgentEmailDraft).
  • Needs an environment: --env or the saved context.
  • Sends an idempotency key. The CLI generates one per run; pass --idempotency-key to retry safely.
FlagTypeRequiredDefaultDescription
<id>positionalyesResource ID

Also accepts the global flags.

deployments draft approve

Approve an email draft.

deployments draft approve <id>
  • Calls POST /v1/agent-email/drafts/{draftId}/approve (SDK approveAgentEmailDraft).
  • Needs an environment: --env or the saved context.
  • Sends an idempotency key. The CLI generates one per run; pass --idempotency-key to retry safely.
FlagTypeRequiredDefaultDescription
<id>positionalyesResource ID

Also accepts the global flags.

deployments draft reject

Reject an email draft.

deployments draft reject <id> --reason <reason>
  • Calls POST /v1/agent-email/drafts/{draftId}/reject (SDK rejectAgentEmailDraft).
  • Needs an environment: --env or the saved context.
  • Sends an idempotency key. The CLI generates one per run; pass --idempotency-key to retry safely.
FlagTypeRequiredDefaultDescription
<id>positionalyesResource ID
--reasonstringyesRejection reason

Also accepts the global flags.

deployments draft cancel

Cancel an email draft.

deployments draft cancel <id>
  • Calls POST /v1/agent-email/drafts/{draftId}/cancel (SDK cancelAgentEmailDraft).
  • Needs an environment: --env or the saved context.
  • Destructive. Live runs ask for confirmation; pass --yes in scripts or with --json.
  • Sends an idempotency key. The CLI generates one per run; pass --idempotency-key to retry safely.
FlagTypeRequiredDefaultDescription
<id>positionalyesResource ID

Also accepts the global flags.

deployments draft send

Send an approved email draft.

deployments draft send <id>
  • Calls POST /v1/agent-email/drafts/{draftId}/send (SDK sendAgentEmailDraft).
  • Needs an environment: --env or the saved context.
  • Sends an idempotency key. The CLI generates one per run; pass --idempotency-key to retry safely.
FlagTypeRequiredDefaultDescription
<id>positionalyesResource ID

Also accepts the global flags.

On this page