How to assign a form to a form group
This topic demonstrates how to assign a form to a form group for your Docusign Rooms for Real Estate account.
You must first create a form group and grant office access to this form group to complete this how-to.
Run this code example from our Quickstart or launcher projects: Bash, C#, Java, Node.js, PHP, PowerShell, Python, or Ruby.
Required data
Running the code in this how-to requires this data:
Step 1. Obtain your OAuth token
To make the API calls shown in this how-to, you need a valid OAuth access token. Docusign supports access tokens for three different recommended OAuth grant types: Public Authorization Code Grant, Confidential Authorization Code Grant, and JSON Web Token (JWT) Grant. Choose the OAuth grant type appropriate for your scenario.
See Authentication for guidance on your options to get an OAuth token.
Step 2. Construct your API headers
After you have a valid OAuth access token, you are ready to construct the API headers that you will pass to the API call. Construct your headers like this, but make sure to substitute your valid OAuth access token for {ACCESS_TOKEN}.
Step 3. Retrieve the desired form library ID
Rooms accounts have forms bundled into objects known as FormLibraries. Form Libraries are collections of form IDs that can be applied to a given form group through its associated form group ID.
Retrieve your desired form ID from the formsLibraryId by making a GET request to the FormLibraries:GetFormLibraries endpoint. Here’s how you make the call, but make sure to substitute your base path for {BASE_PATH} and API account ID for {API_ACCOUNT_ID}.
Step 4. Select a form group ID
To find the form group you want to assign the form to, you need to make a GET request to the FormGroups:GetFormGroups endpoint. The Rooms API will return a list of available form group IDs; select one to continue through the example.
Here’s how you make the call, but make sure to substitute your base path for {BASE_PATH} and API account ID for {API_ACCOUNT_ID}.
Step 5. Construct your request body
Next, create a request body using the previously obtained form ID. Make sure to substitute your form ID for {FORM_ID}.
Step 6. Call the Rooms API
Now that you have constructed your API headers and request body, make a POST request to the FormGroups:AssignFormGroupForm endpoint and include the request body to add your form to a form group for your Rooms account.
Here’s how you make the call, but make sure to substitute your base path for {BASE_PATH}, API account ID for {API_ACCOUNT_ID}, and form group ID for {FORM_GROUP_ID}.
Expected response
If you run this code example from our Quickstart or launcher projects, you should see a JSON response similar to the code shown.
Next steps
- Run this code example from our Quickstart or launcher projects: Bash, C#, Java, Node.js, PHP, PowerShell, Python, or Ruby.
- Learn Rooms concepts.
- See all available Rooms API How-to guides.
- See details about Using room templates and task lists.
- See how to Go-Live with a completed app and find the base path for API calls in the production environment.