Message: create / contact (app -> client)

Back to overview

Confirm the created contact.

This message SHALL be sent when the contact has been created successfully in the app.

Acknowledgement

This message acknowledges:

Message Condition Error Codes
create/contact (client -> app)

(None)

Name Description
disabledByPolicy

Feature disabled by administrator

internalError

An internal error occurred

invalidIdentity

The identity is invalid

Args

Field Description Type Optional Nullable
identity

The identity of the contact that was created

String False False

Data

Field Description Type Optional Nullable
receiver

The contact

Map<Contact> False False

Models

Contact

Field Description Type Optional Nullable Default
id

The Threema identity (8 characters)

String False False
displayName

The contact display name

This is generated by the app from the first and last name, depending on the display logic (either "firstname lastname" or "lastname firstname").

String False False
color

The contact color in hex notation (e.g. "#1122FF")

String False False
firstName

The contact first name (max 256 bytes)

String True False
lastName

The contact last name (max 256 bytes)

String True False
publicNickname

The contact public nickname (without preceding ~, max 32 bytes)

String True False
verificationLevel

The verification level

  • 1: Unverified (red)
  • 2: Server verified (yellow)
  • 3: Fully verified (green)

Allowed values: 1, 2, 3

Integer False False
state

The identity state

Allowed values: "ACTIVE", "INACTIVE", "INVALID"

String False False
featureMask

The feature mask is a bitmask indicating support for certain features.

Bit values:

  • 0x01: Audio messages
  • 0x02: Group chat
  • 0x04: Ballots
  • 0x08: File transfer
  • 0x10: VoIP calls

Example: A client with feature mask 0x07 supports audio messages, group chat and ballots, but no file transfers and no VoIP calls.

Integer False False
isWork

Whether this is a contact from the same Threema Work package.
Only relevant for Threema Work users.

Boolean True False False
identityType

The identity type

  • 0: Regular Threema user
  • 1: Threema Work user

Allowed values: 0, 1

Integer False False
publicKey

The contact public key

Binary False False
isBlocked

Whether this contact is blocked.

Boolean True False False
locked

Whether the chat with this contact is locked. This is used for private chats.

Boolean False False
visible

Whether the chat with this contact is visible. This is used for private chats.

Boolean False False
hidden

The contact is hidden (e.g. because it is part of a group, but was never added to the address book or contacted)

Boolean False False
access

The access object

Map<ContactReceiverAccess> False False

ContactReceiverAccess

Field Description Type Optional Nullable Default
canDelete

Whether this contact can be deleted

Boolean False False
canChangeAvatar

Whether the avatar of this group can be changed

Boolean False False
canChangeFirstName

Whether the first name of this contact can be changed

Boolean False False
canChangeLastName

Whether the last name of this contact can be changed

Boolean False False