createUserProperty method

Future<void> createUserProperty({
  1. required String userId,
  2. required String key,
  3. required UserPropertyCreate body,
})

Creates a property for a user. For more information about user properties, see Confluence entity properties (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). Note, these properties stored against a user are on a Confluence site level and not space/content level.

Note: the number of properties which could be created per app in a tenant for each user might be restricted by fixed system limits. Permissions required: Permission to access the Confluence site ('Can use' global permission).

Implementation

Future<void> createUserProperty(
    {required String userId,
    required String key,
    required UserPropertyCreate body}) async {
  await _client.send(
    'post',
    'wiki/rest/api/user/{userId}/property/{key}',
    pathParameters: {
      'userId': userId,
      'key': key,
    },
    body: body.toJson(),
  );
}