---
title: Upload
slug: reference/upload
docTags: 
createdAt: 2025-03-20T22:35:07.299Z
---

{
  "id": "9N7qN0bHeJEkb1S4WjlWD",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/account-setting/logo",
    "servers": [
      {
        "url": "https://app.amberflo.io/account-setting/logo"
      }
    ],
    "name": "Upload",
    "description": "<p>Upload a company logo to be displayed in the Customer Portal.</p>\n<p>When there is no company logo, a placeholder is displayed in the Customer Portal.</p>\n<p>The file must be an image (i.e. have MIME type <code>image/*</code>) and be smaller than 1MB.</p>",
    "contentType": "multipart/form-data",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [
        {
          "name": "logo",
          "kind": "required",
          "type": "string<binary>",
          "description": "File to use as company logo. It must be an image file (i.e. have MIME type `image/*`) and be smaller than 1MB.\n\n**Note** that the file must be sent as raw binary (i.e. do not encode the file content; the `curl` example works fine, but the `try it` *does not* because it encodes the file content).\n",
          "example": ""
        }
      ],
      "oAuthParameters": [
        {
          "id": "api_key",
          "name": "x-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful response",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "filename",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "mimeType",
                "kind": "optional",
                "type": "string",
                "example": ""
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "dqXXJ9R7EFZQCsejhYBNa",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/account-setting/logo \\\n     --header 'accept: application/json' \\\n     --header 'content-type: multipart/form-data' \\\n     --form 'logo=@\"/path/to/file\"'"
        },
        {
          "id": "KQyR-226cJVy5G7WLAoRk",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"multipart/form-data\");\n\nvar formdata = new FormData();\nformdata.append(\"logo\", fileInput.files[0], \"file\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: formdata,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/account-setting/logo\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "y3-ZAKGXeIq4aAFwjm2UI",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/account-setting/logo\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"multipart/form-data\"\nform_data = [['logo', File.open('/path/to/file')]]\nrequest.set_form form_data, 'multipart/form-data'\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "dzhLIbVBJdQPYKaoZedMZ",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://app.amberflo.io/account-setting/logo\"\n\npayload = {}\nfiles=[\n   ('logo',('file',open('/path/to/file','rb'),'application/octet-stream'))\n]\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'multipart/form-data'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload, files=files)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "dqXXJ9R7EFZQCsejhYBNa"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful response\n{\n  \"filename\": \"\",\n  \"mimeType\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "92vbCgW9kh_QLa4ihY902",
      "type": "paragraph",
      "children": [
        {
          "text": "Upload a company logo to be displayed in the Customer Portal.",
          "id": "YpYl9bTN3m4J22NQd-whx"
        }
      ]
    },
    {
      "id": "JboxBJPdjlnp8p-KfM2Am",
      "type": "paragraph",
      "children": [
        {
          "text": "When there is no company logo, a placeholder is displayed in the Customer Portal.",
          "id": "YHc2OgDSM-MFsuVxRMqTp"
        }
      ]
    },
    {
      "id": "PpgNMdMvodtldrvjYlSfK",
      "type": "paragraph",
      "children": [
        {
          "text": "The file must be an image (i.e. have MIME type ",
          "id": "JMeHvb5IJ_9zPhjM7f01Z"
        },
        {
          "text": "image/*",
          "highlight": true,
          "id": "47j4ZG7ZxhtvAj8gSK_2_"
        },
        {
          "text": ") and be smaller than 1MB.",
          "id": "eRQjRw5tmKL-f9eO1FOR3"
        }
      ]
    }
  ]
}