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

# Create, Update, Delete Safely

> CRUD operations workflow with safety best practices

write operations require authentication. use a test account when learning.

```bash theme={null}
export ATPROTO_HANDLE=your.handle
export ATPROTO_PASSWORD=your-app-password
```

## create

```bash theme={null}
pdsx create app.bsky.feed.post text='hello world' langs='["en"]'
```

pdsx adds `$type` and `createdAt` automatically. validation happens server-side - check [lexicon docs](https://github.com/bluesky-social/atproto/tree/main/lexicons/app/bsky) for required fields.

## update

```bash theme={null}
# get record key from ls output
pdsx ls app.bsky.feed.post -o json | jq -r '.[] | "\(.uri) - \(.value.text)"'

# update
pdsx edit app.bsky.feed.post/RKEY text='updated text'

# update profile
pdsx edit app.bsky.actor.profile/self description='new bio'
```

## delete

```bash theme={null}
pdsx rm app.bsky.feed.post/RKEY
```

delete is permanent - no undo.

## workflow

```bash theme={null}
# create
pdsx create app.bsky.feed.post text='test'

# verify
pdsx ls app.bsky.feed.post --limit 1 -o json | jq -r '.[0].value.text'

# edit
pdsx edit app.bsky.feed.post/RKEY text='updated'

# delete
pdsx rm app.bsky.feed.post/RKEY
```

## what's next

* [blob upload workflow](/guides/blob-upload) - attach images to posts
* [troubleshooting](/quickstart#invalid-uri-format) - understand shorthand vs full URIs
* [records concept](/concepts/records-and-collections) - understand lexicons and validation
