# blue.moji.collection.saveToCollection

> Published by [moji.blue](https://lexicon.garden/identity/did:plc:kmzpsik7s5y5fwu7nnkngfx4)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:kmzpsik7s5y5fwu7nnkngfx4/blue.moji.collection.saveToCollection)
- [Documentation](https://lexicon.garden/lexicon/did:plc:kmzpsik7s5y5fwu7nnkngfx4/blue.moji.collection.saveToCollection/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:kmzpsik7s5y5fwu7nnkngfx4/blue.moji.collection.saveToCollection/examples)

## Definitions

### `blue.moji.collection.saveToCollection`

**Type**: `procedure`

Copy a single emoji from another repo. Requires auth.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | The source Bluemoji alias or rkey. Internationalised aliases are accepted and encoded per RFC 0005. |
| `source` | `string` (at-identifier) | Yes | The handle or DID of the repo to copy from. |
| `renameTo` | `string` | No | The alias to save the Bluemoji to in the current logged-in user's repo. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes |  |
| `item` | `ref` → `blue.moji.collection.item#itemView` | Yes |  |

#### Errors

- **EmojiNotFound**: Indicates the named Bluemoji was not found in the source repo.
- **DestinationExists**: Indicates another Bluemoji with the same name already exists in the source repo. Set renameTo to rename.

## Raw Schema

```json
{
  "id": "blue.moji.collection.saveToCollection",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "source",
            "name"
          ],
          "properties": {
            "name": {
              "type": "string",
              "maxLength": 512,
              "description": "The source Bluemoji alias or rkey. Internationalised aliases are accepted and encoded per RFC 0005."
            },
            "source": {
              "type": "string",
              "format": "at-identifier",
              "description": "The handle or DID of the repo to copy from."
            },
            "renameTo": {
              "type": "string",
              "description": "The alias to save the Bluemoji to in the current logged-in user's repo."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "EmojiNotFound",
          "description": "Indicates the named Bluemoji was not found in the source repo."
        },
        {
          "name": "DestinationExists",
          "description": "Indicates another Bluemoji with the same name already exists in the source repo. Set renameTo to rename."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "item"
          ],
          "properties": {
            "uri": {
              "type": "string",
              "format": "at-uri"
            },
            "item": {
              "ref": "blue.moji.collection.item#itemView",
              "type": "ref"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Copy a single emoji from another repo. Requires auth."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
