MadHive Creative API
The creative API from MadHive — 1 operation(s) for creative.
The creative API from MadHive — 1 operation(s) for creative.
openapi: 3.2.0
info:
title: Madhive Creative API
version: 1.0.0
description: "The Madhive API provides a comprehensive interface for digital advertising clients and services.\n\n## Authentication\nThis API uses OAuth 2.0 client credentials flow for authentication. To access protected endpoints:\n\n1. **Obtain an access token** using the `/oauth/token` endpoint with your client credentials\n2. **Include the token** in subsequent API requests using the `Authorization` header:\n ```\n Authorization: Bearer YOUR_ACCESS_TOKEN_HERE\n ```\n\n### Token Usage Example\n```bash\n# Get access token\ncurl -X POST \"https://api2.madhive.com/oauth/token\" \\\n -H \"Content-Type: application/x-www-form-urlencoded\" \\\n -d \"grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET\"\n\n# Use token in API requests\ncurl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN_HERE\" \\\n \"https://api2.madhive.com/v1/campaigns\"\n```\n\n**Note:** Access tokens have an expiration time. You should handle token refresh in your application logic.\n"
servers:
- url: https://api2.madhive.com/api
description: apigee
tags:
- name: creative
paths:
/v1/creatives:
get:
tags:
- creative
summary: Receive the list of creatives and their IDs.
description: Receive the list of creatives and their IDs.
operationId: getCreatives
parameters:
- $ref: '#/components/parameters/X-Cloud-Trace-Context'
- in: query
name: page_size
description: number of creatives per page (default 100, max 10000)
required: false
schema:
type: integer
default: 100
maximum: 10000
- in: query
name: offset
description: 'Optional page selector RELATIVE to page_token: 1 = next page (the default when a page_token is supplied), -1 = previous page, 0 = reload the current page. Has no effect without page_token.
'
required: false
schema:
type: integer
- in: query
name: page_token
description: 'Opaque cursor from the previous response''s pagination.pageToken. Pass it alone to fetch the next page; pagination is cursor-based and offset defaults to the next page when a page_token is supplied.
'
required: false
schema:
type: string
- in: query
name: advertiser
description: Filter by advertiser organization ID(s). Comma-separated for multiple advertisers.
required: false
schema:
type: string
- in: query
name: statuses
description: 'Filter by creative status. Comma-separated. Values: DRAFT, READY, PAUSED, CANCELLED, ARCHIVED.'
required: false
schema:
type: string
- in: query
name: media_types
description: 'Filter by media type. Comma-separated. Values: VIDEO, AUDIO, DISPLAY. OTT is accepted as an alias for VIDEO.'
required: false
schema:
type: string
- in: query
name: search
description: Typo-tolerant fuzzy text search across creative id, name, vast_url, isci_code, click_thru, oms_id, and ext_id. Results are ranked by match quality.
required: false
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/CreativeListResponse'
examples:
response:
value:
transaction:
id: 4af459ff8e1a36b6bb74fb88f1a02477
taskId: '14158884487309867565'
creatives:
- id: a8MWQ2v4ZceGhsku2P5amaOXCnwe
name: Creative name
'400':
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
$ref: '#/components/responses/401Unauthorized'
security:
- oauth2: []
post:
tags:
- creative
summary: Uploading a creative via VAST and CDN. Ability to add in a clickthrough.
description: Uploading a creative via VAST and CDN. Ability to add in a clickthrough.
operationId: createCreative
parameters:
- $ref: '#/components/parameters/X-Cloud-Trace-Context'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreativeRequest'
description: creative creation
required: true
responses:
'200':
description: creative created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Creative'
examples:
response:
value:
id: HPAKbbHX1IZFeeAh1K7dSogRUvgF
name: my first creative
advertiserId: fwpObxzCpvITV2GspiUc3C5YfprJ
type: CDN
iabCategory: IAB5-5
url: https://api2.madhive.com/api
status: READY
'400':
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
response:
value:
error: 'name: cannot be empty'
status: ERROR
transaction:
id: 4af459ff8e1a36b6bb74fb88f1a02477
taskId: '14158884487309867565'
'401':
$ref: '#/components/responses/401Unauthorized'
security:
- oauth2: []
components:
schemas:
Creative:
type: object
required:
- name
- advertiserId
- type
- url
- iabCategory
- updatedBy
- lastUpdated
- clickThrough
properties:
id:
type: string
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
validate: required_with=Status,omitempty,min=28,max=28
description: madhive creative id
example: HPAKbbHX1IZFeeAh1K7dSogRUvgF
name:
type: string
x-oapi-codegen-extra-tags:
validate: 'required,min=2,ne= '
x-isnullable: false
x-omitempty: false
description: creative name
example: my first creative
advertiserId:
type: string
x-oapi-codegen-extra-tags:
validate: required,min=28,max=28
x-isnullable: false
description: advertiser id
example: fwpObxzCpvITV2GspiUc3C5YfprJ
type:
type: string
x-oapi-codegen-extra-tags:
validate: required,oneof=VAST CDN DISPLAY
x-isnullable: false
x-omitempty: false
description: creative type
example: CDN
iabCategory:
type: string
x-oapi-codegen-extra-tags:
validate: 'required,min=2,ne= '
x-isnullable: false
x-omitempty: false
description: taxonomy for advertising
example: IAB5-5
url:
type: string
x-oapi-codegen-extra-tags:
validate: required_without=DisplayTag
x-isnullable: false
x-omitempty: false
description: vast or cdn location
example: https://madhive.com/creative.mp4
displayTag:
type: string
x-isnullable: false
x-omitempty: false
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
validate: required_without=Url
description: display tag
example: <div style="width:300px;height:250px;">Ad Tag</div>
adId:
type: string
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
validate: 'omitempty,min=2,ne= '
x-omitempty: true
description: ' Ad-ID replaced (ISCI Code) Industry Standard Coding Identification'
example: '123456'
updatedBy:
type: string
format: byte
description: The id of the user who last modified the creative
example: ABcDefghiJKl7812312MnoPQrstU
lastUpdated:
type: integer
format: int64
description: The number of seconds in UTC time since Unix epoch
example: 1726191001
clickThrough:
type: string
format: uri
x-oapi-codegen-extra-tags:
validate: omitempty,http_url
description: A web link that, when clicked, directs a user to a specific webpage or resource
example: https://www.clickthru.com
assetValidations:
type: array
description: list of creative specifications/attributes and validations
x-go-type-skip-optional-pointer: true
items:
$ref: '#/components/schemas/AssetValidation'
sendToAcr:
type: boolean
x-omitempty: false
x-go-type-skip-optional-pointer: true
description: indicates whether the creative should be sent to ACR (Automatic Content Recognition) like Inscape
example: false
previewUrl:
type: string
x-go-type-skip-optional-pointer: true
x-omitempty: true
description: Preview link to view the creative without logging into the native platform. Derived from asset_url, vast_url, or h5validator preview. Not stored in database.
example: https://preview.madhive.com/creative/HPAKbbHX1IZFeeAh1K7dSogRUvgF
creativeType:
type: string
x-go-type-skip-optional-pointer: true
x-omitempty: true
description: Media type derived from creative renditions. Computed at read time, not stored in database. Values - NONE, VIDEO, AUDIO, DISPLAY
example: VIDEO
enum:
- NONE
- VIDEO
- AUDIO
- DISPLAY
companionBannerIds:
type: array
maxItems: 6
x-go-type-skip-optional-pointer: true
x-omitempty: true
items:
type: string
minLength: 28
maxLength: 28
x-oapi-codegen-extra-tags:
validate: omitempty,max=6,unique,dive,min=28,max=28
description: List of display creative IDs attached as companion banners. Only applicable to audio creatives. Maximum 6 allowed. Each ID references a display creative belonging to the same advertiser as the audio creative, and no two companion banners share the same dimensions.
example:
- HPAKbbHX1IZFeeAh1K7dSogRUvgF
CreativeListResponse:
type: object
required:
- transaction
- creatives
properties:
transaction:
$ref: '#/components/schemas/Transaction'
creatives:
type: array
items:
$ref: '#/components/schemas/CreativeListItem'
x-oapi-codegen-extra-tags:
validate: omitempty,min=28,max=28
description: list of creatives
example:
- id: 0X4Ue7ELKvMI6cQaPzZ8evrO0XUx
name: test creative
pagination:
$ref: '#/components/schemas/Pagination'
CreativeListItem:
type: object
required:
- id
- name
properties:
id:
type: string
x-isnullable: false
x-omitempty: false
description: madhive creative id
example: HPAKbbHX1IZFeeAh1K7dSogRUvgF
name:
type: string
x-isnullable: false
x-omitempty: false
description: creative name
example: my first creative
companionBannerIds:
type: array
x-go-type-skip-optional-pointer: true
x-omitempty: true
items:
type: string
description: List of display creative IDs attached as companion banners. Only present for audio creatives with companion banners.
example:
- HPAKbbHX1IZFeeAh1K7dSogRUvgF
CreativeRequest:
type: object
required:
- name
- advertiserId
- iabCategory
- type
properties:
name:
type: string
x-oapi-codegen-extra-tags:
validate: 'required,min=2,ne= '
x-isnullable: false
x-omitempty: false
description: creative name
example: my first creative
advertiserId:
type: string
x-oapi-codegen-extra-tags:
validate: required,min=28,max=28
x-isnullable: false
description: advertiser id
example: fwpObxzCpvITV2GspiUc3C5YfprJ
type:
type: string
x-oapi-codegen-extra-tags:
validate: required,oneof=VAST CDN DISPLAY
x-isnullable: false
x-omitempty: false
description: creative type
example: CDN
iabCategory:
type: string
x-oapi-codegen-extra-tags:
validate: 'required,min=2,ne= '
x-isnullable: false
x-omitempty: false
description: taxonomy for advertising
example: IAB5-5
url:
type: string
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
validate: required_without=displayTag
x-isnullable: false
x-omitempty: false
description: vast or cdn location
example: https://madhive.com/creative.mp4
displayTag:
type: string
x-isnullable: false
x-omitempty: false
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
validate: required_without=url
description: display tag
example: <div style="width:300px;height:250px;">Ad Tag</div>
adId:
type: string
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
validate: 'omitempty,min=2,ne= '
x-omitempty: true
description: ' Ad-ID replaced (ISCI Code) Industry Standard Coding Identification'
example: '123456'
sendToAcr:
type: boolean
x-omitempty: false
x-go-type-skip-optional-pointer: true
description: indicates whether the creative should be sent to ACR (Automatic Content Recognition) like Inscape
example: false
clickThrough:
type: string
format: uri
x-go-type-skip-optional-pointer: true
x-omitempty: true
x-oapi-codegen-extra-tags:
validate: omitempty,http_url
description: A web link that, when clicked, directs a user to a specific webpage or resource
example: https://www.clickthru.com
companionBannerIds:
type: array
maxItems: 6
x-go-type-skip-optional-pointer: true
x-omitempty: true
items:
type: string
minLength: 28
maxLength: 28
x-oapi-codegen-extra-tags:
validate: omitempty,max=6,unique,dive,min=28,max=28
description: List of display creative IDs to attach as companion banners. Only applicable to audio creatives. Maximum 6 allowed. Each ID must reference a display creative belonging to the same advertiser as the audio creative, and no two companion banners may share the same dimensions.
example:
- HPAKbbHX1IZFeeAh1K7dSogRUvgF
ErrorResponse:
type: object
required:
- transaction
properties:
errors:
type: array
x-go-type-skip-optional-pointer: true
items:
type: string
description: many error messages
error:
type: string
x-go-type-skip-optional-pointer: true
description: error message
example: Unauthorized
status:
type: string
x-go-type-skip-optional-pointer: true
description: status of the service
example: ERROR
transaction:
$ref: '#/components/schemas/Transaction'
Transaction:
type: object
x-go-type-skip-optional-pointer: true
x-omitempty: false
required:
- id
- taskId
- created
properties:
id:
type: string
description: trace id
example: 4af459ff8e1a36b6bb74fb88f1a02477
taskId:
type: string
x-omitempty: true
description: task id
example: '14158884487309867565'
created:
type: string
description: 'order created date, format: yyyy-mm-dd hh:mm:ss'
example: '2030-11-02T15:04:00Z'
Pagination:
x-go-type-skip-optional-pointer: true
x-isnullable: false
readOnly: true
required:
- pageSize
- offset
- pageToken
- totalRecords
type: object
properties:
pageSize:
type: integer
format: int32
description: Number of items per page
example: 100
offset:
type: integer
format: int32
description: 'Page position relative to the supplied page_token (1 = next page, -1 = previous page, 0 = current page). Echoes the request''s offset.
'
example: 1
pageToken:
type: string
description: Opaque token for retrieving the next page of results
example: eyJuZXh0IjoxMDAsImxhc3QiOiJhYmMxMjMifQ==
totalRecords:
type: integer
format: int32
description: Total number of records available
example: 500
AssetValidation:
type: object
required:
- attribute
- validations
properties:
attribute:
$ref: '#/components/schemas/AssetValidationAttribute'
validations:
type: array
items:
$ref: '#/components/schemas/AssetValidationResult'
AssetValidationResult:
type: object
required:
- publisher
- valid
- message
- detailsShort
- detailsLong
properties:
publisher:
type: string
description: The publisher setting the criteria for these validations
example: HULU
valid:
type: boolean
description: indicates whether this asset is valid given the publisher's criteria
message:
type: string
description: human-readable message
example: Asset Validations Standards acceptable durations 15, 30 or 60 seconds
detailsShort:
type: string
description: short human-readable message
example: Exceeds 30s
detailsLong:
type: string
description: long human-readable message
example: Your creative may not be considered as a 30s asset by some publishers, which may impact cost and scale.
AssetValidationAttribute:
type: object
required:
- id
- name
- value
- required
properties:
id:
type: string
description: id of the asset
example: DURATION
name:
type: string
description: name of the asset
example: duration
value:
type: string
description: value of the asset
example: 15.00s
required:
type: boolean
description: indicates whether or not this is a required asset
parameters:
X-Cloud-Trace-Context:
name: X-Cloud-Trace-Context
in: header
description: gcp trace
required: false
schema:
type: string
default: 91f9f012dc7c7ffc13604c77f12a8931
examples:
401Ex:
value:
error: unauthorized
status: ERROR
transaction:
id: 4af459ff8e1a36b6bb74fb88f1a02477
taskId: '14158884487309867565'
created: '2030-11-02T15:04:00Z'
responses:
401Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
response:
$ref: '#/components/examples/401Ex'
securitySchemes:
oauth2:
type: oauth2
flows:
clientCredentials:
tokenUrl: https://api2.madhive.com/oauth/token
scopes: {}
basicAuth:
type: http
description: Basic Authentication Not Implemented
scheme: basic
bearerAuth:
type: apiKey
name: Authorization
in: header
description: jwt access token for authentication