Skip to content
YouTube API

YouTube API for comments and posts

Otobiz gives you one REST API for YouTube: 40 endpoints for comments and posts, called with one Bearer key.

Start for freeDeveloper docs
  • 40 endpoints
  • One Bearer key
  • Checked before it posts
Quickstart

Three steps to your first call

Make an API key

In Otobiz, open API keys and make one. It acts with the role you pick, and is shown once.

Check the key
# The key from Otobiz, under API keys
export OTOBIZ_API_KEY="otbz_..."

curl https://app.otobiz.ai/api/v1/account \
  -H "Authorization: Bearer $OTOBIZ_API_KEY"

Connect YouTube by link

Ask for a connect link and open it. Nothing is connected until you finish the steps there.

What Otobiz does on YouTube
Get the link
# The answer carries "url": open it to connect YouTube
curl https://app.otobiz.ai/api/v1/connect-sessions \
  -H "Authorization: Bearer $OTOBIZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "kind": "youtube" }'

Make one call

Every call is HTTPS and JSON, with the key as a Bearer token.

Developer docs
Reply to a comment
# Reply under a YouTube comment
curl https://app.otobiz.ai/api/v1/comments/$COMMENT_ID/reply \
  -H "Authorization: Bearer $OTOBIZ_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: comment-88" \
  -d '{ "content": { "kind": "text", "text": "Yes, it ships this week." } }'
Endpoints

YouTube endpoints by job

40 endpoints work on YouTube, read from the API's own spec. Every path starts with https://app.otobiz.ai/api/v1.

Posts

29 endpoints
YouTube: Posts
MethodPathWhat it does
GET/posts/optionsGet an account's publishing facts or choices
POST/posts/validateCheck a post against each account before posting
POST/postsSave a post draft
POST/posts/{postId}/publishPublish a post now or at a time, or move a scheduled post
GET/postsList posts, newest first

Comments

11 endpoints
YouTube: Comments
MethodPathWhat it does
GET/inbox/commentsList comments on the brand's posts
GET/inbox/comments/{commentId}Get a comment and what can be done to it
POST/inbox/comments/{commentId}/replyReply to a comment. Publicly, or privately as a direct message
PATCH/inbox/comments/{commentId}Update a comment

On every channel

The same four jobs sit beside every channel's own endpoints.

  • Connect the channel

    • POST/connect/sessions
    • GET/connect/sessions/{sessionId}
    • GET/connections
    • POST/connections/{connectionId}/disconnect
  • Contacts

    • GET/contacts
    • POST/contacts
    • PATCH/contacts/{contactId}
    • PATCH/contacts/{contactId}/consent
  • Files to attach

    • POST/files
    • GET/files/{fileId}
  • Webhooks

    • POST/webhooks/settings
    • POST/webhooks/test
    • GET/webhooks/logs
Developer docs
Limits

What YouTube takes

YouTube's own limits, as Otobiz enforces them on every call.

Post text
Up to 5,000 characters. Every post needs a file.
Post rules
Each account's own rules come back from GET /posts/options, and POST /posts/validate checks a post before it goes.
Comment reply
Up to 10,000 characters.
Every send

What every call carries

The rules your team works under in Otobiz apply to your code too.

  • Checked before it posts

    POST /posts/validate checks a post against each account. A post that breaks a rule answers 422.

  • Drafts first

    A new post is a draft. Nothing is published until you call publish, now or at a time.

  • No double posts

    Send an Idempotency-Key header and a retry is safe. The key is remembered for 24 hours.

  • Approval where you ask

    A reply from an AI agent's key waits for a reviewer and answers 202.

  • Keys with scopes

    A key acts with the role you pick, and a read-only key can look but never post.

  • Every reply recorded

    Each reply and post is recorded in Otobiz, with who or what sent it.

Responses

What comes back

POST /inbox/comments/{commentId}/reply answers

200
Replied

The event that follows

Otobiz posts each event to your endpoint, signed. The event id is stable, so dedupe on it.

A shortened sample from the API's own examples. The docs list every field.

comment.created
{
  "id": "evt_00000000008008000000000000",
  "type": "comment.created",
  "apiVersion": "v1",
  "createdAt": "2026-10-09T09:30:00.000Z",
  "data": {
    "object": {
      "id": "cmt_01j2jxbb4pex5vsknk084sn04g",
      "channel": "youtube",
      "answered": false,
      "replyStatus": "none",
      "hidden": false,
      "isReply": false,
      "createdAt": "2026-11-18T09:30:00.000Z",
      "post": {
        "id": "pst_01j2jxbb4pex5vsknk084sn04h"
      }
    }
  }
}

Register an endpoint

Name the events you want. A test call sends a sample to check your server.

Developer docs
Subscribe
# Register where the events go
curl https://app.otobiz.ai/api/v1/webhook-endpoints \
  -H "Authorization: Bearer $OTOBIZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "My server", "url": "https://example.com/otobiz", "events": ["comment.created"] }'
AI apps

Let an AI app do it

The same operations are tools on the Otobiz MCP server, so an AI app can work YouTube with no code.

YouTube MCP server

Which comments on our latest video still need an answer? Reply to them.

call_tool list_posts

call_tool list_inbox_comments

call_tool reply_to_inbox_comment

It lists the comments with no reply, answers each one as you, and every reply is recorded in Otobiz.

See the YouTube MCP server
Pricing

No fee per call. You pay for your plan.

YouTube comes with every plan. A call pays only for what it causes, such as a message sent. The API and the MCP server come with it.

See the plans
FAQ

Common questions

Make an Otobiz API key, connect YouTube by link, then call the YouTube API's comments and posts endpoints with the key as a Bearer token.

Try it on real customer chats

Connect Instagram, WhatsApp or any other channel and start replying today.