---
title: "Post the site's response to a request you sent"
method: POST
path: "/api/v1/egress/{egressId}"
tags: ["Runs"]
---

# Post the site's response to a request you sent

`POST /api/v1/egress/{egressId}`

## Request

- Base URL: `https://unbrowse.ai`
- URL: `https://unbrowse.ai/api/v1/egress/{egressId}`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://unbrowse.ai/authorize`, token URL `https://unbrowse.ai/oauth/token`, scopes: `unbrowse`)
  - HTTP bearer

Send the raw response exactly as the site gave it (status, headers, body). If the request could not be sent at all (DNS, TLS, connection refused), send `error` instead; the run treats it as a network error. You have 120 s per request.

## Request body

- object
  - `requestId` string, required
  - `response` EgressResponse
    - `status` integer, required
    - `headers` union: As [name, value] pairs (keeps repeated headers such as set-cookie) or an object.
      - array[]
        - string[]
      - object
    - `body` string: The body, decoded (no content-encoding). Up to 10 MB.
    - `bodyEncoding` 'text' | 'base64'
    - `url` string, uri: The final URL, when redirects were followed.
  - `error` string: Why the request could not be sent.

## Response `200`

The finished run

- Run
  - `runId` string, required
  - `status` 'accepted' | 'working' | 'input_required' | 'succeeded' | 'failed' | 'outcome_unknown' | 'cancelled' | 'expired', required
  - `capabilityId` string, nullable
  - `phase` string
  - `stateRevision` integer
  - `result` unknown
  - `requirements` Object[]: What the run needs (status input_required).
  - `error` Object
  - `verified` boolean

## Other responses

- `202`: The next site request(s)
- `400`: An error
- `401`: Missing or invalid credentials. The WWW-Authenticate header names the protected-resource metadata.
- `402`: An error
- `404`: An error
- `409`: An error
- `429`: An error

---

[API](https://skmtc.dev/unbrowse/apis/unbrowse-api.md) · [All operations](https://skmtc.dev/unbrowse/apis/unbrowse-api/llms.txt) · [OpenAPI document](https://skmtc.dev/unbrowse/apis/unbrowse-api/revisions/f49034a1fbff?raw)
