Threema Work API

Threema Work API (1.4.2)

Download OpenAPI specification:Download

Threema Work API is designed to let 3rd-party applications communicate with Threema Work subscriptions. *

  • All requests are authenticated using an X-API-Key which can be obtained from your management cockpit.
  • An X-API-Key HTTP header must be sent to indicate which API key is to be used with the request.
  • The API key must match the remote IP (if specified for the given API key) of the connected HTTP client.

Authentication

apiKey

Security Scheme Type API Key
Header parameter name: X-Api-Key

Subscription

Subscription methods provide access to the subscription.

Subscription: Detail

Access to your subscription

Authorizations:

Responses

Response Schema: application/json
Array of objects <application/json> (Link)
id
string 10 characters

Unique subscription identifier

name
string

Short description name of the subscription

validUntil
string (DateTime) 24 characters

*ISO8601 formated date *Example: 2017-01-01T00:00:00+0100

type
string
Enum: "basic" "business" "enterprise" "essential" "advanced" "professional" "edu5"

Chosen subscription type

licenseAmount
integer

Number of purchased licenses

Response samples

Content type
application/json
{}

Subscription: Update

Change the name of the subscription

Authorizations:
Request Body schema: application/json
name
required
string [ 1 .. 256 ] characters

New name of the subscription

Responses

Request samples

Content type
application/json
{
  • "name": "My very nice Threema Work subscription"
}

Response samples

Content type
application/json
{
  • "error": "Detailed error message"
}

Credentials

Credential methods provide access to the subscription credentials.

Credentials: List

List all credentials of the package

Authorizations:
query Parameters
filterUsername
string

Filter the credentials by the username

pageSize
integer <int32> (PageSizeParameter) [ 1 .. 5000 ]
Default: 20

Set the limit the filter result.

page
integer

Set to page offset the filter result to a particular record count.

Responses

Response Schema: application/json
Array of objects <application/json> (Link)
Array of objects (Credential)

Credential List

object <application/json> (Paging)

Response samples

Content type
application/json
{}

Credentials: Create

Create new credentials

Authorizations:
Request Body schema: application/json
username
required
string [ 1 .. 256 ] characters

Unique username

password
required
string [ 1 .. 256 ] characters

Password of the credential

hash
boolean
Default: false

If you save the password as hash, there’s no way for you to retrieve it.

licenseCount
integer

Amount of ID creations allowed for the credentital. Only set to more then 1 if credential should be a multi-user license.

lock
boolean

Once the credentials are in use with a specific ID, they cannot be used in conjunction with any other ID (unless the original ID is either revoked or detached from this subscription).

Responses

Response Headers
Location
string

A link to the credential detail resource.

Response Schema: application/json
Array of objects <application/json> (Link)
id
string (CredentialsId)

Unique id of a credential record

username
string
password
string
usage
integer
hashed
boolean
Default: false

If you save the password as hash, there’s no way for you to retrieve it.

locked
boolean

Once the credentials are in use with a specific ID, they cannot be used in conjunction with any other ID (unless the original ID is either revoked or detached from this subscription).

Request samples

Content type
application/json
{
  • "username": "bob",
  • "password": "3mawrk",
  • "hash": false,
  • "licenseCount": 1,
  • "lock": true
}

Response samples

Content type
application/json
{
  • "_links": [