> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tinycloud.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Delegations

> Grant another DID scoped, revocable access to paths in your space

Use delegations when another DID needs access to a path in your space. To send a file to a person, use [Share](https://docs.tinycloud.xyz/cli/share.md) instead.

## Create a delegation

```bash theme={null}
tc delegation create \
  --to did:pkh:eip155:1:0xRecipient... \
  --path documents/ \
  --actions kv/get,kv/list \
  --expiry 7d
```

The CLI prefixes short actions with `tinycloud.` automatically, so `kv/get` becomes `tinycloud.kv/get`.

## Inspect and revoke

```bash theme={null}
tc delegation list
tc delegation list --granted
tc delegation list --received
tc delegation info bafy...
tc delegation revoke bafy...
```

## Share links

To hand someone a file rather than a standing delegation, use
[`tc share publish`](https://docs.tinycloud.xyz/cli/share). It publishes a bearer link or an addressed
link (one email address or an email domain) that opens in the Share
viewer, and keeps an encrypted sender history you can list and revoke.

## DID and expiry rules

* Use a PKH DID for user-to-user delegations
* `did:key` is for session-key style identities
* Expiry can be relative (`1h`, `7d`) or an absolute ISO timestamp; `delegation create` defaults to `1h`

> [!NOTE]
>
> Bearer Share links are built on the same delegations: `tc share revoke` on a
> bearer link revokes its delegation. Addressed shares add a signed policy that
> your node enforces.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.