POST
/
v1
/
teams
/
{teamId}
/
agent
/
email
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.email.sendEmail({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  body: {},
})
{
  "emailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "to": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

idempotency-key
string

Reuse this key with the same request after a lost response. The original send is returned and no second email goes out.

Required string length: 1 - 200

Path Parameters

teamId
string
required

Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.

Body

application/json
subject
string
required

Email subject line, 1-200 characters. Sent verbatim.

Required string length: 1 - 200
bodyMarkdown
string
required

Report body as Markdown, 1-50000 characters. Headings, paragraphs, bold/italic, links, bullet and numbered lists, block quotes and code are rendered to email-safe HTML; raw HTML is escaped, never rendered.

Required string length: 1 - 50000

Response

Success

emailId
string<uuid>
required

Audit row id for the sent email.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
to
string
required

The address the email was delivered to: always the signed-in user's own account email.