Threema Work API

Threema Work API (1.3.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) [ items &lt;application/json&gt; ]
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
{
  • "message": "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

Set to limit the filter result. (0 will ignore the limit and return ALL records)

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) [ items &lt;application/json&gt; ]
Array of objects (Credential) [ items ]

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

licenseCount
integer

License count

Responses

Response Headers
Location
string

A link to the credential detail resource.

Response Schema: application/json
Array of objects <application/json> (Link) [ items &lt;application/json&gt; ]
id
string (CredentialsId)

Unique id of a credential record

username
string
password
string
licenseAmount
integer

Request samples

Content type
application/json
{
  • "username": "bob",
  • "password": "3mawrk",
  • "licenseCount": 2
}

Response samples

Content type
application/json
{}

Credentials: Detail

Show credentials for a specified id

Authorizations:
path Parameters
id
required
string (CredentialsId)
Example: e7MCEXNCGmRDRX3BF71tJAoAiLVpvsu

Unique id of a credential record

Responses

Response Schema: application/json
Array of objects <application/json> (Link) [ items &lt;application/json&gt; ]
id
string (CredentialsId)

Unique id of a credential record

username
string
password
string
licenseAmount
integer

Response samples

Content type
application/json
{}

Credentials: Update

Update the username and password of a specified id

Authorizations:
path Parameters
id
required
string (CredentialsId)
Example: e7MCEXNCGmRDRX3BF71tJAoAiLVpvsu

Unique id of a credential record

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

Unique username

password
required
string [ 1 .. 256 ] characters

Password of the credential

Responses

Request samples

Content type
application/json
{
  • "username": "bob",
  • "password": "3mawrk"
}

Response samples

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

Credentials: Remove

Remove credentials of a specified id

Authorizations:
path Parameters
id
required
string (CredentialsId)
Example: e7MCEXNCGmRDRX3BF71tJAoAiLVpvsu

Unique id of a credential record

Responses

Response samples

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

Users

Subscription methods provide access to the subscription users.

Users: List

List all users of the package

Authorizations:
query Parameters
filterCredential
string

Filter the users by the id of the used Credential

filterUsername
string

Filter the users by the username of the used Credential

filterQuery
string

Search the users

pageSize
integer

Set to limit the filter result. (0 will ignore the limit and return ALL records)

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) [ items &lt;application/json&gt; ]
Array of objects (User) [ items ]

User List

object <application/json> (Paging)

Response samples

Content type
application/json
{}

User: Detail

Show a user, selected by threemaId

Authorizations:
path Parameters
threemaId
required
string (ThreemaId)
Example: B4UXXX11

Responses

Response Schema: application/json
Array of objects <application/json> (Link) [ items &lt;application/json&gt; ]
id
string (ThreemaId)
nickname
string

Nickname, chosen by the user in the Threema App

firstName
string

First name of the user, configured by the MDM system.

lastName
string

Last name of the user, configured by the MDM system.

csi
string

Any value (e.g. internal username), configured by the MDM system.

category
string

User category (e.g. group, department), configured by the MDM system.

version
string

Used Version *

  • Example: android - 3.1k
  • | OS | Separator | App Version |
  • |---------|-----------|-------------|
  • | android | - | 3.1k |
lastCheck
string (DateTime) 24 characters

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

createdAt
string (DateTime) 24 characters

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

Response samples

Content type
application/json
{}

User: Remove

Revoke a user(Threema ID), selected by threemaId

Authorizations:
path Parameters
threemaId
required
string (ThreemaId)
Example: B4UXXX11

Responses

Response samples

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

User: Unlink

Detach a user (Threema ID) from subscription

Authorizations:
path Parameters
threemaId
required
string (ThreemaId)
Example: B4UXXX11

Responses