API

AgentEmail

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/email/{message_id} load The message as a plain-text document

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

agent_email, err := client.AgentEmail(nil).Load(map[string]any{"agent_id": "example", "id": "example_id", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(agent_email)

Lua

Construct client as shown in the Lua setup, then call the operations:

local agent_email, err = client:AgentEmail():load({ agent_id = "example", id = "example_id", organization_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$agent_email = $client->AgentEmail()->load(["agent_id" => "example", "id" => "example_id", "organization_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

agent_email = client.AgentEmail().load({"agent_id": "example", "id": "example_id", "organization_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

agent_email = client.AgentEmail.load({ "agent_id" => "example", "id" => "example_id", "organization_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const agent_email = await client.AgentEmail().load({ agent_id: "example", id: "example_id", organization_id: "example" })

Fields

Field Type Required Description
delivery one,string,null Yes What SES reported for mail the agent sent; null for received mail
direction string Yes inbound: mail the agent received; outbound: mail it sent
from string Yes From
id string Yes Id
preview string No Preview
received_at string Yes Received At
recipient_tag one,string,null Yes The +tag the sender used, if any
spam boolean Yes SES judged it spam
subject one,string,null Yes Subject
text string Yes From, To, Subject and Date headers, a blank line, then the body as plain text
to array Yes To

load

GET /api/v1/organizations/{organization_id}/agents/{id}/spark/email/{message_id}

Operation ID: get_api_v1_organizations_organization_id_agents_id_spark_email_message_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes
message_id path string Yes

Responses

200: The message as a plain-text document

application/json

Property Type Required Description
text string Yes From, To, Subject and Date headers, a blank line, then the body as plain text
to array of string Yes
401: Unauthorized
403: Not allowed to read this agent's mail
404: No such message, or it expired
422: Unprocessable entity
502: Bad gateway