---
title: "Upload the organization's logo"
description: "Stores the organization's square logo (asset: icon) and returns the https URL to save with PATCH /v1/organization { icon_url }."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/organization/upload-the-organization-s-logo"
---
# Upload the organization's logo

> Stores the organization's square logo (asset: icon) and returns the https URL to save with PATCH /v1/organization { icon_url }.

<api-operation method="POST" path="/v1/organization/brand_images">
<template v-slot:docs="">

Stores the organization's square logo (`asset: icon`) and returns the https URL to save with `PATCH /v1/organization { icon_url }`. Accepts PNG, JPEG, GIF or WebP, detected from the file's leading bytes; SVG is never accepted. Maximum 5 MB.

## Headers

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        Idempotency-Key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Safely retry writes — repeats return the original response. If a write FAILED after it had already taken effect, that failure is what repeats: the key is spent, and a new attempt needs a new key.
    </td>
  </tr>
</tbody>
</table>

## Body

The request body is **required**.

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        asset
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      The organization has one brand image: its square sidebar logo. One of <code>
        icon
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      The image file, base64-encoded. Maximum 5 MB decoded.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        content_type
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Optional, and never trusted — the type is read from the file's bytes. Send it only so a mismatch appears in our logs.
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        asset
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Which brand image this is. One of <code>
        logo
      </code>
      
      , <code>
        icon
      </code>
      
      , <code>
        favicon
      </code>
      
      , <code>
        signature
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        url
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The https URL to store on the business.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        content_type
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The type proven by the file's leading bytes. One of <code>
        image/png
      </code>
      
      , <code>
        image/jpeg
      </code>
      
      , <code>
        image/gif
      </code>
      
      , <code>
        image/webp
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        bytes
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      The image's size in bytes.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        201
      </code>
    </td>
    
    <td>
      Created
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        400
      </code>
    </td>
    
    <td>
      Not a supported image, or an invalid body
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        409
      </code>
    </td>
    
    <td>
      Idempotency-Key conflict — the key is already in flight, or was reused with a different request payload.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        413
      </code>
    </td>
    
    <td>
      Payload too large
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        503
      </code>
    </td>
    
    <td>
      Image uploads are not enabled on this deployment
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl -X POST "$TMBILLING_URL/v1/organization/brand_images" \
  -H "Authorization: Bearer $TMBILLING_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "asset": "icon",
    "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
  }'
```

</template>

<template v-slot:response="">
<code-group>

```json [201 Created]
{
  "object": "brand_image",
  "asset": "logo",
  "url": "biz_XXXXXXXXXXXX01",
  "content_type": "image/png",
  "bytes": 1
}
```

```json [400 Bad Request]
{
  "error": {
    "type": "invalid_request_error",
    "message": "Not a supported image, or an invalid body"
  }
}
```

```json [409 Conflict]
{
  "error": {
    "type": "idempotency_error",
    "message": "Idempotency-Key conflict — the key is already in flight, or was reused with a different request payload."
  }
}
```

```json [413 Payload Too Large]
{
  "error": {
    "type": "invalid_request_error",
    "message": "Payload too large"
  }
}
```

```json [503 Service Unavailable]
{
  "error": {
    "type": "api_error",
    "message": "Image uploads are not enabled on this deployment"
  }
}
```

</code-group>
</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
