Smalk Docs
  • Publisher
  • API Reference
  • Smalk MCP
  • Advertiser
Smalk
  • Website
  • Dashboard
  • Service status
Developers
  • REST API reference
  • OpenAPI schema
  • Support
Legal
  • Privacy policy
  • Terms

© 2026 Smalk. All rights reserved.

Information
Tracking
GEA - Ad Content
Ad Placement Inventory
    List ad placementsgetCreate/sync placementspostGet placement detailsgetUpdate placementputDelete placementdeletePartially update placementpatchVerify placement HTML and ad server connectionpostList the URLs on your site that serve Smalk contentgetGet inventory statisticsget
Workspace
Health
IndexNow
Reporting
Datasets
public
Schemas
powered by Zudoku
Smalk Public API
Smalk Public API

Ad Placement Inventory

Manage ad placements on your website


List ad placements

GET
https://api.smalk.ai
/api/v1/projects/{project_id}/ads/inventory/

List all ad placements for a workspace with filtering and pagination.

Authentication: Requires API Key in the Authorization header.

Query Parameters:

  • search: Filter by group_name, URL, or placement_id
  • status: Filter by status (0=UNVERIFIED, 1=NOT_CONNECTED, 2=INSTALLED, 3=ACTIVE, 4=INACTIVE)
  • format: Filter by ad format
  • group_name: Filter by group name
  • group_by_url: If 'true', return one row per URL with placement count
  • page: Page number (default: 1)
  • page_size: Items per page (default: 20)

List ad placements › path Parameters

project_id
​string · uuid · required

List ad placements › query Parameters

group_by_url
​boolean

Group results by URL

page
​integer

Page number

page_size
​integer

Items per page

search
​string

Search in group_name, URL, or placement_id

status
​integer

Filter by status

List ad placements › Responses

200
​object[]
Serializer for AdPlacement model. Provides standardized format for reading and creating ad placements.
id
​string · uuid · readOnly · required
project
​string · uuid · readOnly · required
url
​string · uri · maxLength: 2048 · required

URL of the page containing this placement

placement_position_display
​string · readOnly · required
status_display
​string · readOnly · required
minimum_daily_rate
​string · decimal · readOnly · pattern: ^-?\d{0,6}(?:\.\d{0,… · required
minimum_daily_rate_currency
​null | string · readOnly · required
is_auto_ads
​boolean · readOnly · required
active_bookings_count
​integer · readOnly · required
active_booking_id
​null | string · readOnly · required
​readOnly · required

Per-placement frame style. Overrides the project-level PublisherBrandSafety.frame_color when set. Null = inherit project default. Applies to the booking path for every value. The no-booking shell renders only for summary_toc and summary_video_transcript (other variants need an active booking to surface).

  • no - No
  • grey - Grey
  • black - Black
  • clear - Clear
  • gradient - Gradient
  • shadow - Shadow
  • label - Label only
  • preview - Preview with gradient fade
  • summary_boxed_reveal - Summary — Boxed Reveal
  • summary_editorial_brief - Summary — Editorial Brief
  • summary_video_transcript - Summary — Video Transcript
  • summary_toc - Summary — Table of Contents
  • summary_expert_content - Summary — Expert Content
  • 2mo - Minimal · Ad Only
  • 2mc - Minimal · Toc
  • 2ms - Minimal · Summary
  • 2md - Minimal · Tldr
  • 2mv - Minimal · Video
  • 2to - Teaser · Ad Only
  • 2tc - Teaser · Toc
  • 2ts - Teaser · Summary
  • 2td - Teaser · Tldr
  • 2tv - Teaser · Video
  • 2po - Paragraph · Ad Only
  • 2pc - Paragraph · Toc
  • 2ps - Paragraph · Summary
  • 2pd - Paragraph · Tldr
  • 2pv - Paragraph · Video
  • 2fo - Full · Ad Only
  • 2fc - Full · Toc
  • 2fs - Full · Summary
  • 2fd - Full · Tldr
  • 2fv - Full · Video
last_served_at
​null | string · date-time · readOnly · required

Last time an ad was served on this placement

total_impressions
​integer · readOnly · required

Total impressions served (denormalized)

total_revenue
​string · decimal · readOnly · pattern: ^-?\d{0,8}(?:\.\d{0,… · required

Total revenue generated (denormalized)

total_revenue_currency
​string · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
publisher_project_name
​null | string · readOnly · required
can_book
​boolean · readOnly · required
next_available_date
​null | string · readOnly · required
​object · readOnly · required
citation_source
​null | string · uuid
group_name
​null | string · maxLength: 255

Optional group name for this placement (e.g., 'Homepage Hero Banner')

placement_id
​null | string · maxLength: 100

Publisher-defined placement ID (e.g., 'sidebar-top')

placement_type
​string · enum

Type of placement (manual vs auto-generated)

  • MANUAL - Manual Validation
  • AUTO - Auto approval
Enum values:
MANUAL
AUTO
​min: -2147483648 · max: 2147483647

Position of the placement on the page (not specified, top of page, bottom of page, middle of page, before comments, after comments, middle of comments)

  • 0 - Not Specified
  • 1 - Top of Page
  • 2 - Bottom of Page
  • 3 - Middle of the page
  • 4 - Before comments
  • 5 - After Comments
  • 6 - Middle of Comments
position_offset_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count from start of main content container up to the placement div. Raw measurement backing placement_position. 0 with content_total_chars=0 indicates a structural fallback (div inside

/
/
).

content_total_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count of the main content container on the page. Raw measurement backing placement_position.

status
​integer · enum · min: -2147483648 · max: 2147483647

Current status of the placement

  • 0 - Unverified (awaiting HTML verification)
  • 1 - Not Connected (awaiting SSAI call)
  • 2 - Installed (SSAI verified, no campaign)
  • 3 - Active (has active campaign)
  • 4 - Inactive (manually deactivated)
  • 5 - Lazy (declared inventory, awaiting first serve)
Enum values:
0
1
2
3
4
5
active
​boolean

If False, this placement is excluded and will never receive ads (publisher preference)

allowed_formats
​string[]

Allowed ad formats for this placement (empty = all)

Enum values:
PARAGRAPH
FAQ
COMPARISON_TABLE
LISTICLE
VS_PAGE
FEATURE_MATRIX
FULL_ARTICLE
IN_ARTICLE
auto_approve_bookings
​boolean

Enable automatic approval of bookings for this placement

auto_approve_threshold_score
​string · decimal · pattern: ^-?\d{0,3}(?:\.\d{0,…

Minimum AI validation score required for auto-approval (0-100)

GET/api/v1/projects/{project_id}/ads/inventory/
curl https://api.smalk.ai/api/v1/projects/:project_id/ads/inventory \ --header 'Authorization: <api-key>'
Example Responses
[ { "id": "00000000-0000-0000-0000-000000000000", "project": "00000000-0000-0000-0000-000000000000", "citation_source": "00000000-0000-0000-0000-000000000000", "group_name": "group_name", "url": "https://www.example.com/path/to/resource", "placement_id": "placement_id", "placement_type": "MANUAL", "placement_position": 0, "placement_position_display": "placement_position_display", "position_offset_chars": 0, "content_total_chars": 0, "status": 0, "status_display": "status_display", "active": true, "allowed_formats": [ "PARAGRAPH" ], "minimum_daily_rate": "minimum_daily_rate", "minimum_daily_rate_currency": "minimum_daily_rate_currency", "is_auto_ads": true, "active_bookings_count": 0, "active_booking_id": "active_booking_id", "auto_approve_bookings": true, "auto_approve_threshold_score": "auto_approve_threshold_score", "frame_color_override": "no", "last_served_at": "2024-08-25T15:00:00Z", "total_impressions": 0, "total_revenue": "total_revenue", "total_revenue_currency": "total_revenue_currency", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "publisher_project_name": "publisher_project_name", "can_book": true, "next_available_date": "next_available_date", "pricing_summary": { "key": {} } } ]
json
application/json

Create/sync placements

POST
https://api.smalk.ai
/api/v1/projects/{project_id}/ads/inventory/

Create or sync ad placements (bulk operation).

Send an array of placements to register. If a placement with the same (project, url, placement_id) already exists, it won't be duplicated.

Authentication: Requires API Key.

WordPress Plugin Usage:

  1. Generate unique placement_id values for each <div smalk-ads id="..."> element
  2. Call this endpoint to register all placements on page save
  3. Check the response to see which placements were created vs already existed

Create/sync placements › path Parameters

project_id
​string · uuid · required

Create/sync placements › Request Body

Serializer for AdPlacement model. Provides standardized format for reading and creating ad placements.
id
​string · uuid · readOnly · required
project
​string · uuid · readOnly · required
url
​string · uri · maxLength: 2048 · required

URL of the page containing this placement

placement_position_display
​string · readOnly · required
status_display
​string · readOnly · required
minimum_daily_rate
​string · decimal · readOnly · pattern: ^-?\d{0,6}(?:\.\d{0,… · required
minimum_daily_rate_currency
​null | string · readOnly · required
is_auto_ads
​boolean · readOnly · required
active_bookings_count
​integer · readOnly · required
active_booking_id
​null | string · readOnly · required
​readOnly · required

Per-placement frame style. Overrides the project-level PublisherBrandSafety.frame_color when set. Null = inherit project default. Applies to the booking path for every value. The no-booking shell renders only for summary_toc and summary_video_transcript (other variants need an active booking to surface).

  • no - No
  • grey - Grey
  • black - Black
  • clear - Clear
  • gradient - Gradient
  • shadow - Shadow
  • label - Label only
  • preview - Preview with gradient fade
  • summary_boxed_reveal - Summary — Boxed Reveal
  • summary_editorial_brief - Summary — Editorial Brief
  • summary_video_transcript - Summary — Video Transcript
  • summary_toc - Summary — Table of Contents
  • summary_expert_content - Summary — Expert Content
  • 2mo - Minimal · Ad Only
  • 2mc - Minimal · Toc
  • 2ms - Minimal · Summary
  • 2md - Minimal · Tldr
  • 2mv - Minimal · Video
  • 2to - Teaser · Ad Only
  • 2tc - Teaser · Toc
  • 2ts - Teaser · Summary
  • 2td - Teaser · Tldr
  • 2tv - Teaser · Video
  • 2po - Paragraph · Ad Only
  • 2pc - Paragraph · Toc
  • 2ps - Paragraph · Summary
  • 2pd - Paragraph · Tldr
  • 2pv - Paragraph · Video
  • 2fo - Full · Ad Only
  • 2fc - Full · Toc
  • 2fs - Full · Summary
  • 2fd - Full · Tldr
  • 2fv - Full · Video
last_served_at
​null | string · date-time · readOnly · required

Last time an ad was served on this placement

total_impressions
​integer · readOnly · required

Total impressions served (denormalized)

total_revenue
​string · decimal · readOnly · pattern: ^-?\d{0,8}(?:\.\d{0,… · required

Total revenue generated (denormalized)

total_revenue_currency
​string · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
publisher_project_name
​null | string · readOnly · required
can_book
​boolean · readOnly · required
next_available_date
​null | string · readOnly · required
​object · readOnly · required
citation_source
​null | string · uuid
group_name
​null | string · maxLength: 255

Optional group name for this placement (e.g., 'Homepage Hero Banner')

placement_id
​null | string · maxLength: 100

Publisher-defined placement ID (e.g., 'sidebar-top')

placement_type
​string · enum

Type of placement (manual vs auto-generated)

  • MANUAL - Manual Validation
  • AUTO - Auto approval
Enum values:
MANUAL
AUTO
​min: -2147483648 · max: 2147483647

Position of the placement on the page (not specified, top of page, bottom of page, middle of page, before comments, after comments, middle of comments)

  • 0 - Not Specified
  • 1 - Top of Page
  • 2 - Bottom of Page
  • 3 - Middle of the page
  • 4 - Before comments
  • 5 - After Comments
  • 6 - Middle of Comments
position_offset_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count from start of main content container up to the placement div. Raw measurement backing placement_position. 0 with content_total_chars=0 indicates a structural fallback (div inside

/
/
).

content_total_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count of the main content container on the page. Raw measurement backing placement_position.

status
​integer · enum · min: -2147483648 · max: 2147483647

Current status of the placement

  • 0 - Unverified (awaiting HTML verification)
  • 1 - Not Connected (awaiting SSAI call)
  • 2 - Installed (SSAI verified, no campaign)
  • 3 - Active (has active campaign)
  • 4 - Inactive (manually deactivated)
  • 5 - Lazy (declared inventory, awaiting first serve)
Enum values:
0
1
2
3
4
5
active
​boolean

If False, this placement is excluded and will never receive ads (publisher preference)

allowed_formats
​string[]

Allowed ad formats for this placement (empty = all)

Enum values:
PARAGRAPH
FAQ
COMPARISON_TABLE
LISTICLE
VS_PAGE
FEATURE_MATRIX
FULL_ARTICLE
IN_ARTICLE
auto_approve_bookings
​boolean

Enable automatic approval of bookings for this placement

auto_approve_threshold_score
​string · decimal · pattern: ^-?\d{0,3}(?:\.\d{0,…

Minimum AI validation score required for auto-approval (0-100)

Create/sync placements › Responses

Serializer for AdPlacement model. Provides standardized format for reading and creating ad placements.
id
​string · uuid · readOnly · required
project
​string · uuid · readOnly · required
url
​string · uri · maxLength: 2048 · required

URL of the page containing this placement

placement_position_display
​string · readOnly · required
status_display
​string · readOnly · required
minimum_daily_rate
​string · decimal · readOnly · pattern: ^-?\d{0,6}(?:\.\d{0,… · required
minimum_daily_rate_currency
​null | string · readOnly · required
is_auto_ads
​boolean · readOnly · required
active_bookings_count
​integer · readOnly · required
active_booking_id
​null | string · readOnly · required
​readOnly · required

Per-placement frame style. Overrides the project-level PublisherBrandSafety.frame_color when set. Null = inherit project default. Applies to the booking path for every value. The no-booking shell renders only for summary_toc and summary_video_transcript (other variants need an active booking to surface).

  • no - No
  • grey - Grey
  • black - Black
  • clear - Clear
  • gradient - Gradient
  • shadow - Shadow
  • label - Label only
  • preview - Preview with gradient fade
  • summary_boxed_reveal - Summary — Boxed Reveal
  • summary_editorial_brief - Summary — Editorial Brief
  • summary_video_transcript - Summary — Video Transcript
  • summary_toc - Summary — Table of Contents
  • summary_expert_content - Summary — Expert Content
  • 2mo - Minimal · Ad Only
  • 2mc - Minimal · Toc
  • 2ms - Minimal · Summary
  • 2md - Minimal · Tldr
  • 2mv - Minimal · Video
  • 2to - Teaser · Ad Only
  • 2tc - Teaser · Toc
  • 2ts - Teaser · Summary
  • 2td - Teaser · Tldr
  • 2tv - Teaser · Video
  • 2po - Paragraph · Ad Only
  • 2pc - Paragraph · Toc
  • 2ps - Paragraph · Summary
  • 2pd - Paragraph · Tldr
  • 2pv - Paragraph · Video
  • 2fo - Full · Ad Only
  • 2fc - Full · Toc
  • 2fs - Full · Summary
  • 2fd - Full · Tldr
  • 2fv - Full · Video
last_served_at
​null | string · date-time · readOnly · required

Last time an ad was served on this placement

total_impressions
​integer · readOnly · required

Total impressions served (denormalized)

total_revenue
​string · decimal · readOnly · pattern: ^-?\d{0,8}(?:\.\d{0,… · required

Total revenue generated (denormalized)

total_revenue_currency
​string · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
publisher_project_name
​null | string · readOnly · required
can_book
​boolean · readOnly · required
next_available_date
​null | string · readOnly · required
​object · readOnly · required
citation_source
​null | string · uuid
group_name
​null | string · maxLength: 255

Optional group name for this placement (e.g., 'Homepage Hero Banner')

placement_id
​null | string · maxLength: 100

Publisher-defined placement ID (e.g., 'sidebar-top')

placement_type
​string · enum

Type of placement (manual vs auto-generated)

  • MANUAL - Manual Validation
  • AUTO - Auto approval
Enum values:
MANUAL
AUTO
​min: -2147483648 · max: 2147483647

Position of the placement on the page (not specified, top of page, bottom of page, middle of page, before comments, after comments, middle of comments)

  • 0 - Not Specified
  • 1 - Top of Page
  • 2 - Bottom of Page
  • 3 - Middle of the page
  • 4 - Before comments
  • 5 - After Comments
  • 6 - Middle of Comments
position_offset_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count from start of main content container up to the placement div. Raw measurement backing placement_position. 0 with content_total_chars=0 indicates a structural fallback (div inside

/
/
).

content_total_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count of the main content container on the page. Raw measurement backing placement_position.

status
​integer · enum · min: -2147483648 · max: 2147483647

Current status of the placement

  • 0 - Unverified (awaiting HTML verification)
  • 1 - Not Connected (awaiting SSAI call)
  • 2 - Installed (SSAI verified, no campaign)
  • 3 - Active (has active campaign)
  • 4 - Inactive (manually deactivated)
  • 5 - Lazy (declared inventory, awaiting first serve)
Enum values:
0
1
2
3
4
5
active
​boolean

If False, this placement is excluded and will never receive ads (publisher preference)

allowed_formats
​string[]

Allowed ad formats for this placement (empty = all)

Enum values:
PARAGRAPH
FAQ
COMPARISON_TABLE
LISTICLE
VS_PAGE
FEATURE_MATRIX
FULL_ARTICLE
IN_ARTICLE
auto_approve_bookings
​boolean

Enable automatic approval of bookings for this placement

auto_approve_threshold_score
​string · decimal · pattern: ^-?\d{0,3}(?:\.\d{0,…

Minimum AI validation score required for auto-approval (0-100)

POST/api/v1/projects/{project_id}/ads/inventory/
curl https://api.smalk.ai/api/v1/projects/:project_id/ads/inventory \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: <api-key>' \ --data '{ "placements": [ { "url": "https://example.com/article", "placement_id": "wp-abc123xyz", "group_name": "Article Content", "placement_type": "AUTO", "placement_position": 3 } ] }'
Example Request Body
{ "placements": [ { "url": "https://example.com/article", "placement_id": "wp-abc123xyz", "group_name": "Article Content", "placement_type": "AUTO", "placement_position": 3 } ] }
json
Example Responses
{ "id": "00000000-0000-0000-0000-000000000000", "project": "00000000-0000-0000-0000-000000000000", "citation_source": "00000000-0000-0000-0000-000000000000", "group_name": "group_name", "url": "https://www.example.com/path/to/resource", "placement_id": "placement_id", "placement_type": "MANUAL", "placement_position": 0, "placement_position_display": "placement_position_display", "position_offset_chars": 0, "content_total_chars": 0, "status": 0, "status_display": "status_display", "active": true, "allowed_formats": [ "PARAGRAPH" ], "minimum_daily_rate": "minimum_daily_rate", "minimum_daily_rate_currency": "minimum_daily_rate_currency", "is_auto_ads": true, "active_bookings_count": 0, "active_booking_id": "active_booking_id", "auto_approve_bookings": true, "auto_approve_threshold_score": "auto_approve_threshold_score", "frame_color_override": "no", "last_served_at": "2024-08-25T15:00:00Z", "total_impressions": 0, "total_revenue": "total_revenue", "total_revenue_currency": "total_revenue_currency", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "publisher_project_name": "publisher_project_name", "can_book": true, "next_available_date": "next_available_date", "pricing_summary": { "key": {} } }
json
application/json

Get placement details

GET
https://api.smalk.ai
/api/v1/projects/{project_id}/ads/inventory/{id}/

Retrieve details for a specific ad placement by ID.

Get placement details › path Parameters

id
​string · uuid · required

A UUID string identifying this ad placement.

project_id
​string · uuid · required

Get placement details › Responses

200
Serializer for AdPlacement model. Provides standardized format for reading and creating ad placements.
id
​string · uuid · readOnly · required
project
​string · uuid · readOnly · required
url
​string · uri · maxLength: 2048 · required

URL of the page containing this placement

placement_position_display
​string · readOnly · required
status_display
​string · readOnly · required
minimum_daily_rate
​string · decimal · readOnly · pattern: ^-?\d{0,6}(?:\.\d{0,… · required
minimum_daily_rate_currency
​null | string · readOnly · required
is_auto_ads
​boolean · readOnly · required
active_bookings_count
​integer · readOnly · required
active_booking_id
​null | string · readOnly · required
​readOnly · required

Per-placement frame style. Overrides the project-level PublisherBrandSafety.frame_color when set. Null = inherit project default. Applies to the booking path for every value. The no-booking shell renders only for summary_toc and summary_video_transcript (other variants need an active booking to surface).

  • no - No
  • grey - Grey
  • black - Black
  • clear - Clear
  • gradient - Gradient
  • shadow - Shadow
  • label - Label only
  • preview - Preview with gradient fade
  • summary_boxed_reveal - Summary — Boxed Reveal
  • summary_editorial_brief - Summary — Editorial Brief
  • summary_video_transcript - Summary — Video Transcript
  • summary_toc - Summary — Table of Contents
  • summary_expert_content - Summary — Expert Content
  • 2mo - Minimal · Ad Only
  • 2mc - Minimal · Toc
  • 2ms - Minimal · Summary
  • 2md - Minimal · Tldr
  • 2mv - Minimal · Video
  • 2to - Teaser · Ad Only
  • 2tc - Teaser · Toc
  • 2ts - Teaser · Summary
  • 2td - Teaser · Tldr
  • 2tv - Teaser · Video
  • 2po - Paragraph · Ad Only
  • 2pc - Paragraph · Toc
  • 2ps - Paragraph · Summary
  • 2pd - Paragraph · Tldr
  • 2pv - Paragraph · Video
  • 2fo - Full · Ad Only
  • 2fc - Full · Toc
  • 2fs - Full · Summary
  • 2fd - Full · Tldr
  • 2fv - Full · Video
last_served_at
​null | string · date-time · readOnly · required

Last time an ad was served on this placement

total_impressions
​integer · readOnly · required

Total impressions served (denormalized)

total_revenue
​string · decimal · readOnly · pattern: ^-?\d{0,8}(?:\.\d{0,… · required

Total revenue generated (denormalized)

total_revenue_currency
​string · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
publisher_project_name
​null | string · readOnly · required
can_book
​boolean · readOnly · required
next_available_date
​null | string · readOnly · required
​object · readOnly · required
citation_source
​null | string · uuid
group_name
​null | string · maxLength: 255

Optional group name for this placement (e.g., 'Homepage Hero Banner')

placement_id
​null | string · maxLength: 100

Publisher-defined placement ID (e.g., 'sidebar-top')

placement_type
​string · enum

Type of placement (manual vs auto-generated)

  • MANUAL - Manual Validation
  • AUTO - Auto approval
Enum values:
MANUAL
AUTO
​min: -2147483648 · max: 2147483647

Position of the placement on the page (not specified, top of page, bottom of page, middle of page, before comments, after comments, middle of comments)

  • 0 - Not Specified
  • 1 - Top of Page
  • 2 - Bottom of Page
  • 3 - Middle of the page
  • 4 - Before comments
  • 5 - After Comments
  • 6 - Middle of Comments
position_offset_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count from start of main content container up to the placement div. Raw measurement backing placement_position. 0 with content_total_chars=0 indicates a structural fallback (div inside

/
/
).

content_total_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count of the main content container on the page. Raw measurement backing placement_position.

status
​integer · enum · min: -2147483648 · max: 2147483647

Current status of the placement

  • 0 - Unverified (awaiting HTML verification)
  • 1 - Not Connected (awaiting SSAI call)
  • 2 - Installed (SSAI verified, no campaign)
  • 3 - Active (has active campaign)
  • 4 - Inactive (manually deactivated)
  • 5 - Lazy (declared inventory, awaiting first serve)
Enum values:
0
1
2
3
4
5
active
​boolean

If False, this placement is excluded and will never receive ads (publisher preference)

allowed_formats
​string[]

Allowed ad formats for this placement (empty = all)

Enum values:
PARAGRAPH
FAQ
COMPARISON_TABLE
LISTICLE
VS_PAGE
FEATURE_MATRIX
FULL_ARTICLE
IN_ARTICLE
auto_approve_bookings
​boolean

Enable automatic approval of bookings for this placement

auto_approve_threshold_score
​string · decimal · pattern: ^-?\d{0,3}(?:\.\d{0,…

Minimum AI validation score required for auto-approval (0-100)

GET/api/v1/projects/{project_id}/ads/inventory/{id}/
curl https://api.smalk.ai/api/v1/projects/:project_id/ads/inventory/:id \ --header 'Authorization: <api-key>'
Example Responses
{ "id": "00000000-0000-0000-0000-000000000000", "project": "00000000-0000-0000-0000-000000000000", "citation_source": "00000000-0000-0000-0000-000000000000", "group_name": "group_name", "url": "https://www.example.com/path/to/resource", "placement_id": "placement_id", "placement_type": "MANUAL", "placement_position": 0, "placement_position_display": "placement_position_display", "position_offset_chars": 0, "content_total_chars": 0, "status": 0, "status_display": "status_display", "active": true, "allowed_formats": [ "PARAGRAPH" ], "minimum_daily_rate": "minimum_daily_rate", "minimum_daily_rate_currency": "minimum_daily_rate_currency", "is_auto_ads": true, "active_bookings_count": 0, "active_booking_id": "active_booking_id", "auto_approve_bookings": true, "auto_approve_threshold_score": "auto_approve_threshold_score", "frame_color_override": "no", "last_served_at": "2024-08-25T15:00:00Z", "total_impressions": 0, "total_revenue": "total_revenue", "total_revenue_currency": "total_revenue_currency", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "publisher_project_name": "publisher_project_name", "can_book": true, "next_available_date": "next_available_date", "pricing_summary": { "key": {} } }
json
application/json

Update placement

PUT
https://api.smalk.ai
/api/v1/projects/{project_id}/ads/inventory/{id}/

Update an existing ad placement's settings.

Update placement › path Parameters

id
​string · uuid · required

A UUID string identifying this ad placement.

project_id
​string · uuid · required

Update placement › Request Body

Serializer for AdPlacement model. Provides standardized format for reading and creating ad placements.
id
​string · uuid · readOnly · required
project
​string · uuid · readOnly · required
url
​string · uri · maxLength: 2048 · required

URL of the page containing this placement

placement_position_display
​string · readOnly · required
status_display
​string · readOnly · required
minimum_daily_rate
​string · decimal · readOnly · pattern: ^-?\d{0,6}(?:\.\d{0,… · required
minimum_daily_rate_currency
​null | string · readOnly · required
is_auto_ads
​boolean · readOnly · required
active_bookings_count
​integer · readOnly · required
active_booking_id
​null | string · readOnly · required
​readOnly · required

Per-placement frame style. Overrides the project-level PublisherBrandSafety.frame_color when set. Null = inherit project default. Applies to the booking path for every value. The no-booking shell renders only for summary_toc and summary_video_transcript (other variants need an active booking to surface).

  • no - No
  • grey - Grey
  • black - Black
  • clear - Clear
  • gradient - Gradient
  • shadow - Shadow
  • label - Label only
  • preview - Preview with gradient fade
  • summary_boxed_reveal - Summary — Boxed Reveal
  • summary_editorial_brief - Summary — Editorial Brief
  • summary_video_transcript - Summary — Video Transcript
  • summary_toc - Summary — Table of Contents
  • summary_expert_content - Summary — Expert Content
  • 2mo - Minimal · Ad Only
  • 2mc - Minimal · Toc
  • 2ms - Minimal · Summary
  • 2md - Minimal · Tldr
  • 2mv - Minimal · Video
  • 2to - Teaser · Ad Only
  • 2tc - Teaser · Toc
  • 2ts - Teaser · Summary
  • 2td - Teaser · Tldr
  • 2tv - Teaser · Video
  • 2po - Paragraph · Ad Only
  • 2pc - Paragraph · Toc
  • 2ps - Paragraph · Summary
  • 2pd - Paragraph · Tldr
  • 2pv - Paragraph · Video
  • 2fo - Full · Ad Only
  • 2fc - Full · Toc
  • 2fs - Full · Summary
  • 2fd - Full · Tldr
  • 2fv - Full · Video
last_served_at
​null | string · date-time · readOnly · required

Last time an ad was served on this placement

total_impressions
​integer · readOnly · required

Total impressions served (denormalized)

total_revenue
​string · decimal · readOnly · pattern: ^-?\d{0,8}(?:\.\d{0,… · required

Total revenue generated (denormalized)

total_revenue_currency
​string · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
publisher_project_name
​null | string · readOnly · required
can_book
​boolean · readOnly · required
next_available_date
​null | string · readOnly · required
​object · readOnly · required
citation_source
​null | string · uuid
group_name
​null | string · maxLength: 255

Optional group name for this placement (e.g., 'Homepage Hero Banner')

placement_id
​null | string · maxLength: 100

Publisher-defined placement ID (e.g., 'sidebar-top')

placement_type
​string · enum

Type of placement (manual vs auto-generated)

  • MANUAL - Manual Validation
  • AUTO - Auto approval
Enum values:
MANUAL
AUTO
​min: -2147483648 · max: 2147483647

Position of the placement on the page (not specified, top of page, bottom of page, middle of page, before comments, after comments, middle of comments)

  • 0 - Not Specified
  • 1 - Top of Page
  • 2 - Bottom of Page
  • 3 - Middle of the page
  • 4 - Before comments
  • 5 - After Comments
  • 6 - Middle of Comments
position_offset_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count from start of main content container up to the placement div. Raw measurement backing placement_position. 0 with content_total_chars=0 indicates a structural fallback (div inside

/
/
).

content_total_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count of the main content container on the page. Raw measurement backing placement_position.

status
​integer · enum · min: -2147483648 · max: 2147483647

Current status of the placement

  • 0 - Unverified (awaiting HTML verification)
  • 1 - Not Connected (awaiting SSAI call)
  • 2 - Installed (SSAI verified, no campaign)
  • 3 - Active (has active campaign)
  • 4 - Inactive (manually deactivated)
  • 5 - Lazy (declared inventory, awaiting first serve)
Enum values:
0
1
2
3
4
5
active
​boolean

If False, this placement is excluded and will never receive ads (publisher preference)

allowed_formats
​string[]

Allowed ad formats for this placement (empty = all)

Enum values:
PARAGRAPH
FAQ
COMPARISON_TABLE
LISTICLE
VS_PAGE
FEATURE_MATRIX
FULL_ARTICLE
IN_ARTICLE
auto_approve_bookings
​boolean

Enable automatic approval of bookings for this placement

auto_approve_threshold_score
​string · decimal · pattern: ^-?\d{0,3}(?:\.\d{0,…

Minimum AI validation score required for auto-approval (0-100)

Update placement › Responses

200
Serializer for AdPlacement model. Provides standardized format for reading and creating ad placements.
id
​string · uuid · readOnly · required
project
​string · uuid · readOnly · required
url
​string · uri · maxLength: 2048 · required

URL of the page containing this placement

placement_position_display
​string · readOnly · required
status_display
​string · readOnly · required
minimum_daily_rate
​string · decimal · readOnly · pattern: ^-?\d{0,6}(?:\.\d{0,… · required
minimum_daily_rate_currency
​null | string · readOnly · required
is_auto_ads
​boolean · readOnly · required
active_bookings_count
​integer · readOnly · required
active_booking_id
​null | string · readOnly · required
​readOnly · required

Per-placement frame style. Overrides the project-level PublisherBrandSafety.frame_color when set. Null = inherit project default. Applies to the booking path for every value. The no-booking shell renders only for summary_toc and summary_video_transcript (other variants need an active booking to surface).

  • no - No
  • grey - Grey
  • black - Black
  • clear - Clear
  • gradient - Gradient
  • shadow - Shadow
  • label - Label only
  • preview - Preview with gradient fade
  • summary_boxed_reveal - Summary — Boxed Reveal
  • summary_editorial_brief - Summary — Editorial Brief
  • summary_video_transcript - Summary — Video Transcript
  • summary_toc - Summary — Table of Contents
  • summary_expert_content - Summary — Expert Content
  • 2mo - Minimal · Ad Only
  • 2mc - Minimal · Toc
  • 2ms - Minimal · Summary
  • 2md - Minimal · Tldr
  • 2mv - Minimal · Video
  • 2to - Teaser · Ad Only
  • 2tc - Teaser · Toc
  • 2ts - Teaser · Summary
  • 2td - Teaser · Tldr
  • 2tv - Teaser · Video
  • 2po - Paragraph · Ad Only
  • 2pc - Paragraph · Toc
  • 2ps - Paragraph · Summary
  • 2pd - Paragraph · Tldr
  • 2pv - Paragraph · Video
  • 2fo - Full · Ad Only
  • 2fc - Full · Toc
  • 2fs - Full · Summary
  • 2fd - Full · Tldr
  • 2fv - Full · Video
last_served_at
​null | string · date-time · readOnly · required

Last time an ad was served on this placement

total_impressions
​integer · readOnly · required

Total impressions served (denormalized)

total_revenue
​string · decimal · readOnly · pattern: ^-?\d{0,8}(?:\.\d{0,… · required

Total revenue generated (denormalized)

total_revenue_currency
​string · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
publisher_project_name
​null | string · readOnly · required
can_book
​boolean · readOnly · required
next_available_date
​null | string · readOnly · required
​object · readOnly · required
citation_source
​null | string · uuid
group_name
​null | string · maxLength: 255

Optional group name for this placement (e.g., 'Homepage Hero Banner')

placement_id
​null | string · maxLength: 100

Publisher-defined placement ID (e.g., 'sidebar-top')

placement_type
​string · enum

Type of placement (manual vs auto-generated)

  • MANUAL - Manual Validation
  • AUTO - Auto approval
Enum values:
MANUAL
AUTO
​min: -2147483648 · max: 2147483647

Position of the placement on the page (not specified, top of page, bottom of page, middle of page, before comments, after comments, middle of comments)

  • 0 - Not Specified
  • 1 - Top of Page
  • 2 - Bottom of Page
  • 3 - Middle of the page
  • 4 - Before comments
  • 5 - After Comments
  • 6 - Middle of Comments
position_offset_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count from start of main content container up to the placement div. Raw measurement backing placement_position. 0 with content_total_chars=0 indicates a structural fallback (div inside

/
/
).

content_total_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count of the main content container on the page. Raw measurement backing placement_position.

status
​integer · enum · min: -2147483648 · max: 2147483647

Current status of the placement

  • 0 - Unverified (awaiting HTML verification)
  • 1 - Not Connected (awaiting SSAI call)
  • 2 - Installed (SSAI verified, no campaign)
  • 3 - Active (has active campaign)
  • 4 - Inactive (manually deactivated)
  • 5 - Lazy (declared inventory, awaiting first serve)
Enum values:
0
1
2
3
4
5
active
​boolean

If False, this placement is excluded and will never receive ads (publisher preference)

allowed_formats
​string[]

Allowed ad formats for this placement (empty = all)

Enum values:
PARAGRAPH
FAQ
COMPARISON_TABLE
LISTICLE
VS_PAGE
FEATURE_MATRIX
FULL_ARTICLE
IN_ARTICLE
auto_approve_bookings
​boolean

Enable automatic approval of bookings for this placement

auto_approve_threshold_score
​string · decimal · pattern: ^-?\d{0,3}(?:\.\d{0,…

Minimum AI validation score required for auto-approval (0-100)

PUT/api/v1/projects/{project_id}/ads/inventory/{id}/
curl https://api.smalk.ai/api/v1/projects/:project_id/ads/inventory/:id \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: <api-key>' \ --data '{ "id": "00000000-0000-0000-0000-000000000000", "project": "00000000-0000-0000-0000-000000000000", "citation_source": "00000000-0000-0000-0000-000000000000", "group_name": "group_name", "url": "https://www.example.com/path/to/resource", "placement_id": "placement_id", "placement_type": "MANUAL", "placement_position": 0, "placement_position_display": "placement_position_display", "position_offset_chars": 0, "content_total_chars": 0, "status": 0, "status_display": "status_display", "active": true, "allowed_formats": [ "PARAGRAPH" ], "minimum_daily_rate": "minimum_daily_rate", "minimum_daily_rate_currency": "minimum_daily_rate_currency", "is_auto_ads": true, "active_bookings_count": 0, "active_booking_id": "active_booking_id", "auto_approve_bookings": true, "auto_approve_threshold_score": "auto_approve_threshold_score", "frame_color_override": "no", "last_served_at": "2024-08-25T15:00:00Z", "total_impressions": 0, "total_revenue": "total_revenue", "total_revenue_currency": "total_revenue_currency", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "publisher_project_name": "publisher_project_name", "can_book": true, "next_available_date": "next_available_date", "pricing_summary": { "key": {} } }'
Example Request Body
{ "id": "00000000-0000-0000-0000-000000000000", "project": "00000000-0000-0000-0000-000000000000", "citation_source": "00000000-0000-0000-0000-000000000000", "group_name": "group_name", "url": "https://www.example.com/path/to/resource", "placement_id": "placement_id", "placement_type": "MANUAL", "placement_position": 0, "placement_position_display": "placement_position_display", "position_offset_chars": 0, "content_total_chars": 0, "status": 0, "status_display": "status_display", "active": true, "allowed_formats": [ "PARAGRAPH" ], "minimum_daily_rate": "minimum_daily_rate", "minimum_daily_rate_currency": "minimum_daily_rate_currency", "is_auto_ads": true, "active_bookings_count": 0, "active_booking_id": "active_booking_id", "auto_approve_bookings": true, "auto_approve_threshold_score": "auto_approve_threshold_score", "frame_color_override": "no", "last_served_at": "2024-08-25T15:00:00Z", "total_impressions": 0, "total_revenue": "total_revenue", "total_revenue_currency": "total_revenue_currency", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "publisher_project_name": "publisher_project_name", "can_book": true, "next_available_date": "next_available_date", "pricing_summary": { "key": {} } }
json
Example Responses
{ "id": "00000000-0000-0000-0000-000000000000", "project": "00000000-0000-0000-0000-000000000000", "citation_source": "00000000-0000-0000-0000-000000000000", "group_name": "group_name", "url": "https://www.example.com/path/to/resource", "placement_id": "placement_id", "placement_type": "MANUAL", "placement_position": 0, "placement_position_display": "placement_position_display", "position_offset_chars": 0, "content_total_chars": 0, "status": 0, "status_display": "status_display", "active": true, "allowed_formats": [ "PARAGRAPH" ], "minimum_daily_rate": "minimum_daily_rate", "minimum_daily_rate_currency": "minimum_daily_rate_currency", "is_auto_ads": true, "active_bookings_count": 0, "active_booking_id": "active_booking_id", "auto_approve_bookings": true, "auto_approve_threshold_score": "auto_approve_threshold_score", "frame_color_override": "no", "last_served_at": "2024-08-25T15:00:00Z", "total_impressions": 0, "total_revenue": "total_revenue", "total_revenue_currency": "total_revenue_currency", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "publisher_project_name": "publisher_project_name", "can_book": true, "next_available_date": "next_available_date", "pricing_summary": { "key": {} } }
json
application/json

Delete placement

DELETE
https://api.smalk.ai
/api/v1/projects/{project_id}/ads/inventory/{id}/

Remove an ad placement from inventory.

Delete placement › path Parameters

id
​string · uuid · required

A UUID string identifying this ad placement.

project_id
​string · uuid · required

Delete placement › Responses

No response body

No data returned
DELETE/api/v1/projects/{project_id}/ads/inventory/{id}/
curl https://api.smalk.ai/api/v1/projects/:project_id/ads/inventory/:id \ --request DELETE \ --header 'Authorization: <api-key>'
Example Responses
No example specified for this content type

Partially update placement

PATCH
https://api.smalk.ai
/api/v1/projects/{project_id}/ads/inventory/{id}/

Update specific fields of an ad placement (e.g., status, active flag).

Partially update placement › path Parameters

id
​string · uuid · required

A UUID string identifying this ad placement.

project_id
​string · uuid · required

Partially update placement › Request Body

Serializer for AdPlacement model. Provides standardized format for reading and creating ad placements.
id
​string · uuid · readOnly
project
​string · uuid · readOnly
citation_source
​null | string · uuid
group_name
​null | string · maxLength: 255

Optional group name for this placement (e.g., 'Homepage Hero Banner')

url
​string · uri · maxLength: 2048

URL of the page containing this placement

placement_id
​null | string · maxLength: 100

Publisher-defined placement ID (e.g., 'sidebar-top')

placement_type
​string · enum

Type of placement (manual vs auto-generated)

  • MANUAL - Manual Validation
  • AUTO - Auto approval
Enum values:
MANUAL
AUTO
​min: -2147483648 · max: 2147483647

Position of the placement on the page (not specified, top of page, bottom of page, middle of page, before comments, after comments, middle of comments)

  • 0 - Not Specified
  • 1 - Top of Page
  • 2 - Bottom of Page
  • 3 - Middle of the page
  • 4 - Before comments
  • 5 - After Comments
  • 6 - Middle of Comments
placement_position_display
​string · readOnly
position_offset_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count from start of main content container up to the placement div. Raw measurement backing placement_position. 0 with content_total_chars=0 indicates a structural fallback (div inside

/
/
).

content_total_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count of the main content container on the page. Raw measurement backing placement_position.

status
​integer · enum · min: -2147483648 · max: 2147483647

Current status of the placement

  • 0 - Unverified (awaiting HTML verification)
  • 1 - Not Connected (awaiting SSAI call)
  • 2 - Installed (SSAI verified, no campaign)
  • 3 - Active (has active campaign)
  • 4 - Inactive (manually deactivated)
  • 5 - Lazy (declared inventory, awaiting first serve)
Enum values:
0
1
2
3
4
5
status_display
​string · readOnly
active
​boolean

If False, this placement is excluded and will never receive ads (publisher preference)

allowed_formats
​string[]

Allowed ad formats for this placement (empty = all)

Enum values:
PARAGRAPH
FAQ
COMPARISON_TABLE
LISTICLE
VS_PAGE
FEATURE_MATRIX
FULL_ARTICLE
IN_ARTICLE
minimum_daily_rate
​string · decimal · readOnly · pattern: ^-?\d{0,6}(?:\.\d{0,…
minimum_daily_rate_currency
​null | string · readOnly
is_auto_ads
​boolean · readOnly
active_bookings_count
​integer · readOnly
active_booking_id
​null | string · readOnly
auto_approve_bookings
​boolean

Enable automatic approval of bookings for this placement

auto_approve_threshold_score
​string · decimal · pattern: ^-?\d{0,3}(?:\.\d{0,…

Minimum AI validation score required for auto-approval (0-100)

​readOnly

Per-placement frame style. Overrides the project-level PublisherBrandSafety.frame_color when set. Null = inherit project default. Applies to the booking path for every value. The no-booking shell renders only for summary_toc and summary_video_transcript (other variants need an active booking to surface).

  • no - No
  • grey - Grey
  • black - Black
  • clear - Clear
  • gradient - Gradient
  • shadow - Shadow
  • label - Label only
  • preview - Preview with gradient fade
  • summary_boxed_reveal - Summary — Boxed Reveal
  • summary_editorial_brief - Summary — Editorial Brief
  • summary_video_transcript - Summary — Video Transcript
  • summary_toc - Summary — Table of Contents
  • summary_expert_content - Summary — Expert Content
  • 2mo - Minimal · Ad Only
  • 2mc - Minimal · Toc
  • 2ms - Minimal · Summary
  • 2md - Minimal · Tldr
  • 2mv - Minimal · Video
  • 2to - Teaser · Ad Only
  • 2tc - Teaser · Toc
  • 2ts - Teaser · Summary
  • 2td - Teaser · Tldr
  • 2tv - Teaser · Video
  • 2po - Paragraph · Ad Only
  • 2pc - Paragraph · Toc
  • 2ps - Paragraph · Summary
  • 2pd - Paragraph · Tldr
  • 2pv - Paragraph · Video
  • 2fo - Full · Ad Only
  • 2fc - Full · Toc
  • 2fs - Full · Summary
  • 2fd - Full · Tldr
  • 2fv - Full · Video
last_served_at
​null | string · date-time · readOnly

Last time an ad was served on this placement

total_impressions
​integer · readOnly

Total impressions served (denormalized)

total_revenue
​string · decimal · readOnly · pattern: ^-?\d{0,8}(?:\.\d{0,…

Total revenue generated (denormalized)

total_revenue_currency
​string · readOnly
created
​string · date-time · readOnly
modified
​string · date-time · readOnly
publisher_project_name
​null | string · readOnly
can_book
​boolean · readOnly
next_available_date
​null | string · readOnly
​object · readOnly

Partially update placement › Responses

200
Serializer for AdPlacement model. Provides standardized format for reading and creating ad placements.
id
​string · uuid · readOnly · required
project
​string · uuid · readOnly · required
url
​string · uri · maxLength: 2048 · required

URL of the page containing this placement

placement_position_display
​string · readOnly · required
status_display
​string · readOnly · required
minimum_daily_rate
​string · decimal · readOnly · pattern: ^-?\d{0,6}(?:\.\d{0,… · required
minimum_daily_rate_currency
​null | string · readOnly · required
is_auto_ads
​boolean · readOnly · required
active_bookings_count
​integer · readOnly · required
active_booking_id
​null | string · readOnly · required
​readOnly · required

Per-placement frame style. Overrides the project-level PublisherBrandSafety.frame_color when set. Null = inherit project default. Applies to the booking path for every value. The no-booking shell renders only for summary_toc and summary_video_transcript (other variants need an active booking to surface).

  • no - No
  • grey - Grey
  • black - Black
  • clear - Clear
  • gradient - Gradient
  • shadow - Shadow
  • label - Label only
  • preview - Preview with gradient fade
  • summary_boxed_reveal - Summary — Boxed Reveal
  • summary_editorial_brief - Summary — Editorial Brief
  • summary_video_transcript - Summary — Video Transcript
  • summary_toc - Summary — Table of Contents
  • summary_expert_content - Summary — Expert Content
  • 2mo - Minimal · Ad Only
  • 2mc - Minimal · Toc
  • 2ms - Minimal · Summary
  • 2md - Minimal · Tldr
  • 2mv - Minimal · Video
  • 2to - Teaser · Ad Only
  • 2tc - Teaser · Toc
  • 2ts - Teaser · Summary
  • 2td - Teaser · Tldr
  • 2tv - Teaser · Video
  • 2po - Paragraph · Ad Only
  • 2pc - Paragraph · Toc
  • 2ps - Paragraph · Summary
  • 2pd - Paragraph · Tldr
  • 2pv - Paragraph · Video
  • 2fo - Full · Ad Only
  • 2fc - Full · Toc
  • 2fs - Full · Summary
  • 2fd - Full · Tldr
  • 2fv - Full · Video
last_served_at
​null | string · date-time · readOnly · required

Last time an ad was served on this placement

total_impressions
​integer · readOnly · required

Total impressions served (denormalized)

total_revenue
​string · decimal · readOnly · pattern: ^-?\d{0,8}(?:\.\d{0,… · required

Total revenue generated (denormalized)

total_revenue_currency
​string · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
publisher_project_name
​null | string · readOnly · required
can_book
​boolean · readOnly · required
next_available_date
​null | string · readOnly · required
​object · readOnly · required
citation_source
​null | string · uuid
group_name
​null | string · maxLength: 255

Optional group name for this placement (e.g., 'Homepage Hero Banner')

placement_id
​null | string · maxLength: 100

Publisher-defined placement ID (e.g., 'sidebar-top')

placement_type
​string · enum

Type of placement (manual vs auto-generated)

  • MANUAL - Manual Validation
  • AUTO - Auto approval
Enum values:
MANUAL
AUTO
​min: -2147483648 · max: 2147483647

Position of the placement on the page (not specified, top of page, bottom of page, middle of page, before comments, after comments, middle of comments)

  • 0 - Not Specified
  • 1 - Top of Page
  • 2 - Bottom of Page
  • 3 - Middle of the page
  • 4 - Before comments
  • 5 - After Comments
  • 6 - Middle of Comments
position_offset_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count from start of main content container up to the placement div. Raw measurement backing placement_position. 0 with content_total_chars=0 indicates a structural fallback (div inside

/
/
).

content_total_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count of the main content container on the page. Raw measurement backing placement_position.

status
​integer · enum · min: -2147483648 · max: 2147483647

Current status of the placement

  • 0 - Unverified (awaiting HTML verification)
  • 1 - Not Connected (awaiting SSAI call)
  • 2 - Installed (SSAI verified, no campaign)
  • 3 - Active (has active campaign)
  • 4 - Inactive (manually deactivated)
  • 5 - Lazy (declared inventory, awaiting first serve)
Enum values:
0
1
2
3
4
5
active
​boolean

If False, this placement is excluded and will never receive ads (publisher preference)

allowed_formats
​string[]

Allowed ad formats for this placement (empty = all)

Enum values:
PARAGRAPH
FAQ
COMPARISON_TABLE
LISTICLE
VS_PAGE
FEATURE_MATRIX
FULL_ARTICLE
IN_ARTICLE
auto_approve_bookings
​boolean

Enable automatic approval of bookings for this placement

auto_approve_threshold_score
​string · decimal · pattern: ^-?\d{0,3}(?:\.\d{0,…

Minimum AI validation score required for auto-approval (0-100)

PATCH/api/v1/projects/{project_id}/ads/inventory/{id}/
curl https://api.smalk.ai/api/v1/projects/:project_id/ads/inventory/:id \ --request PATCH \ --header 'Content-Type: application/json' \ --header 'Authorization: <api-key>' \ --data '{ "id": "00000000-0000-0000-0000-000000000000", "project": "00000000-0000-0000-0000-000000000000", "citation_source": "00000000-0000-0000-0000-000000000000", "group_name": "group_name", "url": "https://www.example.com/path/to/resource", "placement_id": "placement_id", "placement_type": "MANUAL", "placement_position": 0, "placement_position_display": "placement_position_display", "position_offset_chars": 0, "content_total_chars": 0, "status": 0, "status_display": "status_display", "active": true, "allowed_formats": [ "PARAGRAPH" ], "minimum_daily_rate": "minimum_daily_rate", "minimum_daily_rate_currency": "minimum_daily_rate_currency", "is_auto_ads": true, "active_bookings_count": 0, "active_booking_id": "active_booking_id", "auto_approve_bookings": true, "auto_approve_threshold_score": "auto_approve_threshold_score", "frame_color_override": "no", "last_served_at": "2024-08-25T15:00:00Z", "total_impressions": 0, "total_revenue": "total_revenue", "total_revenue_currency": "total_revenue_currency", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "publisher_project_name": "publisher_project_name", "can_book": true, "next_available_date": "next_available_date", "pricing_summary": { "key": {} } }'
Example Request Body
{ "id": "00000000-0000-0000-0000-000000000000", "project": "00000000-0000-0000-0000-000000000000", "citation_source": "00000000-0000-0000-0000-000000000000", "group_name": "group_name", "url": "https://www.example.com/path/to/resource", "placement_id": "placement_id", "placement_type": "MANUAL", "placement_position": 0, "placement_position_display": "placement_position_display", "position_offset_chars": 0, "content_total_chars": 0, "status": 0, "status_display": "status_display", "active": true, "allowed_formats": [ "PARAGRAPH" ], "minimum_daily_rate": "minimum_daily_rate", "minimum_daily_rate_currency": "minimum_daily_rate_currency", "is_auto_ads": true, "active_bookings_count": 0, "active_booking_id": "active_booking_id", "auto_approve_bookings": true, "auto_approve_threshold_score": "auto_approve_threshold_score", "frame_color_override": "no", "last_served_at": "2024-08-25T15:00:00Z", "total_impressions": 0, "total_revenue": "total_revenue", "total_revenue_currency": "total_revenue_currency", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "publisher_project_name": "publisher_project_name", "can_book": true, "next_available_date": "next_available_date", "pricing_summary": { "key": {} } }
json
Example Responses
{ "id": "00000000-0000-0000-0000-000000000000", "project": "00000000-0000-0000-0000-000000000000", "citation_source": "00000000-0000-0000-0000-000000000000", "group_name": "group_name", "url": "https://www.example.com/path/to/resource", "placement_id": "placement_id", "placement_type": "MANUAL", "placement_position": 0, "placement_position_display": "placement_position_display", "position_offset_chars": 0, "content_total_chars": 0, "status": 0, "status_display": "status_display", "active": true, "allowed_formats": [ "PARAGRAPH" ], "minimum_daily_rate": "minimum_daily_rate", "minimum_daily_rate_currency": "minimum_daily_rate_currency", "is_auto_ads": true, "active_bookings_count": 0, "active_booking_id": "active_booking_id", "auto_approve_bookings": true, "auto_approve_threshold_score": "auto_approve_threshold_score", "frame_color_override": "no", "last_served_at": "2024-08-25T15:00:00Z", "total_impressions": 0, "total_revenue": "total_revenue", "total_revenue_currency": "total_revenue_currency", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "publisher_project_name": "publisher_project_name", "can_book": true, "next_available_date": "next_available_date", "pricing_summary": { "key": {} } }
json
application/json

Verify placement HTML and ad server connection

POST
https://api.smalk.ai
/api/v1/projects/{project_id}/ads/inventory/{id}/verify/

Verify if the ad placement div exists on the page and test the ad server connection.

Verification process:

  1. Fetches the page HTML to check if <div smalk-ads> element is present
  2. The page fetch triggers the ad server (SSAI) to call our API
  3. Waits 2 seconds for the ad server to respond
  4. Checks if placement status was updated to INSTALLED

Status transitions:

  • UNVERIFIED → NOT_CONNECTED: When HTML tag is found
  • NOT_CONNECTED → INSTALLED: When ad server successfully calls our API

Note: Also verifies all other placements sharing the same URL.

Verify placement HTML and ad server connection › path Parameters

id
​string · uuid · required

A UUID string identifying this ad placement.

project_id
​string · uuid · required

Verify placement HTML and ad server connection › Request Body

Serializer for AdPlacement model. Provides standardized format for reading and creating ad placements.
id
​string · uuid · readOnly · required
project
​string · uuid · readOnly · required
url
​string · uri · maxLength: 2048 · required

URL of the page containing this placement

placement_position_display
​string · readOnly · required
status_display
​string · readOnly · required
minimum_daily_rate
​string · decimal · readOnly · pattern: ^-?\d{0,6}(?:\.\d{0,… · required
minimum_daily_rate_currency
​null | string · readOnly · required
is_auto_ads
​boolean · readOnly · required
active_bookings_count
​integer · readOnly · required
active_booking_id
​null | string · readOnly · required
​readOnly · required

Per-placement frame style. Overrides the project-level PublisherBrandSafety.frame_color when set. Null = inherit project default. Applies to the booking path for every value. The no-booking shell renders only for summary_toc and summary_video_transcript (other variants need an active booking to surface).

  • no - No
  • grey - Grey
  • black - Black
  • clear - Clear
  • gradient - Gradient
  • shadow - Shadow
  • label - Label only
  • preview - Preview with gradient fade
  • summary_boxed_reveal - Summary — Boxed Reveal
  • summary_editorial_brief - Summary — Editorial Brief
  • summary_video_transcript - Summary — Video Transcript
  • summary_toc - Summary — Table of Contents
  • summary_expert_content - Summary — Expert Content
  • 2mo - Minimal · Ad Only
  • 2mc - Minimal · Toc
  • 2ms - Minimal · Summary
  • 2md - Minimal · Tldr
  • 2mv - Minimal · Video
  • 2to - Teaser · Ad Only
  • 2tc - Teaser · Toc
  • 2ts - Teaser · Summary
  • 2td - Teaser · Tldr
  • 2tv - Teaser · Video
  • 2po - Paragraph · Ad Only
  • 2pc - Paragraph · Toc
  • 2ps - Paragraph · Summary
  • 2pd - Paragraph · Tldr
  • 2pv - Paragraph · Video
  • 2fo - Full · Ad Only
  • 2fc - Full · Toc
  • 2fs - Full · Summary
  • 2fd - Full · Tldr
  • 2fv - Full · Video
last_served_at
​null | string · date-time · readOnly · required

Last time an ad was served on this placement

total_impressions
​integer · readOnly · required

Total impressions served (denormalized)

total_revenue
​string · decimal · readOnly · pattern: ^-?\d{0,8}(?:\.\d{0,… · required

Total revenue generated (denormalized)

total_revenue_currency
​string · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
publisher_project_name
​null | string · readOnly · required
can_book
​boolean · readOnly · required
next_available_date
​null | string · readOnly · required
​object · readOnly · required
citation_source
​null | string · uuid
group_name
​null | string · maxLength: 255

Optional group name for this placement (e.g., 'Homepage Hero Banner')

placement_id
​null | string · maxLength: 100

Publisher-defined placement ID (e.g., 'sidebar-top')

placement_type
​string · enum

Type of placement (manual vs auto-generated)

  • MANUAL - Manual Validation
  • AUTO - Auto approval
Enum values:
MANUAL
AUTO
​min: -2147483648 · max: 2147483647

Position of the placement on the page (not specified, top of page, bottom of page, middle of page, before comments, after comments, middle of comments)

  • 0 - Not Specified
  • 1 - Top of Page
  • 2 - Bottom of Page
  • 3 - Middle of the page
  • 4 - Before comments
  • 5 - After Comments
  • 6 - Middle of Comments
position_offset_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count from start of main content container up to the placement div. Raw measurement backing placement_position. 0 with content_total_chars=0 indicates a structural fallback (div inside

/
/
).

content_total_chars
​null | integer · min: -2147483648 · max: 2147483647

Visible-text char count of the main content container on the page. Raw measurement backing placement_position.

status
​integer · enum · min: -2147483648 · max: 2147483647

Current status of the placement

  • 0 - Unverified (awaiting HTML verification)
  • 1 - Not Connected (awaiting SSAI call)
  • 2 - Installed (SSAI verified, no campaign)
  • 3 - Active (has active campaign)
  • 4 - Inactive (manually deactivated)
  • 5 - Lazy (declared inventory, awaiting first serve)
Enum values:
0
1
2
3
4
5
active
​boolean

If False, this placement is excluded and will never receive ads (publisher preference)

allowed_formats
​string[]

Allowed ad formats for this placement (empty = all)

Enum values:
PARAGRAPH
FAQ
COMPARISON_TABLE
LISTICLE
VS_PAGE
FEATURE_MATRIX
FULL_ARTICLE
IN_ARTICLE
auto_approve_bookings
​boolean

Enable automatic approval of bookings for this placement

auto_approve_threshold_score
​string · decimal · pattern: ^-?\d{0,3}(?:\.\d{0,…

Minimum AI validation score required for auto-approval (0-100)

Verify placement HTML and ad server connection › Responses

200

Verification completed

No data returned
POST/api/v1/projects/{project_id}/ads/inventory/{id}/verify/
curl https://api.smalk.ai/api/v1/projects/:project_id/ads/inventory/:id/verify \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: <api-key>' \ --data '{ "id": "00000000-0000-0000-0000-000000000000", "project": "00000000-0000-0000-0000-000000000000", "citation_source": "00000000-0000-0000-0000-000000000000", "group_name": "group_name", "url": "https://www.example.com/path/to/resource", "placement_id": "placement_id", "placement_type": "MANUAL", "placement_position": 0, "placement_position_display": "placement_position_display", "position_offset_chars": 0, "content_total_chars": 0, "status": 0, "status_display": "status_display", "active": true, "allowed_formats": [ "PARAGRAPH" ], "minimum_daily_rate": "minimum_daily_rate", "minimum_daily_rate_currency": "minimum_daily_rate_currency", "is_auto_ads": true, "active_bookings_count": 0, "active_booking_id": "active_booking_id", "auto_approve_bookings": true, "auto_approve_threshold_score": "auto_approve_threshold_score", "frame_color_override": "no", "last_served_at": "2024-08-25T15:00:00Z", "total_impressions": 0, "total_revenue": "total_revenue", "total_revenue_currency": "total_revenue_currency", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "publisher_project_name": "publisher_project_name", "can_book": true, "next_available_date": "next_available_date", "pricing_summary": { "key": {} } }'
Example Request Body
{ "id": "00000000-0000-0000-0000-000000000000", "project": "00000000-0000-0000-0000-000000000000", "citation_source": "00000000-0000-0000-0000-000000000000", "group_name": "group_name", "url": "https://www.example.com/path/to/resource", "placement_id": "placement_id", "placement_type": "MANUAL", "placement_position": 0, "placement_position_display": "placement_position_display", "position_offset_chars": 0, "content_total_chars": 0, "status": 0, "status_display": "status_display", "active": true, "allowed_formats": [ "PARAGRAPH" ], "minimum_daily_rate": "minimum_daily_rate", "minimum_daily_rate_currency": "minimum_daily_rate_currency", "is_auto_ads": true, "active_bookings_count": 0, "active_booking_id": "active_booking_id", "auto_approve_bookings": true, "auto_approve_threshold_score": "auto_approve_threshold_score", "frame_color_override": "no", "last_served_at": "2024-08-25T15:00:00Z", "total_impressions": 0, "total_revenue": "total_revenue", "total_revenue_currency": "total_revenue_currency", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "publisher_project_name": "publisher_project_name", "can_book": true, "next_available_date": "next_available_date", "pricing_summary": { "key": {} } }
json
Example Responses
No example specified for this content type

List the URLs on your site that serve Smalk content

GET
https://api.smalk.ai
/api/v1/projects/{project_id}/ads/inventory/active-ad-urls/

Returns the URLs on your site that are currently serving Smalk content, so you can refresh them and purge your CDN cache.

By default the response includes:

  • URLs with an active ad booking, and
  • URLs serving a video-transcript block.

Use the query parameters below to include additional URL types or to receive a lighter response shape.

URLs are returned exactly as you registered them (with www. where applicable) so they match your own canonical URLs.

Large inventories (?frames=toc can reach tens of thousands of URLs): the response supports two transfer optimisations — send Accept-Encoding: gzip to receive a gzip-compressed body (~85% smaller), and use conditional requests — the response carries an ETag; send it back as If-None-Match and you get 304 Not Modified with an empty body while the URL set is unchanged. Combining ?flat=true + gzip + If-None-Match is recommended for frequent polling.

List the URLs on your site that serve Smalk content › path Parameters

project_id
​string · uuid · required

List the URLs on your site that serve Smalk content › query Parameters

flat
​boolean

When true, urls is a flat array of URL strings instead of objects — a lighter payload. Default false returns [{"url": …}] objects.

frames
​string[]

Include summary-widget URLs (opt-in). Repeatable or comma-separated. toc → pages showing the table-of-contents summary widget; summary → pages showing another summary widget. Omitted by default. Values cumulate, e.g. ?frames=toc,summary.

Enum values:
summary
toc
transcripts
​boolean

Include video-transcript URLs. Default true. Set false to return only URLs that have an active ad booking.

List the URLs on your site that serve Smalk content › Responses

200
project_id
​string · required
generated_at
​string · date-time · required
count
​integer · required
​object[] · required

List of URLs serving Smalk content. With ?flat=true this is a flat array of URL strings instead of objects.

GET/api/v1/projects/{project_id}/ads/inventory/active-ad-urls/
curl https://api.smalk.ai/api/v1/projects/:project_id/ads/inventory/active-ad-urls \ --header 'Authorization: <api-key>'
Example Responses
{ "project_id": "43d152d4-7f90-4e4f-9ab8-07d68986dcf4", "generated_at": "2026-05-19T12:00:00Z", "count": 1, "urls": [ { "url": "https://example.com/article-1" } ] }
json
application/json

Get inventory statistics

GET
https://api.smalk.ai
/api/v1/projects/{project_id}/ads/inventory/stats/

Get aggregated statistics for ad placement inventory.

Returns:

  • active_placements: Count of INSTALLED + ACTIVE placements
  • non_installed_placements: Count of UNVERIFIED + NOT_CONNECTED + INACTIVE placements
  • total_urls: Count of unique URLs with ad placements
  • active_campaigns: Count of placements with ACTIVE status
  • inactive_placements: Count of INSTALLED placements (no active campaign)

Get inventory statistics › path Parameters

project_id
​string · uuid · required

Get inventory statistics › Responses

200

Statistics retrieved successfully

No data returned
GET/api/v1/projects/{project_id}/ads/inventory/stats/
curl https://api.smalk.ai/api/v1/projects/:project_id/ads/inventory/stats \ --header 'Authorization: <api-key>'
Example Responses
No example specified for this content type

GEA - Ad ContentWorkspace