Skip to main content
POST
/
items
/
create
Create item
curl --request POST \
  --url https://api.thehaystack.ai/v2/haystack/items/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "date": "2023-12-25",
  "collectionId": 123,
  "speakers": [
    {
      "id": 123
    }
  ],
  "subTitle": "<string>",
  "description": "<string>",
  "shortDescription": "<string>",
  "seriesId": 123,
  "orderInSeries": 123,
  "autoPublish": true,
  "autoAcceptMediaChapters": true,
  "autoAcceptScriptures": true
}
'
{
  "item": {
    "id": 123,
    "title": "The Power of Prayer",
    "subTitle": "<string>",
    "description": "<string>",
    "shortDescription": "<string>",
    "date": "2025-01-15",
    "collectionId": 123,
    "seriesId": 123,
    "orderInSeries": 123,
    "urlSlug": "<string>",
    "durationSecs": 123,
    "status": "draft",
    "wizardStep": "basicDetails",
    "publishedDate": "2023-11-07T05:31:56Z",
    "autoPublish": true,
    "squareImgUrl": "<string>",
    "wideImgUrl": "<string>",
    "ultraWideImgUrl": "<string>",
    "verticalImgUrl": "<string>",
    "entryDate": "2023-11-07T05:31:56Z",
    "collection": {
      "id": 1,
      "name": "Sunday Sermons",
      "itemDescriptor": "sermon"
    },
    "series": {
      "id": 123,
      "title": "The Gospel of John",
      "subTitle": "<string>",
      "collectionId": 123,
      "description": "<string>",
      "shortDescription": "<string>",
      "sortOrder": 123,
      "itemSortDirection": "DESC",
      "showItemOrderInSeries": true,
      "urlSlug": "<string>",
      "colorHex": "#FF5733",
      "squareImgUrl": "<string>",
      "wideImgUrl": "<string>",
      "ultraWideImgUrl": "<string>",
      "published": true
    },
    "speakers": [
      {
        "id": 123,
        "name": "Pastor John Smith",
        "bio": "<string>",
        "imageUrl": "<string>"
      }
    ],
    "scriptures": [
      {
        "id": 123,
        "itemId": 123,
        "book": "<string>",
        "bookName": "Matthew",
        "chapter": 123,
        "verseStart": 123,
        "verseEnd": 123,
        "keyVerse": true,
        "suggested": true,
        "accepted": true,
        "displayOrder": 123,
        "citation": "Matthew 5:1-12",
        "hidden": true
      }
    ],
    "mediaAssets": [
      {
        "id": 123,
        "itemId": 123,
        "contentType": "video",
        "status": "created",
        "duration": 123,
        "muxAssetId": "<string>",
        "muxPlaybackId": "<string>",
        "variantTypeId": 123,
        "variantType": {
          "id": 123,
          "name": "Sermon Video",
          "contentType": "video",
          "indexable": true,
          "displayOrder": 123,
          "collectionId": 123
        }
      }
    ],
    "resources": [
      {
        "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>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Enter your API token from the Haystack dashboard

Body

application/json
title
string
required
date
string<date>
required
collectionId
integer
required
speakers
object[]
required

At least one speaker is required

Minimum array length: 1
subTitle
string
description
string
shortDescription
string
seriesId
integer | null
orderInSeries
integer | null
autoPublish
boolean
autoAcceptMediaChapters
boolean
autoAcceptScriptures
boolean

Response

200 - application/json

Item created

item
object