Skip to content

Upload the customer portal favicon

Open .md

POST/v1/api/store/{team_slug}/setting/customer_portal_favicon

v1Operation ID v1_public_setting_customer_portal_favicon_update

Uploads the favicon of your customer portal, the small icon in the browser tab, as multipart/form-data in the field media. It replaces the current one.

YoPrint checks the file's content, not its name: it must really be an ICO, PNG or JPEG file. A renamed file of another kind is refused, and SVG is not accepted. The file is saved with the type YoPrint found (image/vnd.microsoft.icon for an ICO).

The file is checked first, so a refused upload leaves the current favicon in place. Once the new one is saved, the old one is removed. The response has no data; read the company details for favicon_url.

Permission

Needs the Manage Settings permission. The team owner always has it.

Side effects

  • Customers see the new icon the next time they open the portal.

Path parameters

  • team_slugstringrequired

    Your team slug, shown as Team ID next to your API key in Profile.

    • Example your-team

Request body

multipart/form-data, required.

  • mediastring (binary)required

    An ICO, PNG or JPEG file, at most 4096 KiB (4 MB). An ICO must be well formed, with 1 to 256 images, each a PNG or a bitmap.

Response

200Successful response.

Errors

  • 401The API key is missing or wrong (unauthenticated).

  • 403You are not allowed to do this. api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only {"message": "Insufficient Permission"}. Other refusals use the error envelope, with unauthorized or user_is_not_authorized.

    When
    Your role lacks Manage Settings. The body is {"message": "Insufficient Permission"}, without the error envelope.
    Fix
    Use the key of a member whose role has Manage Settings, or the owner's.
  • 404Not found. page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. code: null, with a message that starts "No query results for": there is no record with that id.

  • 422Validation failed, or the image was refused by the media rules: a mockup that is not an image a preview can be made of (mockup_type_not_allowed), or an image over a size limit (image_not_allowed), or a file that is a web page, a script or a program (validation_failed on media, or upload_not_allowed: "This type of file cannot be uploaded."); error.message is one sentence naming the limit.

    When
    media is missing, larger than 4096 KiB, or not a valid ICO, PNG or JPEG file (validation_failed; error.fields.media says, for example, "The media must be a valid ICO, PNG, or JPEG file."). The current favicon stays.
    Fix
    Upload one ICO, PNG or JPEG file.