Early access: these pages are being written and reviewed. Facts in the header boxes come straight from the product.
Send an estimate
POST
/api/v1/estimates/{id}/send
const url = 'https://api.pitch2sale.com/api/v1/estimates/example/send';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"to":["hello@example.com"],"subject":"example","message":"example","attach_pdf":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pitch2sale.com/api/v1/estimates/example/send \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "to": [ "hello@example.com" ], "subject": "example", "message": "example", "attach_pdf": true }'With to (1-10 addresses; the first is To, the rest are CC’d): emails the client from the org’s connected mailbox with the org’s branding, a link to the public estimate page and, with attach_pdf, the PDF. Allowed for draft, sent and viewed estimates; a draft becomes sent only after the email is delivered. Without to: marks a draft as sent without emailing. Emits estimate.sent. Rate limited per user.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
to
Array<string>
subject
string
message
string
attach_pdf
boolean
Examplegenerated
{ "to": [ "hello@example.com" ], "subject": "example", "message": "example", "attach_pdf": true}Responses
Section titled “Responses”The estimate and whether an email went out
Media typeapplication/json
object
estimate
required
object
_id
required
string
status
required
string
key
additional properties
any
email_sent
required
boolean
Examplegenerated
{ "estimate": { "_id": "example", "status": "example" }, "email_sent": true}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; OAuth app tokens are not accepted on this route
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" } ]}