# ink.branchline.publishSeed

> Published by [branchline.ink](https://lexicon.garden/identity/did:plc:brvu7akhdvsqcomb67pafw25)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.publishSeed)
- [Documentation](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.publishSeed/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.publishSeed/examples)

## Definitions

### `ink.branchline.publishSeed`

**Type**: `procedure`

Gift a seed. The caller must be signed in and must be the grantee of `grantor`; publishing passes that seed's planting right on to `grantee` as a new child seed. The AppView writes an ink.branchline.seed record to the caller's PDS and mirrors it into the local read cache. Root (grantor-less) seeds are not created through this endpoint — they are authored only by the branchline.ink repo.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `grantee` | `string` (did) | Yes | DID of the new grantee receiving the gift. |
| `grantor` | `string` (at-uri) | Yes | AT-URI of the seed the caller currently holds as grantee. |
| `expiresAt` | `string` (datetime) | No | Optional expiry for the new grant. Must not extend past the grantor chain's earliest expiry. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |

#### Errors

- **Unauthorized**: The caller is not signed in.
- **GrantorNotFound**: The grantor seed does not exist in the AppView.
- **NotGrantee**: The caller is not the grantee of the grantor seed.
- **GrantorExpired**: The grantor seed's expiry has passed.
- **GrantorAlreadyGranted**: The grantor seed has already been granted to another recipient.

## Raw Schema

```json
{
  "id": "ink.branchline.publishSeed",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "grantor",
            "grantee"
          ],
          "properties": {
            "grantee": {
              "type": "string",
              "format": "did",
              "description": "DID of the new grantee receiving the gift."
            },
            "grantor": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the seed the caller currently holds as grantee."
            },
            "expiresAt": {
              "type": "string",
              "format": "datetime",
              "description": "Optional expiry for the new grant. Must not extend past the grantor chain's earliest expiry."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "Unauthorized",
          "description": "The caller is not signed in."
        },
        {
          "name": "GrantorNotFound",
          "description": "The grantor seed does not exist in the AppView."
        },
        {
          "name": "NotGrantee",
          "description": "The caller is not the grantee of the grantor seed."
        },
        {
          "name": "GrantorExpired",
          "description": "The grantor seed's expiry has passed."
        },
        {
          "name": "GrantorAlreadyGranted",
          "description": "The grantor seed has already been granted to another recipient."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "cid"
          ],
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid"
            },
            "uri": {
              "type": "string",
              "format": "at-uri"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Gift a seed. The caller must be signed in and must be the grantee of `grantor`; publishing passes that seed's planting right on to `grantee` as a new child seed. The AppView writes an ink.branchline.seed record to the caller's PDS and mirrors it into the local read cache. Root (grantor-less) seeds are not created through this endpoint — they are authored only by the branchline.ink repo."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
