NativeAds AI Brand DNA Versions API

The Brand DNA Versions API from NativeAds AI — 6 operation(s) for brand dna versions.

GitHub OpenAPI

Operations 9

GET /brands/{brandId}/brand-dna/versions List Brand DNA versions for a brand #
POST /brands/{brandId}/brand-dna/versions Create a new Brand DNA version #
GET /brands/{brandId}/brand-dna/active Get the currently active Brand DNA version #
GET /brands/{brandId}/brand-dna/versions/{versionId} Get a specific Brand DNA version #
PUT /brands/{brandId}/brand-dna/versions/{versionId} Update a Brand DNA version (rename and/or edit DNA payload) #
DELETE /brands/{brandId}/brand-dna/versions/{versionId} Delete a Brand DNA version #
POST /brands/{brandId}/brand-dna/versions/{versionId}/activate Activate a Brand DNA version #
POST /brands/{brandId}/brand-dna/versions/{versionId}/cancel Cancel an in-flight Brand DNA extraction #
POST /brands/{brandId}/brand-dna/versions/{versionId}/rerun Re-run extraction for a Brand DNA version #

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/nativeads-ai:nativeads-ai-brand-dna-versions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

nativeads-ai-brand-dna-versions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: NativeAds Headless Brand DNA Versions API
  version: 1.0.0
  description: 'The headless REST API for programmatic creative generation. Authenticate with a per-user API key (`Authorization: Bearer nak_...`). This reference lists only the endpoints an API key may call; generation endpoints are asynchronous (submit returns an id, then poll).'
  license:
    name: Commercial
    url: https://www.nativeads.ai/
servers:
- url: https://creative-v1.nativeads.ai/v1
  description: NativeAds API Server
security:
- BearerAuth: []
tags:
- name: Brand DNA Versions
paths:
  /brands/{brandId}/brand-dna/versions:
    get:
      summary: List Brand DNA versions for a brand
      description: Returns all versions for the brand, newest first. Each item carries the preview slice but not the full DNA payload.
      operationId: listBrandDnaVersions
      tags:
      - Brand DNA Versions
      security:
      - BearerAuth: []
      parameters:
      - name: brandId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: List retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBrandDnaVersionsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Brand not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      summary: Create a new Brand DNA version
      description: 'Create a new version with one or more source assets/URLs. Returns the version

        in pending state; the orchestrator picks up the workflow trigger row and runs

        per-source extractors plus the merger asynchronously.'
      operationId: createBrandDnaVersion
      tags:
      - Brand DNA Versions
      security:
      - BearerAuth: []
      parameters:
      - name: brandId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBrandDnaVersionRequest'
      responses:
        '200':
          description: Version created and queued for extraction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandDnaVersionSummaryResponse'
        '400':
          description: Bad Request - invalid body or NO_SOURCES
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - ASSET_NOT_OWNED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Brand not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /brands/{brandId}/brand-dna/active:
    get:
      summary: Get the currently active Brand DNA version
      description: 'Returns the active version detail. When the active version is mid-rerun

        (status=pending or extracting), responds 200 with `dna: null`. Returns 404

        when no version has ever been activated for the brand.'
      operationId: getActiveBrandDnaVersion
      tags:
      - Brand DNA Versions
      security:
      - BearerAuth: []
      parameters:
      - name: brandId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Active version retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandDnaVersionDetailResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Brand not found or no active version (VERSION_NOT_FOUND)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /brands/{brandId}/brand-dna/versions/{versionId}:
    get:
      summary: Get a specific Brand DNA version
      description: Returns the full version detail including sources and (when ready) the canonical DNA payload.
      operationId: getBrandDnaVersion
      tags:
      - Brand DNA Versions
      security:
      - BearerAuth: []
      parameters:
      - name: brandId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: versionId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Version retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandDnaVersionDetailResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: VERSION_NOT_FOUND or BRAND_NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      summary: Update a Brand DNA version (rename and/or edit DNA payload)
      description: 'Optimistic-locked update via updatedAt. Setting `dna` overwrites the canonical

        S3 payload and recomputes the preview slice; `name` updates metadata only.

        At least one of `name` or `dna` must be provided. Confidence score and

        missing fields are immutable from this endpoint.'
      operationId: updateBrandDnaVersion
      tags:
      - Brand DNA Versions
      security:
      - BearerAuth: []
      parameters:
      - name: brandId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: versionId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBrandDnaVersionRequest'
      responses:
        '200':
          description: Version updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandDnaVersionSummaryResponse'
        '400':
          description: Bad Request - invalid body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: VERSION_NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: STALE_UPDATE (concurrency conflict) or INVALID_STATUS_FOR_ACTION
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Delete a Brand DNA version
      description: 'Hard-deletes a non-active version, including its sources (CASCADE) and S3

        artifacts. Deleting the active version is forbidden; activate another version first.'
      operationId: deleteBrandDnaVersion
      tags:
      - Brand DNA Versions
      security:
      - BearerAuth: []
      parameters:
      - name: brandId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: versionId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Version deleted
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: VERSION_NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: ACTIVE_VERSION_DELETE_FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /brands/{brandId}/brand-dna/versions/{versionId}/activate:
    post:
      summary: Activate a Brand DNA version
      description: 'Marks the version active and mirrors its s3_key, version_number, and status to

        Brands.brand_dna_s3_key/brand_dna_version/brand_dna_status so downstream

        modal consumers pick up the new payload. Idempotent on an already-active version.'
      operationId: activateBrandDnaVersion
      tags:
      - Brand DNA Versions
      security:
      - BearerAuth: []
      parameters:
      - name: brandId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: versionId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Version activated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandDnaVersionSummaryResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: VERSION_NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: INVALID_STATUS_FOR_ACTION (only ready versions can activate)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /brands/{brandId}/brand-dna/versions/{versionId}/cancel:
    post:
      summary: Cancel an in-flight Brand DNA extraction
      description: 'Signals workflow cancellation and deletes the version row. Only valid

        while the version is pending or extracting. Best-effort cleans S3 partials.'
      operationId: cancelBrandDnaVersion
      tags:
      - Brand DNA Versions
      security:
      - BearerAuth: []
      parameters:
      - name: brandId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: versionId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Version cancelled and removed
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: VERSION_NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: INVALID_STATUS_FOR_ACTION (cannot cancel ready or failed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /brands/{brandId}/brand-dna/versions/{versionId}/rerun:
    post:
      summary: Re-run extraction for a Brand DNA version
      description: 'Replaces the version''s source set with the supplied assetIds and urls,

        resets status to pending, and queues a fresh extraction. The version

        retains its versionNumber and is_active flag. Returns 202 Accepted.'
      operationId: rerunBrandDnaVersion
      tags:
      - Brand DNA Versions
      security:
      - BearerAuth: []
      parameters:
      - name: brandId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: versionId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RerunBrandDnaVersionRequest'
      responses:
        '202':
          description: Re-run accepted; poll the version detail endpoint until status=ready
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandDnaVersionSummaryResponse'
        '400':
          description: Bad Request - NO_SOURCES or invalid body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - ASSET_NOT_OWNED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: VERSION_NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: INVALID_STATUS_FOR_ACTION (cannot rerun while pending or extracting)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    BrandDnaVersionDetailResponse:
      type: object
      required:
      - status
      - data
      properties:
        status:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/BrandDnaVersionDetail'
    BrandDnaVersionSummaryResponse:
      type: object
      required:
      - status
      - data
      properties:
        status:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/BrandDnaVersionSummary'
    BrandDnaPreview:
      type: object
      required:
      - colorHexes
      - typographyShort
      - toneShort
      - topValues
      - sourceCounts
      description: Denormalized list-view slice computed from the canonical DNA payload
      properties:
        colorHexes:
          type: array
          items:
            type: string
          maxItems: 5
          description: First 5 color hex values from the canonical palette
          example:
          - '#1a8a3a'
          - '#fff8e7'
          - '#3a3a3a'
          - '#c00000'
          - '#a3c293'
        typographyShort:
          type: string
          description: Short typography descriptor (truncated)
          example: Bold sans-serif headlines paired with serif body copy
        toneShort:
          type: string
          description: Short voice/tone descriptor (truncated)
          example: Warm, family-oriented, confident
        topValues:
          type: array
          items:
            type: string
          maxItems: 3
          description: Top 3 brand values
          example:
          - Quality
          - Family
          - Tradition
        sourceCounts:
          type: object
          required:
          - pdf
          - image
          - video
          - url
          description: Count of source rows per type for the version
          properties:
            pdf:
              type: integer
              minimum: 0
            image:
              type: integer
              minimum: 0
            video:
              type: integer
              minimum: 0
            url:
              type: integer
              minimum: 0
    BrandDnaVersionDetail:
      allOf:
      - $ref: '#/components/schemas/BrandDnaVersionSummary'
      - type: object
        required:
        - sources
        properties:
          sources:
            type: array
            items:
              $ref: '#/components/schemas/BrandDnaSource'
          dna:
            type:
            - object
            - 'null'
            description: 'Canonical Brand DNA payload (snake_case passthrough from the merger).

              Null while pending or extracting; null on the active version while

              an in-place rerun is underway.

              '
            additionalProperties: true
    ErrorError:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          example: INVALID_REQUEST
        message:
          type: string
          example: Invalid input data provided
        details:
          description: "Additional error context (optional, can be object or array). Absent on\nmost errors; the message is the only guaranteed human-readable field.\n\nUpload rejections populate it, because a client needs to act on the\nanswer rather than parse it. `POST /v1/assets/initiate-upload` and\n`POST /v1/assets/confirm-upload` return:\n\n- `reason` — `unsupported_declared_type` when the declared MIME type is\n  not accepted, or `unsupported_file_contents` when the uploaded bytes\n  are a different format than declared (an AVIF saved with a `.jpg`\n  name, say). Only confirm-upload can report the second: it is the\n  first point that reads the real bytes.\n- `declaredType` — the MIME type the client sent.\n- `detectedFormat` — the format the bytes actually are, on\n  `unsupported_file_contents` only.\n- `supportedFormats` — every format an upload may be.\n- `retryable` — `false` on both, meaning the same bytes will be\n  rejected again. Clients must not retry these.\n"
          example:
            reason: unsupported_file_contents
            declaredType: image/jpeg
            detectedFormat: AVIF
            retryable: false
            supportedFormats:
            - DOC
            - DOCX
            - GIF
            - JPEG
            - MP4
            - PDF
            - PNG
            - QuickTime
            - TIFF
    CreateBrandDnaVersionRequest:
      type: object
      description: Create a new Brand DNA version. At least one of assetIds or urls must be non-empty.
      properties:
        name:
          type: string
          maxLength: 200
          description: Optional human-readable label
        assetIds:
          type: array
          items:
            type: string
            format: uuid
          maxItems: 20
          description: 'Asset IDs to feed into per-source extractors (PDF, image, or video). The real limit is COMBINED: assetIds and urls together may not exceed 20, and a request over that is refused with "Too many sources (max 20)". maxItems here is a per-array ceiling and cannot express the sum, so reading it as 20 + 20 is wrong.

            '
        urls:
          type: array
          items:
            type: string
            format: uri
          maxItems: 20
          description: 'Website URLs to feed into the web extractor. Counts toward the same combined limit of 20 as assetIds, not a separate allowance.

            '
    RerunBrandDnaVersionRequest:
      type: object
      description: 'Reset a version''s status to pending and queue a fresh extraction.

        Replaces the existing source set with the supplied sources.

        assetIds and urls share one combined limit of 20; the per-array maxItems

        below cannot express that sum, so 20 + 20 is not accepted.

        '
      properties:
        assetIds:
          type: array
          items:
            type: string
            format: uuid
          maxItems: 20
          description: Counts toward the combined limit of 20 shared with urls.
        urls:
          type: array
          items:
            type: string
            format: uri
          maxItems: 20
          description: Counts toward the combined limit of 20 shared with assetIds.
    Error:
      description: Standard error response
      type: object
      required:
      - error
      - requestId
      properties:
        error:
          $ref: '#/components/schemas/ErrorError'
        requestId:
          type: string
          format: uuid
          description: Unique identifier for the request, useful for tracing.
    ListBrandDnaVersionsResponse:
      type: object
      required:
      - status
      - data
      properties:
        status:
          type: string
          example: success
        data:
          type: array
          items:
            $ref: '#/components/schemas/BrandDnaVersionSummary'
    UpdateBrandDnaVersionRequest:
      type: object
      required:
      - updatedAt
      description: 'Update version metadata or DNA payload. Optimistic lock via updatedAt.

        Omit dna for rename-only updates.

        '
      properties:
        name:
          type: string
          maxLength: 200
        dna:
          type: object
          additionalProperties: true
          description: Full canonical Brand DNA payload (snake_case). Overwrites the existing s3_key blob.
        updatedAt:
          type: string
          format: date-time
          description: Concurrency token; the previously-returned updatedAt for this version
    BrandDnaVersionSummary:
      type: object
      required:
      - versionId
      - versionNumber
      - isActive
      - status
      - createdAt
      - updatedAt
      description: Compact representation of a Brand DNA version, suitable for list views
      properties:
        versionId:
          type: string
          format: uuid
          readOnly: true
        versionNumber:
          type: integer
          minimum: 1
          readOnly: true
        name:
          type:
          - string
          - 'null'
          maxLength: 200
        isActive:
          type: boolean
        status:
          type: string
          enum:
          - pending
          - extracting
          - ready
          - failed
          description: Lifecycle state of the version
        confidenceScore:
          type:
          - integer
          - 'null'
          minimum: 1
          maximum: 10
          description: Merger-reported 1 to 10 confidence; null while pending or extracting
        missingFields:
          type:
          - array
          - 'null'
          items:
            type: string
          description: Snake_case field names the merger could not resolve
        preview:
          allOf:
          - $ref: '#/components/schemas/BrandDnaPreview'
          description: Null while pending or extracting, populated when status=ready
        createdAt:
          type: string
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          readOnly: true
    BrandDnaSource:
      type: object
      required:
      - id
      - type
      - status
      description: One source (asset or URL) feeding a Brand DNA version
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        type:
          type: string
          enum:
          - pdf
          - image
          - video
          - url
          description: Source category
        label:
          type:
          - string
          - 'null'
          description: Optional human-readable label set at create time
        assetId:
          type:
          - string
          - 'null'
          format: uuid
          description: Asset ID for asset-backed sources (mutually exclusive with url)
        url:
          type:
          - string
          - 'null'
          description: URL for url sources (mutually exclusive with assetId)
        pageCount:
          type:
          - integer
          - 'null'
          description: Page count for PDF sources, populated after extraction
        status:
          type: string
          enum:
          - queued
          - processing
          - done
          - failed
          description: Per-source processing state
        progressNote:
          type:
          - string
          - 'null'
          description: Free-form progress hint set by extractors
        errorReason:
          type:
          - string
          - 'null'
          description: Failure detail when status=failed
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for authentication.