Skip to content
Back to skills

7 Sync Api

BSecurity

Sub-skill of todoist-api: 7. Sync API.

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
developmentpythongobashapi

Works with

  • api

Security analysis

B88/100
  • criticalExfiltrates credentials via HTTP — exact pattern from Snyk ToxicSkills study

Pro shows the line behind each finding and how to fix it

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill 7-sync-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 7 Sync Api?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 7 Sync Api
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-7-sync-api/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-7-sync-api)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: todoist-api-7-sync-api
description: 'Sub-skill of todoist-api: 7. Sync API.'
version: 1.0.0
category: business
type: reference
scripts_exempt: true
---

# 7. Sync API

## 7. Sync API


**Sync API Basics:**
```bash
# Initial sync (full read)
curl -s -X POST "https://api.todoist.com/sync/v9/sync" \
    -H "Authorization: Bearer $TODOIST_API_KEY" \
    -H "Content-Type: application/x-www-form-urlencoded" \
    -d "sync_token=*&resource_types=[\"all\"]" | jq

# Incremental sync (with sync token)
SYNC_TOKEN="your-sync-token-from-previous-response"
curl -s -X POST "https://api.todoist.com/sync/v9/sync" \
    -H "Authorization: Bearer $TODOIST_API_KEY" \
    -H "Content-Type: application/x-www-form-urlencoded" \
    -d "sync_token=$SYNC_TOKEN&resource_types=[\"items\",\"projects\"]" | jq

# Batch operations with commands
curl -s -X POST "https://api.todoist.com/sync/v9/sync" \
    -H "Authorization: Bearer $TODOIST_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
        "commands": [
            {
                "type": "item_add",
                "temp_id": "temp1",
                "uuid": "unique-uuid-1",
                "args": {
                    "content": "Task 1",
                    "project_id": "PROJECT_ID"
                }
            },
            {
                "type": "item_add",
                "temp_id": "temp2",
                "uuid": "unique-uuid-2",
                "args": {
                    "content": "Task 2",
                    "project_id": "PROJECT_ID"
                }
            }
        ]
    }' | jq
```

**Python Sync Operations:**
```python
import requests
import json
import uuid

TODOIST_API_KEY = os.environ["TODOIST_API_KEY"]
SYNC_URL = "https://api.todoist.com/sync/v9/sync"

def sync_read(sync_token="*", resource_types=None):
    """Read data using Sync API"""
    if resource_types is None:
        resource_types = ["all"]

    response = requests.post(
        SYNC_URL,
        headers={"Authorization": f"Bearer {TODOIST_API_KEY}"},
        data={
            "sync_token": sync_token,
            "resource_types": json.dumps(resource_types)
        }
    )
    return response.json()

def batch_add_tasks(tasks):
    """Add multiple tasks in one request"""
    commands = []
    for task in tasks:
        commands.append({
            "type": "item_add",
            "temp_id": f"temp_{uuid.uuid4().hex[:8]}",
            "uuid": str(uuid.uuid4()),
            "args": task
        })

    response = requests.post(
        SYNC_URL,
        headers={
            "Authorization": f"Bearer {TODOIST_API_KEY}",
            "Content-Type": "application/json"
        },
        json={"commands": commands}
    )
    return response.json()

# Example: Add multiple tasks at once
tasks_to_add = [
    {"content": "Task 1", "project_id": "2345678901", "priority": 4},
    {"content": "Task 2", "project_id": "2345678901", "priority": 3},
    {"content": "Task 3", "project_id": "2345678901", "priority": 2},
]

result = batch_add_tasks(tasks_to_add)
print(f"Added {len(tasks_to_add)} tasks")
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.