Skip to main content
PATCH
/
items
/
{itemId}
/
resources
/
{resourceId}
/
update
Update resource
curl --request PATCH \
  --url https://api.thehaystack.ai/v2/haystack/items/{itemId}/resources/{resourceId}/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "subTitle": "<string>",
  "description": "<string>",
  "resourceTypeId": 123,
  "linkTarget": "<string>",
  "externalPlatform": "youtube",
  "externalPlatformId": "<string>"
}
'
{
  "resource": {
    "id": 123,
    "itemId": 123,
    "title": "<string>",
    "subTitle": "<string>",
    "description": "<string>",
    "resourceTypeId": 123,
    "displayOrder": 123,
    "contentType": "file",
    "fileMimeType": "<string>",
    "fileSizeBytes": 123,
    "externalPlatform": "youtube",
    "externalPlatformId": "<string>",
    "thumbnailImgUrl": "<string>",
    "url": "<string>",
    "resourceType": {
      "id": 123,
      "name": "<string>"
    },
    "linkTarget": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://developer.thehaystack.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Enter your API token from the Haystack dashboard

Path Parameters

itemId
integer
required
resourceId
integer
required

Body

application/json
title
string
subTitle
string | null
description
string | null
resourceTypeId
integer | null

Only used on link resources

externalPlatform
enum<string> | null

Only used on video resources

Available options:
youtube,
vimeo
externalPlatformId
string | null

Only used on video resources

Response

Updated resource

resource
object