Save a link as a note, or attach it to a note
POST
/api/v1/saga/links
const url = 'https://api.yggy.tech/api/v1/saga/links';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"example","comment":"example","parentNoteId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.yggy.tech/api/v1/saga/links \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "comment": "example", "parentNoteId": "example" }'Yggy reads the link in the background: platform posts through their official oEmbed, other pages with one fetch.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
url
required
The link as pasted. yggy normalizes it.
string
comment
A short comment that becomes the note’s text.
string
parentNoteId
Attach the link to this note instead of making a new one.
string
Example generated
{ "url": "example", "comment": "example", "parentNoteId": "example"}Responses
Section titled “ Responses ”Saved; the link is being read
Media type application/json
object
noteId
required
string
linkId
required
string
existing
required
The link was already in a note; nothing was created.
boolean
Example generated
{ "noteId": "example", "linkId": "example", "existing": true}Not a link, or the comment is too long
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Note not found
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Too many links
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}