-->

Add permission profile through API

2020-02-14 07:25发布

问题:

Is it possible to add a permission profile for a user through the DocuSign REST API? Either when creating a new user or afterwards? I see where I can add a user to a group, but not a permission profile.

回答1:

Yes you can do both - you can modify user profiles when adding a new user, and you can also modify existing users - through DocuSign's APIs. (You can also manually set them through the Console UI)

When adding new users to an account there are some high level settings you set about the user, such as name, email, company, etc., and then there is a

userSettings 

object that contains (name,value) pairs for settings such as whether they're an admin, if they can send envelopes, if they can send through the API, etc. The following page from the online REST API guide describes this call and has a separate section below that lists all the potential name->value pairs and their values. Most of them are booleans but some are strings.

DocuSign REST API call - Add Members to Account

Next, to see what account settings are set for an existing user, you can make an API call to retrieve them:

DocuSign REST API call - Get User Settings

Lastly, to modify the settings of an existing user, you can make the following call:

DocuSign REST API call - Modify User Settings

Probably the best way to test all of this out easily and quickly is to use the REST API explorer. You can add the userSettings name->value pairs through the tool and see what the sample request bodies look like...

DocuSign ioDocs Explorer

[EDIT] With regards to user profiles that can be viewed in the Console (i.e. DocuSign Sender, Admin, etc.) you can create groups, add users to those groups, then configure those groups to use existing profiles based on the permissionProfileId. The steps to do that through the API are as follows:

  1. Add a new group
  2. Add users to the new group you just created
  3. Get a list of Permission Profiles in your account
  4. Set the Permission profile for the group


标签: docusignapi