LogoLogo
edgegap.comDashboard
  • 📘Learning Center
    • Getting Started
    • Unity Games
      • Getting Started - Servers
      • Developer Tools
    • Unreal Engine Games
      • Getting Started - Servers
      • Developer Tools
    • Matchmaking
      • Getting Started
      • Matchmaker In-Depth
      • Ping Beacons
    • Advanced Features
      • Apps and Versions
      • Deployments
      • Managed Clusters
  • API Reference
    • Dedicated Servers
    • Integration
    • Matchmaking
    • Peer to Peer
  • Release Notes
  • 📚Documentation
    • Sample Projects
      • Unity Netcodes
        • Unity NGO
        • Photon Fusion 1
        • Photon Fusion 2
        • Mirror
        • Mirror WebGL
        • Fishnet
        • Fishnet WebGL
        • Photon Bolt
      • Unreal Top-Down Sample
      • NuxtJS
      • Ruby On Rails
      • Unity Lobbies
      • Unity Matchmaker
    • Tools & Integrations
      • Container
        • What is Docker
        • Your First Docker
        • The Good Practices
        • SSH in Your Container
        • External Registries
          • Docker Hub
          • AWS ECR
          • GCP GCR
          • Gitlab registry
      • Deploy from Nakama
      • EOS Lobby Integration
      • Switch From Gamelift
      • Switch From Multiplay
      • Playfab Bridge
    • Deployment
      • Endpoint Storage
        • How to Save Logs
        • Upload File to Deployment
      • Webhooks
    • Application
      • Command and Arguments
      • 1:1 Port Mapping
    • Session
      • How They Work
      • Application Version Configuration
      • Manage Request
      • Selectors Filtering
    • Fleet
      • Fleet Policy
      • Policy Filter
      • Linking Version
      • Fleet's Deployment
    • Container Registry
    • Distributed Relay
      • Matchmaker/Lobby
      • Relay Edgegap API
      • Transport Samples
    • Lobby
      • Lobby Service
      • Functions
    • Glossary
    • SLA Terms
Powered by GitBook
LogoLogo

Connect with Community

  • Discord
  • Linkedin
  • X

Read More

  • Release Notes
  • Blog
  • Enterprise
  • Legal
  • edgegap.com

© 2025 Edgegap

On this page

Was this helpful?

  1. API Reference

Peer to Peer

PreviousMatchmakingNextRelease Notes

Last updated 2 months ago

Was this helpful?

📫 Relays

🏨 Lobby Manager

Delete a Relay Session

delete

Delete a relay session.

Authorizations
Path parameters
session_idanyRequired
Responses
204
No Content
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
503
Service Unavailable
application/json
delete
DELETE /v1/relays/sessions/{session_id} HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Accept: */*

No content

Get a Relay Session

get

Retrieve the information for a relay session.

Authorizations
Path parameters
session_idanyRequired
Responses
200
Success
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
get
GET /v1/relays/sessions/{session_id} HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Accept: */*
{
  "session_id": "7349356945f1-S",
  "authorization_token": 3500589645,
  "status": "READY",
  "ready": true,
  "linked": true,
  "error": "Session failed",
  "session_users": [
    {
      "ip_address": "1.1.1.1",
      "latitude": 45.5088,
      "longitude": -73.5878,
      "authorization_token": 21986334
    }
  ],
  "relay": {
    "ip": "2.2.2.2",
    "host": "7349356945f1.st.edgegap.net",
    "ports": {
      "server": {
        "port": 32000,
        "protocol": "UDP",
        "link": "7349356945f1.st.edgegap.net:32000"
      },
      "client": {
        "port": 32001,
        "protocol": "UDP",
        "link": "7349356945f1.st.edgegap.net:32001"
      }
    }
  },
  "webhook_url": "https://my-webhook.com/dump"
}

List All Lobbies

get

List the Lobbies

Authorizations
Responses
200
Success
application/json
401
Unauthorized
application/json
500
Internal Server Error
application/json
get
GET /v1/lobbies HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Accept: */*
{
  "name": "lobby_name",
  "url": "https://lobby.com",
  "status": "Released"
}

Delete a Lobby

delete

Delete a named lobby.

Authorizations
Path parameters
lobby_nameanyRequired
Responses
200
Success
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
delete
DELETE /v1/lobbies/{lobby_name} HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Accept: */*
{
  "name": "lobby_name",
  "url": "https://lobby.com",
  "status": "Released"
}

Get a Lobby

get

Get a named lobby.

Authorizations
Path parameters
lobby_nameanyRequired
Responses
200
Success
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
409
Conflict
application/json
500
Internal Server Error
application/json
get
GET /v1/lobbies/{lobby_name} HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Accept: */*
{
  "name": "lobby_name",
  "url": "https://lobby.com",
  "status": "Released"
}
  • 📫 Relays
  • POSTCreate a Relay Session
  • GETList all Relay Sessions
  • DELETEDelete a Relay Session
  • GETGet a Relay Session
  • POSTAuthorize a user on a Relay Session
  • POSTRemove a user on a Relay Session
  • 🏨 Lobby Manager
  • POSTCreate a Lobby
  • GETList All Lobbies
  • DELETEDelete a Lobby
  • GETGet a Lobby
  • POSTDeploy a Lobby
  • POSTTerminate a Lobby

List all Relay Sessions

get

List all the active relay sessions.

Authorizations
Responses
200
Success
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
500
Internal Server Error
application/json
get
GET /v1/relays/sessions HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Accept: */*
{
  "sessions": [
    {
      "session_id": "7349356945f1-S",
      "authorization_token": 3500589645,
      "status": "READY",
      "ready": true,
      "linked": true,
      "error": "Session failed",
      "session_users": [
        {
          "ip_address": "1.1.1.1",
          "latitude": 45.5088,
          "longitude": -73.5878,
          "authorization_token": 21986334
        }
      ],
      "relay": {
        "ip": "2.2.2.2",
        "host": "7349356945f1.st.edgegap.net",
        "ports": {
          "server": {
            "port": 32000,
            "protocol": "UDP",
            "link": "7349356945f1.st.edgegap.net:32000"
          },
          "client": {
            "port": 32001,
            "protocol": "UDP",
            "link": "7349356945f1.st.edgegap.net:32001"
          }
        }
      },
      "webhook_url": "https://my-webhook.com/dump"
    }
  ],
  "pagination": {
    "number": 1,
    "next_page_number": 1,
    "previous_page_number": 1,
    "paginator": {
      "num_pages": 1
    },
    "has_next": true,
    "has_previous": true
  }
}

Create a Relay Session

post

Create a relay session with users.

Authorizations
Body
webhook_urlstringOptional

URL to send the session data to

Example: https://my-webhook.com/dump
Responses
200
Success
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
500
Internal Server Error
application/json
503
Service Unavailable
application/json
post
POST /v1/relays/sessions HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 141

{
  "users": [
    {
      "ip": "1.1.1.1"
    }
  ],
  "filters": [
    {
      "field": "location",
      "values": [
        "US"
      ],
      "filter_type": "any"
    }
  ],
  "webhook_url": "https://my-webhook.com/dump"
}
{
  "session_id": "7349356945f1-S",
  "authorization_token": 3500589645,
  "status": "READY",
  "ready": true,
  "linked": true,
  "error": "Session failed",
  "session_users": [
    {
      "ip_address": "1.1.1.1",
      "latitude": 45.5088,
      "longitude": -73.5878,
      "authorization_token": 21986334
    }
  ],
  "relay": {
    "ip": "2.2.2.2",
    "host": "7349356945f1.st.edgegap.net",
    "ports": {
      "server": {
        "port": 32000,
        "protocol": "UDP",
        "link": "7349356945f1.st.edgegap.net:32000"
      },
      "client": {
        "port": 32001,
        "protocol": "UDP",
        "link": "7349356945f1.st.edgegap.net:32001"
      }
    }
  },
  "webhook_url": "https://my-webhook.com/dump"
}

Authorize a user on a Relay Session

post

Authorize a user on a Relay Session

Authorizations
Body
session_idstringRequired

Session Request ID (ex: 0724828881e2-S)

Example: 0724828881e2-S
user_ipstringRequired

User Ip to Authorize

Example: 1.1.1.1
Responses
200
Success
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
409
Conflict
application/json
500
Internal Server Error
application/json
503
Service Unavailable
application/json
post
POST /v1/relays/sessions:authorize-user HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 51

{
  "session_id": "0724828881e2-S",
  "user_ip": "1.1.1.1"
}
{
  "session_id": "7349356945f1-S",
  "authorization_token": 3500589645,
  "status": "READY",
  "ready": true,
  "linked": true,
  "error": "Session failed",
  "session_user": {
    "ip_address": "1.1.1.1",
    "latitude": 45.5088,
    "longitude": -73.5878,
    "authorization_token": 21986334
  },
  "relay": {
    "ip": "2.2.2.2",
    "host": "7349356945f1.st.edgegap.net",
    "ports": {
      "server": {
        "port": 32000,
        "protocol": "UDP",
        "link": "7349356945f1.st.edgegap.net:32000"
      },
      "client": {
        "port": 32001,
        "protocol": "UDP",
        "link": "7349356945f1.st.edgegap.net:32001"
      }
    }
  },
  "webhook_url": "https://my-webhook.com/dump"
}

Remove a user on a Relay Session

post

Authorize a user on a Relay Session

Authorizations
Body
session_idstringRequired

Session Request ID (ex: 0724828881e2-S)

Example: 0724828881e2-S
authorization_tokenintegerRequired

Relay Authorization Token

Example: 3500589645
Responses
200
Success
application/json
204
No Content
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
503
Service Unavailable
application/json
post
POST /v1/relays/sessions:revoke-user HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 64

{
  "session_id": "0724828881e2-S",
  "authorization_token": 3500589645
}
{
  "session_id": "7349356945f1-S",
  "authorization_token": 3500589645,
  "status": "READY",
  "ready": true,
  "linked": true,
  "error": "Session failed",
  "session_users": [
    {
      "ip_address": "1.1.1.1",
      "latitude": 45.5088,
      "longitude": -73.5878,
      "authorization_token": 21986334
    }
  ],
  "relay": {
    "ip": "2.2.2.2",
    "host": "7349356945f1.st.edgegap.net",
    "ports": {
      "server": {
        "port": 32000,
        "protocol": "UDP",
        "link": "7349356945f1.st.edgegap.net:32000"
      },
      "client": {
        "port": 32001,
        "protocol": "UDP",
        "link": "7349356945f1.st.edgegap.net:32001"
      }
    }
  },
  "webhook_url": "https://my-webhook.com/dump"
}

Create a Lobby

post

Create a named lobby.

Authorizations
Body
namestringRequired

Name of the lobby

Example: lobby_name
Responses
200
Success
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
409
Conflict
application/json
500
Internal Server Error
application/json
post
POST /v1/lobbies HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "name": "lobby_name"
}
{
  "name": "lobby_name",
  "url": "https://lobby.com",
  "status": "Released"
}

Deploy a Lobby

post

Deploy the lobby with the given name.

Authorizations
Body
namestringRequired

Name of the lobby

Example: lobby_name
Responses
202
Success
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
409
Conflict
application/json
500
Internal Server Error
application/json
post
POST /v1/lobbies:deploy HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "name": "lobby_name"
}
{
  "name": "lobby_name",
  "url": "https://lobby.com",
  "status": "Released"
}

Terminate a Lobby

post

Terminate the lobby with the given name.

Authorizations
Body
namestringRequired

Name of the lobby

Example: lobby_name
Responses
200
Success
application/json
202
Accepted
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
409
Conflict
application/json
500
Internal Server Error
application/json
post
POST /v1/lobbies:terminate HTTP/1.1
Host: api.edgegap.com
authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "name": "lobby_name"
}
{
  "name": "lobby_name",
  "url": "https://lobby.com",
  "status": "Released"
}