Configuring Advanced TCP Protection via API
You can configure Advanced TCP Protection using the Advanced TCP Protection API.
The Advanced TCP Protection API only supports API token authentication. For more information on API authentication, refer to Getting Started: Requests in the Cloudflare API documentation.
For examples of API calls, refer to Common API calls.
Endpoints
To obtain the complete endpoint, append the Advanced TCP Protection API endpoints listed below to the Cloudflare API base URL.
The Cloudflare API base URL is:
https://api.cloudflare.com/client/v4
The <ACCOUNT_ID> argument is the account ID (a hexadecimal string). You can find this value in the Cloudflare dashboard.
The tables in the following sections summarize the available operations.
General operations
| Operation | Method and endpoint / Description | 
|---|
| Get Advanced TCP Protection status
 | Gets the global Advanced TCP Protection status (enabled or disabled).GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_protection_status
 | 
| Update Advanced TCP Protection status
 | Enables or disables Advanced TCP Protection.PATCH accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_protection_status
 | 
Prefix operations
| Operation | Method and endpoint / Description | 
|---|
| List prefixes | Fetches all Advanced TCP Protection prefixes in the account.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/prefixes
 | 
| Add prefixes in bulk | Adds prefixes in bulk to the account (up to 300 prefixes per request).POST accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/prefixes/bulk
 | 
| Get a prefix | Fetches the details of an existing prefix.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/prefixes/<PREFIX_ID>
 | 
| Update a prefix | Updates an existing prefix.PATCH accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/prefixes/<PREFIX_ID>
 | 
| Delete a prefix | Deletes an existing prefix.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/prefixes/<PREFIX_ID>
 | 
| Delete all prefixes | Deletes all existing prefixes from the account.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/prefixes
 | 
Allowlist operations
| Operation | Method and endpoint / Description | 
|---|
| List allowlisted prefixes | Fetches all prefixes in the account allowlist.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/allowlist
 | 
| Add an allowlisted prefix | Adds a prefix to the allowlist.POST accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/allowlist
 | 
| Get an allowlisted prefix | Fetches the details of an existing prefix in the allowlist.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/allowlist/<ALLOWLIST_ID>
 | 
| Update an allowlisted prefix | Updates an existing prefix in the allowlist.PATCH accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/allowlist/<ALLOWLIST_ID>
 | 
| Delete an allowlisted prefix | Deletes an existing prefix from the allowlist.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/allowlist/<ALLOWLIST_ID>
 | 
| Delete all allowlisted prefixes | Deletes all existing prefixes from the allowlist.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/allowlist
 | 
SYN Flood Protection operations
Rules
| Operation | Method and endpoint / Description | 
|---|
| List SYN flood rules | Fetches all SYN flood rules in the account.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/rules
 | 
| Add a SYN flood rule | Adds a SYN flood rule to the account.POST accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/rules
 | 
| Get a SYN flood rule | Fetches the details of an existing SYN flood rule in the account.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/rules/<RULE_ID>
 | 
| Update a SYN flood rule | Updates an existing SYN flood rule in the account.PATCH accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/rules/<RULE_ID>
 | 
| Delete a SYN flood rule | Deletes an existing SYN flood rule from the account.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/rules/<RULE_ID>
 | 
| Delete all SYN flood rules | Deletes all existing SYN flood rules from the account.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/rules
 | 
Filters
| Operation | Method and endpoint / Description | 
|---|
| List SYN flood filters | Fetches all SYN flood filters in the account.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/filters
 | 
| Add a SYN flood filter | Adds a SYN flood filter to the account.POST accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/filters
 | 
| Get a SYN flood filter | Fetches the details of an existing SYN flood filter in the account.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/filters/<FILTER_ID>
 | 
| Update a SYN flood filter | Updates an existing SYN flood filter in the account.PATCH accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/filters/<FILTER_ID>
 | 
| Delete a SYN flood filter | Deletes an existing SYN flood filter from the account.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/filters/<FILTER_ID>
 | 
| Delete all SYN flood filters | Deletes all existing SYN flood filters from the account.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/syn_protection/filters
 | 
Out-of-state TCP Protection operations
Rules
| Operation | Method and endpoint / Description | 
|---|
| List out-of-state TCP rules | Fetches all out-of-state TCP rules in the account.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules
 | 
| Add an out-of-state TCP rule | Adds an out-of-state TCP rule to the account.POST accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules
 | 
| Get an out-of-state TCP rule | Fetches the details of an existing out-of-state TCP rule in the account.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/<RULE_ID>
 | 
| Update an out-of-state TCP rule | Updates an existing out-of-state TCP rule in the account.PATCH accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/<RULE_ID>
 | 
| Delete an out-of-state TCP rule | Deletes an existing out-of-state TCP rule from the account.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/<RULE_ID>
 | 
| Delete all out-of-state TCP rules | Deletes all existing out-of-state TCP rules from the account.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules
 | 
Filters
| Operation | Method and endpoint / Description | 
|---|
| List out-of-state TCP filters | Fetches all out-of-state TCP filters in the account.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters
 | 
| Add an out-of-state TCP filter | Adds an out-of-state TCP filter to the account.POST accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters
 | 
| Get an out-of-state TCP filter | Fetches the details of an existing out-of-state TCP filter in the account.GET accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/<FILTER_ID>
 | 
| Update an out-of-state TCP filter | Updates an existing out-of-state TCP filter in the account.PATCH accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/<FILTER_ID>
 | 
| Delete an out-of-state TCP filter | Deletes an existing out-of-state TCP filter from the account.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/<FILTER_ID>
 | 
| Delete all out-of-state TCP filters | Deletes all existing out-of-state TCP filters from the account.DELETE accounts/<ACCOUNT_ID>/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters
 | 
The API operations that return a list of items use pagination. For more information on the available pagination query parameters, refer to Requests: Pagination in the API documentation.