···11-Great! You now know where to find records, now it's time to learn how to write records. When writing atproto records you
22-can use 3 methods for this:
11+Great! Now it's time to **write a record**. There are three different APIs on a PDS for writing:
3244-- [com.atproto.repo.createRecord](https://docs.bsky.app/docs/api/com-atproto-repo-create-record) Creates a new atproto
55- record, errors if it has the same record key already in the collection
66-- [com.atproto.repo.putRecord](https://docs.bsky.app/docs/api/com-atproto-repo-put-record) Updates an existing
77- atproto record if a record exists with the same record key, if not creates a new record
88-- [com.atproto.repo.applyWrites](https://docs.bsky.app/docs/api/com-atproto-repo-apply-writes) Batch endpoint for writes
99- that allows you to create, update, or delete multiple records.
33+- [`com.atproto.repo.createRecord`](https://docs.bsky.app/docs/api/com-atproto-repo-create-record) Creates a new atproto record, errors if it has the same record key already in the collection
1041111-Like the previous record you found at `{{at_uri}}`, you will write your own `codes.advent.challenge.day` record in your
55+- [`com.atproto.repo.putRecord`](https://docs.bsky.app/docs/api/com-atproto-repo-put-record) Updates an existing atproto record if a record exists with the same record key, if not creates a new record ("upsert")
66+77+- [`com.atproto.repo.applyWrites`](https://docs.bsky.app/docs/api/com-atproto-repo-apply-writes) Batch endpoint for writes that allows you to create, update, or delete multiple records atomically.
88+99+For this challenge, you will write your a `codes.advent.challenge.day` record in your
1210own repository at the record key `2` and set the property `partTwo` to `{{code}}`.
13111412The contents of the record would look about like this: