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, 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>"
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"]
}
}
}'