Skip to main content
PATCH
/
v1
/
dev
/
user
/
action-items
/
{action_item_id}
Update Action Item
curl --request PATCH \
  --url https://api.omi.me/v1/dev/user/action-items/{action_item_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "completed": true,
  "description": "<string>",
  "due_at": "2023-11-07T05:31:56Z"
}
'
import requests

url = "https://api.omi.me/v1/dev/user/action-items/{action_item_id}"

payload = {
"completed": True,
"description": "<string>",
"due_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({completed: true, description: '<string>', due_at: '2023-11-07T05:31:56Z'})
};

fetch('https://api.omi.me/v1/dev/user/action-items/{action_item_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omi.me/v1/dev/user/action-items/{action_item_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'completed' => true,
'description' => '<string>',
'due_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.omi.me/v1/dev/user/action-items/{action_item_id}"

payload := strings.NewReader("{\n \"completed\": true,\n \"description\": \"<string>\",\n \"due_at\": \"2023-11-07T05:31:56Z\"\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.omi.me/v1/dev/user/action-items/{action_item_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"completed\": true,\n \"description\": \"<string>\",\n \"due_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.omi.me/v1/dev/user/action-items/{action_item_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"completed\": true,\n \"description\": \"<string>\",\n \"due_at\": \"2023-11-07T05:31:56Z\"\n}"

response = http.request(request)
puts response.read_body
{
  "completed": true,
  "description": "<string>",
  "id": "<string>",
  "completed_at": "2023-11-07T05:31:56Z",
  "conversation_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "due_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}
{
"detail": "<string>"
}
{
"detail": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <firebase_id_token>.

Path Parameters

action_item_id
string
required

Body

application/json
completed
boolean | null

New completion status

description
string | null

New description

Required string length: 1 - 500
due_at
string<date-time> | null

New due date (ISO format with timezone)

Response

Successful Response

completed
boolean
required
description
string
required
id
string
required
completed_at
string<date-time> | null
conversation_id
string | null
created_at
string<date-time> | null
due_at
string<date-time> | null
updated_at
string<date-time> | null