Created
July 25, 2022 15:37
-
-
Save 3200pro/3a08e4157bdd506b070342241683675e to your computer and use it in GitHub Desktop.
Mutate Data Sanity.io (Add Post)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Test process of adding a post to the dataset | |
curl 'https://<PROJECT>.api.sanity.io/v2021-06-07/data/mutate/<DATASET>' \ | |
-H "Authorization: Bearer <TOKEN>" \ | |
-H 'Content-Type: application/json' \ | |
--data-binary '{"mutations":[{ "create": {"_id": "postTestID","title": "Test Title","_type": "site.post"} }]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment