---
title: "Create a Relay Session"
method: POST
path: "/v1/relays/sessions"
tags: ["Relays"]
---

# Create a Relay Session

`POST /v1/relays/sessions`

Create a relay session with users.

## Headers

- `Accept` string
- `Content-Type` string

## Request body

- object
  - `users` unknown[], required — List of IP Addresses of session users
    - unknown
  - `filters` unknown[] — List of location filters to apply to the session
    - unknown
  - `webhook_url` string — URL to send the session data to

## Response `200`

Success

- RelaySession
  - `session_id` string, required — The session ID
  - `authorization_token` integer — The authorization token for the session
  - `status` string, required — The status of the session
  - `ready` boolean, required — If the session is ready to be used
  - `linked` boolean, required — If the session is linked to a relay
  - `error` string — The error message if the session failed
  - `session_users` object[] — List Session Users
    - `ip_address` string — The IP Address of the user
    - `latitude` number — The latitude of the user
    - `longitude` number — The longitude of the user
    - `authorization_token` integer — The authorization token of the user
  - `relay` object — The relay details the session is linked to
    - `ip` string — The IP Address of the relay
    - `host` string — The host of the relay
    - `ports` object
      - `server` object
        - `port` integer — The port number
        - `protocol` string — The protocol of the port
        - `link` string — The link to the port
      - `client` object
        - `port` integer — The port number
        - `protocol` string — The protocol of the port
        - `link` string — The link to the port
  - `webhook_url` string — The webhook URL that we will call once the session is ready

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.dev/edgegap/apis/edgegap-v2-api.md) · [All operations](https://skmtc.dev/edgegap/apis/edgegap-v2-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/edgegap/edgegap-v2-api/revisions/8c42320af012/schema)
