---
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: eJztVcFu2zgQ/RVhTi3AjZJFF1vo5hYtkN3DBo2LHgwdxuLYYiyRLEnF9gr892IoOZIbN+ihx14EafQ4nPf4ZtiDJF85ZYMyGgpYhIBVnWGmaZ+h9xSyYDLM1sbsWnQ7EBBw66FYwbsx5KEU4KnqnApHKFY9rAkduUUXaihWZSwFWHTYUiDnE8BXNbUIRQ/haAkK8MEpvQUBdMDWNhxSpGRzOG7b/cPbv83h/7/qQwimessVqJAgpwpuJUQBjr52ypGEIriOBGhsGbSeQAIUc7QYauCqeAX58M7II9dyrsSyppkASRYQUBkdSAeGo7WNqpDh+YPnNReImfUDVQEEWGcsuaDI818ln5OPAtJ+yxS9II3uWtbdV45I+9pw2rTifh5Zo9bkblvcEgjYdE1zh1tauKpWjxx5VJIM40ZdFpwhFUiVw31DcsJ2eqfNXkMZz/Rdcf3zassYB4S3RvuB4p/XNz8QNWlJclD3t6Yva/rm+s1zGU/Gz7QJ2cZ0Wv46GSsjL0gVBbTkPQvw/N93RFKGCZ+IpPWhNpL7z/i0LbdhAflJNJ/3U6/GPCnhgUeLezwNjs41UECPUjryPuZoVf54wyeATuG6GSiMvwfdNtg1AQqoQ7C+yPPgjlc7dLgjsldoLYhLHh0yZGaThZqyf0d8NtQCMcbZzLtnZYed55PvSSbemXkkGE+kBGK7pJePxrXIFf7zZZm05BP7NI2mD6eROFh8Mu/M2XMDRx5zG8N41m0gdXN1fXU9G51PjBZ3txcVWNzdZhvjzumzXFGkA2wxuWocsqdrY/T9Wbp+cuZPXS8DoUCHkNsGleYd07n3o2VWT33G9ijOBvzomlJAzS4rVtD3a/T02TUxcvhrR45vqXLyTHKWVJ7fJRQbbDy9wOHVp9Hrr7MflTsGUR+TNZuOv0DAjo7nN1Iso4CaUJJLVQyA98Nef6SznRI86+ooTisWVUU2vIgtZx1499/9Mo2r4eJrU8uDwz2I9EzFmsQ92TrFemhQb7s0AmDIyW7Fc7N/Z+7E6qIcfT8glmZHOsYndQJ/szAxfgPFevk9
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":["screenshot","assetScreenshot","bannerImage","fullPageArchive","video","bookmarkAsset","precrawledArchive","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":["screenshot","assetScreenshot","bannerImage","fullPageArchive","video","bookmarkAsset","precrawledArchive","unknown"]}},"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>


      