Skip to main content
POST
/
resources
/
{uuid}
/
blocks
Add a block to a resource
curl --request POST \
  --url https://api.journeybee.io/v1/resources/{uuid}/blocks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "series": 123,
  "title": "<string>",
  "content": {},
  "asset_uuid": "<string>",
  "style": {
    "background_color": "<string>",
    "text_color": "<string>",
    "border": {
      "width": 123,
      "color": "<string>",
      "radius": 123
    },
    "padding": {
      "top": 123,
      "bottom": 123,
      "left": 123,
      "right": 123
    },
    "margin": {
      "top": 123,
      "bottom": 123,
      "left": 123,
      "right": 123
    }
  },
  "markdown": "<string>"
}
'
{
  "uuid": "<string>",
  "series": 123,
  "title": "<string>",
  "content": "<unknown>",
  "style": {
    "background_color": "<string>",
    "text_color": "<string>",
    "border": {
      "width": 123,
      "color": "<string>",
      "radius": 123
    },
    "padding": {
      "top": 123,
      "bottom": 123,
      "left": 123,
      "right": 123
    },
    "margin": {
      "top": 123,
      "bottom": 123,
      "left": 123,
      "right": 123
    }
  },
  "asset_uuid": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication. Use "Bearer <api_key>" or "Api-Key <api_key>".

Path Parameters

uuid
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Body

application/json

Create a content block. Resources are composed of ordered blocks — each block is a distinct content unit (text paragraph, image, video, quiz, etc.).

Create a content block. Resources are composed of ordered blocks — each block is a distinct content unit (text paragraph, image, video, quiz, etc.).

type
enum<string>
required

Block type. Determines how content is interpreted: text (TipTap JSON), image (use asset_uuid), video (videoContent), document (use asset_uuid), button (TipTap JSON with link), embed (embedContent), powerpoint (use asset_uuid), files (filesContent), quiz (quizContent).

Available options:
text,
image,
video,
document,
button,
embed,
powerpoint,
files,
quiz
series
number
required

Display order (1-indexed). Blocks are rendered in ascending series order.

title
string | null
content
object

Block content. Shape depends on type: text/image/document/button → TipTap JSON; video → {source, url}; embed → {url, html}; files → {files: [...], layout}; quiz → {questions: [...], passingScore, ...}. See block type documentation for details.

asset_uuid
string

Asset UUID for image, video (uploaded), document, or powerpoint blocks.

style
object

Visual styling for the block.

markdown
string

Markdown content for text blocks. When provided, converts to TipTap JSON and overrides the content field.

Maximum string length: 100000

Response

201 - application/json

Default Response

uuid
string
required
type
enum<string>
required
Available options:
text,
image,
video,
document,
button,
embed,
powerpoint,
files,
quiz
series
number
required

Display order (1-indexed)

title
string | null
required
content
any
required

Block content — shape varies by type. See documentation.

style
object
required

Visual styling for the block.

asset_uuid
string | null
required

Associated asset (image, video file, document, etc.)

created_at
string
required
updated_at
string
required