---
title: cURL commands for Job Tracking
description: "The Teleporte API documentation can be found here: https://apidocs.sera4.com This page provides supplemental information and example cURL commands to assist in managing Teleporte job tracking sessions"
---

[Skip to content](https://cx.sera4.com/job-tracking-curl#main-content)

English

Show submenu for translations

![Sera4 Logo\_white-2](https://cx.sera4.com/hubfs/Sera4%20Logo_white-2.svg)

- [Default HubSpot Blog](https://sera4-3787649.hs-sites.com/blog)

Open main navigation

Close main navigation

- [Default HubSpot Blog](https://sera4-3787649.hs-sites.com/blog)
- English
  
  Show submenu for translations
- [Go to sera4.com](https://sera4.com/)

[Go to sera4.com](https://sera4.com/)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Help Center](https://cx.sera4.com/?hsLang=en)
2. [Onboarding](https://cx.sera4.com/onboarding?hsLang=en)
3. [Web Interface](https://cx.sera4.com/onboarding?hsLang=en#web-interface)

# cURL commands for Job Tracking

The Teleporte API documentation can be found here: [https://apidocs.sera4.com](https://apidocs.sera4.com)

This page provides supplemental information and example cURL commands to assist in managing Teleporte job tracking sessions, designed to be used in conjunction with the official API documentation.

### API Tokens

- **API\_URL\_BASE**=  API URL obtained form the *Menu --\> Developers --\> API Management* page in Teleporte web interface. The URL looks like this: "*https://tws-api-XXXXXX-XXXX-XXX-XXX-XXX.sera4.ca/v3*"
- **ORG\_TOKEN**= This token needs to be generated from the *Menu --\> Developers --\> API Management* page in Teleporte web interface.
- **USERNAME**= Email address of Teleporte administrator account
- **PASSWORD**= Password of Teleporte administrator account
- **BEARER\_TOKEN**= When creating a Teleporte API session successfully, the response includes this token in the field "*tws\_token": {"tws\_token\_data":"\<BEARER\_TOKEN\>*"
- **MEMBERSHIP\_ID**= When creating a Teleporte API session successfully, the response includes this token in the field "*tws\_memberships": \[{"id":"\<MEMBERSHIP\_ID\>*"

### Create Teleporte API Session

Applications need to create a Teleporte session to communicate with Teleporte.

`API_URL="API_URL_BASE/sessions"`

`curl --location -g --request POST $API_URL \`

`--header 'Content-Type: application/json' \`

`--data-raw "{\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\"}"`

When a session is created successfully, the response of this API will include a BEARER\_TOKEN and a MEMBERSHIP\_ID.

Teleporte sessions needs to be renewed based on the expiration date/time given by the *tws\_token\_expires\_at* field in the response.

 

List Work Sessions

`API_URL="API_URL_BASE/work_sessions"`

`curl "$API_URL" \`

`-H "Content-Type: application/json" \`

`-H "Authorization: Bearer $BEARER_TOKEN" \`

`-H "tws-organization-token: $ORGANIZATION_TOKEN" \`

`-H "tws-membership-id: $MEMBERSHIP_ID"`

### Approve Work Session

SESSION\_ID=ID of pending session, which can be obtained by listing work sessions.

`API_URL="$API_URL_BASE/work_sessions/$SESSION_ID/approve"`

`curl --location -g --request PUT $API_URL \`

`--header 'Content-Type: application/json' \`

`-H "Authorization: Bearer $BEARER_TOKEN" \`

`-H "tws-organization-token: $ORGANIZATION_TOKEN"  \`

`-H "tws-membership-id: $MEMBERSHIP_ID"  \`

`--data-raw '{`

`  "options": {`

`        "ticket_number": "sarid123",`

`        "tasks": ["Preventive Maintenance", "PDT"]`

`    }`

`}'`

### Decline Work Session

`API_URL="$API_URL_BASE/work_sessions/$SESSION_ID/decline"`

`curl --location -g --request PUT $API_URL \`

`--header 'Content-Type: application/json' \`

`-H "Authorization: Bearer $BEARER_TOKEN" \`

`-H "tws-organization-token: $ORGANIZATION_TOKEN"  \`

`-H "tws-membership-id: $MEMBERSHIP_ID" `

### Assign Teleporte Key

`API_URL="$API_URL_BASE/keys"`

`curl --location -g --request POST $API_URL \`

`--header 'Content-Type: application/json' \`

`-H "Authorization: Bearer $BEARER_TOKEN" \`

`-H "tws-organization-token: $ORGANIZATION_TOKEN"  \`

`-H "tws-membership-id: $MEMBERSHIP_ID" \`

`--data-raw '{`

`        "key": {`

`                "lock_ids": [143415],`

`                "membership_ids": ["97e9a980-9caf-4466"], `

`                "start_date": "2025-04-15 10:00:00",`

`                "end_date": "2025-04-15 12:00:00",`

`                "ticket_number": "S_ID1234",`

`                "options": {`

`                        "tasks": ["Preventive Maintenance"]`

`                }   `

`        }   `

`}'`

 

 

 

- [Onboarding](https://cx.sera4.com/onboarding?hsLang=en#main-content)

    - [Intro to Teleporte](https://cx.sera4.com/onboarding?hsLang=en#intro-to-teleporte)
    - [Intro for Users](https://cx.sera4.com/onboarding?hsLang=en#intro-for-users)
    - [Intro for Administrators](https://cx.sera4.com/onboarding?hsLang=en#intro-for-administrators)
    - [Mobile Application](https://cx.sera4.com/onboarding?hsLang=en#mobile-application)
    - [Web Interface](https://cx.sera4.com/onboarding?hsLang=en#web-interface)
    - [AP3 Padlock](https://cx.sera4.com/onboarding?hsLang=en#ap3-padlock)
    - [Controllers](https://cx.sera4.com/onboarding?hsLang=en#controllers)
    - [KSC1](https://cx.sera4.com/onboarding?hsLang=en#ksc1)
    - [Job Tracking](https://cx.sera4.com/onboarding?hsLang=en#job-tracking)
- [FAQ](https://cx.sera4.com/faq?hsLang=en#main-content)

    - [Mobile App](https://cx.sera4.com/faq?hsLang=en#mobile-app)
    - [Web Interface](https://cx.sera4.com/faq?hsLang=en#web-interface)
    - [AP3 Padlock](https://cx.sera4.com/faq?hsLang=en#ap3-padlock)
    - [Security](https://cx.sera4.com/faq?hsLang=en#security)
- [Troubleshooting](https://cx.sera4.com/troubleshooting?hsLang=en#main-content)

    - [General Troubleshooting](https://cx.sera4.com/troubleshooting?hsLang=en#general-troubleshooting)
    - [AP3 Padlock Troubleshooting](https://cx.sera4.com/troubleshooting?hsLang=en#ap3-padlock-troubleshooting)
    - [Web Interface Troubleshooting](https://cx.sera4.com/troubleshooting?hsLang=en#web-interface-troubleshooting)
- [Resources](https://cx.sera4.com/resources?hsLang=en#main-content)

    - [Documents](https://cx.sera4.com/resources?hsLang=en#documents)
    - [Installation Guides](https://cx.sera4.com/resources?hsLang=en#installation-guides)
    - [Manuals](https://cx.sera4.com/resources?hsLang=en#manuals)
    - [Product Portal](https://cx.sera4.com/resources?hsLang=en#product-portal)

- [Default HubSpot Blog](https://sera4-3787649.hs-sites.com/blog)

[![Sera4 Logo\_white-2](https://cx.sera4.com/hubfs/Sera4%20Logo_white-2.svg "Sera4 Logo_white-2")](http://sera4.com)

For all additional inquiries, please message us at cx@sera4.com

Copyright © 2025, Sera4