# dev.knotless.transferRepo

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

✓ This is the authoritative definition for this NSID.

## Description

Offers a repository to another account, or withdraws the offer.

## Links

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

## Definitions

### `dev.knotless.transferRepo`

**Type**: `procedure`

Names, in the repository's dev.knotless.repo record, the account and name it is offered to, as `knotless transfer` does, or with no `to` takes the offer back. It moves when that account takes it up (dev.knotless.acceptTransfer). A private repository cannot move. Only its owner, logged in to this appview's web pages, can: the appview writes with the session it keeps for that account, which the pages' session cookie names.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | No | The name it would have there: its own when absent. |
| `repo` | `string` (at-uri) | Yes | The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it. |
| `to` | `string` (at-identifier) | No | The account to offer it to, by handle or DID. Absent, the offer is withdrawn. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `transfer` | `ref` → `dev.knotless.defs#repoViewBasic` | No | Where it is offered now; absent once withdrawn. |

#### Errors

- **NotFound**: No such repository.
- **InvalidRequest**: The account is the owner's own, there is no such account, or the repository is private.
- **AuthenticationRequired**: No account is logged in to the pages, or its session has ended.
- **Forbidden**: The account logged in is not the repository's owner.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Names, in the repository's dev.knotless.repo record, the account and name it is offered to, as `knotless transfer` does, or with no `to` takes the offer back. It moves when that account takes it up (dev.knotless.acceptTransfer). A private repository cannot move. Only its owner, logged in to this appview's web pages, can: the appview writes with the session it keeps for that account, which the pages' session cookie names.",
      "errors": [
        {
          "description": "No such repository.",
          "name": "NotFound"
        },
        {
          "description": "The account is the owner's own, there is no such account, or the repository is private.",
          "name": "InvalidRequest"
        },
        {
          "description": "No account is logged in to the pages, or its session has ended.",
          "name": "AuthenticationRequired"
        },
        {
          "description": "The account logged in is not the repository's owner.",
          "name": "Forbidden"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "name": {
              "description": "The name it would have there: its own when absent.",
              "maxLength": 100,
              "type": "string"
            },
            "repo": {
              "description": "The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.",
              "format": "at-uri",
              "type": "string"
            },
            "to": {
              "description": "The account to offer it to, by handle or DID. Absent, the offer is withdrawn.",
              "format": "at-identifier",
              "type": "string"
            }
          },
          "required": [
            "repo"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "transfer": {
              "description": "Where it is offered now; absent once withdrawn.",
              "ref": "dev.knotless.defs#repoViewBasic",
              "type": "ref"
            }
          },
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Offers a repository to another account, or withdraws the offer.",
  "id": "dev.knotless.transferRepo",
  "lexicon": 1
}
```
