# org.tangled.repo.createRepo

> Create a new repository

- Kind: procedure
- Authority: repo.tangled.org
- Lexicon: 1
- Published by [tangled.org](https://lexicon.garden/identity/did:plc:wshs7t2adsemcrrd4snkeqli), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.repo.createRepo)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.repo.createRepo/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.repo.createRepo/analytics)

## Procedure (`org.tangled.repo.createRepo`)

Type: procedure · POST

### Input (application/json)

- `createdAt` (string · datetime)
- `defaultBranch` (string): Default branch of the repository.
- `description` (string)
  - Constraints: minGraphemes: 1, maxGraphemes: 140
- `did` (string · did): Optional user-provided DID to use as the repo identity instead of minting one.
- `name` (string · record-key, required): Name of the repository.
- `source` (union): A source to clone from, populate this when forking or importing a repository.
  - One of: `org.tangled.repo.defs#sourceTangled`, `org.tangled.repo.defs#sourceExternal`
- `spindle` (string · did)
- `topics` (array): Topics related to the repo
  - Constraints: maxLength: 50
  - `items` (string)
    - Constraints: maxLength: 50
- `website` (string · uri): Any URI related to the repo

### Output (application/json)

- `did` (string · did)
- `key` (string): Multibase-encoded public signing key the knot holds for this repository

## 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
}
```
