# dev.tsunagite.createSong

> Published by [tsunagite.dev](https://lexicon.garden/identity/did:plc:pz4sp2vf5w26wnaee253gfms)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:pz4sp2vf5w26wnaee253gfms/dev.tsunagite.createSong)
- [Documentation](https://lexicon.garden/lexicon/did:plc:pz4sp2vf5w26wnaee253gfms/dev.tsunagite.createSong/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:pz4sp2vf5w26wnaee253gfms/dev.tsunagite.createSong/examples)

## Definitions

### `dev.tsunagite.createSong`

**Type**: `procedure`

Create a record for a song in a game hosting leaderboards via Tsunagite. If the song already exists, update its data.

#### Input

**Encoding**: `text/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` (record-key) | Yes | The ID of this song. Should only include [a-zA-Z0-9-]. |
| `song` | `ref` → `dev.tsunagite.song` | Yes |  |

#### Output

**Encoding**: `text/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | No | The URI pointing to the song's newly-created record. |

## Raw Schema

```json
{
  "id": "dev.tsunagite.createSong",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "id",
            "song"
          ],
          "properties": {
            "id": {
              "type": "string",
              "format": "record-key",
              "description": "The ID of this song. Should only include [a-zA-Z0-9-]."
            },
            "song": {
              "ref": "dev.tsunagite.song",
              "type": "ref"
            }
          }
        },
        "encoding": "text/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "properties": {
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "The URI pointing to the song's newly-created record."
            }
          }
        },
        "encoding": "text/json"
      },
      "description": "Create a record for a song in a game hosting leaderboards via Tsunagite. If the song already exists, update its data."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
