API Documentation
Toggle TOC panel

URL structure

1 https://access-service.xy-company.com/api/v1/users/{userId}

where {userId} is the ID of a Cocoon Data user account.

Supported methods and overview

Detailed description

This API endpoint serves a number of purposes:

  • Enables or disables 2FA on a SafeShare administrator account (specified by userId).
  • Reconfigures 2FA for a Cocoon Data user account (specified by userId) which is either:

Note: For more information about retrieving Cocoon Data user account IDs, see <access-service>/api/v1/users and <access-service>/api/v1/organisations/{orgGroupId}/users.

Supported roles and conditions

This API endpoint supports requests utilizing Cocoon Data user accounts with the following roles (as described in the SafeShare Administrator's and Organisation Administrator's Guides):

The Cocoon Data Platform's resources available to a Cocoon Data user meeting the criteria above is determined by the access token submitted in the header of requests to this endpoint.

Required headers

The appropriate access token as the Bearer token:

  • Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub...

The following header is required if the body of the request has a JSON object:

  • Content-Type: application/json

Required parameters

The following parameter must be sent in the body of the PUT request, each as individual member of a JSON object:

  • mfaEnabled ( for SafeShare administrator users only ) - A boolean value of true to enable 2FA on the Cocoon Data user account represented by userId in the request's URL or false to disable 2FA on this account.
  • generateNewAuthenticatorKey - A boolean value of true to reconfigure 2FA for the Cocoon Data user represented by userId in the URL.
    Example (request to enable 2FA on a Cocoon Data user account):
    "mfaEnabled": true

    Example (request to reconfigure 2FA on a user account):
    "generateNewAuthenticatorKey": true


If the request succeeded, then an HTTP response status 200 OK is returned.