docs/doc/developer/api/action-items.mdx
response = requests.get(
"https://api.omi.me/v1/dev/user/action-items",
headers={"Authorization": f"Bearer {API_KEY}"},
params={"completed": False, "limit": 50}
)
action_items = response.json()
```
response = requests.post(
"https://api.omi.me/v1/dev/user/action-items",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"description": "Review pull request #123",
"completed": False,
"due_at": "2025-12-08T15:00:00+00:00"
}
)
action_item = response.json()
```
Each action item object accepts the same fields as the single create endpoint.
response = requests.post(
"https://api.omi.me/v1/dev/user/action-items/batch",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"action_items": [
{"description": "Review Q1 report", "due_at": "2025-12-10T17:00:00Z"},
{"description": "Schedule team meeting"}
]
}
)
result = response.json()
print(f"Created {result['created_count']} action items")
```
At least one field must be provided. Setting `completed: true` automatically sets `completed_at`.
# Mark action item as completed
response = requests.patch(
"https://api.omi.me/v1/dev/user/action-items/action_abc123",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={"completed": True}
)
action_item = response.json()
print(f"Completed at: {action_item['completed_at']}")
```
response = requests.delete(
"https://api.omi.me/v1/dev/user/action-items/action_abc123",
headers={"Authorization": f"Bearer {API_KEY}"}
)
result = response.json()
if result["success"]:
print("Action item deleted successfully")
```
Import tasks from an external task management system into Omi:
<Tabs> <Tab title="Python"> ```python import requestsAPI_KEY = "omi_dev_your_api_key"
# Your tasks from another app
external_tasks = [
{"title": "Complete project proposal", "due": "2025-12-15T10:00:00Z", "done": False},
{"title": "Send weekly report", "due": "2025-12-12T17:00:00Z", "done": False},
{"title": "Review team feedback", "due": None, "done": True}
]
# Convert to Omi action items format
action_items = [
{
"description": task["title"],
"due_at": task["due"],
"completed": task["done"]
}
for task in external_tasks
]
# Create batch
response = requests.post(
"https://api.omi.me/v1/dev/user/action-items/batch",
headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
json={"action_items": action_items}
)
print(f"Imported {response.json()['created_count']} action items")
```
// Your tasks from another app
const externalTasks = [
{ title: "Complete project proposal", due: "2025-12-15T10:00:00Z", done: false },
{ title: "Send weekly report", due: "2025-12-12T17:00:00Z", done: false },
{ title: "Review team feedback", due: null, done: true }
];
// Convert to Omi action items format
const actionItems = externalTasks.map(task => ({
description: task.title,
due_at: task.due,
completed: task.done
}));
// Create batch
const response = await fetch(
"https://api.omi.me/v1/dev/user/action-items/batch",
{
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({ action_items: actionItems })
}
);
const result = await response.json();
console.log(`Imported ${result.created_count} action items`);
```
API_KEY = "omi_dev_your_api_key"
# Get pending tasks
response = requests.get(
"https://api.omi.me/v1/dev/user/action-items",
headers={"Authorization": f"Bearer {API_KEY}"},
params={"completed": False, "limit": 100}
)
pending_tasks = response.json()
print(f"You have {len(pending_tasks)} pending tasks")
for task in pending_tasks:
due = task.get("due_at", "No due date")
print(f"- {task['description']} (Due: {due})")
```
const response = await fetch(
"https://api.omi.me/v1/dev/user/action-items?completed=false&limit=100",
{ headers: { Authorization: `Bearer ${API_KEY}` } }
);
const pendingTasks = await response.json();
console.log(`You have ${pendingTasks.length} pending tasks`);
pendingTasks.forEach(task => {
const due = task.due_at || "No due date";
console.log(`- ${task.description} (Due: ${due})`);
});
```