{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"5dc537bf-73ef-4b93-b4b5-ef0b5c94ba04","name":"TWS-Public API","description":"Teleporte Web Services (TWS) 3.0 API\n\nTeleporte includes administration APIs that allow administrators to perform actions such as provisioning a user and managing resources.\n\nBy automating administration, user management and provisioning can be centralized in an existing tool, rather than using the Teleporte web administration panels. For example, a partner selling multiple collaboration tools to customers can use these APIs to enable customer provisioning through a centralized portal.\n\nBy accessing or using this API, you acknowledge and agree to be bound by our [Terms of Service](https://www.sera4.com/terms-of-use/) and [Privacy Policy](https://www.sera4.com/privacy-policy/).\n\n# Getting Started\n\nThe requirements to work with TWS API are the following:\n\n- Teleporte enterprise license\n    \n- Contact the support team ([support@sera4.com](https://mailto:support@sera4.com)) to request API access. We will provide 2 authentication tokens:\n    \n    - TwsHost: Custom API URL for your organization\n        \n    - TwsApiOrgToken: Your organization token\n        \n- A Teleporte administrator account (`TwsUser`) , with a configured password (`TwsPass`)\n    \n\nOnce you have validated the requirements, you can:\n\n1. Create a session to authenticate against the URL `TwsHost`. See [<b>Creating A Session</b>](#creating-a-session)\n    \n2. Include authentication headers on all future API calls after creating a session. See [<b>Authentication Headers Required</b>](#authentication-headers-required)\n    \n\nThe current version of the TWS API is 3.0 and all the calls should be of the format [https://tws-api-1234.com/v3](https://tws-api-1234.com/v3) where 1234 is your `TwsHost`.\n\n## Creating a session\n\nTo create a session, ensure that the following _environment variables_ are set in your Postman environment. These variables will be mapped to proper header variables and used on every request automatically.\n\n| PostMan Variable | Used Within | Description |\n| --- | --- | --- |\n| TwsUser | Create Session BODY | The username/email for an administrator account associated with this server. Used only in create session |\n| TwsPass | Create Session BODY | The password for the user specified. Used only in create session BODY payload |\n| TwsHost | URL | The organization URL used to send requests to an organizations server. Provided by the CX team after registering. There is 1 unique TwsHost per organization. Example: [<i>https://tws-api-1234-abcd-1234-abcd.sera4.com/v3</i>](https://tws-api-1234-abcd-1234-abcd.sera4.com/v3) . This is used on every request as the host and prefix variable. |\n\n### Session Information\n\nAfter creating a session, the POST body contains all the information you will need for subsequent, authenticated requests. See example response in [<b>Authentication &gt; Create Session</b>](https://apidocs.sera4.com/#7b9b7a49-2d1b-496d-a4e4-b0514d44cd78). Look inside the response for the following fields:\n\n- `tws_token` - Authentication token information. This includes the actual token `tws_token_data` as well as the token expiry time `tws_token_expires_at`. See **token renewal** for information about renewing tokens. The environment variable _TwsUserToken_ is automatically set to this value if using the postman examples provided.\n    \n- `tws_membership` - The membership object created for this account within this organization. A membership is a unique mapping of global_acccount id to organization_id and uniquely identifies your account. A membership is globally unique. Set the environment variable _TwsMembershipId_ to the value of the membership that you would like to use. Most accounts typically will only have 1 membership unless they are managing multiple organizations.\n    \n\nSee authentication headers required for more information on where to use these values.\n\n## Authentication Headers Required\n\nEvery request to the TWS API (except for session create) is an authenticated request. Each authenticated request requires 3 additional headers. The values for these can be found in the session information (noted above).\n\n| Header Name | Postman Variable | Description | Example |\n| --- | --- | --- | --- |\n| tws-membership-id | _TwsMembershipId_ | Membership for the user authenticating user. The membership ID is matched internally against the URL of the API service, ensuring your users membership ID is matched to the organization that it is trying to view | tws-membership-id = {{TwsMembershipId}} |\n| tws-organization-token | _TwsApiOrgToken_ | API org token (see Getting Started) | tws-organization-token = {{TwsApiOrgToken}} |\n| Authorization | _TwsUserToken_ | Token used for identity verification | Authorization = Bearer {{TwsUserToken}} |\n\n## Creating Resources\n\nAll endpoints which create resources prefer data to be sent in the `POST body`. Any resource endpoint which creates a new resource will also send a **201** status code to indicate that a resource has been created.\n\n## Error Codes\n\n- `401` You are unauthenticated. Use the session API to generate a new session object.\n    \n- `403` You are unauthorized. You do not have sufficient permissions to perform this operation against the intended resource/url. Please check both your API url and your membership ID to ensure you have the correct membership for the correct API url.\n    \n- `409` Your request has a conflict. The resource may already exist and/or is being processed.\n    \n- `422` Your input is malformed or bad. Please re-check your parameters.\n    \n\n**Note** Certain API endpoints will have additional HTTP status error codes. Please check the documentation for endpoint specific error codes.\n\n## Paginating data\n\nFor LIST calls which paginate data, these additional parameters can be added to the query to help increase the number of records returned and the offset of the data.\n\n- page_size\n    \n- page\n    \n\nYou can see if an endpoint can be paginated by the additional metadata returned in the call which indicates the total amount of entries and your current position.\n\nThe **page_size** parameter may have a different maximum value, depending on which endpoint is being called.\n\n## Sorting data\n\nFor LIST calls which list data, the `sort_by` parameter can be added to sort data in a specific order. The syntax for the sort_by parameter is always `,`\n\nDirection can be one of two values\n\n- `asc` - Sort data in ascending order\n    \n- `desc` - Sort data in ascending order\n    \n\nExample:\n\n- created_at, desc\n    \n- updated_at, asc\n    \n\n# Webhook Support\n\nWebhooks are event-driven calls made from Sera4 to a pre-configured HTTP(s) endpoint. To enable a webhook, simply update your organizations webhook_url to a RFC compliant URI that supports the POST method.\n\nWebhooks are available for the following events.\n\n- Users (create, delete, update)\n    \n- Locks (create, delete, update, open, close)\n    \n- Organization (update)\n    \n- Access Request (create)\n    \n- Lock Groups & Group Keys - (create, delete)\n    \n- Sites & Site Keys (Beta) - (create, delete)\n    \n- Access Requests (Beta) - (create, update)\n    \n\nWebhooks enablement and configuration options are available via API only.\n\nPlease contact the customer experience team ([cx@sera4.com](https://mailto:cx@sera4.com)) for additional details on webhook payloads.\n\n# Having issues with the API or Postman?\n\nPlease ensure that you are using Postman 7.0.9 or newer.\n\nIf you are a registered company and have a valid API key, please [email support](https://mailto:support@sera4.com?subject=API:) ([support@sera4.com](https://mailto:support@sera4.com)) for additional assistance with API endpoints. For better service, please prefix the subject line with **API** so that our team can properly route your inquiry to the right support personnel.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":true,"owner":"6088983","team":559932,"collectionId":"5dc537bf-73ef-4b93-b4b5-ef0b5c94ba04","publishedId":"SWECXvsp","public":true,"publicUrl":"https://apidocs.sera4.com","privateUrl":"https://go.postman.co/documentation/6088983-5dc537bf-73ef-4b93-b4b5-ef0b5c94ba04","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.0","publishDate":"2020-07-31T12:40:48.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/0c0622ac6f93314028d6555f9a4a9bb64265db809f240dc84314023bb123bda5","favicon":"https://res.cloudinary.com/postman/image/upload/v1576702822/team/booxoo53avwdb8516kdd.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://apidocs.sera4.com/view/metadata/SWECXvsp"}