Todoist's unified API lives at https://api.todoist.com/api/v1. (The older REST v2 and Sync v9 APIs are retired.)
Create a token at Settings → Integrations → Developer. Send it as Authorization: Bearer <token>. In the examples it's written {{TODOIST_TOKEN}}.
Full reference: https://developer.todoist.com/api/v1/
curl https://api.todoist.com/api/v1/tasks \
-H "Authorization: Bearer {{TODOIST_TOKEN}}"
curl https://api.todoist.com/api/v1/projects \
-H "Authorization: Bearer {{TODOIST_TOKEN}}"
due_string takes natural language.
curl -X POST https://api.todoist.com/api/v1/tasks \
-H "Authorization: Bearer {{TODOIST_TOKEN}}" \
-H "Content-Type: application/json" \
-d '{"content": "Try PostTaco", "due_string": "tomorrow at 9am"}'