Rename a note or replace its text
PATCH
/api/v1/saga/notes/{id}
const url = 'https://api.yggy.tech/api/v1/saga/notes/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"example","content":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.yggy.tech/api/v1/saga/notes/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "content": "example" }'A new title is free. A new text overwrites the stored text and has yggy read the note again, which needs extraction credits and is refused while the note is still being processed.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body
Section titled “Request Body ” Media type application/json
object
title
New title. Free; nothing is read again.
string
content
New text. yggy reads the note again, which uses extraction credits like any other run.
string
Example generated
{ "title": "example", "content": "example"}Responses
Section titled “ Responses ”Edited
Media type application/json
object
documentId
required
string
title
required
string
reprocessing
required
boolean
invocationId
string
Example generated
{ "documentId": "example", "title": "example", "reprocessing": true, "invocationId": "example"}Invalid request, or out of credits (error code USAGE_LIMIT_EXCEEDED)
Media type application/json
Not a yggy notes workspace
Media type application/json
object
success
required
boolean
error
required
object
code
required
string
message
required
string
details
Example
{ "success": false}Note not found
Media type application/json
object
success
required
boolean
error
required
object
code
required
string
message
required
string
details
Example
{ "success": false}Note is still being processed
Media type application/json
object
success
required
boolean
error
required
string
message
required
string
Example
{ "success": false}