---
title: "Endpoint for submitting an encrypted onion request"
method: POST
path: "/oxen/v4/lsrpc"
tags: ["Onion"]
---

# Endpoint for submitting an encrypted onion request

`POST /oxen/v4/lsrpc`

The data is an onion-encrypted request for another endpoint, wrapped in an encrypted layer for this open group server.

## Response `200`

Onion request completed.  The subrequest response will be encoded in a two-string bencoded list (see the request details for the encoding specifics) where the first string contains the response metadata as json with keys:

- code -- the HTTP response code of the subrequest, e.g. 200, 404 - headers -- a dict of HTTP response headers; the header name keys are always
  lower-cased.


The second part is the response body bytes; as in HTTP, interpreting this depends on the `content-type` header in the `headers` metadata, and the details of the invoked endpoint.

These two byte strings are bencoded, and then the bencoded data is encrypted using the same ephemeral key and encryption type as was used in the request.

## Changes

- **2022-02-04** `97e50dd5ee1b` — 1 info
  - endpoint added
- **2021-11-10** `fbd68862ef17` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/oxen-io/apis/session-open-group-server/changes/oxen/v4/lsrpc/post.md)

---

[API](https://skmtc.dev/oxen-io/apis/session-open-group-server.md) · [All operations](https://skmtc.dev/oxen-io/apis/session-open-group-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/oxen-io/session-open-group-server/revisions/39a4ebc32b95/schema)
