Skip to content
Pitch2SaleDevelopers
Open the app
Early access: these pages are being written and reviewed. Facts in the header boxes come straight from the product.

Update email draft

PUT
/api/v1/email-drafts/{id}
curl --request PUT \
--url https://api.pitch2sale.com/api/v1/email-drafts/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "lead_id": "example", "contact_id": "example", "connected_account_id": "example", "to": [ "hello@example.com" ], "cc": [ "hello@example.com" ], "bcc": [ "hello@example.com" ], "subject": "example", "body_html": "example", "body_text": "example", "attachments": [ { "file_id": "example", "name": "example", "url": "example", "size": 1, "content_type": "example", "s3_key": "example" } ] }'
id
required
string
Media typeapplication/json
object
lead_id
Any of:
string
/^[0-9a-fA-F]{24}$/
contact_id
Any of:
string
/^[0-9a-fA-F]{24}$/
connected_account_id
Any of:
string
/^[0-9a-fA-F]{24}$/
to
Array<string>
<= 50 items
cc
Array<string>
<= 50 items
bcc
Array<string>
<= 50 items
subject
string
<= 1000 characters
body_html
string
<= 2000000 characters
body_text
string
<= 2000000 characters
attachments
Array<object>
<= 20 items
object
file_id
required
string
>= 1 characters <= 200 characters
name
required
string
>= 1 characters <= 500 characters
url
Any of:
string
<= 2000 characters
size
required
integer
<= 52428800
content_type
required
string
>= 1 characters <= 200 characters
s3_key
Any of:
string
>= 1 characters <= 500 characters
Examplegenerated
{
"lead_id": "example",
"contact_id": "example",
"connected_account_id": "example",
"to": [
"hello@example.com"
],
"cc": [
"hello@example.com"
],
"bcc": [
"hello@example.com"
],
"subject": "example",
"body_html": "example",
"body_text": "example",
"attachments": [
{
"file_id": "example",
"name": "example",
"url": "example",
"size": 1,
"content_type": "example",
"s3_key": "example"
}
]
}

OK

Validation failed

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}

Authentication required or token invalid

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}

Role permission or token scope missing

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}

Rate limit exceeded

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}