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
{}

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)
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).

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

hash
boolean
Default: false

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

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

Request samples

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

Response samples

Content type
application/json
{
  • "error": "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
{
  • "error": "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 <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 (User)

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)
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
{
  • "error": "Detailed error message"
}

User: Unlink

Detach a user (Threema ID) from subscription

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

Responses

Response samples

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

Contacts

Contact Categories: Show

Show a contact category (Directory Feature required)

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

Responses

Response samples

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

Contact: List

List custom contacts of your subscription

Authorizations:
query Parameters
filterCategory
string

Filter the result by the category

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 (Contact)

Contact List

object <application/json> (Paging)

Response samples

Content type
application/json
{}

Contact: Create

Create a new custom contact

Authorizations:
Request Body schema: application/json
threemaId
required
string (ThreemaId)
firstName
string [ 1 .. 256 ] characters
lastName
string [ 1 .. 256 ] characters
enabled
boolean

Responses

Response Headers
Location
string

A link to the contact detail resource.

Request samples

Content type
application/json
{
  • "threemaId": "B4UXXX11",
  • "firstName": "Echo",
  • "lastName": "Ohce",
  • "enabled": true
}

Response samples

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

Contact: Detail

Show a contact, selected by threemaId

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

Responses

Response Schema: application/json
Array of objects <application/json> (Link)
threemaId
string (ThreemaId)
type
string
Enum: "custom" "auto"
firstName
string
lastName
string
enabled
boolean

Response samples

Content type
application/json
{}

Contact: Update

Change the information of a contact, selected by threemaId

Authorizations:
path Parameters
threemaId
required
string (ThreemaId)
Example: B4UXXX11
Request Body schema: application/json
firstName
required
string [ 1 .. 256 ] characters
lastName
required
string [ 1 .. 256 ] characters
enabled
required
boolean

Responses

Request samples

Content type
application/json
{
  • "firstName": "Echo",
  • "lastName": "Ohce",
  • "enabled": true
}

Response samples

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

Contact: Remove

Revoke a custom contact, selected by threemaId

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

Responses

Response samples

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

Contact Categories: List

List the categories of the given contact (Directory Feature required)

Authorizations:
path Parameters
threemaId
required
string (ThreemaId)
Example: B4UXXX11
query Parameters
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 (Category)

Categories

object <application/json> (Paging)

Response samples

Content type
application/json
{}

Contact Categories: Replace

Replace all linked categories (Directory Feature required)

Authorizations:
path Parameters
threemaId
required
string (ThreemaId)
Example: B4UXXX11
Request Body schema: application/json
categories
required
Array of strings

List of category ids

Responses

Request samples

Content type
application/json
{
  • "categories": [
    ]
}

Response samples

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

App Configuration

Individual App Configuration: List

Show all individual settings of a credential

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)
Array of objects (MdmObject)

List of settings (for the specific credentials)

Response samples

Content type
application/json
{}

Individual App Configuration: Create

Create or modify an individual setting of a credential

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

Unique id of a credential record

Request Body schema: application/json
property
required
string (MdmProperty) [ 4 .. 256 ] characters

Setting name (starting with th_)

required
string or integer or boolean (MdmValue)

Value of the property

Responses

Request samples

Content type
application/json
{
  • "property": "th_firstname",
  • "value": "Peter Schreiner"
}

Response samples

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

Individual App Configuration: Show

Show a setting (setting selected by the property_id) of a credential record (selected by the id). The property_id is the unique name of a setting.

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

Unique id of a credential record

property_id
required
string (MdmProperty) [ 4 .. 256 ] characters
Example: th_firstname

Setting name (starting with th_)

Responses

Response Schema: application/json
Array of objects <application/json> (Link)
name
string (MdmProperty) [ 4 .. 256 ] characters

Setting name (starting with th_)

string or integer or boolean (MdmValue)

Value of the property

Response samples

Content type
application/json
{}

Individual App Configuration: Update

Update a individual setting of a credential record (selected by the id field}

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

Unique id of a credential record

property_id
required
string (MdmProperty) [ 4 .. 256 ] characters
Example: th_firstname

Setting name (starting with th_)

Responses

Response Schema: application/json
Array of objects <application/json> (Link)
name
string (MdmProperty) [ 4 .. 256 ] characters

Setting name (starting with th_)

string or integer or boolean (MdmValue)

Value of the property

Response samples

Content type
application/json
{}

Individual App Configuration: Remove

Remove an individual setting value (selected by property_id) of a credential (selected by id)

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

Unique id of a credential record

property_id
required
string (MdmProperty) [ 4 .. 256 ] characters
Example: th_firstname

Setting name (starting with th_)

Responses

Response samples

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

Global App Configuration: List

Show all global settings of a subscription

Authorizations:

Responses

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

List of settings

Response samples

Content type
application/json
{}

Global App Configuration: Create

Create or modify a global setting of a subscription

Authorizations:
Request Body schema: application/json
property
required
string (MdmProperty) [ 4 .. 256 ] characters

Setting name (starting with th_)

required
string or integer or boolean (MdmValue)

Value of the property

Responses

Request samples

Content type
application/json
{
  • "property": "th_firstname",
  • "value": "Peter Schreiner"
}

Response samples

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

Individual App Configuration: Bulk Get

Show all app configuration settings for each credential

Authorizations:
query Parameters
pageSize
integer <int32> (PageSizeParameterSmall) [ 1 .. 500 ]
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 (CredentialMdmParameters)

Array of credentials with individual app configuration settings

object <application/json> (Paging)

Response samples

Content type
application/json
{}

Individual App Configuration: Bulk Update

Create or modify multiple settings at once

Authorizations:
Request Body schema: application/json
Array of objects (CredentialMdmParameters) <= 1000 items

Array of credentials with individual app configuration settings

Responses

Request samples

Content type
application/json
{
  • "credentials": [
    ]
}

Response samples

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

Global App Configuration: Show

Load a global setting (selected by property_id) of a subscription. The property_id is the unique name of a setting.

Authorizations:
path Parameters
property_id
required
string (MdmProperty) [ 4 .. 256 ] characters
Example: th_firstname

Setting name (starting with th_)

Responses

Response Schema: application/json
Array of objects <application/json> (Link)
id
string (MdmProperty) [ 4 .. 256 ] characters

Setting name (starting with th_)

string or integer or boolean (MdmValue)

Value of the property

Response samples

Content type
application/json
{}

Global App Configuration: Update

Update a global setting of a subscription

Authorizations:
path Parameters
property_id
required
string (MdmProperty) [ 4 .. 256 ] characters
Example: th_firstname

Setting name (starting with th_)

Responses

Response Schema: application/json
Array of objects <application/json> (Link)
name
string (MdmProperty) [ 4 .. 256 ] characters

Setting name (starting with th_)

string or integer or boolean (MdmValue)

Value of the property

Response samples

Content type
application/json
{}

Global App Configuration: Remove

Remove a global setting of a subscription, selected by property_id

Authorizations:
path Parameters
property_id
required
string (MdmProperty) [ 4 .. 256 ] characters
Example: th_firstname

Setting name (starting with th_)

Responses

Response samples

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

Logos

Logos: Detail

Access to your in-app logos

Authorizations:

Responses

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

A valid https url to the dark logo

light
any

A valid https url to the light logo

Response samples

Content type
application/json
{}

Logos: Update

Update the URLs of the subscription’s in-app logos

Authorizations:
Request Body schema: application/json
dark
required
string (LogoUrl) [ 12 .. 256 ] characters

Url of the logo, must be start with https://

light
required
string (LogoUrl) [ 12 .. 256 ] characters

Url of the logo, must be start with https://

Responses

Request samples

Content type
application/json

Response samples

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