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.
Authorizations
Section titled “Authorizations”Send your API key in the x-api-key header.
See Authentication.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
Recipient addresses. Required. Every address must be a valid email address, otherwise the request fails with 422 and nothing is sent.
[ "recipient@example.com"]Accepted for compatibility but currently not included in the email.
Here is the scan for your records.Example
{ "emails": [ "recipient@example.com", "accounting@example.com" ]}Responses
Section titled “ Responses ”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
object
Usually the HTTP status code. It can differ; a request to an unknown path returns HTTP 400 with code 500.
401Human-readable description of the error.
The kind of error, for example Authorization or REST.
RESTReturned 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
Examples
{ "error": { "code": 401, "message": "The request does not include a valid access token. Please provide a valid access token.", "type": "Authorization" }}{ "error": { "code": 401, "message": "x-api-key: x-api-key is invalid", "type": "REST" }}{ "error": { "code": 401, "message": "User does not have access to requested resource.", "type": "Authorization" }}The request body failed validation. The message names the invalid field.
Error envelope returned with 4xx and 5xx responses.
object
object
Usually the HTTP status code. It can differ; a request to an unknown path returns HTTP 400 with code 500.
401Human-readable description of the error.
The kind of error, for example Authorization or REST.
RESTReturned 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
Example
{ "error": { "code": 422, "message": "label: must have a value", "type": "REST", "fields": {} }}