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
| Field | Values | Default |
|---|---|---|
videoType | video, short | video |
category | YouTube category id (1, 2, 10, 15, 17, 19, 20, 22–28) | 22 (People & Blogs) |
visibility | public, unlisted, private | public |
license | youtube (standard), creativeCommon | youtube |
notifySubscribers | boolean | true |
allowEmbedding | boolean | true |
madeForKids | boolean (COPPA self-declaration) | false |
Gotchas
titleis 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. madeForKidsis a legal declaration (COPPA) — set it deliberately, not by default.- Video publishing takes longer than images — watch for
post.published/post.failedwebhooks rather than assuming success.