Every Upstash Redis database has a REST URL. Redis commands map to paths: /set/key/value, /get/key, or POST a command array.
Copy the REST URL and token from your database's page in the Upstash console. Send the token as Authorization: Bearer <token>. In the examples they're written {{UPSTASH_REDIS_HOST}} and {{UPSTASH_REDIS_TOKEN}}.
Full reference: https://upstash.com/docs/redis/features/restapi
curl https://{{UPSTASH_REDIS_HOST}}/set/greeting/hello \
-H "Authorization: Bearer {{UPSTASH_REDIS_TOKEN}}"
curl https://{{UPSTASH_REDIS_HOST}}/get/greeting \
-H "Authorization: Bearer {{UPSTASH_REDIS_TOKEN}}"
curl -X POST https://{{UPSTASH_REDIS_HOST}} \
-H "Authorization: Bearer {{UPSTASH_REDIS_TOKEN}}" \
-d '["INCR", "visits"]'