Zoho CRM Org Photo

org_photo. Published by Zoho in its first-party OpenAPI 3.1.0 repository github.com/zoho/crm-oas; 3 operation(s).

OpenAPI Specification

zoho-crm-org-photo-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Org Photo",
    "description": "org_photo",
    "version": "8"
  },
  "servers": [
    {
      "url": "https://zohoapis.{dc}/crm/{version}",
      "description": "API Server URL",
      "variables": {
        "dc": {
          "enum": [
            "com",
            "eu",
            "in",
            "cn",
            "au"
          ],
          "default": "com",
          "description": "API Server URL TLD"
        },
        "version": {
          "default": "v8",
          "description": "API Version"
        }
      }
    }
  ],
  "paths": {
    "/org/photo": {
      "get": {
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.org.READ"
            ]
          }
        ],
        "summary": "Get Org Photo",
        "description": "Retrieve the organization photo",
        "operationId": "getOrgPhoto",
        "responses": {
          "200": {
            "description": "Successfully retrieved the organization photo",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "Binary image data representing the organization photo in PNG format"
                }
              }
            }
          },
          "204": {
            "description": "No content - organization photo not found"
          }
        }
      },
      "post": {
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.org.CREATE"
            ]
          }
        ],
        "summary": "Upload Organization Photo",
        "description": "Upload a photo for the organization",
        "operationId": "uploadOrganizationPhoto",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "description": "Request body for uploading organization photo",
                "additionalProperties": false,
                "properties": {
                  "file": {
                    "type": "object",
                    "description": "The image file to upload as organization photo",
                    "additionalProperties": false
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully uploaded the organization photo",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Success response for organization photo upload",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Status of the operation",
                          "enum": [
                            "success"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Response code",
                          "enum": [
                            "SUCCESS"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Success message",
                          "maxLength": 1000
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional details about the operation",
                          "additionalProperties": false,
                          "properties": {}
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid request parameters or data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Error response for bad request",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the operation",
                      "enum": [
                        "error"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code indicating the type of error",
                      "enum": [
                        "INVALID_URL_PATTERN",
                        "INVALID_DATA",
                        "INVALID_REQUEST_METHOD",
                        "INVALID_REQUEST",
                        "INVALID_TOKEN"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Error message describing the issue",
                      "maxLength": 1000
                    },
                    "details": {
                      "type": "object",
                      "description": "Additional details about the error",
                      "additionalProperties": false,
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions to upload organization photo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Error response for forbidden access",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the operation",
                      "enum": [
                        "error"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code indicating no permission",
                      "enum": [
                        "NO_PERMISSION"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Error message describing the permission issue",
                      "maxLength": 1000
                    },
                    "details": {
                      "type": "object",
                      "description": "Additional details about the permission error",
                      "additionalProperties": false,
                      "properties": {
                        "items": {
                          "type": "string",
                          "description": "Permission items that are missing",
                          "maxLength": 500
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large - file size exceeds the maximum allowed limit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Error response for file size exceeds limit",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the operation",
                      "enum": [
                        "error"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code indicating file size exceeds limit",
                      "enum": [
                        "FILE_SIZE_EXCEEDS"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Error message describing the file size issue",
                      "maxLength": 1000
                    },
                    "details": {
                      "type": "object",
                      "description": "Additional details about the file size error",
                      "additionalProperties": false,
                      "properties": {
                        "size": {
                          "type": "integer",
                          "description": "Maximum allowed file size in bytes",
                          "format": "int32"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type - invalid file format or resolution exceeds limit",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Error response for file resolution exceeds limit",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Status of the operation",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Error code indicating file resolution exceeds limit",
                          "enum": [
                            "FILE_RESOLUTION_EXCEEDS"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message describing the resolution issue",
                          "maxLength": 1000
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional details about the resolution error",
                          "additionalProperties": false,
                          "properties": {
                            "resolution": {
                              "type": "integer",
                              "description": "Maximum allowed resolution in pixels",
                              "format": "int32"
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "Error response for invalid file format",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Status of the operation",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Error code indicating invalid data",
                          "enum": [
                            "INVALID_DATA"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message describing the invalid file format",
                          "maxLength": 1000
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional details about the error",
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.org.DELETE"
            ]
          }
        ],
        "summary": "Delete Organization Photo",
        "description": "Delete the organization photo",
        "operationId": "delete",
        "responses": {
          "200": {
            "description": "Successfully deleted the organization photo",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Success response for organization photo deletion",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Status of the operation",
                          "enum": [
                            "success"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Response code",
                          "enum": [
                            "SUCCESS"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Success message",
                          "maxLength": 1000
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional details about the operation",
                          "additionalProperties": false
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid request parameters or data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Error response for bad request",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the operation",
                      "enum": [
                        "error"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code indicating the type of error",
                      "enum": [
                        "INVALID_URL_PATTERN",
                        "INVALID_DATA",
                        "INVALID_REQUEST_METHOD",
                        "INVALID_REQUEST",
                        "INVALID_TOKEN"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Error message describing the issue",
                      "maxLength": 1000
                    },
                    "details": {
                      "type": "object",
                      "description": "Additional details about the error",
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions to delete organization photo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Error response for forbidden access",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the operation",
                      "enum": [
                        "error"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code indicating no permission",
                      "enum": [
                        "NO_PERMISSION"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Error message describing the permission issue",
                      "maxLength": 1000
                    },
                    "details": {
                      "type": "object",
                      "description": "Additional details about the permission error",
                      "additionalProperties": false,
                      "properties": {
                        "permissions": {
                          "type": "array",
                          "description": "List of required permissions",
                          "maxItems": 100,
                          "items": {
                            "type": "string",
                            "description": "Permission name",
                            "maxLength": 500
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "iam-oauth2-schema": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
            "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
            "refreshUrl": "https://accounts.zoho.com/oauth/v2/token",
            "scopes": {
              "ZohoCRM.org.ALL": "Full access to organization settings",
              "ZohoCRM.org.READ": "Read access to organization settings",
              "ZohoCRM.org.CREATE": "Create access to organization settings",
              "ZohoCRM.org.DELETE": "Delete access to organization settings",
              "ZohoCRM.features.READ": "Read access to feature details"
            }
          }
        }
      }
    }
  }
}