Skip to content
English - Canada
  • There are no suggestions because the search field is empty.

REST Endpoint

Information Brief

Swagger (OpenAPI 2.0): https://api.thinktel.ca/swagger/ui/swagger.json
Swagger UI: https://api.thinktel.ca/swagger/ui
Base URL: https://api.thinktel.ca/rest.svc
Port: 443
Encryption: TLS 1.0 (limited cipher suites available), TLS 1.1 (limited cipher suites available), or TLS 1.2
Authentication: Basic over HTTPS
Username: {Customer’s username}
Password: {Customer’s password}

Follow the links below to see REST code examples of how to Add DIDs to existing SIP Trunk:

Principals of our RESTful API Endpoint

  1. All communication shall be HTTPS with Basic authentication.
  2. Nouns shall be used to represent resources in the URI path.
  3. HTTP methods POST, GET, PUT, and DELETE shall provide standard CRUD operations of Create, Retrieve, Update, and Delete respectively.
  4. HTTP response codes (200 OK, 400 Bad Request, 500 Internal Server Error, etc) shall provide positive or negative confirmation of requests. HTTP response codes in the 400 and 500 series shall provide exception details in the response body when available.
  5. Accept headers of HTTP requests shall be accommodated when possible (XML, JSON, etc) to provide a response in the requested representational format.
  6. POST requests shall be used to create resources, and shall return a representation of the successfully created resource upon success.
  7. GET requests shall be used to retrieve a representation of one or more resources, and shall be idempotent; or in other words, free from side effects.
  8. PUT requests shall be used to update resources, and shall return a representation of the successfully updated resource upon success.
  9. PUT requests shall update all fields; therefore, it is recommended to GET the latest, update necessary fields locally, then PUT the updated resource.
  10. DELETE requests shall be used to delete resources.

RESTful Content: XML or JSON

If the Accept header of the HTTP request specifies text/json as the content type, then JSON is returned in the HTTP response body, otherwise XML (application/xml; charset=utf-8) is the default content type.

The HTTP request body can also be either text/json or application/xml for PUT and POST requests, as long as the appropriate Content-Type is set in the HTTP request header. Note that application/xml does not require the standard <?xml … = … ?> document tag in the HTTP response or request body, since the HTTP header Content-Type already contains the information. This is the key difference between text/xml and application/xml.