POST/contacts/{contactId}/photo

Uploads a contact profile photo. Use the URL returned as a response to upload the photo, then the photo is saved as the profile photo of the contact.

Note
For how to upload content using the API, see Upload or Download Files.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

contact

HTTP Request

POSThttps://www.worksapis.com/v1.0/contacts/{contactId}/photo

Path Parameters

ParameterTypeDescription
contactId string 

Customer/client contact ID


required
example : contact2-a56d-44a4-5304-033e16fca8d1 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
fileName string 

File name


required 
fileSize integer 

File size (in bytes)


required
minimum : 1
maximum : 10485760
format : int64 

Request Example

example

1{2  "fileName": "fileName",3  "fileSize": 10000004}

Response

HTTP 200

OK

PropertyTypeDescription
uploadUrl string 

URL to upload a contact photo.

 

Response Example

example

1{2  "uploadUrl": "https://apis-storage.worksmobile.com/b/ZzezmFWdVTHLJOJJuLnYE5Bc1JN3U9RCkvlN32ZBNdK5FhnmcFBtnLvHuK3bdeExNN3lkK19Ihl9fFK7JuKL9DjYUTJMEAWjWWXtnelfCri5/e76pw3I6lHGcw?fileId=jhkhjugjbgjjbrulbiujindctjveedeebjblbrkiicri"3}

HTTP 400

Bad Request

HTTP 403

Forbidden