Skip to main content
POST
/
unified
/
proxy
Proxy Request
curl --request POST \
  --url https://api.stackone.com/unified/proxy \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'x-account-id: <x-account-id>' \
  --data '{
  "url": "https://api.sample-integration.com/v1",
  "method": "get",
  "path": "/employees/directory",
  "headers": {
    "Content-Type": "application/json"
  },
  "body": {}
}'
{
  "status": 200,
  "headers": {
    "content-type": "application/json",
    "x-request-id": "123e4567-e89b-12d3-a456-426614174000"
  },
  "data": {
    "id": "123",
    "name": "John Doe",
    "email": "john.doe@example.com"
  },
  "provider_errors": [
    {
      "status": 400,
      "url": "https://api.someprovider.com/v1/endpoint",
      "raw": {
        "error": "Bad Request",
        "message": "The supplied data is invalid"
      },
      "headers": {
        "date": "Tue, 02 Apr 2024 13:52:01 GMT",
        "content-type": "application/json; charset=utf-8"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

x-account-id
string
required

The account identifier

Body

application/json

The request body

url
string | null

The base url of the request

Example:

"https://api.sample-integration.com/v1"

method
enum<string> | null
default:get

The method of the request

Available options:
get,
post,
put,
delete,
patch
path
string | null

The path of the request including any query parameters

Example:

"/employees/directory"

headers
object | null

The headers to send in the request

Example:
{ "Content-Type": "application/json" }
body
object | null

The body of the request

Response

The proxy request was successful.

status
number
required

The HTTP status code returned by the provider

Example:

200

headers
object | null

The headers returned by the provider

Example:
{
"content-type": "application/json",
"x-request-id": "123e4567-e89b-12d3-a456-426614174000"
}
data

The response data from the provider. Can be an object, array, or primitive value.

Example:
{
"id": "123",
"name": "John Doe",
"email": "john.doe@example.com"
}
provider_errors
object[] | null

Provider-specific errors if any occurred

Example:
[
{
"status": 400,
"url": "https://api.someprovider.com/v1/endpoint",
"raw": {
"error": "Bad Request",
"message": "The supplied data is invalid"
},
"headers": {
"date": "Tue, 02 Apr 2024 13:52:01 GMT",
"content-type": "application/json; charset=utf-8"
}
}
]