Coactive context-studio > adSegments API

The context-studio > adSegments API from Coactive — 1 operation(s) for context-studio > adsegments.

Operations 3

POST /api/v1/datasets/{dataset_id}/videos/external-identifier/{asset_identifier_value}/ad-segments Create ad segments for a video #
DELETE /api/v1/datasets/{dataset_id}/videos/external-identifier/{asset_identifier_value}/ad-segments Delete ad segment metadata for a video #
GET /api/v1/datasets/{dataset_id}/videos/external-identifier/{asset_identifier_value}/ad-segments Retrieve ad segments for a video #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/coactive-context-studio-adsegments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

coactive-context-studio-adsegments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Reference agentic-search > agenticSearch context-studio > adSegments API
  version: 1.0.0
servers:
- url: https://api.coactive.ai
  description: Production
- url: https://app.coactive.ai
  description: Production
tags:
- name: context-studio > adSegments
paths:
  /api/v1/datasets/{dataset_id}/videos/external-identifier/{asset_identifier_value}/ad-segments:
    post:
      operationId: create-ad-segments
      summary: Create ad segments for a video
      description: Creates ad segments for the video identified by the provided asset identifier value.
      tags:
      - context-studio > adSegments
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: asset_identifier_value
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/context-studio_VideoAdSegmentsCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/context-studio_HTTPValidationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/context-studio_VideoAdSegmentsCreateRequest'
    delete:
      operationId: delete-ad-segments
      summary: Delete ad segment metadata for a video
      description: Soft-deletes the ad-segment composite for the video identified by the provided asset identifier value. If no ad segments exist for the video, the request still succeeds with 204 No Content.
      tags:
      - context-studio > adSegments
      parameters:
      - name: dataset_id
        in: path
        description: The Coactive-internal unique identifier for the dataset the video belongs to.
        required: true
        schema:
          type: string
          format: uuid
      - name: asset_identifier_value
        in: path
        description: The customer's own internal asset identifier for the video.
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '401':
          description: Missing or invalid authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/context-studio_HTTPValidationError'
        '403':
          description: Caller is not authorized to delete assets in this dataset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/context-studio_HTTPValidationError'
        '404':
          description: No video found matching the provided asset_identifier_value, or the dataset does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/context-studio_HTTPValidationError'
        '422':
          description: Invalid path parameter, missing gateway identity headers, or multiple videos match the provided asset_identifier_value.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/context-studio_HTTPValidationError'
    get:
      operationId: get-ad-segments
      summary: Retrieve ad segments for a video
      description: Returns all ad segments stored for the video identified by the provided asset identifier value.
      tags:
      - context-studio > adSegments
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: asset_identifier_value
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/context-studio_VideoAdSegmentsGetResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/context-studio_HTTPValidationError'
components:
  schemas:
    context-studio_VideoAdSegmentsCreateRequest:
      type: object
      properties:
        ad_segments:
          type: array
          items:
            $ref: '#/components/schemas/context-studio_VideoAdSegmentCreateRequest'
      required:
      - ad_segments
      description: Request model for creating ad segments for a video.
      title: VideoAdSegmentsCreateRequest
    context-studio_VideoAdSegmentMetadataRequest:
      type: object
      properties:
        segment_type:
          type: string
        segment_number:
          type: integer
        incode:
          type: string
        outcode:
          type: string
      required:
      - segment_type
      - segment_number
      - incode
      - outcode
      description: Request model for ad segment metadata.
      title: VideoAdSegmentMetadataRequest
    context-studio_HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/context-studio_ValidationError'
      title: HTTPValidationError
    context-studio_VideoAdSegmentsGetResponse:
      type: object
      properties:
        ad_segments:
          type: array
          items:
            $ref: '#/components/schemas/context-studio_VideoAdSegmentResponse'
      required:
      - ad_segments
      description: Response wrapper for the GET ad-segments endpoint.
      title: VideoAdSegmentsGetResponse
    context-studio_ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/context-studio_ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
      required:
      - loc
      - msg
      - type
      title: ValidationError
    context-studio_VideoAdSegmentCreateRequest:
      type: object
      properties:
        segment_start_time_ms:
          type: number
          format: double
        segment_end_time_ms:
          type: number
          format: double
        segment_start_frame_number:
          type: integer
        segment_end_frame_number:
          type: integer
        metadata:
          oneOf:
          - $ref: '#/components/schemas/context-studio_VideoAdSegmentMetadataRequest'
          - type: 'null'
      required:
      - segment_start_time_ms
      - segment_end_time_ms
      - segment_start_frame_number
      - segment_end_frame_number
      description: Request model for creating an ad segment.
      title: VideoAdSegmentCreateRequest
    context-studio_ValidationErrorLocItems:
      oneOf:
      - type: string
      - type: integer
      title: ValidationErrorLocItems
    context-studio_VideoAdSegmentsCreateResponse:
      type: object
      properties:
        asset_identifier_value:
          type: string
        ad_segments_created:
          type: integer
        segments:
          type: array
          items:
            $ref: '#/components/schemas/context-studio_AdSegmentInfo'
        message:
          type: string
      required:
      - asset_identifier_value
      - ad_segments_created
      - segments
      - message
      description: Response returned after ad segments are created.
      title: VideoAdSegmentsCreateResponse
    context-studio_AdSegmentInfo:
      type: object
      properties:
        segment_number:
          type: integer
        id:
          type: string
          format: uuid
      required:
      - segment_number
      - id
      description: A single Break Pattern segment with its assigned ID.
      title: AdSegmentInfo
    context-studio_VideoAdSegmentResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        segment_start_time_ms:
          type: number
          format: double
        segment_end_time_ms:
          type: number
          format: double
        segment_start_frame_number:
          type: integer
        segment_end_frame_number:
          type: integer
        metadata:
          oneOf:
          - $ref: '#/components/schemas/context-studio_VideoAdSegmentMetadataResponse'
          - type: 'null'
      required:
      - id
      - segment_start_time_ms
      - segment_end_time_ms
      - segment_start_frame_number
      - segment_end_frame_number
      description: A single ad segment returned from the DB.
      title: VideoAdSegmentResponse
    context-studio_VideoAdSegmentMetadataResponse:
      type: object
      properties:
        segment_type:
          type: string
        segment_number:
          type: integer
        incode:
          type: string
        outcode:
          type: string
      required:
      - segment_type
      - segment_number
      - incode
      - outcode
      description: Response model for ad segment metadata stored in composite slice JSONB.
      title: VideoAdSegmentMetadataResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer