# DWN Messages
## Legend
| Symbol | Description |
| ----------------------- | ----------- |
| :heavy_check_mark: | Required |
| :eight_spoked_asterisk: | Optional |
| :x: | Prohibited |
| :question: | Undecided |
## Messages
| Message | Auth | Capabilities | Data |
|:---------------------- | ------------------------ | ----------------------------- | ------------------ |
| **PermissionsRequest** | :heavy_check_mark:[^pra] | :x: | :x: |
| **PermissionsGrant** | :heavy_check_mark:[^pga] | :x: | :x: |
| **PermissionsQuery** | :heavy_check_mark: | | :x: |
| **PermissionsRevoke** | | | :x: |
| **CollectionsWrite** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| **CollectionsQuery** | :x: | :eight_spoked_asterisk:[^cqc] | :x: |
| **CollectionsCommit** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| **CollectionsDelete** | | | :x: |
| **ThreadsCreate** | :heavy_check_mark: | :x: | :heavy_check_mark: |
| **ThreadsReply** | | :x: | :heavy_check_mark: |
| **ThreadsQuery** | | | :x: |
| **ThreadsClose** | | | :x: |
| **ThreadsDelete**[^td] | | | :x: |
[^pra]: Signature of grantee
[^pga]: Signature of granter
[^cqc]: No capabilities returns all published data (e.g. `published: true`)
[^td]: :question: can you delete a thread in someone else's DWN?
## Questions
- Does this look right?
```javascript=
const grant = {
descriptor: {
method: "PermissionsGrant",
grantedBy: "did:ex:alice",
grantedTo: "did:ex:bob",
scope: {
method: "CollectionsWrite",
schema: "https://schema.org/MusicPlaylist"
},
conditions: {
delegation: true
}
},
authorization: JWS(grantedByKey, { descriptorCid })
};
const msg = {
descriptor: {
method: 'CollectionsWrite',
schema: "https://schema.org/MusicPlaylist",
dataCid: CID(data)
},
data: 'chicken parfait',
authorization: JWS(invokerKey, { descriptorCid, pgCid }),
permissionsGrant: pg
}
```