---
title: "Hand in a photo you took at the event"
method: POST
path: "/api/hack/photos"
tags: ["hack"]
---

# Hand in a photo you took at the event

`POST /api/hack/photos`

## Request

- Base URL: `https://www.immersivecommons.com`
- URL: `https://www.immersivecommons.com/api/hack/photos`
- Auth: one of:
  - API key in cookie `__session`
  - HTTP bearer

Clerk session or agt_ token with `hack:submit` - the scope every builder at the event already holds, deliberately reused because scopes freeze at mint and a new one would be reachable by nobody. Lands `pending`: an organiser reviews submissions before they appear in the gallery.

## Request body

- HackPhotoSubmitRequest
  - `eid` string: Event id. Defaults to the current hackathon.
  - `image_base64` string, required: Base64 bytes. A `data:` URL is accepted and unwrapped, but it must be base64-encoded.
  - `content_type` string: Declared image type. Checked against the accepted set.
  - `filename` string
  - `caption` string
  - `credit` string

## Response `200`

The stored (pending) record.

- HackPhotoSubmitResponse
  - `ok` boolean, required
  - `photo` HackPhotoPublic, required: The public projection of a gallery photo. Deliberately carries NO blob URL — bytes come from the separate download route.
    - `id` string
    - `eid` string
    - `state` string: pending | published | rejected.
    - `caption` string
    - `credit` string
    - `submitted_at` string, date-time
  - `note` string: Says plainly that an organiser reviews submissions before they appear.

## Other responses

- `400`: Invalid JSON, missing `image_base64`, or bytes that do not decode.
- `403`: No auth, or no member identity to attribute the photo to.
- `413`: Image over the size ceiling.
- `415`: `content_type` is not an accepted image type.

---

[API](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api.md) · [All operations](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api/revisions/be67c1f67c27?raw)
