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

# Grants

> A grant is the person's permission for one purpose. Pool indexes and answers only what an active grant covers.

## What a grant holds

| Field | Meaning |
| - | - |
| `sources` | `.photos`, `.screenshots`. Pool indexes only the sources an active grant names. |
| `data` | The kinds of things your app may read, for example `.products` or `.links`. `DataCategory.things` is every kind of thing. |
| `operations` | `.query`, `.evidence`, `.observe` and `.exportTaste`. Each one has to be granted. `.exportTaste` lets a summary of visual taste leave the device: see [Rank a catalog](https://docs.pool.day/rank.md). |
| `purpose` | One sentence on why. It is stored with the grant so the person and your own audit can read it later. |
| `expires` | Optional. After this date every call fails with `PoolError.grantExpired`. |
| `allowsCloudAssist` | Off by default. See [Cloud assist](https://docs.pool.day/cloud-assist.md). |

## Ask for less

Request the narrowest grant your feature needs. A wishlist feature needs `data: [.products]` and `sources: [.screenshots]`, not everything. Three things are separate categories on purpose:

* `.recognizedText`: without it, results carry no excerpt of the text Pool read. Ask only if you show quotes to the person.
* `.placesVisited`: the cities a person travelled to, for [Trips](https://docs.pool.day/trips.md). `DataCategory.things` does not include it.
* `.locations`: exact places, visits and venues. See [Places and visits](https://docs.pool.day/places.md).
* `.people`: faces grouped into unnamed people, with the `people` index option. See [People](https://docs.pool.day/people.md).
* `.confirmedPeople`: reserved.

## Checked on every call

The grant you pass is looked up again on every query, evidence read, change page and live update. The wording of a question can never widen it: asking for “places” under a products grant returns no places.

## Revoking

```swift theme={null}
try await pool.authorization.revoke(grant)

// Everything the person has granted this app:
let active = try await pool.authorization.grants()
```

* Calls with a revoked grant fail at once with `PoolError.grantRevoked`, and live queries end with the same error.
* When the last active grant is revoked, the whole index is deleted from the device.
* When the person takes away photo access in Settings, the index is deleted too and coverage reports the lost permission.

## Give people a way out

Show the grants your app holds somewhere in its settings, with the purpose and a button that calls `revoke`. It costs one screen and it is what makes people comfortable saying yes.


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