lianja / DocuSign eSignature REST API / Deletes the user profile image for the specified user.
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")
// Adds the "Authorization: Bearer {{accessToken}}" header.
loHttp.AuthToken = "{{accessToken}}"
loHttp.SetRequestHeader("Accept","application/json")
loSbRequestBody = createobject("CkStringBuilder")
loJson.EmitSb(loSbRequestBody)
loResp = loHttp.PTextSb("DELETE","https://domain.com/v2.1/accounts/{{accountId}}/users/{{userId}}/profile/image",loSbRequestBody,"utf-8","application/json",.F.,.F.)
if (loHttp.LastMethodSuccess = .F.) then
? loHttp.LastErrorText
release loHttp
release loJson
release loSbRequestBody
return
endif
? str(loResp.StatusCode)
? loResp.BodyStr
release loResp
release loHttp
release loJson
release loSbRequestBody
Curl Command
curl -X DELETE
-H "Accept: application/json"
-H "Authorization: Bearer {{accessToken}}"
-d '{}'
https://domain.com/v2.1/accounts/{{accountId}}/users/{{userId}}/profile/image
Postman Collection Item JSON
{
"name": "Deletes the user profile image for the specified user.",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"body": {
"mode": "raw",
"raw": "{}"
},
"url": {
"raw": "{{baseUrl}}/v2.1/accounts/{{accountId}}/users/{{userId}}/profile/image",
"host": [
"{{baseUrl}}"
],
"path": [
"v2.1",
"accounts",
"{{accountId}}",
"users",
"{{userId}}",
"profile",
"image"
],
"variable": [
{
"key": "accountId",
"value": "{{accountId}}",
"type": "string"
},
{
"key": "userId",
"value": "{{userId}}",
"type": "string"
}
]
},
"description": "Deletes the user profile image from the specified user's profile.\n\nThe userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account."
},
"response": [
]
}