Evenbead docs

Email

11 operations. All areas

POST/v1/documents/{id}/email

Email an invoice, credit memo or sales receipt to the customer as a PDF (from noreply@evenbead.com with your company's name; Reply-To your address). An agent over its policy creates a proposal instead.

  • Operation emailDocument
  • Scope: propose
  • Write: needs Idempotency-Key (or dry_run)
Parameters
  • id path, string, required
Request body
  • to string Recipient (default: the customer's email on file). Anything else makes an agent's send a proposal.
  • to_name string
  • cc array of string
  • message string A short note shown above the document details.
  • dry_run boolean Preview the recipients, subject, attachment and policy verdict without queuing.
Responses
  • 200 Dry run: the preview and the policy verdict (object)
  • 201 Email queued (or, for an agent over its policy, waiting for approval: status pending_approval) (object)
  • Errors 400, 401, 403, 404, 409, 422, 429, 500 (Error: error.type, message)

POST/v1/estimates/{id}/email

Email an estimate to the customer as a PDF. Same governance as emailDocument.

  • Operation emailEstimate
  • Scope: propose
  • Write: needs Idempotency-Key (or dry_run)
Parameters
  • id path, string, required
Request body
  • to string Recipient (default: the customer's email on file). Anything else makes an agent's send a proposal.
  • to_name string
  • cc array of string
  • message string A short note shown above the document details.
  • dry_run boolean Preview the recipients, subject, attachment and policy verdict without queuing.
Responses
  • 200 Dry run: the preview and the policy verdict (object)
  • 201 Email queued (or, for an agent over its policy, waiting for approval: status pending_approval) (object)
  • Errors 400, 401, 403, 404, 409, 422, 429, 500 (Error: error.type, message)

GET/v1/email/outbox

This company's emails, newest first (documents, reminders, security notices), with delivery status

  • Operation listEmails
  • Scope: read
  • Read
Parameters
  • status query, "pending_approval" | "queued" | "sending" | "sent" | "failed" | "suppressed" | "rejected" | "cancelled"
  • limit query, integer
Responses
  • 200 Emails (object)
  • Errors 400, 401, 403, 429, 500 (Error: error.type, message)

GET/v1/email/outbox/{id}

One email with its delivery status

  • Operation getEmail
  • Scope: read
  • Read
Parameters
  • id path, string, required
Responses
  • 200 Email (object)
  • Errors 400, 401, 403, 404, 429, 500 (Error: error.type, message)

POST/v1/email/outbox/{id}/approve

Approve an agent's email that waits for approval (approve scope; never your own); it is queued for sending

  • Operation approveEmail
  • Scope: approve
  • Write: needs Idempotency-Key (or dry_run)
Parameters
  • id path, string, required
Request body
  • reason string
Responses
  • 200 Approved and queued (object)
  • Errors 400, 401, 403, 404, 409, 422, 429, 500 (Error: error.type, message)

POST/v1/email/outbox/{id}/reject

Reject an agent's email that waits for approval, with a reason (approve scope; never your own)

  • Operation rejectEmail
  • Scope: approve
  • Write: needs Idempotency-Key (or dry_run)
Parameters
  • id path, string, required
Request body
  • reason string, required
Responses
  • 200 Rejected (object)
  • Errors 400, 401, 403, 404, 409, 422, 429, 500 (Error: error.type, message)

POST/v1/email/outbox/{id}/cancel

Cancel an email that has not been sent yet (its requester, or an admin)

  • Operation cancelEmail
  • Scope: propose
  • Write: needs Idempotency-Key (or dry_run)
Parameters
  • id path, string, required
Request body
  • reason string
Responses
  • 200 Cancelled (object)
  • Errors 400, 401, 403, 404, 409, 422, 429, 500 (Error: error.type, message)

POST/v1/email/outbox/{id}/retry

Queue a failed email again (admin scope)

  • Operation retryEmail
  • Scope: admin
  • Write: needs Idempotency-Key (or dry_run)
Parameters
  • id path, string, required
Request body
  • reason string
Responses
  • 200 Queued again (object)
  • Errors 400, 401, 403, 404, 409, 422, 429, 500 (Error: error.type, message)

GET/v1/email/settings

This company's email settings: Reply-To, sender name, security-notice address, payment reminders

  • Operation getEmailSettings
  • Scope: read
  • Read
Responses
  • 200 Settings (object)
  • Errors 400, 401, 403, 429, 500 (Error: error.type, message)

POST/v1/email/settings

Set Reply-To, sender name, the security-notice address and payment reminders (off by default; days relative to the due date, e.g. [3, 10, 30]). Admin scope.

  • Operation updateEmailSettings
  • Scope: admin
  • Write: sets a value, no Idempotency-Key needed
Request body
  • reply_to string | null An email address.
  • display_name string | null
  • security_notices_to string | null An email address.
  • reminders_enabled boolean
  • reminder_days array of integer
Responses
  • 200 Settings (object)
  • Errors 400, 401, 403, 409, 422, 429, 500 (Error: error.type, message)

GET/v1/email/suppressions

Addresses this company's emails are not sent to (unsubscribed from reminders, or bounced)

  • Operation listEmailSuppressions
  • Scope: read
  • Read
Responses
  • 200 Suppressions (object)
  • Errors 400, 401, 403, 429, 500 (Error: error.type, message)