Skip to content

Share Scan via Email

POST
/scans/{scan_id}/email

Emails a scan’s content (PDF) to one or more email addresses. The scan_id can be obtained from the getPieceScans operation.

Sending is asynchronous: a 200 OK with an empty body means the emails were queued, not that they were delivered. One email is sent to each address. Delivery failures are not reported back through the API.

Send your API key in the x-api-key header. See Authentication.

scan_id
required
string
object
emails
required

Recipient addresses. Required. Every address must be a valid email address, otherwise the request fails with 422 and nothing is sent.

Array<string>
>= 1 items
[
"recipient@example.com"
]
comment

Accepted for compatibility but currently not included in the email.

string
Here is the scan for your records.
Example
{
"emails": [
"recipient@example.com",
"accounting@example.com"
]
}

The emails were queued for sending. Response body is empty.

The x-api-key header is missing or the key is not valid, or the caller can’t access an ID in the request. IDs that don’t exist return the same response as IDs the caller can’t access.

Error envelope returned with 4xx and 5xx responses.

object
error
object
code

Usually the HTTP status code. It can differ; a request to an unknown path returns HTTP 400 with code 500.

integer
401
message

Human-readable description of the error.

string
type

The kind of error, for example Authorization or REST.

string
REST
fields

Returned only with 422 responses. It may give more details about what failed validation, as lists of messages keyed by the name of the input.

object
key
additional properties
Array<string>
Examples
{
"error": {
"code": 401,
"message": "The request does not include a valid access token. Please provide a valid access token.",
"type": "Authorization"
}
}

The request body failed validation. The message names the invalid field.

Error envelope returned with 4xx and 5xx responses.

object
error
object
code

Usually the HTTP status code. It can differ; a request to an unknown path returns HTTP 400 with code 500.

integer
401
message

Human-readable description of the error.

string
type

The kind of error, for example Authorization or REST.

string
REST
fields

Returned only with 422 responses. It may give more details about what failed validation, as lists of messages keyed by the name of the input.

object
key
additional properties
Array<string>
Example
{
"error": {
"code": 422,
"message": "label: must have a value",
"type": "REST",
"fields": {}
}
}