# org.tangled.repo.createRepo

> Published by [tangled.org](https://lexicon.garden/identity/did:plc:wshs7t2adsemcrrd4snkeqli)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.repo.createRepo)
- [Documentation](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.repo.createRepo/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.repo.createRepo/examples)

## Definitions

### `org.tangled.repo.createRepo`

**Type**: `procedure`

Create a new repository

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | No |  |
| `defaultBranch` | `string` | No | Default branch of the repository. |
| `description` | `string` | No |  |
| `did` | `string` (did) | No | Optional user-provided DID to use as the repo identity instead of minting one. |
| `name` | `string` (record-key) | Yes | Name of the repository. |
| `source` | `union` | No | A source to clone from, populate this when forking or importing a repository. |
| `spindle` | `string` (did) | No |  |
| `topics` | `array` | No | Topics related to the repo |
| `website` | `string` (uri) | No | Any URI related to the repo |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | No |  |
| `key` | `string` | No | Multibase-encoded public signing key the knot holds for this repository |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Create a new repository",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "createdAt": {
              "format": "datetime",
              "type": "string"
            },
            "defaultBranch": {
              "description": "Default branch of the repository.",
              "type": "string"
            },
            "description": {
              "maxGraphemes": 140,
              "minGraphemes": 1,
              "type": "string"
            },
            "did": {
              "description": "Optional user-provided DID to use as the repo identity instead of minting one.",
              "format": "did",
              "type": "string"
            },
            "name": {
              "description": "Name of the repository.",
              "format": "record-key",
              "type": "string"
            },
            "source": {
              "description": "A source to clone from, populate this when forking or importing a repository.",
              "refs": [
                "org.tangled.repo.defs#sourceTangled",
                "org.tangled.repo.defs#sourceExternal"
              ],
              "type": "union"
            },
            "spindle": {
              "format": "did",
              "type": "string"
            },
            "topics": {
              "description": "Topics related to the repo",
              "items": {
                "maxLength": 50,
                "type": "string"
              },
              "maxLength": 50,
              "type": "array"
            },
            "website": {
              "description": "Any URI related to the repo",
              "format": "uri",
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "did": {
              "format": "did",
              "type": "string"
            },
            "key": {
              "description": "Multibase-encoded public signing key the knot holds for this repository",
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "org.tangled.repo.createRepo",
  "lexicon": 1
}
```
