Help Retrieving Cards from API

I am trying to use the API to get all cards created today, but I am not sure how to do that in the API.

I’ve looked at the documentation, but I just can’t figure out how to do that. I want to grab the body content of all the notes created today and do some stuff with it for a sort of daily summary with ChatGPT.

Can you show me what a curl command would look like for selecting all cards created today?

Hi @Iamjmw,

If you pass today’s date in created_when in the request body to the /v1/cards/get/select endpoint, it will fetch all cards created today:

curl --request POST \
  --url https://api.supernotes.app/v1/cards/get/select \
  --header 'Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "created_when": {
    "from_when": "2023-12-13T00:00:00",
    "to_when": "2023-12-13T23:59:59"
  }
}'
1 Like

That’s what I thought. I was trying to get it working in Apple Shortcuts and it was giving me an error. I had to just approach it a different way and it’s working now. Thanks!