Upload Organization Photo

Each organization has a unique logo or image. You can upload and update the organization photo using this API.

Purpose

To upload the brand logo or image of the organization.

Request Details

Request URL

{api-domain}/crm/{version}/org/photo

Header

Authorization: Zoho-oauthtoken 100xx.92d4xxxxxxxxxxxxx15f52

Scope

scope=ZohoCRM.org.{operation_type}

Possible operation types

ALL - Full access to Organization data
CREATE - Upload organization photo
WRITE - Edit organization data

Parameters
  • filefile, mandatory

    Choose the photo you want to upload.

Sample Request

Copiedcurl "https://www.zylkercorp.zohoplatform.com/crm/v4/org/photo"
-X POST
-H "Authorization: Zoho-oauthtoken 100xx.d92d4xxxxxxxxxxxxx15f52"
-F "file=@img1.png"
Copiedphoto = invokeUrl
[
	url: "www.zylkercorp.zohoplatform.com/profile_images/1212572524128563200/w2ub-ATf_400x400.jpg"
	type: GET
];
photo.setParamName("file");
response = invokeurl
[
	url: "https://www.zylkercorp.zohoplatform.com/crm/v4/org/photo"
	type: POST
	files: photo
	connection:"crm_oauth_connection"
];

In the request, "file=@img1.png" contains the sample image.

Possible Errors

  • INVALID_DATAHTTP 400

    Invalid file type
    Resolution: The file being uploaded is not an image file. Ensure that the file you are trying to upload is an image file.

  • INVALID_REQUEST_METHODHTTP 400

    The http request method type is not a valid one
    Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above.

  • AUTHORIZATION_FAILEDHTTP 400

    User does not have sufficient privilege to add organization photo.
    Resolution: The user does not have the permission to add organization photo. Contact your system administrator.

  • INVALID_DATAHTTP 400

    The request does not contain any file
    Resolution: You have not added any file to the request. Ensure that you add an image file to the request. Refer to parameters section above.

  • INVALID_DATAHTTP 400

    The request contains more than one file
    Resolution: You have added more than one file to the request. Ensure that you add only one image file to the request. Refer to parameters section above.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: Client does not have ZohoCRM.org.CREATE/ZohoCRM.org.WRITE scope. Create a new client with valid scope. Refer to scope section above.

  • NO_PERMISSIONHTTP 403

    Permission denied to update
    Resolution: The user does not have permission to upload organization photo. Contact your system administrator.

  • INVALID_URL_PATTERNHTTP 404

    Please check if the URL trying to access is a correct one
    Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to request URL section above.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in the server. Contact support team.

  • FILE_SIZE_MORE_THAN_ALLOWED_SIZEHTTP 415

    Please check if the file size is in the correct range
    Resolution: The photo you are trying to upload either exceeds the allowed size(1 MB) or the allowed resolution(10 MP). Ensure that the photo being uploaded is within the prescribed range.

Sample Response

Copied{
	"message": "photo uploaded successfully",
	"details": {},
	"status": "success",
	"code": "SUCCESS",
}