Platform API reference

Platform API · Workspaces

post/v1/workspaces/{workspace_slug}/avatarAuth

Upload (or replace) the workspace identity avatar. Gated by `workspace.settings.update` (owner + admin). PNG/JPEG/WEBP only, ≤2 MB, magic-byte sniffed. SVG is rejected (stored-XSS).

Path parameters

workspace_slug*string

Slug of the workspace. Platform routes name the workspace by slug, positionally in the SDK (`platform.workspaces.retrieve("acme")`); the product APIs bind `workspace_id` instead.

Response · 200

avatar_url*string

URL of the uploaded avatar image.

Example

Request

POST https://api.platform-auth.productcraft.co/v1/workspaces/{workspace_slug}/avatar
Authorization: Bearer YOUR_TOKEN

Response

{
  "avatar_url": "string"
}