Save content entity
curl --request POST \
--url https://memex.garden/api/save-content-entity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"url": "https://example.com/article"
},
"tags": [
"reading",
"research"
]
}
'import requests
url = "https://memex.garden/api/save-content-entity"
payload = {
"data": { "url": "https://example.com/article" },
"tags": ["reading", "research"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {url: 'https://example.com/article'}, tags: ['reading', 'research']})
};
fetch('https://memex.garden/api/save-content-entity', 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://memex.garden/api/save-content-entity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'url' => 'https://example.com/article'
],
'tags' => [
'reading',
'research'
]
]),
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://memex.garden/api/save-content-entity"
payload := strings.NewReader("{\n \"data\": {\n \"url\": \"https://example.com/article\"\n },\n \"tags\": [\n \"reading\",\n \"research\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://memex.garden/api/save-content-entity")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"url\": \"https://example.com/article\"\n },\n \"tags\": [\n \"reading\",\n \"research\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://memex.garden/api/save-content-entity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"url\": \"https://example.com/article\"\n },\n \"tags\": [\n \"reading\",\n \"research\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"entity": {
"id": "<string>",
"type": "web",
"created_at": 123,
"updated_at": 123,
"url": "<string>",
"title": "<string>",
"normalized_url": "<string>",
"user_id": "<string>",
"external_id": "<string>",
"tag_ids": [
"<string>"
],
"reference_content_ids": [
"<string>"
],
"canonical_url": "<string>",
"favicon_url": "<string>",
"description": "<string>",
"keywords": "<string>",
"author": "<string>",
"date": "<string>",
"html": "<string>",
"full_text": "<string>"
},
"entities": [
{
"id": "<string>",
"type": "web",
"created_at": 123,
"updated_at": 123,
"url": "<string>",
"title": "<string>",
"normalized_url": "<string>",
"user_id": "<string>",
"external_id": "<string>",
"tag_ids": [
"<string>"
],
"reference_content_ids": [
"<string>"
],
"canonical_url": "<string>",
"favicon_url": "<string>",
"description": "<string>",
"keywords": "<string>",
"author": "<string>",
"date": "<string>",
"html": "<string>",
"full_text": "<string>"
}
],
"isNew": true,
"tags": [
{
"id": "<string>",
"name": "<string>",
"created_at": 123,
"updated_at": 123
}
]
}{
"error": "Unauthorized"
}{
"error": "Internal server error",
"message": "<string>"
}API reference
Save content entity
Save content entities. URL saves can pass data.url with optional metadata and tags.
POST
/
save-content-entity
Save content entity
curl --request POST \
--url https://memex.garden/api/save-content-entity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"url": "https://example.com/article"
},
"tags": [
"reading",
"research"
]
}
'import requests
url = "https://memex.garden/api/save-content-entity"
payload = {
"data": { "url": "https://example.com/article" },
"tags": ["reading", "research"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {url: 'https://example.com/article'}, tags: ['reading', 'research']})
};
fetch('https://memex.garden/api/save-content-entity', 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://memex.garden/api/save-content-entity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'url' => 'https://example.com/article'
],
'tags' => [
'reading',
'research'
]
]),
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://memex.garden/api/save-content-entity"
payload := strings.NewReader("{\n \"data\": {\n \"url\": \"https://example.com/article\"\n },\n \"tags\": [\n \"reading\",\n \"research\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://memex.garden/api/save-content-entity")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"url\": \"https://example.com/article\"\n },\n \"tags\": [\n \"reading\",\n \"research\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://memex.garden/api/save-content-entity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"url\": \"https://example.com/article\"\n },\n \"tags\": [\n \"reading\",\n \"research\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"entity": {
"id": "<string>",
"type": "web",
"created_at": 123,
"updated_at": 123,
"url": "<string>",
"title": "<string>",
"normalized_url": "<string>",
"user_id": "<string>",
"external_id": "<string>",
"tag_ids": [
"<string>"
],
"reference_content_ids": [
"<string>"
],
"canonical_url": "<string>",
"favicon_url": "<string>",
"description": "<string>",
"keywords": "<string>",
"author": "<string>",
"date": "<string>",
"html": "<string>",
"full_text": "<string>"
},
"entities": [
{
"id": "<string>",
"type": "web",
"created_at": 123,
"updated_at": 123,
"url": "<string>",
"title": "<string>",
"normalized_url": "<string>",
"user_id": "<string>",
"external_id": "<string>",
"tag_ids": [
"<string>"
],
"reference_content_ids": [
"<string>"
],
"canonical_url": "<string>",
"favicon_url": "<string>",
"description": "<string>",
"keywords": "<string>",
"author": "<string>",
"date": "<string>",
"html": "<string>",
"full_text": "<string>"
}
],
"isNew": true,
"tags": [
{
"id": "<string>",
"name": "<string>",
"created_at": 123,
"updated_at": 123
}
]
}{
"error": "Unauthorized"
}{
"error": "Internal server error",
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
Tag names. Missing tags are created and attached.
If true, the response includes HTML on web entities.
Use receipt to return after the processing request is queued instead of waiting for entity data.
Available options:
content, receipt Response
Save response
- Option 1
- Option 2
Union over Memex content entities. API-facing documented variants are web, twitter (tweets), youtube, image, and reddit.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
Union over Memex content entities. API-facing documented variants are web, twitter (tweets), youtube, image, and reddit.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
Show child attributes
Show child attributes

