Threema Work API (1.9.0)
Download OpenAPI specification:
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.
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/jsonrequired
| 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 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/jsonrequired
| 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 is 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. |
(LicenseReceiverAddress (string or null)) Default: null Receiver E-Mail address for the activation link | |
| invite | boolean Default: true Sent E-Mail invite to address, if address is given and valid |
| language | string (LicenseReceiverLanguage) Enum: "en" "de" "es" Language for the activation link e-mail content |
Responses
Request samples
- Payload
{- "username": "bob",
- "password": "3mawrk",
- "hash": false,
- "licenseCount": 1,
- "lock": true,
- "address": "work@threema.ch",
- "invite": true,
- "language": "en"
}Response samples
- 201
- 400
- 401
- 403
{- "_links": [
], - "id": "e7MCEXNCGmRDRX3BF71tJAoAiLVpvsu",
- "username": "alice",
- "password": "3mawrk",
- "usage": 1,
- "hashed": true,
- "locked": true
}CredentialReceiver: Resend All
Resend to all possible license receivers
Authorizations:
Request Body schema: application/jsonrequired
| language required | string (LicenseReceiverLanguage) Enum: "en" "de" "es" Language for the activation link e-mail content |
Responses
Request samples
- Payload
{- "language": "en"
}Response samples
- 200
- 400
- 401
{- "invited_count": "Count of sent invitations"
}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 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/jsonrequired
| 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 is 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. |
Responses
Request samples
- Payload
{- "username": "bob",
- "password": "3mawrk",
- "hash": true,
- "lock": true
}Response samples
- 400
- 401
- 404
{- "error": "Detailed error message"
}CredentialsReceiver: Detail
Show credentials receiver for a specified id
Authorizations:
path Parameters
| id required | string (CredentialsId) Example: e7MCEXNCGmRDRX3BF71tJAoAiLVpvsu Unique id of a credential record |
Responses
Response samples
- 200
- 400
- 401
- 404
{- "_links": [
], - "type": "email",
- "address": "work@threema.ch",
- "state": "sent",
- "sentCount": 3,
- "lastSent": "2017-01-01T00:00:00+0100"
}CredentialReceiver: Update
Update the existing license receiver of specified id
Authorizations:
path Parameters
| id required | string (CredentialsId) Example: e7MCEXNCGmRDRX3BF71tJAoAiLVpvsu Unique id of a credential record |
Request Body schema: application/jsonrequired
| address required | string <email> (LicenseReceiverAddress) Receiver e-mail address for the activation link |
Responses
Request samples
- Payload
{- "address": "work@threema.ch"
}Response samples
- 400
- 401
- 404
{- "error": "Detailed error message"
}CredentialReceiver: Remove
Remove credentials receiver of a specified id
Authorizations:
path Parameters
| id required | string (CredentialsId) Example: e7MCEXNCGmRDRX3BF71tJAoAiLVpvsu Unique id of a credential record |
Responses
Response samples
- 400
- 401
- 404
{- "error": "Detailed error message"
}CredentialReceiver: Resend
Resend the license to the receiver of specified id
Authorizations:
path Parameters
| id required | string (CredentialsId) Example: e7MCEXNCGmRDRX3BF71tJAoAiLVpvsu Unique id of a credential record |
Request Body schema: application/jsonrequired
| language required | string (LicenseReceiverLanguage) Enum: "en" "de" "es" Language for the activation link e-mail content |
Responses
Request samples
- Payload
{- "language": "en"
}Response samples
- 400
- 401
- 404
- 429
{- "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 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,employees",
- "jobTitle": "Marketing Manager",
- "department": "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,employees",
- "jobTitle": "Software Engineer",
- "department": "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 samples
- 200
- 400
- 401
- 404
{- "_links": [
], - "id": "B4UXXX11",
- "nickname": "Alice",
- "firstName": "Al",
- "lastName": "Ice",
- "csi": "AI000001",
- "category": "marketing,employees",
- "jobTitle": "Manager",
- "department": "Marketing",
- "version": "android - 3.1k",
- "lastCheck": "2017-01-01T00:00:00+0100",
- "createdAt": "2017-01-01T00:00:00+0100"
}Tags: List
List all tags of the subscription
Authorizations:
query Parameters
| page | integer Default: 0 |
| pageSize | integer Default: 20 |
Responses
Response samples
- 200
- 400
- 401
{- "tags": [
- {
- "id": "yyyyyyyyyy",
- "name": "Marketing Team",
- "enabled": true,
- "assignedUsersCount": 15
}
], - "paging": {
- "count": 20,
- "total": 400,
- "page": 9,
}
}Tags: Create
Create a new tag
Authorizations:
Request Body schema: application/jsonrequired
| enabled | boolean Whether the tag should be visible in the company directory |
| name | string [ 1 .. 500 ] characters The name of the tag |
Responses
Request samples
- Payload
{- "enabled": true,
- "name": "Marketing Team"
}Response samples
- 400
- 401
- 409
{- "error": "Detailed error message"
}Response samples
- 200
- 400
- 401
- 404
{- "_links": [
], - "id": "yyyyyyyyyy",
- "name": "Marketing Team",
- "isEnabled": true,
- "assignedUsersCount": 15
}Tag: Update
Update a tag
Authorizations:
path Parameters
| tagUid required | string |
Request Body schema: application/jsonrequired
| enabled | boolean Whether the tag should be visible in the company directory |
Responses
Request samples
- Payload
{- "enabled": true
}Response samples
- 400
- 401
- 404
{- "error": "Detailed error message"
}Tag: Delete
Delete a tag and unlink it from all users
Authorizations:
path Parameters
| tagUid required | string |
Request Body schema: application/jsonrequired
| deleteChannel | boolean If true, also delete the linked channel(s). False will only unlink. |
| deleteGroup | boolean If true also delete the linked broadcast group(s). False will unlink. |
Responses
Request samples
- Payload
{- "deleteChannel": false,
- "deleteGroup": false
}Response samples
- 400
- 401
- 404
{- "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 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/jsonrequired
| threemaId required | string (ThreemaId) |
| firstName | string [ 1 .. 256 ] characters |
| lastName | string [ 1 .. 256 ] characters |
| enabled | boolean |
| directory_enabled | boolean |
Responses
Request samples
- Payload
{- "threemaId": "B4UXXX11",
- "firstName": "Echo",
- "lastName": "Ohce",
- "enabled": true,
- "directory_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 samples
- 200
- 400
- 401
- 404
{- "_links": [
], - "id": "B4UXXX11",
- "type": "auto",
- "firstName": "Echo",
- "lastName": "Ohce",
- "enabled": true,
- "directory_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/jsonrequired
| firstName required | string [ 1 .. 256 ] characters |
| lastName required | string [ 1 .. 256 ] characters |
| enabled required | boolean |
| directory_enabled | boolean |
Responses
Request samples
- Payload
{- "firstName": "Echo",
- "lastName": "Ohce",
- "enabled": true,
- "directory_enabled": true
}Response samples
- 400
- 401
- 404
{- "error": "Detailed error message"
}Contact Tags: List
List the tags (previously: 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 samples
- 200
- 401
- 403
- 404
{- "categories": [
- {
- "id": "yyyyyyyyyy",
- "name": "Category 1 by MDM",
- "enabled": true,
- "assignedUsersCount": 15
}, - {
- "id": "xxxxxxxxx",
- "name": "Category 2",
- "enabled": true,
- "assignedUsersCount": 15
}
], - "paging": {
- "count": 20,
- "total": 400,
- "page": 9,
}
}Contact Tags: Add
Add a tag to the given contact. This will also update the app configuration parameter th_category. Important: This only works if the user is not part of an MDM license.
Authorizations:
path Parameters
| threemaId required | string (ThreemaId) Example: B4UXXX11 |
Request Body schema: application/jsonrequired
| uid | string The UID of the tag to add or remove |
Responses
Request samples
- Payload
{- "uid": "abc123"
}Response samples
- 400
- 401
- 403
- 404
- 409
{- "error": "Detailed error message"
}Contact Tags: Remove
Remove a tag from the given contact. This will also update the app configuration parameter th_category. Important: This only works if the user is not part of an MDM license.
Authorizations:
path Parameters
| threemaId required | string (ThreemaId) Example: B4UXXX11 |
Request Body schema: application/jsonrequired
| uid | string The UID of the tag to add or remove |
Responses
Request samples
- Payload
{- "uid": "abc123"
}Response samples
- 400
- 401
- 403
- 404
{- "error": "Detailed error message"
}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 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/jsonrequired
| 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 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 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: Create
Create or modify a global setting of a subscription
Authorizations:
Request Body schema: application/jsonrequired
| 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 samples
- 200
- 401
{- "credentials": [
- {
- "id": "LAow0Rksa",
- "parameters": [
- {
- "name": "th_nickname",
- "value": "Bob"
}, - {
- "name": "th_disable_screenshots",
- "value": false
}
]
}
], - "paging": {
- "count": 20,
- "total": 400,
- "page": 9,
}
}Individual App Configuration: Bulk Update
Create or modify multiple settings at once
Authorizations:
Request Body schema: application/jsonrequired
Array of objects (CredentialMdmParameters) <= 1000 items Array of credentials with individual app configuration settings |
Responses
Request samples
- Payload
{- "credentials": [
- {
- "id": "LAow0Rksa",
- "parameters": [
- {
- "name": "th_nickname",
- "value": "Bob"
}, - {
- "name": "th_disable_screenshots",
- "value": false
}
]
}
]
}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 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 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: Update
Update the subscription in-app logo by variant (light,dark)
Authorizations:
path Parameters
| logoVariant required | string (LogoVariant) Enum: "dark" "light" Example: dark |
Request Body schema: image/pngrequired
PNG-image file with a resolution of at least 680 x 80 pixels.
Responses
Response samples
- 400
- 401
{- "error": "Detailed error message"
}