Yoxel Drafts API
A draft message is a message which has not been sent yet. The drafts endpoints let you create new drafts, read existing drafts, and send drafts.
A draft message is a message which has not been sent yet. The drafts endpoints let you create new drafts, read existing drafts, and send drafts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/aurinko:aurinko-drafts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
contact:
email: support@aurinko.io
description: '## Introduction
The Aurinko API is a unified API platform allowing developers to quickly build integrations with
many mailbox providers and services like Google, Office 365, Outlook.com, MS Exchange, IMAP.
The unified API abstracts away differences between many email, calendar, contact, task APIs
to make it easy to connect and sync the mailbox data.
The Aurinko API''s focus is convenient and reliable data synchronization for all supported
data categories (email, calendar, contacts, tasks) so the API provides methods to receive changes/deltas
and be notified of the changes (through webhooks) in a unified manner. The API''s sync/deltas model
should allow developers to build reliable event based solutions easily.
The Aurinko API is built on HTTP. Our API is RESTful. It has predictable resource URLs.
It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body.
## API Authentication
When you sign up for an account, you are given a Client Id and Secret
for every application that you create. You use those to go through OAuth flows that allow you
to start syncing remote account data through Aurinko. An account OAuth flow can be started with
just the Client Id and the Client Secret will be required to obtain an account access token in the
"authorization code" flow ("implicit grant" flow does is secured by the "trusted domains" setting).
Aurinko offers two forms of authentication:
- `Basic ` - used for authentication flows and administrative requests made from the server side.
- `Bearer ` - used for working with an account data.
- `Api Key in Cookie` - for in-browser apps that use Aurinko as their backend API with user sessions.
- `Api Key in Header (X-Aurinko-Session)` - for server side apps that need user sessions
Never share your client secret or access token. Keep them guarded and secure.
## Getting Started Guide
If you have a use case you would like to implement, please consult us for feedback on the best API operations for the task.
Click here to visit our API Guides.'
termsOfService: https://www.aurinko.io/terms-of-service/
title: Aurinko.io Drafts API
version: 1.0.0
servers:
- url: https://api.aurinko.io
description: Production server
security:
- AccountToken: []
- AppAuth: []
AccountIdHeader: []
- UserSessionHeader: []
AccountIdHeader: []
- UserSessionCookie: []
ClientIdHeader: []
AccountIdHeader: []
- AuthTypeHeader: []
ExchangeIdToken: []
ClientIdHeader: []
AccountIdHeader: []
tags:
- name: Drafts
x-displayName: Draft messages
description: A draft message is a message which has not been sent yet. The drafts endpoints let you create new drafts, read existing drafts, and send drafts.
paths:
/v1/email/drafts:
post:
operationId: createDraft
tags:
- Drafts
summary: Create a new draft message
parameters:
- schema:
type:
- bodytype
- 'null'
$ref: '#/components/schemas/BodyType'
in: query
name: bodyType
required: false
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OutgoingEmail'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/EmailDraftResponse'
x-codeSamples:
- lang: cURL
source: "curl -H 'Authorization: Bearer <access token>' \\\n -X POST https://api.aurinko.io/v1/email/drafts?bodyType=text \\\n -d '{\n \"subject\": \"Business lunch\",\n \"body\": \"How about a lunch meeting?\",\n \"to\": [{\"address\": \"partner@example.com\"}]\n \"cc\": [{\"address\": \"guest@example.com\"}]\n }'"
/v1/email/drafts/{draftId}:
get:
operationId: getDraft
tags:
- Drafts
summary: Get a draft message
parameters:
- schema:
type: string
in: path
name: draftId
description: draft message identifier
required: true
- schema:
type:
- bodytype
- 'null'
$ref: '#/components/schemas/BodyType'
in: query
name: bodyType
required: false
- schema:
type:
- array
- 'null'
items:
type: nativeproperty
$ref: '#/components/schemas/NativeProperty'
in: query
name: nativeProperties
required: false
- schema:
default: false
type:
- boolean
- 'null'
in: query
name: loadInlines
description: automatically pre-load relevant inline attachments
required: false
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/EmailDraft'
x-codeSamples:
- lang: cURL
source: "curl -X GET -H 'Authorization: Bearer <access token>' \\\n https://api.aurinko.io/v1/email/drafts/{id}"
/v1/email/drafts/{draftId}/send:
post:
operationId: sendDraft
tags:
- Drafts
summary: Send a draft message
parameters:
- schema:
type: string
in: path
name: draftId
description: an identifier of a draft message
required: true
- schema:
format: date-time
type:
- string
- 'null'
in: query
name: sendTime
required: false
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DraftSendDetails'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/EmailDraftSendResponse'
x-codeSamples:
- lang: cURL
source: "curl -H 'Authorization: Bearer <access token>' \\\n -X POST https://api.aurinko.io/v1/email/drafts/{draftId}/send?sendTime=2021-04-28T15:40:00Z \\"
components:
schemas:
OutgoingEmailAttachment:
type: object
properties:
inline:
type: boolean
name:
type: string
mimeType:
type: string
contentId:
type: string
content:
type: string
format: base64
EmailDraftResponse:
type: object
properties:
id:
type: string
readOnly: true
webLink:
type: string
readOnly: true
EmailAttachment:
type: object
properties:
id:
type: string
readOnly: true
name:
type: string
readOnly: true
mimeType:
type: string
readOnly: true
size:
type: integer
readOnly: true
inline:
type: boolean
readOnly: true
contentId:
type: string
readOnly: true
content:
type: string
readOnly: true
contentLocation:
type: string
readOnly: true
DraftSendDetails:
type: object
properties:
tracking:
$ref: '#/components/schemas/OutEmailTrack'
EmailHeader:
type: object
properties:
name:
type: string
value:
type: string
OutgoingEmail:
type: object
properties:
from:
$ref: '#/components/schemas/EmailAddress'
subject:
type: string
body:
type: string
inReplyTo:
type: string
references:
type: string
to:
type: array
items:
$ref: '#/components/schemas/EmailAddress'
cc:
type: array
items:
$ref: '#/components/schemas/EmailAddress'
bcc:
type: array
items:
$ref: '#/components/schemas/EmailAddress'
replyTo:
type: array
items:
$ref: '#/components/schemas/EmailAddress'
xHeaders:
type: array
items:
$ref: '#/components/schemas/EmailHeader'
attachments:
type: array
items:
$ref: '#/components/schemas/OutgoingEmailAttachment'
tracking:
$ref: '#/components/schemas/OutEmailTrack'
followUp:
$ref: '#/components/schemas/FollowUpOutgoing'
keywords:
type: array
items:
type: string
NativeProperty:
type: string
EmailAddress:
type: object
properties:
name:
type: string
address:
type: string
format: email
raw:
type: string
readOnly: true
BodyType:
type: string
enum:
- html
- text
OutEmailTrack:
type: object
properties:
threadReplies:
type: boolean
opens:
type: boolean
trackOpensAfterSendDelay:
type: integer
description: number of seconds to wait after a send before enabling tracking
default: 5
context:
type: string
description: User-defined tracking data that will be associated with this email.
EmailDraftSendResponse:
type: object
properties:
status:
type: string
enum:
- Ok
- Scheduled
trackingId:
type: string
description: A tracking identifier for the sent message
FollowUpOutgoing:
type: object
properties:
ruleId:
type: integer
actionVars:
type: object
additionalProperties:
type: string
EmailDraft:
type: object
properties:
id:
type: string
readOnly: true
message:
$ref: '#/components/schemas/EmailMessage'
scheduled:
$ref: '#/components/schemas/ScheduledDraft'
Sensitivity:
type: string
enum:
- normal
- private
- personal
- confidential
ScheduledDraft:
type: object
properties:
jobId:
type: integer
format: int64
readOnly: true
sendTime:
type: string
format: date-time
readOnly: true
status:
type: string
enum:
- scheduled
- sent
- failed
errorMessage:
type: string
readOnly: true
EmailMessage:
type: object
properties:
id:
type: string
readOnly: true
threadId:
type: string
readOnly: true
createdTime:
type: string
format: date-time
readOnly: true
lastModifiedTime:
type: string
format: date-time
readOnly: true
sentAt:
type: string
format: date-time
readOnly: true
receivedAt:
type: string
format: date-time
readOnly: true
internetMessageId:
type: string
readOnly: true
subject:
type: string
readOnly: true
sysLabels:
type: array
readOnly: true
items:
type: string
enum:
- junk
- trash
- sent
- inbox
- unread
- flagged
- important
- draft
keywords:
type: array
items:
type: string
sysClassifications:
type: array
readOnly: true
items:
type: string
enum:
- personal
- social
- promotions
- updates
- forums
sensitivity:
$ref: '#/components/schemas/Sensitivity'
meetingMessageMethod:
type: string
enum:
- request
- reply
- cancel
- counter
- other
from:
$ref: '#/components/schemas/EmailAddress'
to:
type: array
items:
$ref: '#/components/schemas/EmailAddress'
cc:
type: array
items:
$ref: '#/components/schemas/EmailAddress'
bcc:
type: array
items:
$ref: '#/components/schemas/EmailAddress'
replyTo:
type: array
items:
$ref: '#/components/schemas/EmailAddress'
hasAttachments:
type: boolean
readOnly: true
body:
type: string
readOnly: true
bodySnippet:
type: string
readOnly: true
attachments:
type: array
items:
$ref: '#/components/schemas/EmailAttachment'
inReplyTo:
type: string
readOnly: true
references:
type: string
readOnly: true
threadIndex:
type: string
readOnly: true
internetHeaders:
type: array
items:
$ref: '#/components/schemas/EmailHeader'
nativeProperties:
type: object
additionalProperties:
type: string
folderId:
type: string
readOnly: true
webLink:
type: string
readOnly: true
omitted:
type: array
readOnly: true
items:
type: string
enum:
- threadId
- body
- attachments
- recipients
- internetHeaders
securitySchemes:
AppAuth:
type: http
scheme: basic
description: App-level basic authentication using Client ID and Client Secret that can be obtained at Aurinko Dashboard page.
AccountToken:
type: http
scheme: bearer
description: Account-level authentication with account token obtained using `/auth/authorize` endpoint.
UserSessionCookie:
type: apiKey
in: cookie
name: AUR{APPID}
description: Cookie-based user-level authentication
UserSessionHeader:
type: apiKey
in: header
name: X-Aurinko-Session
description: Token-based user-level authentication
ClientIdHeader:
type: apiKey
in: header
name: X-Aurinko-Client-Id
description: Client ID that can be obtained at Aurinko Dashboard page
AccountIdHeader:
type: apiKey
in: header
name: X-Aurinko-Account-Id
description: User account id
AuthTypeHeader:
type: apiKey
in: header
name: X-Aurinko-Auth-Type
description: 'Authentication type. Possible values: default, exchangeIdToken'
ExchangeIdToken:
type: http
scheme: bearer
bearerFormat: 'Exchange Identity Token (only with `X-Aurinko-Auth-Type: exchangeIdToken` header.)'
description: 'Authentication using Exchange Identity Token. To use this method `X-Aurinko-Auth-Type: exchangeIdToken` header should be used.'
x-tagGroups:
- name: OAuth Flow
tags:
- Auth
- Account
- User
- name: Account management
tags:
- Accounts
- Services
- Managed accounts
- name: Email
tags:
- Messages
- EmailSync
- Drafts
- EmailFolders
- EmailTracking
- FollowUpRobot
- name: Calendars
tags:
- Calendars
- Events
- CalSync
- FreeBusySchedule
- name: Scheduling
tags:
- Booking
- GroupBooking
- Availability
- name: Contacts
tags:
- Contacts
- ContSync
- name: Tasks
tags:
- TaskLists
- Tasks
- TaskSync
- name: Webhooks
tags:
- Webhooks
- name: Other
tags:
- Errors