Threema Work API (1.7.1)
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. - Requests must be limited to 10,000 per day, the server will return HTTP header code
429
if the request limit is reached. - 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.
Subscription: Detail
Access to your subscription
Authorizations:
Responses
Response Schema: application/json
Array of objects <application/json> (Link) [ items <application/json > ] | |
id | string = 10 characters Unique subscription identifier |
name | string Short description name of the subscription |
validUntil | string (DateTime) = 24 characters *ISO8601 formated date
*Example: |
type | string Enum: "basic" "business" "enterprise" "essential" "advanced" "professional" "edu5" Chosen subscription type |
licenseAmount | integer Number of purchased licenses |
Response samples
- 200
- 401
{- "_links": [
], - "id": "XYZ0123456",
- "name": "My Threema Work subscription",
- "validUntil": "2017-01-01T00:00:00+0100",
- "type": "professional",
- "licenseAmount": 400
}
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
- Payload
{- "name": "My very nice Threema Work subscription"
}
Response samples
- 400
- 401
{- "error": "Detailed error message"
}
Credentials: List
List all credentials of the package
Authorizations:
query Parameters
filterUsername | string Filter the credentials by the |
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) [ items <application/json > ] | |
Array of objects (Credential) Credential List | |
object <application/json> (Paging) |
Response samples
- 200
- 401
{- "credentials": [
- {
- "id": "LAow0Rksa",
- "username": "alice",
- "password": "3mawrk",
- "usage": 0,
- "hashed": false,
- "locked": true
}, - {
- "id": "pwq4Kslw",
- "username": "bob",
- "password": null,
- "usage": 0,
- "hashed": true,
- "locked": false
}
], - "paging": {
- "count": 20,
- "total": 400,
- "page": 9,
}
}
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
Location | string A link to the credential detail resource. |
Response Schema: application/json
Array of objects <application/json> (Link) [ items <application/json > ] | |
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
- Payload
{- "username": "bob",
- "password": "3mawrk",
- "hash": false,
- "licenseCount": 1,
- "lock": true
}
Response samples
- 201
- 400
- 401
- 403
{- "_links": [
], - "id": "e7MCEXNCGmRDRX3BF71tJAoAiLVpvsu",
- "username": "alice",
- "password": "3mawrk",
- "usage": 1,
- "hashed": true,
- "locked": true
}
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 <application/json > ] | |
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
- 200
- 400
- 401
- 404
{- "_links": [
], - "id": "e7MCEXNCGmRDRX3BF71tJAoAiLVpvsu",
- "username": "alice",
- "password": "3mawrk",
- "usage": 1,
- "hashed": true,
- "locked": true
}
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
- Payload
{- "username": "bob",
- "password": "3mawrk",
- "hash": true,
- "lock": true
}
Response samples
- 400
- 401
- 404
{- "error": "Detailed error message"
}
Users: List
List all users of the package
Authorizations:
query Parameters
filterCredential | string Filter the users by the |
filterUsername | string Filter the users by the |
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) [ items <application/json > ] | |
Array of objects (User) User List | |
object <application/json> (Paging) |
Response samples
- 200
- 400
- 401
{- "users": [
- {
- "_links": [
], - "id": "USER001",
- "lastCheck": "2021-12-01T00:00:00+0100",
- "createdAt": "2017-01-01T00:00:00+0100",
- "nickname": "Alice",
- "firstName": "Al",
- "lastName": "Ice",
- "csi": "AI000001",
- "category": "Marketing",
- "version": "android - 3.1k"
}, - {
- "_links": [
], - "id": "USER002",
- "lastCheck": "2021-12-01T00:00:00+0100",
- "createdAt": "2017-01-01T00:00:00+0100",
- "nickname": "Bob",
- "firstName": "B",
- "lastName": "Ob",
- "csi": "AI000002",
- "category": "IT",
- "version": "ios - 2.9k"
}
], - "paging": {
- "count": 20,
- "total": 400,
- "page": 9,
}
}
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 <application/json > ] | |
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 *
|
lastCheck | string (DateTime) = 24 characters *ISO8601 formated date
*Example: |
createdAt | string (DateTime) = 24 characters *ISO8601 formated date
*Example: |
Response samples
- 200
- 400
- 401
- 404
{- "_links": [
], - "id": "B4UXXX11",
- "nickname": "Alice",
- "firstName": "Al",
- "lastName": "Ice",
- "csi": "AI000001",
- "category": "Marketing",
- "version": "android - 3.1k",
- "lastCheck": "2017-01-01T00:00:00+0100",
- "createdAt": "2017-01-01T00:00:00+0100"
}
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) [ items <application/json > ] | |
Array of objects (Contact) Contact List | |
object <application/json> (Paging) |
Response samples
- 200
- 401
{- "contacts": [
- {
- "_links": [
], - "id": "*THREEMA",
- "type": "custom",
- "firstName": "Threema",
- "lastName": "Channel",
- "enabled": false
}, - {
- "_links": [
], - "id": "ECHOECHO",
- "type": "auto",
- "firstName": "Echo",
- "lastName": "Ohce",
- "enabled": true
}
], - "paging": {
- "count": 20,
- "total": 400,
- "page": 9,
}
}
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
Location | string A link to the contact detail resource. |
Request samples
- Payload
{- "threemaId": "B4UXXX11",
- "firstName": "Echo",
- "lastName": "Ohce",
- "enabled": true
}
Response samples
- 400
- 401
{- "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) [ items <application/json > ] | |
threemaId | string (ThreemaId) |
type | string Enum: "custom" "auto" |
firstName | string |
lastName | string |
enabled | boolean |
Response samples
- 200
- 400
- 401
- 404
{- "_links": [
], - "threemaId": "B4UXXX11",
- "type": "auto",
- "firstName": "Echo",
- "lastName": "Ohce",
- "enabled": true
}
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
- Payload
{- "firstName": "Echo",
- "lastName": "Ohce",
- "enabled": true
}
Response samples
- 400
- 401
- 404
{- "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) [ items <application/json > ] | |
Array of objects (Category) Categories | |
object <application/json> (Paging) |
Response samples
- 200
- 401
{- "categories": [
- {
- "id": "yyyyyyyyyy",
- "name": "Category 1 by MDM",
- "source": "mdm"
}, - {
- "id": "xxxxxxxxx",
- "name": "Category 2",
- "source": "custom"
}
], - "paging": {
- "count": 20,
- "total": 400,
- "page": 9,
}
}
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) [ items <application/json > ] | |
Array of objects (MdmObject) List of settings (for the specific credentials) |
Response samples
- 200
- 401
{- "_links": [
], - "parameters": [
- {
- "_links": [
- {
- "ref": "detail"
}
], - "name": "th_disable_screenshots",
- "value": true
}, - {
- "_links": [
], - "name": "th_nickname",
- "value": "J.W."
}
]
}
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 |
required | string or integer or boolean (MdmValue) Value of the property |
Responses
Request samples
- Payload
{- "property": "th_firstname",
- "value": "Peter Schreiner"
}
Response samples
- 400
- 401
{- "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 |
Responses
Response Schema: application/json
Array of objects <application/json> (Link) [ items <application/json > ] | |
name | string (MdmProperty) [ 4 .. 256 ] characters Setting name (starting with |
string or integer or boolean (MdmValue) Value of the property |
Response samples
- 200
- 400
- 401
- 404
{- "_links": [
- {
- "ref": "detail",
},
], - "name": "th_firstname",
- "value": "Peter Schreiner"
}
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 |
Responses
Response Schema: application/json
Array of objects <application/json> (Link) [ items <application/json > ] | |
name | string (MdmProperty) [ 4 .. 256 ] characters Setting name (starting with |
string or integer or boolean (MdmValue) Value of the property |
Response samples
- 200
- 400
- 401
- 404
{- "name": "th_firstname",
- "value": "Peter Schreiner"
}
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 |
Responses
Response samples
- 400
- 401
- 404
{- "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) [ items <application/json > ] | |
Array of objects (SubscriptionMdmProperty) List of settings |
Response samples
- 200
- 401
{- "parameters": [
- {
- "_links": [
], - "name": "th_disable_screenshots",
- "value": true
}, - {
- "_links": [
], - "name": "th_nickname",
- "value": "J.W."
}
]
}
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 |
required | string or integer or boolean (MdmValue) Value of the property |
Responses
Request samples
- Payload
{- "property": "th_firstname",
- "value": "Peter Schreiner"
}
Response samples
- 400
- 401
{- "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) [ items <application/json > ] | |
Array of objects (CredentialMdmParameters) Array of credentials with individual app configuration settings | |
object <application/json> (Paging) |
Response samples
- 200
- 401
{- "credentials": [
- [
- {
- "_links": [
], - "id": "LAow0Rksa",
- "parameters": [
- {
- "_links": [
- {
- "rel": "detail",
}
], - "name": "th_disable_screenshots",
- "value": true
}, - {
- "_links": [
- {
- "rel": "detail",
}
], - "name": "th_nickname",
- "value": "Alice"
}
]
}, - {
- "_links": [
], - "id": "LAow0Rksa2",
- "parameters": [
- {
- "_links": [
- {
- "rel": "detail",
}
], - "name": "th_disable_screenshots",
- "value": true
}, - {
- "_links": [
- {
- "rel": "detail",
}
], - "name": "th_nickname",
- "value": "Alice"
}
]
}
]
], - "paging": {
- "count": 20,
- "total": 400,
- "page": 9,
}
}
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
- Payload
{- "credentials": [
- {
- "id": "LAow0Rksa",
- "parameters": [
- {
- "name": "th_disable_screenshots",
- "value": true
}, - {
- "name": "th_nickname",
- "value": "Alice"
}
]
}, - {
- "id": "LAow0Rksa2",
- "parameters": [
- {
- "name": "th_disable_screenshots",
- "value": true
}, - {
- "name": "th_nickname",
- "value": "Alice"
}
]
}
]
}
Response samples
- 400
- 401
{- "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 |
Responses
Response Schema: application/json
Array of objects <application/json> (Link) [ items <application/json > ] | |
id | string (MdmProperty) [ 4 .. 256 ] characters Setting name (starting with |
string or integer or boolean (MdmValue) Value of the property |
Response samples
- 200
- 400
- 401
- 404
{- "_links": [
], - "id": "th_firstname",
- "value": "Peter Schreiner"
}
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 |
Responses
Response Schema: application/json
Array of objects <application/json> (Link) [ items <application/json > ] | |
name | string (MdmProperty) [ 4 .. 256 ] characters Setting name (starting with |
string or integer or boolean (MdmValue) Value of the property |
Response samples
- 200
- 400
- 401
- 404
{- "name": "th_firstname",
- "value": "Peter Schreiner"
}
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 |
Responses
Response samples
- 400
- 401
- 404
{- "error": "Detailed error message"
}
Logo Variant: Show
Access to your in-app logos
Authorizations:
path Parameters
logoVariant required | string (LogoVariant) Enum: "dark" "light" Example: dark |
Responses
Response Schema: image/png
PNG-image file with a resolution of at least 680 × 80 pixels.
Response samples
- 401
- 404
{- "error": "Detailed error message"
}
Logo Variant: Update
Update the subscription’s in-app logo by variant (light,dark)
Authorizations:
path Parameters
logoVariant required | string (LogoVariant) Enum: "dark" "light" Example: dark |
Request Body schema: image/png
PNG-image file with a resolution of at least 680 × 80 pixels.
Responses
Response samples
- 400
- 401
{- "error": "Detailed error message"
}