# ai.newnal.illi.media.uploadItem

> Upload one photo or video. multipart/form-data parts: homeId, file, timezone?, people? (JSON array of {name, relationship?}, at most 20 people), note? (at most 300 graphemes), takenAt? (offset-bearing timestamp). Unknown parts are ignored. A manual takenAt is queued after registration through updateUserInput. Otherwise capture time comes from file metadata, then upload time. Same-file content in one home returns the existing active original across uploaders, ignoring the new people/note/takenAt without another record or media registration. Originals and derivatives are stored on their original uploader PDN.

- Kind: procedure
- Authority: media.illi.newnal.ai
- Lexicon: 1
- Published by [illi-service.newnal.id](https://lexicon.garden/identity/did:plc:uztm7bi2ce42dez3uu3qafro), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.media.uploadItem)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.media.uploadItem/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.media.uploadItem/analytics)

## Procedure (`ai.newnal.illi.media.uploadItem`)

Type: procedure · POST

### Input (multipart/form-data)


### Output (application/json)

- `item` (ref, required)
  - Reference: `ai.newnal.illi.media.defs#itemView`

### Errors

- `UnsupportedMedia`: No description in schema.
- `MediaTooLarge`: No description in schema.
- `UploadThrottled`: No description in schema.
- `ScopeMissing`: No description in schema.
- `NotAllowed`: No description in schema.
- `PdsUnavailable`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Upload one photo or video. multipart/form-data parts: homeId, file, timezone?, people? (JSON array of {name, relationship?}, at most 20 people), note? (at most 300 graphemes), takenAt? (offset-bearing timestamp). Unknown parts are ignored. A manual takenAt is queued after registration through updateUserInput. Otherwise capture time comes from file metadata, then upload time. Same-file content in one home returns the existing active original across uploaders, ignoring the new people/note/takenAt without another record or media registration. Originals and derivatives are stored on their original uploader PDN.",
      "errors": [
        {
          "name": "UnsupportedMedia"
        },
        {
          "name": "MediaTooLarge"
        },
        {
          "name": "UploadThrottled"
        },
        {
          "name": "ScopeMissing"
        },
        {
          "name": "NotAllowed"
        },
        {
          "name": "PdsUnavailable"
        }
      ],
      "input": {
        "encoding": "multipart/form-data"
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "item": {
              "ref": "ai.newnal.illi.media.defs#itemView",
              "type": "ref"
            }
          },
          "required": [
            "item"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "ai.newnal.illi.media.uploadItem",
  "lexicon": 1
}
```
