> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fourdos.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Snapshot the connected YouTube channel's figures now



## OpenAPI

````yaml https://api.develop.fourdos.dev/openapi/partner.json post /v1/external-data/youtube/sync
openapi: 3.1.0
info:
  title: 4D OS Partner API
  version: 0.1.0
  description: >-
    REST API for 4D OS partners. Authenticate with your organization API key:
    `Authorization: Bearer <key>`.


    Requests and responses are JSON with `snake_case` field names. Errors share
    one envelope: `{ "error": { "code", "status", "message", "details"? } }`.


    Mutating endpoints that declare it accept an `Idempotency-Key` header so
    retries are safe.


    Bulk-migrating members? See the [Migrating to 4D
    guide](https://docs.fourdos.dev/walkthroughs/migrate-existing-members) for
    the canonical import schema, a worked example, and the `/v1/imports`
    sequence.
servers:
  - url: https://api.develop.fourdos.dev
security:
  - partnerApiKey: []
tags:
  - name: Users
    description: Create, read, and manage users and their org membership
  - name: Imports
    description: Bulk member import jobs (staging → validate → commit)
  - name: API keys
    description: Issue, list, and revoke server-side organization API keys
  - name: Modules
    description: >-
      Publish private modules, install visible modules, and manage their
      credentials
  - name: Ingest
    description: Receive signed native events from an installed module
  - name: Engagement
    description: Browser event tracking (publishable keys) and tracking-key management
  - name: Revenue
    description: Report sales and refunds for the club's revenue dashboards
  - name: Ad delivery
    description: Fill a club site's ad slots, for anonymous or signed-in fans
  - name: Ad entries
    description: Fans entering a sponsor's draw, reported by the club's backend
paths:
  /v1/external-data/youtube/sync:
    post:
      tags:
        - External integrations
      summary: Snapshot the connected YouTube channel's figures now
      parameters:
        - name: org
          in: query
          required: true
          schema:
            type: string
            format: uuid
        - name: Origin
          in: header
          required: true
          schema:
            type: string
            format: uri
          description: Configured console origin.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalDataYoutubeSync'
        '401':
          description: Sign in required
        '403':
          description: Administrator access and a trusted origin required
        '404':
          description: Tenant resource not found
        '422':
          description: Invalid selection
        '503':
          description: Provider configuration unavailable
      security:
        - adminSession: []
components:
  schemas:
    ExternalDataYoutubeSync:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        channelTitle:
          type: string
        videos:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - channelTitle
        - videos
      additionalProperties: false
  securitySchemes:
    partnerApiKey:
      type: http
      scheme: bearer
      description: >-
        Organization API key (`org_...`) sent as `Authorization: Bearer <key>`.
        Keys are scoped to one organization; every request operates within that
        tenant.
    adminSession:
      type: http
      scheme: bearer
      description: >-
        Partner admin session token sent as `Authorization: Bearer <token>`.
        Obtained by signing in (console or the email OTP endpoints) and
        completing the second factor; see the Authentication page.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.