> ## Documentation Index
> Fetch the complete documentation index at: https://docs.classquill.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload Blog Image

> Upload an image to the `blog-images` Supabase storage bucket and return its public
URL (use as a post's `featured_image` or inline in `content`). By default the image
is stored under the calling key's OWN organisation.

* target=org (default) → `org/<org_id>/<uuid>-<filename>` (the key's own org).
* target=platform      → `platform/<brand>/<uuid>-<filename>`; reserved for EquateIt
  marketing sites — requires the key's platform-blog capability.

415 on an unsupported MIME type, 413 over 10 MB. Requires `blog:write`.



## OpenAPI

````yaml /openapi.json post /v1/blog-images
openapi: 3.1.0
info:
  title: EquateIt Public API
  description: >-
    REST API for EquateIt tutoring organisations. Pipe your sessions, invoices,
    payments, tutor earnings, students, and more into your own tools. Most
    endpoints are reads; a focused set of writes (each gated by a *:write scope)
    create or update data, including creating student/tutor/parent accounts.


    Authenticate every request with an org API key:

        Authorization: Token token=ei_live_...

    Mint keys in the EquateIt app under Settings → Developers.
  version: 1.0.0
servers: []
security:
  - ApiKeyAuth: []
tags:
  - name: General
  - name: Sessions
  - name: Tutors
  - name: Students & Parents
  - name: Billing
  - name: Curriculum
  - name: Coursework
  - name: Operations
  - name: Pricing
  - name: Bookings
  - name: Blog
  - name: Reports
paths:
  /v1/blog-images:
    post:
      tags:
        - Blog
      summary: Upload Blog Image
      description: >-
        Upload an image to the `blog-images` Supabase storage bucket and return
        its public

        URL (use as a post's `featured_image` or inline in `content`). By
        default the image

        is stored under the calling key's OWN organisation.


        * target=org (default) → `org/<org_id>/<uuid>-<filename>` (the key's own
        org).

        * target=platform      → `platform/<brand>/<uuid>-<filename>`; reserved
        for EquateIt
          marketing sites — requires the key's platform-blog capability.

        415 on an unsupported MIME type, 413 over 10 MB. Requires `blog:write`.
      operationId: upload_blog_image_v1_blog_images_post
      parameters:
        - name: target
          in: query
          required: false
          schema:
            type: string
            description: org (default) | platform
            default: org
            title: Target
          description: org (default) | platform
        - name: brand
          in: query
          required: false
          schema:
            type: string
            description: equateit | classquill (platform only)
            default: classquill
            title: Brand
          description: equateit | classquill (platform only)
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_blog_image_v1_blog_images_post'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlogImageUploadResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_upload_blog_image_v1_blog_images_post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: Body_upload_blog_image_v1_blog_images_post
    BlogImageUploadResult:
      properties:
        url:
          type: string
          title: Url
        path:
          type: string
          title: Path
        size_bytes:
          type: integer
          title: Size Bytes
      type: object
      required:
        - url
        - path
        - size_bytes
      title: BlogImageUploadResult
      description: >-
        POST /v1/blog-images result — the public URL of the uploaded image (use
        as a

        post's `featured_image` or inline in `content`), the storage path it was
        written

        to inside the `blog-images` bucket, and its size in bytes.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Org API key as `Token token=ei_live_...`

````