POST /entities
Create
Store one entity.
Create, read, update, delete, and list entities. Use JSON or EDN.
An entity has an id, a type, and any data you want to store.
Store one entity.
Get one entity by id.
Replace its type and data.
Remove one entity.
Page through one type.
Set your URL and key once, then use the five requests below.
Use the production URL and your API key.
export API_BASE_URL=https://shipdeploy.work/api/v1
export SHIP_DEPLOY_API_KEY=replace-with-your-api-keyStore a note. Data can contain any JSON object.
curl -X POST "$API_BASE_URL/entities.json" \
-H 'content-type: application/json' \
-H "x-api-key: $SHIP_DEPLOY_API_KEY" \
-d '{"id":"note-1","type":"note","data":{"title":"First note","done":false}}'Fetch the entity by id.
curl -X POST "$API_BASE_URL/queries/find-entity-by-id.json" \
-H 'content-type: application/json' \
-H "x-api-key: $SHIP_DEPLOY_API_KEY" \
-d '{"id":"note-1"}'Replace the entity data for the same id.
curl -X POST "$API_BASE_URL/entities/update.json" \
-H 'content-type: application/json' \
-H "x-api-key: $SHIP_DEPLOY_API_KEY" \
-d '{"id":"note-1","type":"note","data":{"title":"First note","done":true}}'List notes, newest first.
curl -X POST "$API_BASE_URL/queries/find-entities-by-type.json" \
-H 'content-type: application/json' \
-H "x-api-key: $SHIP_DEPLOY_API_KEY" \
-d '{"type":"note","page":1,"page-size":20,"sort-by":"updated-at","sort-direction":"desc"}'Soft delete removes the entity from normal reads and lists.
curl -X POST "$API_BASE_URL/entities/delete.json" \
-H 'content-type: application/json' \
-H "x-api-key: $SHIP_DEPLOY_API_KEY" \
-d '{"id":"note-1","mode":"soft"}'Use .json with JSON or .edn with EDN. The same persistence operations support both formats.
curl -X POST "$API_BASE_URL/entities.edn" \
-H 'content-type: application/edn' \
-H 'accept: application/edn' \
-H "x-api-key: $SHIP_DEPLOY_API_KEY" \
-d '{:id "note-2" :type "note" :data {:title "EDN note" :done false}}'Create a temporary account and run the requests with a real key.