Skip to main content
POST
/
conversations
/
{conv_id}
/
drafts
Create a new draft
curl --request POST \
  --url https://api.getfernand.com/conversations/{conv_id}/drafts \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "content": "..."
}
'
{
  "created": "2023-11-07T05:31:56Z",
  "last_updated": "2023-11-07T05:31:56Z",
  "conversation_id": 123,
  "id": 123,
  "title": "<string>",
  "content": {},
  "author_id": 123,
  "target_id": 123
}
Creates a message draft within the specified conversation, allowing the author and optional target agent to be set by ID or email.

Authorizations

X-API-Key
string
header
required

Authenticate your account by including your secret key in API requests. You can manage your API keys in the Dashboard.

Authentication to the API is performed by using the HTTP Header X-API-Key.

Path Parameters

conv_id
integer
required

ID of the conversation to create the draft in.

Body

application/json
content
string
required

Content of the draft (required).

Example:

"..."

author_id
integer

ID of the agent authoring the draft (optional if author_email is provided).

Example:

123

author_email
string

Email of the agent authoring the draft (optional if author_id is provided).

Example:

"jared.dunns@piedpiper.com"

target_id
integer

ID of the agent the draft is targeted to (optional).

target_email
string

Email of the agent the draft is targeted to (optional).

Example:

"richard.hendricks@piedpiper.com"

title
string

Title of the draft (optional).

Example:

"Lawyer response"

Response

Draft created successfully.

created
string<date-time>
required

Timestamp when the draft was created (UTC)

last_updated
string<date-time>
required

Timestamp when the draft was last updated (UTC)

conversation_id
integer<int64>
required

Conversation ID this draft belongs to

id
integer<int64>

Unique identifier for the message draft

title
string | null

Optional title for the draft

Maximum string length: 250
content
object

JSON object containing the draft content and metadata. Example: { "content": "string", "attachments": [ { "type": "application/pdf", "name": "report.pdf", "content": "<... base64 encoded content ...>" } ], "inlines": [ { "type": "image/png", "name": "screenshot.png", "content": "<... base64 encoded content ...>", "cid": "random-cid-12345" } ], "actions": [ { "name": "status.close", "snippet_id": 123, "data": {} } ] }

author_id
integer<int64> | null

Agent ID who created the draft

target_id
integer<int64> | null

Agent ID to whom the draft is targeted (null means everyone)