---
id: attach-asset
title: "Attach asset"
description: "Attach a new asset to a bookmark"
sidebar_label: "Attach asset"
hide_title: true
hide_table_of_contents: true
api: eJztVU2P2zYQ/SvCnBqAXe0GKRro5hQtsgnQLrIOejB8GIsji2uKVEjKHxX434Oh5JUdO8EeesxFkEaP5Lw3b4Y9SPKlU21Q1kABsxCwrDPMDO0y9J5CFmyG2craTYNuAwICrj0UC3g3hjwsBXgqO6fCAYpFDytCR27WhRqKxTIuBbTosKFAzieAL2tqEIoewqElKMAHp8waBNAem1ZzSJGSen9YN7unt7/b/X+/1fsQbPmWM1AhQY4Z3EuIAhx96ZQjCUVwHQkw2DBoNYEEKObYYqiBs+IV5MM7Kw+cy7kS85pOBEiygIDSmkAmMBzbVqsSGZ4/eV5zhZhdPVEZQEDrbEsuKPL8V8lL8lFAOm+eolekMV3DumtlNu9Do/8YUxHgS0dkfG3TQbKCcafH0/gKjSF33+CaQEDVaf2Aa5q5slZbjmyVJMu4Ua8Z75ASp9LhTpOcsJ0n97nVFiWxqrjFgI7jZmPszsAyntVjwXxP2S1jHBC+tcYPkry+vftOEZL2JIdq/KzBi2sgoFKa/k5tcEnFdFrjivuI2+VlBXtz++ayRscuzIwNWWU7I/+/GpVWXkk+CmjIe1bx8t83RNIOEz4RSetDbSUPA+vTsTwTCsiPyvu8nwZHzJMSnstMbnucYp3TUECPUjryPubYqnx7x2VEp1jaRGH8PehWYacDFFCH0Poiz4M73GzQ4YaovcG2BXGtAYYdMltloabs44jPhlwgxngygB9Z2eHk0zH8LBOfnOzKMB6PCcSeSy9/WdcgZ/jh33nSkiv2aZqTfx7n89A/k51O2uaiOyIP3sryIhZvYHZ3c3tzezLMn2nNHu6vyjB7uM8q6841YM2iSFVsMFlrHPvHi2zsoLPt+smeL7rwBlaB9iFvNSrDJ6bi96NvFs8dyx4pzq6c0TpLATVbrVhA36/Q02enY+Twl44c35vLyTjJXlJ5fpdQVKg9/YDDL59Gw7/KvpfuGERzSP7UHX+BgA0dzu/IyHOjJpTkUhYDYKzkr6nA0wYXrR3FccWsLKkNP8QuT9rw4Z/HeRp8w1XcpL4HhzsQ6ZmStYl78naK9aDRrLs0B2DYky2L547/xuGJ1VU5+n5AzO2GTIzP6gT+ZmFi/ApH4yvL
sidebar_class_name: "post api-method"
info_path: api/karakeep-api
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Attach asset"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/bookmarks/{bookmarkId}/assets"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Attach a new asset to a bookmark

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"schema":{"type":"string","example":"ieidlxygmwj87oxz5hxttoc8","title":"BookmarkId"},"required":true,"name":"bookmarkId","in":"path"}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"description":"The asset to attach","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"assetType":{"type":"string","enum":["linkHtmlContent","screenshot","pdf","assetScreenshot","bannerImage","fullPageArchive","video","bookmarkAsset","precrawledArchive","userUploaded","avatar","unknown"]}},"required":["id","assetType"]}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"201":{"description":"The attached asset","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"assetType":{"type":"string","enum":["linkHtmlContent","screenshot","pdf","assetScreenshot","bannerImage","fullPageArchive","video","bookmarkAsset","precrawledArchive","userUploaded","avatar","unknown"]},"fileName":{"type":"string","nullable":true}},"required":["id","assetType"]}}}},"404":{"description":"Bookmark not found","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}}}}}
>
  
</StatusCodes>


      