Documentation

    API Endpoints

    Retrieving Usage Statistics

    Use this endpoint to retrieve statistics about your account's usage.

    Request

    GET https://api.upscope.io/v1.4/usage
    

    Response

    // HTTP 200
    {
      "status": "ok",
      "usage": {
          "agents": {
              "last_30_days": 10,
              "today": 0
          },
          "session_counts": {
              "last_30_days": 20,
              "now": 0,
              "today": 0
          },
          "session_seconds": {
              "last_30_days": 5000,
              "today": 0
          },
          "visitors": {
              "last_24_hrs": 50000,
              "last_30_days": 50000,
              "online_now": 400
          }
      }
    }
    
    FieldTypeDescription
    usage.agents.last_30_daysintegerNumber of Agents who used Co-Browsing API in the last 30 days.
    usage.agents.todayintegerNumber of Agents who used Co-Browsing API in the last 24 hours.
    usage.session_counts.last_30_daysintegerNumber of Sessions in the last 30 days.
    usage.session_counts.nowintegerNumber of Sessions currently ongoing.
    usage.session_counts.todayintegerNumber of Sessions in the last 24 hours.
    usage.session_seconds.last_30_daysintegerNumber of Session seconds in the past 30 days.
    usage.session_seconds.todayintegerNumber of Session seconds in the past 24 hours.
    usage.visitors.last_24_hrsintegerNumber of Visitors in the past 24 hours.
    usage.visitors.last_30_daysintegerNumber of Visitors in the past 30 days.
    usage.visitors.online_nowintegerNumber of Visitors online now.

    Searching for a Visitor or Retrieving a List of Visitors

    Use this endpoint to search for a particular Visitor or to show a list of recently online Visitors.

    Know the Visitor's ID?
    If you know the Visitor's ID, avoid using the search functionality and instead use the direct endpoint, which will be considerably faster.
    Need just 1 result?
    Make sure to set max_results to 1. This will be considerably faster as our API service will be making a bunch of parallel requests to all the co-browsing regions you have enabled, and by setting to 1, it can respond to you as soon as it gets the first result.

    Request

    GET https://api.upscope.io/v1.4/list
    
    ParameterTypeDescription
    searchstringThe search query in this format. If left empty, the latest Visitors will be returned.
    max_resultsnumberThe max number of results to return, up to 10. Defaults to 10. Setting this to 1 will make the search faster.

    Response

    // HTTP 200
    {
      "status": "ok",
      "visitors": [
        {
          "short_id": "1234",
          // ...
        }
      ]
    }
    
    FieldTypeDescription
    visitorsVisitor[]List of Visitors matching the query.

    Retrieving a Visitor

    Use this endpoint to retrieve a particular Visitor.

    Request

    GET https://api.upscope.io/v1.4/visitors/{visitor_id}
    
    ParameterTypeDescription
    {visitor_id}stringThe short id of the Visitor.

    Response

    // HTTP 200
    {
      "status": "ok",
      "visitor": {
        "short_id": "1234",
        "sessions": [
          // ...
        ],
        // ...
      }
    }
    
    FieldTypeDescription
    visitorVisitorThe Visitor.
    visitor.sessionsSession[]List of the Visitor's last 50 Sessions.

    Errors

    CodeDescription
    404The Visitor does not exist.

    Generating a Viewer Token to Embed Co-Browsing

    Use this endpoint to generate a viewer token instead of a watch link. The token lets you embed the co-browsing screen directly in your own application with the viewer SDK, instead of opening the hosted watch page.

    Calling this endpoint counts as the intent to co-browse: the Session is created right away, so only request a token when the viewer is about to connect.

    Request

    POST https://api.upscope.io/v1.4/visitors/{visitor_id}/viewer_token
    {
      "permissions": {},
      "viewer": {
        "id": "123",
        "name": "Joe Smith"
      },
      "metadata": {},
      "webhook_url": "https://example.com"
    }
    
    ParameterTypeDescription
    {visitor_id}stringThe short id of the Visitor.
    viewer.idstringThe ID of the person viewing the screen (required).
    viewer.namestring, optionalThe name of the person viewing the screen.
    initial_notesstring, optionalThe starting state of the notes for the Session.
    metadataRecord, optionalA JSON-encodeable object of metadata to add to the Session object.
    permissions.allow_audiobooleanWhether the viewer should have access to audio calls (defaults to true, unless disabled through the Javascript SDK). Not available on premise.
    permissions.allow_clickbooleanWhether the viewer should have access to remote click (defaults to true, unless disabled through the Javascript SDK).
    permissions.allow_confettibooleanWhether the viewer should have access to throw confetti (defaults to true).
    permissions.allow_consolebooleanWhether the viewer should have access to remote console capabilities (defaults to false).
    permissions.allow_drawbooleanWhether the viewer should have access to drawing (defaults to true, unless disabled through the Javascript SDK).
    permissions.allow_redirectbooleanWhether the viewer should have access to remote redirect & reload features (defaults to true, unless disabled through the Javascript SDK).
    permissions.allow_request_controlbooleanWhether the viewer should be able to request remote control when the Visitor's SDK requires a control request (defaults to true).
    permissions.allow_request_full_tabbooleanWhether the viewer should be able to request full browser tab sharing (defaults to true, unless disabled through the Javascript SDK).
    permissions.allow_request_modebooleanWhether the viewer should be able to request a different sharing mode, such as full screen sharing (defaults to true).
    permissions.allow_request_visitor_screenbooleanWhether the viewer should be able to ask the Visitor to share their full screen (defaults to true).
    permissions.allow_scrollbooleanWhether the viewer should have access to remote scroll (defaults to true, unless disabled through the Javascript SDK).
    permissions.allow_show_viewer_screenbooleanWhether the viewer should be able to share their screen to the Visitor (defaults to true).
    permissions.allow_typebooleanWhether the viewer should have access to remote type (defaults to true, unless disabled through the Javascript SDK).
    permissions.allow_videobooleanWhether the viewer should have access to video calls (defaults to true). Not available on premise.
    permissions.hide_private_detailsbooleanWhether the Visitor private information (such as IP address) should be hidden from the viewer (defaults to false).
    permissions.keeps_session_alivebooleanWhether this viewer keeps the Session alive. Set to false for silent observers, so the Session ends when the last keep-alive viewer leaves (defaults to true).
    session_properties.controllerArray<"viewer" | "visitor">, optionalWhich sides of the Session can start audio or video calls and request a different sharing mode. Defaults to ["viewer"].
    session_properties.recordboolean, optionalWhether this Session should be recorded. Defaults to your team's session recording setting. Setting it to true requires the session recording feature on your plan. On premise, the recording is stored on and retrieved from your own server.
    webhook_urlstring, URL, optionalAfter the session is ended, a POST request will be made to this URL, sending the Session data as JSON.

    Response

    // HTTP 200
    {
        "status": "ok",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....",
        "endpoint": "https://data--eu.upscope.io",
        "region": "eu",
        "short_id": "1234",
        "expiration": "2026-01-11T18:01:49.700Z"
    }
    
    FieldTypeDescription
    tokenstringThe token to pass to the viewer SDK.
    endpointstringThe server the viewer should connect to. For on-premise accounts, this is your own on-premise endpoint.
    regionstringThe region the Visitor is connected to (onpremise for on-premise accounts).
    short_idstringThe short id of the Visitor.
    expirationDatetime (ISO 8601)Time at which the token is no longer valid. Use it right away.

    Errors

    CodeDescription
    400Your on-premise endpoint or secret key is not configured (on-premise accounts only).
    404The Visitor does not exist.
    402This Session would put you over your subscription limits.
    409The Visitor's browser is not supported.

    The response fields map directly onto the viewer SDK's ViewerProvider props. As with watch links, the token should be requested by your server and handed to the browser right before connecting. See Embedding with the Viewer SDK for how to use the token.

    Stopping an Active Session

    Use this endpoint to stop an active Session.

    Request

    DELETE https://api.upscope.io/v1.4/visitors/{visitor_id}/session
    
    ParameterTypeDescription
    {visitor_id}stringThe short id of the Visitor.

    Response

    // HTTP 200
    {
      "status": "ok"
    }
    

    Errors

    CodeDescription
    404The Visitor does not exist.

    Deleting a Visitor from Co-Browsing API

    Use this endpoint to delete a Visitor from Co-Browsing API entirely. You can only delete Visitors who are not currently online.

    Request

    DELETE https://api.upscope.io/v1.4/visitors/{visitor_id}
    
    ParameterTypeDescription
    {visitor_id}stringThe short id of the Visitor.

    Response

    // HTTP 200
    {
      "status": "ok"
    }
    

    Errors

    CodeDescription
    404The Visitor does not exist.
    409The Visitor is online, or one of their Sessions is still ongoing or has a recording still processing.

    Deleting All Visitors from Co-Browsing API

    Use this endpoint to delete all Visitors from your Co-Browsing API account. This will delete only Visitors that are offline.

    Request

    DELETE https://api.upscope.io/v1.4/visitors?all=true
    
    ParameterTypeDescription
    allbooleanSet to true to confirm deleting all Visitors.

    Response

    // HTTP 200
    {
      "status": "ok"
    }
    

    Agent Lookup

    Use this endpoint to lookup an agent from your Co-Browsing API account.

    You must send either the email or the external_id
    Using the email it will lookup for users from your account, while using the external_id it will lookup for external agents from your account. If you use any other parameter rather than email or external_id it will return not found.

    Request

    GET https://api.upscope.io/v1.4/agents/lookup?email=john@acme.com
    
    ParameterTypeDescription
    emailstring (Only specify email or external_id)The Agent email, this will return a HelloScreen or UserView user.
    external_idstring (Only specify email or external_id)The External Agent id, this will return a Co-Browsing API Agent.

    Response

    // HTTP 200
    {
      "agent": {
        "id": "u_1234",
        // ... Agent data
      },
      "status": "ok"
    }
    
    FieldTypeDescription
    agentAgentThe Agent who started or joined the Session as an observer
    agent.sessionsSession[]The list of the agent's last 10 sessions.

    Errors

    CodeDescription
    404Agent not found

    Retrieving a List of Sessions

    Use this endpoint to retrieve a list of Sessions.

    Request

    GET https://api.upscope.io/v1.4/cobrowsing_sessions/list
    
    ParameterTypeDescription
    before_idstring, optionalOnly list Sessions that happened before the Session with the specified id (used for pagination)
    after_idstring, optionalOnly list Sessions that happened after the Session with the specified id (used for pagination)
    ongoing_onlyboolean (defaults to false)Only list Sessions that are currently active.
    updated_afterDatetime, optionalOnly list Sessions that have had some sort of update to their record after this time.

    Response

    // HTTP 200
    {
        "status": "ok",
        "cobrowsing_sessions": [
          {
            id: "s_123",
    		// ... Session details
          }
    	],
        "has_more": true,
        "last_id": "s_456"
    }
    
    FieldTypeDescription
    cobrowsing_sessionsSession[]A list of Sessions, sorted by start date, from first to last.
    has_morebooleanWhether there are more Sessions matching your filter. (If so, paginate by changing the after_id)
    last_idstring | nullThe id of the last Session. This is always the same as the last Session from the array, and can be used as a cursor with after_id.

    Authorizing an On-Premise Session

    Use this endpoint to authorize an on-premise Session.

    Using our Dashboard?
    If you have integrated your on-premise version of Co-Browsing API to our dashboard, you don't need to use the API. It all just works.

    Request

    POST https://api.upscope.io/v1.4/onpremise/token
    {
      "visitor_id": "VISITOR123",
      "agent": {
        "id": "123",
        "name": "Joe Smith"
      }
    }
    
    ParameterTypeDescription
    agent.idstringThe ID of the Agent (required).
    agent.namestring, optionalThe name of the Agent.
    visitor_idstringThe ID of the Visitor you want to co-browse with.

    Response

    // HTTP 200
    {
        "authorized": true,
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkw...."
    }
    
    FieldTypeDescription
    authorizedbooleantrue to indicate the Session was authorized.
    tokenstringThe token to send to the on-premise version of Co-Browsing API.

    Errors

    CodeDescription
    402This session was not authorized.