emailDrafts
Requires permission sales:quote:read.
Lists the caller's own unsent email drafts, most recently updated first. Requires permission to read quotes.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query EmailDrafts {
emailDrafts {
id
type
createdAt
bodyHtml
ccEmails
inReplyToId
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query EmailDrafts {\n emailDrafts {\n id\n type\n createdAt\n bodyHtml\n ccEmails\n inReplyToId\n }\n}"
}
EOF
Response:
{
"data": {
"emailDrafts": [
{
"id": "id",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z",
"bodyHtml": "string",
"ccEmails": [
"string"
],
"inReplyToId": "string"
}
]
}
}
emailDrafts: [EmailDraft!]!
Type
EmailDraft object
A saved email draft.