# dev.knotless.createOrgRepo

> Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk)

✓ This is the authoritative definition for this NSID.

## Description

Creates a repository in an organization's account, through the gateway the organization delegated writes to, which makes it as the organization, as `knotless create` does. The caller must be an admin of it who joined. Requires a service token from the caller's PDS, audience the gateway's DID, for this method.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.createOrgRepo)
- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.createOrgRepo/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.createOrgRepo/examples)

## Definitions

### `dev.knotless.createOrgRepo#account`

**Type**: `object`

An account, by DID.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |

### `dev.knotless.createOrgRepo`

**Type**: `procedure`

Makes the repository as `knotless create` does: public unless asked for private, naming the runners given or those the gateway's appview offers, with no branches until the first push.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `defaultBranch` | `string` | No | The branch its HEAD names, without refs/heads/: main when absent. |
| `description` | `string` | No | What the repository is, shown under its name. |
| `name` | `string` | Yes | The repository's name, its record key. |
| `org` | `string` (did) | Yes | The organization. |
| `private` | `boolean` | No | Whether to make it private: a space of its own on the organization's PDS, which only its members read. Public when absent. |
| `runners` | `array` | No | The accounts that run its workflows: those the gateway's appview offers when absent. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `members` | `array` | Yes | The members of the organization who may push to it: on a public one, those anyone may see. |
| `runners` | `array` | Yes | Its runners: a private one's can read it. |
| `uninvited` | `string` | No | Why a private one's runners were not told of it, when they were not. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "account": {
      "description": "An account, by DID.",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    },
    "main": {
      "description": "Makes the repository as `knotless create` does: public unless asked for private, naming the runners given or those the gateway's appview offers, with no branches until the first push.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "defaultBranch": {
              "description": "The branch its HEAD names, without refs/heads/: main when absent.",
              "maxLength": 255,
              "type": "string"
            },
            "description": {
              "description": "What the repository is, shown under its name.",
              "maxGraphemes": 300,
              "maxLength": 3000,
              "type": "string"
            },
            "name": {
              "description": "The repository's name, its record key.",
              "maxLength": 100,
              "type": "string"
            },
            "org": {
              "description": "The organization.",
              "format": "did",
              "type": "string"
            },
            "private": {
              "description": "Whether to make it private: a space of its own on the organization's PDS, which only its members read. Public when absent.",
              "type": "boolean"
            },
            "runners": {
              "description": "The accounts that run its workflows: those the gateway's appview offers when absent.",
              "items": {
                "ref": "#account",
                "type": "ref"
              },
              "maxLength": 20,
              "type": "array"
            }
          },
          "required": [
            "org",
            "name"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "members": {
              "description": "The members of the organization who may push to it: on a public one, those anyone may see.",
              "items": {
                "ref": "#account",
                "type": "ref"
              },
              "type": "array"
            },
            "runners": {
              "description": "Its runners: a private one's can read it.",
              "items": {
                "ref": "#account",
                "type": "ref"
              },
              "type": "array"
            },
            "uninvited": {
              "description": "Why a private one's runners were not told of it, when they were not.",
              "maxLength": 3000,
              "type": "string"
            }
          },
          "required": [
            "runners",
            "members"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Creates a repository in an organization's account, through the gateway the organization delegated writes to, which makes it as the organization, as `knotless create` does. The caller must be an admin of it who joined. Requires a service token from the caller's PDS, audience the gateway's DID, for this method.",
  "id": "dev.knotless.createOrgRepo",
  "lexicon": 1
}
```
