lianja / DocuSign Admin API / Assign user to permission profiles for one or more products
Back to Collection Items
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loHttp = createobject("CkHttp")
// Use this online tool to generate code from sample JSON: Generate Code to Create JSON
// The following JSON is sent in the request body.
// {}
loJson = createobject("CkJsonObject")
loHttp.SetRequestHeader("Content-Type","application/json")
// Adds the "Authorization: Bearer {{accessToken}}" header.
loHttp.AuthToken = "{{accessToken}}"
loHttp.SetRequestHeader("Accept","application/json")
loResp = loHttp.PostJson3("https://{{hostenv}}/Management/v2.1/organizations/{{organizationId}}/accounts/{{accountId}}/products/users/{{userId}}/permission_profiles","application/json",loJson)
if (loHttp.LastMethodSuccess = .F.) then
? loHttp.LastErrorText
release loHttp
release loJson
return
endif
? str(loResp.StatusCode)
? loResp.BodyStr
release loResp
release loHttp
release loJson
Curl Command
curl -X POST
-H "Accept: application/json"
-H "Content-Type: application/json"
-H "Authorization: Bearer {{accessToken}}"
-d '{}'
https://{{hostenv}}/Management/v2.1/organizations/{{organizationId}}/accounts/{{accountId}}/products/users/{{userId}}/permission_profiles
Postman Collection Item JSON
{
"name": "Assign user to permission profiles for one or more products",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"body": {
"mode": "raw",
"raw": "{}"
},
"url": {
"raw": "https://{{hostenv}}/Management/v2.1/organizations/{{organizationId}}/accounts/{{accountId}}/products/users/{{userId}}/permission_profiles",
"protocol": "https",
"host": [
"{{hostenv}}"
],
"path": [
"Management",
"v2.1",
"organizations",
"{{organizationId}}",
"accounts",
"{{accountId}}",
"products",
"users",
"{{userId}}",
"permission_profiles"
],
"variable": [
{
"key": "organizationId",
"value": "{{organizationId}}"
},
{
"key": "accountId",
"value": "{{accountId}}"
},
{
"key": "userId",
"value": "{{userId}}"
}
]
},
"description": "Required scopes: user_write"
},
"response": [
]
}