TikTok Marketing API Automated Rules API
The Automated_Rules API from TikTok Marketing API — 7 operation(s) for automated_rules.
The Automated_Rules API from TikTok Marketing API — 7 operation(s) for automated_rules.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/tiktok-ads-automated-rules-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: TikTok API for Business — Marketing Automated Rules API
description: TikTok API for Business (Marketing API) v1.3. This document is a mechanical union of the 202 per-operation OpenAPI 3.0.1 documents TikTok publishes in yml_files/ of its own SDK repository (https://github.com/tiktok/tiktok-business-api-sdk), which are the swagger-codegen inputs for TikTok's first-party Java/Python/JavaScript SDKs. Operation content (paths, parameters, responses, tags and the x-open-* extensions) is preserved verbatim; only info, servers and components.securitySchemes were written by API Evangelist, because the per-operation fragments carry placeholder info blocks and no servers block. The servers values are the production and sandbox base URLs TikTok documents at https://business-api.tiktok.com/portal/docs?id=1738855331457026 .
version: v1.3
contact:
name: TikTok API for Business support
url: https://business-api.tiktok.com/portal/docs?id=1795190020378625
termsOfService: https://business-api.tiktok.com/portal/docs?id=1737191804348417
x-source: https://github.com/tiktok/tiktok-business-api-sdk/tree/main/yml_files
x-harvested-by: API Evangelist enrichment pipeline
x-harvested: '2026-08-13'
servers:
- url: https://business-api.tiktok.com/open_api/v1.3
description: Production
- url: https://sandbox-ads.tiktok.com/open_api/v1.3
description: Sandbox
security:
- AccessToken: []
tags:
- name: Automated_Rules
paths:
/optimizer/rule/batch_bind/:
post:
operationId: Optimizer Rule Batch_bind
parameters:
- description: Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162).
in: query
name: Access-Token
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
advertiser_id:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-convert:
- int64(%s)
x-open-field-id: 1
x-open-source: $.http.body.advertiser_id
bind_info:
description: ''
items:
properties:
bind_type:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-enum:
enum_package_expired: false
enum_package_id: 1804046212921409
enum_package_name: AutoRuleBindType
enums:
- description: ''
is_valid: true
key: BIND
value: '1'
- description: ''
is_valid: true
key: UNBIND
value: '2'
key_format: string
strict: true
use_part: false
validate_only: false
value_format: int32
x-open-field-id: 4
x-open-source: $.http.body.bind_info[].bind_type
dimension:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-enum:
enum_package_expired: false
enum_package_id: 1803155537096705
enum_package_name: AutoRuleDimension
enums:
- description: ''
is_valid: true
key: AD
value: '3'
- description: ''
is_valid: true
key: ADGROUP
value: '2'
- description: ''
is_valid: true
key: CAMPAIGN
value: '1'
key_format: string
strict: true
use_part: false
validate_only: false
value_format: int32
x-open-field-id: 2
x-open-source: $.http.body.bind_info[].dimension
dimension_ids:
description: ''
items:
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-convert:
- int64(%s)
type: array
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 3
x-open-source: $.http.body.bind_info[].dimension_ids
rule_id:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-convert:
- int64(%s)
x-open-field-id: 1
x-open-source: $.http.body.bind_info[].rule_id
required:
- rule_id
- dimension
- dimension_ids
- bind_type
type: object
x-open-allow-strlist: false
x-open-allow-strnum: false
type: array
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 2
x-open-source: $.http.body.bind_info
lang:
default: EN
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 3
x-open-source: $.http.body.lang
required:
- advertiser_id
- bind_info
type: object
x-open-allow-strlist: false
x-open-allow-strnum: false
responses:
'200':
content:
application/json:
schema:
properties:
code:
description: Response code. For the complete list of response codes and descriptions, see [Appendix - Return Codes](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097). Will be shown only if it is an error request.
format: int64
type:
- integer
- 'null'
x-open-allow-strlist: false
x-open-field-id: 4
data:
description: Returned data. The response for the SDK can be checked in the document for the API given in the description.
properties: {}
type:
- object
- 'null'
x-open-allow-strlist: false
x-open-field-id: 1
x-open-source: $.rpc.output.data
message:
description: Response message. For details, see [Appendix - Return Codes](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097).
type:
- string
- 'null'
x-open-allow-strlist: false
x-open-field-id: 3
request_id:
description: The log ID of a request, which uniquely identifies the request.
type:
- string
- 'null'
x-open-allow-strlist: false
x-open-field-id: 2
type: object
x-open-allow-strlist: false
description: OK
summary: Bind objects to rules. [Optimizer Rule Batch Bind](https://business-api.tiktok.com/portal/docs?id=1738769164954626)
tags:
- Automated_Rules
x-open-allowlist: {}
x-open-denylist: {}
x-open-rules:
base_rule: null
extra_rule:
base_source: []
http_query_source: []
http_source:
- name: advertiser_id
required: true
source: $.http.body.advertiser_id
type: number
- children:
- children:
- name: rule_id
required: true
type: number
- name: dimension
required: true
type: number
- children:
- type: number
is_expand: true
name: dimension_ids
required: true
sub_type: number
type: array
- name: bind_type
required: true
type: number
is_expand: true
type: object
is_expand: true
name: bind_info
required: true
source: $.http.body.bind_info[]
sub_type: object
type: array
- name: lang
required: false
source: $.http.body.lang
type: string
plugins:
after_response: []
before_request: []
request_query_rule: null
request_rule:
advertiser_id: $.http.body.advertiser_id
bind_info: $.http.body.bind_info[]
lang: $.http.body.lang
response_cookie: []
response_header: []
response_rule: null
x-open-scene-labels: []
x-open-settings:
pop_resp_nullvalue: false
/optimizer/rule/create/:
post:
operationId: Optimizer Rule Create
parameters:
- description: Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162).
in: query
name: Access-Token
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
advertiser_id:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-convert:
- int64(%s)
x-open-field-id: 1
x-open-source: $.http.body.advertiser_id
lang:
default: EN
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 2
x-open-source: $.http.body.lang
rules:
description: ''
items:
properties:
actions:
description: ''
items:
properties:
action_type:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-enum:
enum_package_expired: false
enum_package_id: 1804143435530241
enum_package_name: AutoRuleActionType
enums:
- description: ''
is_valid: true
key: ADJUST_TO
value: '3'
- description: ''
is_valid: true
key: DECREASE
value: '2'
- description: ''
is_valid: true
key: DEFAULT
value: '0'
- description: ''
is_valid: true
key: INCREASE
value: '1'
key_format: string
strict: true
use_part: false
validate_only: false
value_format: int32
x-open-field-id: 2
x-open-source: $.http.body.rules[].actions[].action_type
frequency_info:
description: ''
properties:
count:
description: ''
format: int64
type: integer
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 4
x-open-source: $.http.body.rules[].actions[].frequency_info.count
custom_frequency_type:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-enum:
enum_package_expired: false
enum_package_id: 1804143747245057
enum_package_name: AutoRuleActionCustomFreType
enums:
- description: ''
is_valid: true
key: N_DAY_Y_TIMES
value: '3'
- description: ''
is_valid: true
key: N_HOUR_Y_TIMES
value: '2'
- description: ''
is_valid: true
key: N_MINTUE_Y_TIMES
value: '1'
key_format: string
strict: true
use_part: false
validate_only: false
value_format: int32
x-open-field-id: 2
x-open-source: $.http.body.rules[].actions[].frequency_info.custom_frequency_type
time:
description: ''
format: int64
type: integer
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 3
x-open-source: $.http.body.rules[].actions[].frequency_info.time
type:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-enum:
enum_package_expired: false
enum_package_id: 1804143659529218
enum_package_name: AutoRuleActionFreType
enums:
- description: ''
is_valid: true
key: CUSTOM
value: '5'
- description: ''
is_valid: true
key: ONCE_IN_1_W
value: '4'
- description: ''
is_valid: true
key: ONCE_IN_24_H
value: '2'
- description: ''
is_valid: true
key: ONCE_IN_48_H
value: '3'
- description: ''
is_valid: true
key: ONLY_ONCE
value: '1'
key_format: string
strict: true
use_part: false
validate_only: false
value_format: int32
x-open-field-id: 1
x-open-source: $.http.body.rules[].actions[].frequency_info.type
required:
- type
type: object
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 5
x-open-source: $.http.body.rules[].actions[].frequency_info
subject_type:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-enum:
enum_package_expired: false
enum_package_id: 1804143361340417
enum_package_name: AutoRuleActionSubType
enums:
- description: ''
is_valid: true
key: BID
value: '6'
- description: ''
is_valid: true
key: DAILY_BUDGET
value: '4'
- description: ''
is_valid: true
key: LIFETIME_BUDGET
value: '5'
- description: ''
is_valid: true
key: MESSAGE
value: '3'
- description: ''
is_valid: true
key: TURN_OFF
value: '2'
- description: ''
is_valid: true
key: TURN_ON
value: '1'
key_format: string
strict: true
use_part: false
validate_only: false
value_format: int32
x-open-field-id: 1
x-open-source: $.http.body.rules[].actions[].subject_type
value:
description: ''
properties:
limit:
description: ''
format: float
type: number
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 3
x-open-source: $.http.body.rules[].actions[].value.limit
use_limit:
description: ''
type: boolean
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 2
x-open-source: $.http.body.rules[].actions[].value.use_limit
value:
description: ''
format: float
type: number
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 1
x-open-source: $.http.body.rules[].actions[].value.value
type: object
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 4
x-open-source: $.http.body.rules[].actions[].value
value_type:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-enum:
enum_package_expired: false
enum_package_id: 1804143484688450
enum_package_name: AutoRuleActionValType
enums:
- description: ''
is_valid: true
key: EXACT
value: '0'
- description: ''
is_valid: true
key: PERCENT
value: '1'
key_format: string
strict: true
use_part: false
validate_only: false
value_format: int32
x-open-field-id: 3
x-open-source: $.http.body.rules[].actions[].value_type
required:
- subject_type
type: object
x-open-allow-strlist: false
x-open-allow-strnum: false
type: array
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 3
x-open-source: $.http.body.rules[].actions
apply_objects:
description: ''
items:
properties:
bind_type:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-enum:
enum_package_expired: false
enum_package_id: 1804046212921409
enum_package_name: AutoRuleBindType
enums:
- description: ''
is_valid: true
key: BIND
value: '1'
- description: ''
is_valid: true
key: UNBIND
value: '2'
key_format: string
strict: true
use_part: false
validate_only: false
value_format: int32
x-open-field-id: 4
dimension:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-enum:
enum_package_expired: false
enum_package_id: 1803155537096705
enum_package_name: AutoRuleDimension
enums:
- description: ''
is_valid: true
key: AD
value: '3'
- description: ''
is_valid: true
key: ADGROUP
value: '2'
- description: ''
is_valid: true
key: CAMPAIGN
value: '1'
key_format: string
strict: true
use_part: false
validate_only: false
value_format: int32
x-open-field-id: 1
x-open-source: $.http.body.rules[].apply_objects[].dimension
dimension_ids:
description: ''
items:
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-convert:
- int64(%s)
type: array
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 2
x-open-source: $.http.body.rules[].apply_objects[].dimension_ids
pre_condition_type:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-enum:
enum_package_expired: false
enum_package_id: 1804046697548801
enum_package_name: AutoRulePreCondition
enums:
- description: ''
is_valid: true
key: ALL_ACTIVE_AD
value: '3'
- description: ''
is_valid: true
key: ALL_ACTIVE_AD_GROUP
value: '2'
- description: ''
is_valid: true
key: ALL_ACTIVE_AD_GROUP_UNDER_SELECTED
value: '4'
- description: ''
is_valid: true
key: ALL_ACTIVE_AD_UNDER_SELECTED
value: '5'
- description: ''
is_valid: true
key: ALL_ACTIVE_CAMPAIGN
value: '1'
- description: ''
is_valid: true
key: ALL_INACTIVE_AD
value: '8'
- description: ''
is_valid: true
key: ALL_INACTIVE_AD_GROUP
value: '7'
- description: ''
is_valid: true
key: ALL_INACTIVE_AD_GROUP_UNDER_SELECTED
value: '9'
- description: ''
is_valid: true
key: ALL_INACTIVE_AD_UNDER_SELECTED
value: '10'
- description: ''
is_valid: true
key: ALL_INACTIVE_CAMPAIGN
value: '6'
- description: ''
is_valid: true
key: SELECTED
value: '0'
key_format: string
strict: true
use_part: false
validate_only: false
value_format: int32
x-open-field-id: 3
x-open-source: $.http.body.rules[].apply_objects[].pre_condition_type
required:
- dimension
- pre_condition_type
type: object
x-open-allow-strlist: false
x-open-allow-strnum: false
type: array
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-field-id: 1
x-open-source: $.http.body.rules[].apply_objects
conditions:
description: ''
items:
properties:
calculation_type:
description: ''
type: string
x-open-allow-strlist: false
x-open-allow-strnum: false
x-open-enum:
enum_package_expired: false
enum_package_id: 1804138653195266
enum_package_name: AutoRuleConCalType
enums:
- description: ''
is_valid: true
key: ALL_OBJECTS
value: '1'
- description: ''
is_valid: true
key: DEFAULT
value: '0'
- description: ''
is_valid: true
key: OF_EACH_OBJECT
value: '2'
key_format: string
strict: true
use_part: false
validate_only: f
# --- truncated at 32 KB (148 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/tiktok-ads/refs/heads/main/openapi/tiktok-ads-automated-rules-api-openapi.yml