Nimply Developers
Examples

Upload a YouTube video

Publish a video with full YouTube options — category, visibility, license, and more.

Scopes: media:write, posts:write, posts:publish.

POST /v1/posts/youtube is the platform-specific create endpoint for YouTube: it accepts every video option the Nimply app exposes and rejects bad requests up front (missing title, non-video media, or a channel that isn't a YouTube channel).

1. Import the video

curl -X POST https://api.nimply.io/v1/media \
  -H "Authorization: Bearer $NIMPLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/videos/launch-recap.mp4",
    "name": "launch-recap.mp4"
  }'

Confirm the returned type is VIDEO — the YouTube endpoint requires a video asset and returns 400 otherwise.

2. Create the video post

curl -X POST https://api.nimply.io/v1/posts/youtube \
  -H "Authorization: Bearer $NIMPLY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: yt-launch-recap-001" \
  -d '{
    "channelId": "123e4567-e89b-12d3-a456-426614174000",
    "title": "How we built our launch in 7 days",
    "description": "A behind-the-scenes look at the sprint.",
    "mediaId": "c4d5e6f7-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
    "videoType": "video",
    "category": "28",
    "visibility": "unlisted",
    "notifySubscribers": false,
    "schedule": "2026-08-01T15:00:00.000Z"
  }'
{
  "id": "7a245d46-…",
  "channelId": "123e4567-e89b-12d3-a456-426614174000",
  "title": "How we built our launch in 7 days",
  "contentType": "VIDEO",
  "status": "SCHEDULED",
  "scheduledAt": "2026-08-01T15:00:00.000Z",
  "mediaIds": ["c4d5e6f7-1a2b-4c3d-9e8f-0a1b2c3d4e5f"]
}

Unlike the generic POST /v1/posts (which returns an array — one post per channel), the platform endpoints target one channel and return a single post object.

Options reference

FieldValuesDefault
videoTypevideo, shortvideo
categoryYouTube category id (1, 2, 10, 15, 17, 19, 20, 2228)22 (People & Blogs)
visibilitypublic, unlisted, privatepublic
licenseyoutube (standard), creativeCommonyoutube
notifySubscribersbooleantrue
allowEmbeddingbooleantrue
madeForKidsboolean (COPPA self-declaration)false

Gotchas

  • title is required — YouTube refuses untitled uploads, so the API refuses them too (max 100 characters).
  • Use "videoType": "short" to publish a Short; the same options apply.
  • madeForKids is a legal declaration (COPPA) — set it deliberately, not by default.
  • Video publishing takes longer than images — watch for post.published / post.failed webhooks rather than assuming success.

On this page