Skip to main content
POST
/
passthrough
/
raw
Raw Passthrough
curl --request POST \
  --url https://api.withterminal.com/tsp/v1/passthrough/raw \
  --header 'Authorization: Bearer <token>' \
  --header 'Connection-Token: <connection-token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "method": "POST",
  "path": "/media/files/download",
  "body": "{\"fileId\":\"file_123\"}"
}
'
"<string>"
Use Raw Passthrough for provider endpoints that download inspection photos, documents, videos, or other non-JSON files. Response rules:
  • Provider success (2xx): the provider body is returned as raw bytes with the provider’s Content-Type and status.
  • Provider error (non-2xx): the response is HTTP 200 with a PassthroughOutput JSON envelope (statusCode, headers, response), matching /passthrough. Unsuccessful provider responses are therefore not surfaced as Terminal API errors; check the envelope’s statusCode for the provider status.
  • Terminal error: requests that fail before or around the provider call return a standard Terminal error status and JSON body.
For normal JSON API calls where you want Terminal to parse and wrap successful provider responses too, use /passthrough instead.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Connection-Token
string
required

The token returned when a user authenticated their account. This authorizes access to a specific account.

Pattern: ^con_tkn_\S+$
Example:

"con_tkn_22vUhkC6tgre4kwaYfUkCDA1rzn6eyb4"

Body

application/json
method
enum<string>
required

The method for the third-party request, such as GET or POST.

Available options:
GET,
POST,
PUT,
PATCH,
DELETE
Example:

"POST"

path
string
required

The path for the third-party request, such as /reports

Example:

"/reports"

headers
object

The headers to use for the request (Terminal will handle the connection's authorization headers)

body
string

The request body

Example:

"{\"reportId\":\"1234\"}"

Response

A successful provider response body, forwarded directly without the Terminal PassthroughOutput JSON envelope. The Content-Type reflects the provider's response (for example image/jpeg or application/pdf), not necessarily application/octet-stream.

Raw response bytes from the provider. The body is not a JSON object and is not base64 encoded for HTTP clients. This endpoint may also return HTTP 200 with a PassthroughOutput JSON envelope (see the endpoint description) when the provider itself responds with an error status.