Edgegap Relays API

Distributed relay sessions and per-user authorization.

Operations 6

POST /v1/relays/sessions Create a Relay Session #
GET /v1/relays/sessions List all Relay Sessions #
DELETE /v1/relays/sessions/{session_id} Delete a Relay Session #
GET /v1/relays/sessions/{session_id} Get a Relay Session #
POST /v1/relays/sessions:authorize-user Authorize a user on a Relay Session #
POST /v1/relays/sessions:revoke-user Remove a user on a Relay Session #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/edgegap:edgegap-relays-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

edgegap-relays-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Edgegap V1 Relays API
  version: 0.0.0
  description: 'Introduction


    The Edgegap API lets you manage all your resources from standard HTTP requests. We promote using them to automate all your processes that are using Edgegap.


    If you have any questions, don''t hesitate to contact us via email, or you can also jump on our Discord. We will be happy to help. Feel free to make features request; we also love those.


    Pagination - Response​


    The GET response body can be returned with pagination to avoid requesting all the data at once.


    Pagination object will always be under the paginator key.


    {

    "number": "The Current page, default=1",

    "next_page_number": "The Next page number or null",

    "previous_page_number": "The Previous page number or null",

    "paginator": {

    "num_pages": "The total numbers of pages"

    },

    "has_next": "Boolean if there is a next page",

    "has_previous": "Boolean if there is a previous page"

    }


    Full Body Example:


    {

    "count": 100,

    "data": ["value-0", "[...]", "value-9"],

    "success": true,

    "pagination": {

    "number": 1,

    "next_page_number": 2,

    "previous_page_number": null,

    "paginator": {

    "num_pages": 10

    },

    "has_next": true,

    "has_previous": false

    }

    }


    Pagination - Parameters​


    You can add those values to manipulate the pagination object in the URL Parameters.


    page


    limit


    Example:


    # To get the second page

    GET - https://api.edgegap.com/v1/apps?page=2


    # To change the count of element in one page (20/page)

    GET - https://api.edgegap.com/v1/apps?limit=20


    # You can mix those (20/page, second page)

    GET - https://api.edgegap.com/v1/apps?page=2&limit=20'
  termsOfService: https://console.edgegap.com/terms-of-service
  contact:
    name: Email
    email: info@edgegap.com
    url: https://edgegap.com
servers:
- url: https://api.edgegap.com
security:
- apiKey: []
tags:
- name: Relays
  description: Handles Relay Sessions operations. Those operations are similar to Sessions but are simplified to be used with relays.
paths:
  /v1/relays/sessions:
    post:
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelaySessionBaseResponse'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create a Relay Session
      description: Create a relay session with users.
      operationId: relay-session-create
      tags:
      - Relays
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RelaySessionCreatePayload'
        required: true
    get:
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelaySessionListResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: List all Relay Sessions
      description: List all the active relay sessions.
      operationId: relay-session-list
      tags:
      - Relays
  /v1/relays/sessions/{session_id}:
    parameters:
    - name: session_id
      in: path
      required: true
      schema:
        type: string
    delete:
      responses:
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '204':
          description: No Content
      summary: Delete a Relay Session
      description: Delete a relay session.
      operationId: relay-session-delete
      tags:
      - Relays
    get:
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelaySessionBaseResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get a Relay Session
      description: Retrieve the information for a relay session.
      operationId: relay-session-get
      tags:
      - Relays
  /v1/relays/sessions:authorize-user:
    post:
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelaySessionUserBaseResponse'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Authorize a user on a Relay Session
      operationId: relay-user-authorize
      tags:
      - Relays
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RelayUserAuthorizePayload'
        required: true
  /v1/relays/sessions:revoke-user:
    post:
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelaySessionBaseResponse'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '204':
          description: No Content
      summary: Remove a user on a Relay Session
      description: Authorize a user on a Relay Session
      operationId: relay-user-revoke
      tags:
      - Relays
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RelayUserRevokePayload'
        required: true
components:
  schemas:
    RelayUserRevokePayload:
      required:
      - authorization_token
      - session_id
      properties:
        session_id:
          type: string
          description: 'Session Request ID (ex: 0724828881e2-S)'
          example: 0724828881e2-S
        authorization_token:
          type: integer
          description: Relay Authorization Token
          example: 3500589645
      type: object
    RelaySessionCreatePayload:
      required:
      - users
      properties:
        users:
          type: array
          description: List of IP Addresses of session users
          minItems: 1
          items:
            $ref: '#/components/schemas/RelaySessionUser'
        filters:
          type: array
          description: List of location filters to apply to the session
          items:
            $ref: '#/components/schemas/RelayFilterModel'
        webhook_url:
          type: string
          description: URL to send the session data to
          example: https://my-webhook.com/dump
      type: object
    Paginator:
      properties:
        num_pages:
          type: integer
          description: Total pages count
      type: object
    ClientRelayPort:
      properties:
        port:
          type: integer
          description: The port number
          example: 32001
        protocol:
          type: string
          description: The protocol of the port
          example: UDP
        link:
          type: string
          description: The link to the port
          example: 7349356945f1.st.edgegap.net:32001
      type: object
    RelaySessionUser:
      required:
      - ip
      properties:
        ip:
          type: string
          description: IP Address of session user
          example: 1.1.1.1
      type: object
      additionalProperties: false
    RelayUserAuthorizePayload:
      required:
      - session_id
      - user_ip
      properties:
        session_id:
          type: string
          description: 'Session Request ID (ex: 0724828881e2-S)'
          example: 0724828881e2-S
        user_ip:
          type: string
          description: User Ip to Authorize
          example: 1.1.1.1
      type: object
    Pagination:
      properties:
        number:
          type: integer
          description: Current page number
        next_page_number:
          type: integer
          description: Next page number
        previous_page_number:
          type: integer
          description: Previous page number
        paginator:
          $ref: '#/components/schemas/Paginator'
        has_next:
          type: boolean
          description: If there is a next page
        has_previous:
          type: boolean
          description: If there is a previous page
      type: object
    RelaySessionUserResponse:
      properties:
        ip_address:
          type: string
          description: The IP Address of the user
          example: 1.1.1.1
        latitude:
          type: number
          description: The latitude of the user
          example: 45.5088
        longitude:
          type: number
          description: The longitude of the user
          example: -73.5878
        authorization_token:
          type: integer
          description: The authorization token of the user
          example: 21986334
      type: object
    RelaySessionBaseResponse:
      required:
      - linked
      - ready
      - session_id
      - status
      properties:
        session_id:
          type: string
          description: The session ID
          example: 7349356945f1-S
        authorization_token:
          type: integer
          description: The authorization token for the session
          example: 3500589645
        status:
          type: string
          description: The status of the session
          example: READY
        ready:
          type: boolean
          description: If the session is ready to be used
        linked:
          type: boolean
          description: If the session is linked to a relay
        error:
          type: string
          description: The error message if the session failed
          example: Session failed
        session_users:
          type: array
          description: List Session Users
          items:
            $ref: '#/components/schemas/RelaySessionUserResponse'
        relay:
          description: The relay details the session is linked to
          allOf:
          - $ref: '#/components/schemas/RelayResponse'
        webhook_url:
          type: string
          description: The webhook URL that we will call once the session is ready
          example: https://my-webhook.com/dump
      type: object
    RelaySessionUserBaseResponse:
      required:
      - linked
      - ready
      - session_id
      - status
      properties:
        session_id:
          type: string
          description: The session ID
          example: 7349356945f1-S
        authorization_token:
          type: integer
          description: The authorization token for the session
          example: 3500589645
        status:
          type: string
          description: The status of the session
          example: READY
        ready:
          type: boolean
          description: If the session is ready to be used
        linked:
          type: boolean
          description: If the session is linked to a relay
        error:
          type: string
          description: The error message if the session failed
          example: Session failed
        session_user:
          description: List Session Users
          allOf:
          - $ref: '#/components/schemas/RelaySessionUserResponse'
        relay:
          description: The relay details the session is linked to
          allOf:
          - $ref: '#/components/schemas/RelayResponse'
        webhook_url:
          type: string
          description: The webhook URL that we will call once the session is ready
          example: https://my-webhook.com/dump
      type: object
    RelayFilterModel:
      required:
      - field
      - filter_type
      - values
      properties:
        field:
          type: string
          description: The field to filter
          example: location
        values:
          type: array
          description: The values to filter
          example:
          - US
          items:
            type: string
        filter_type:
          type: string
          description: The type of filter
          example: any
          enum:
          - any
          - all
          - not
      type: object
    MappedPortResponse:
      properties:
        server:
          $ref: '#/components/schemas/ServerRelayPort'
        client:
          $ref: '#/components/schemas/ClientRelayPort'
      type: object
    RelaySessionListResponse:
      properties:
        sessions:
          type: array
          description: List of relay sessions
          items:
            $ref: '#/components/schemas/RelaySessionBaseResponse'
        pagination:
          description: Pagination Object
          $ref: '#/components/schemas/Pagination'
      type: object
    Error:
      required:
      - message
      properties:
        message:
          type: string
          description: A message depending of the request termination
      type: object
    RelayResponse:
      properties:
        ip:
          type: string
          description: The IP Address of the relay
          example: 2.2.2.2
        host:
          type: string
          description: The host of the relay
          example: 7349356945f1.st.edgegap.net
        ports:
          $ref: '#/components/schemas/MappedPortResponse'
      type: object
    ServerRelayPort:
      properties:
        port:
          type: integer
          description: The port number
          example: 32000
        protocol:
          type: string
          description: The protocol of the port
          example: UDP
        link:
          type: string
          description: The link to the port
          example: 7349356945f1.st.edgegap.net:32000
      type: object
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: authorization
      description: 'To access Edgegap API, generate (and view) your secret tokens in Dashboard - User Settings / Tokens. Add your secret token with each API request as an HTTP header (include the word token): `Authorization: token xxxxxxxx-e458-4592-b607-c2c28afd8b62`'
x-provenance:
  method: harvested
  publisher: Edgegap
  source: https://api.edgegap.com/swagger.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)