# ai.newnal.illi.media.uploadItem

> Published by [illi-service.newnal.id](https://lexicon.garden/identity/did:plc:uztm7bi2ce42dez3uu3qafro)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.media.uploadItem)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.media.uploadItem/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.media.uploadItem/examples)

## Definitions

### `ai.newnal.illi.media.uploadItem`

**Type**: `procedure`

Upload one photo or video to the home's album. multipart/form-data with parts homeId, file, caption?, takenAt?. The original and its derivatives (thumb, display when larger than 1600 px, video poster) go to the uploader's PDN; a mediaItem record is created in the uploader's repo in the family sphere.

#### Input

**Encoding**: `multipart/form-data`

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `item` | `ref` → `ai.newnal.illi.media.defs#itemView` | Yes |  |

#### Errors

- **UnsupportedMedia**
- **MediaTooLarge**
- **UploadThrottled**
- **ScopeMissing**
- **NotAllowed**
- **PdsUnavailable**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Upload one photo or video to the home's album. multipart/form-data with parts homeId, file, caption?, takenAt?. The original and its derivatives (thumb, display when larger than 1600 px, video poster) go to the uploader's PDN; a mediaItem record is created in the uploader's repo in the family sphere.",
      "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
}
```
