{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tokportal-com/json-schema/tokportal-com-credit-costs-response-schema.json",
  "title": "CreditCostsResponse",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tokportal-com-openapi.json#/components/schemas/CreditCostsResponse",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "costs",
        "workspace_pricing",
        "contract_bundle_allowance",
        "owning_fee",
        "pricing_transition",
        "examples"
      ],
      "properties": {
        "costs": {
          "type": "object",
          "required": [
            "account_creation",
            "youtube_account_creation",
            "video_upload",
            "advanced_warming",
            "niche_warming",
            "deep_warming",
            "video_edit",
            "comment_task",
            "sound_volume",
            "repost_url",
            "ad_code",
            "managed_account_subscription",
            "credential_reveal"
          ],
          "properties": {
            "account_creation": {
              "$ref": "#/$defs/CreditCost"
            },
            "api_comment_reply": {
              "$ref": "#/$defs/CreditCost"
            },
            "youtube_account_creation": {
              "type": "object",
              "required": [
                "credits",
                "description",
                "note"
              ],
              "properties": {
                "credits": {
                  "type": "integer",
                  "enum": [
                    100
                  ]
                },
                "description": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "video_upload": {
              "$ref": "#/$defs/CreditCost"
            },
            "advanced_warming": {
              "allOf": [
                {
                  "$ref": "#/$defs/CreditCost"
                }
              ],
              "description": "Advanced Niche Warming, priced per niche target. The only warming product TokPortal sells."
            },
            "niche_warming": {
              "allOf": [
                {
                  "$ref": "#/$defs/CreditCost"
                }
              ],
              "deprecated": true,
              "description": "LEGACY — not offered. Superseded by advanced_warming. The key stays in the response so existing integrations keep parsing; never present it as a purchasable option and never quote it."
            },
            "deep_warming": {
              "allOf": [
                {
                  "$ref": "#/$defs/CreditCost"
                }
              ],
              "deprecated": true,
              "description": "LEGACY — discontinued, new orders are rejected. Superseded by advanced_warming. The key stays in the response so existing integrations keep parsing; never present it as a purchasable option."
            },
            "video_edit": {
              "$ref": "#/$defs/CreditCost"
            },
            "comment_task": {
              "$ref": "#/$defs/CreditCost"
            },
            "sound_volume": {
              "$ref": "#/$defs/CreditCost"
            },
            "repost_url": {
              "$ref": "#/$defs/CreditCost"
            },
            "ad_code": {
              "$ref": "#/$defs/CreditCost"
            },
            "video_archive": {
              "$ref": "#/$defs/CreditCost"
            },
            "tiktok_appeal": {
              "$ref": "#/$defs/CreditCost"
            },
            "video_pin": {
              "$ref": "#/$defs/CreditCost"
            },
            "managed_account_subscription": {
              "$ref": "#/$defs/CreditCost"
            },
            "credential_reveal": {
              "allOf": [
                {
                  "$ref": "#/$defs/CreditCost"
                }
              ],
              "description": "Informational post-cutoff fallback for an unrevealed saved account. The exact reveal quote is account-specific; obtain it from HTTP 428 or 409 on the selected account's reveal or verification-code endpoint."
            }
          },
          "additionalProperties": false
        },
        "workspace_pricing": {
          "type": "object",
          "required": [
            "cohort",
            "effective_at",
            "transition_active",
            "tokportal_coverage_eligible_for_new_accounts_now"
          ],
          "properties": {
            "cohort": {
              "type": "string",
              "enum": [
                "new_credit_customer",
                "existing_credit_customer"
              ]
            },
            "effective_at": {
              "type": "string",
              "format": "date-time"
            },
            "transition_active": {
              "type": "boolean"
            },
            "tokportal_coverage_eligible_for_new_accounts_now": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "credential_reveal_allowance": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "credit_cost",
                "remaining",
                "applies_at",
                "note"
              ],
              "properties": {
                "credit_cost": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 149
                },
                "remaining": {
                  "type": "integer",
                  "minimum": 1
                },
                "applies_at": {
                  "type": "string",
                  "enum": [
                    "paid_first_reveal"
                  ]
                },
                "note": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Active negotiated workspace reveal price and remaining shared first-access quota, or null. Already included in costs.credential_reveal.credits. Obtain the exact account-specific consent quote before revealing."
        },
        "contract_bundle_allowance": {
          "oneOf": [
            {
              "$ref": "#/$defs/ContractBundleAllowance"
            },
            {
              "type": "null"
            }
          ],
          "description": "Workspace-specific contractual creation allowance, or null. Read this immediately before bundle creation instead of hardcoding special pricing."
        },
        "owning_fee": {
          "type": "object",
          "required": [
            "requires_admin_approval",
            "minimum_live_accounts",
            "minimum_reveal_ratio",
            "pending_reveal_credits",
            "legacy_usd_per_account_per_30_days",
            "new_agreement_usd_per_account_per_30_days",
            "new_agreement_effective_at",
            "note"
          ],
          "properties": {
            "requires_admin_approval": {
              "type": "boolean",
              "enum": [
                true
              ]
            },
            "minimum_live_accounts": {
              "type": "integer",
              "enum": [
                25
              ]
            },
            "minimum_reveal_ratio": {
              "type": "number",
              "enum": [
                0.25
              ]
            },
            "pending_reveal_credits": {
              "type": "integer",
              "enum": [
                150
              ]
            },
            "legacy_usd_per_account_per_30_days": {
              "type": "number",
              "enum": [
                10
              ]
            },
            "new_agreement_usd_per_account_per_30_days": {
              "type": "number",
              "enum": [
                15
              ]
            },
            "new_agreement_effective_at": {
              "type": "string",
              "format": "date-time",
              "description": "Immutable production PRE-migration cutover returned by the database pricing authority."
            },
            "note": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "pricing_transition": {
          "type": "object",
          "required": [
            "users_without_paid_credit_purchase_before_transition",
            "users_with_paid_credit_purchase_before_transition",
            "managed_account_eligibility_at",
            "managed_account_eligibility_at_deprecated",
            "managed_account_eligibility_note",
            "grandfathering"
          ],
          "properties": {
            "users_without_paid_credit_purchase_before_transition": {
              "type": "object",
              "required": [
                "effective_at",
                "tokportal_coverage_eligible_for_accounts_created_at_or_after",
                "account_creation_credits",
                "advanced_warming_per_term_credits"
              ],
              "properties": {
                "effective_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Immutable production PRE-migration cutover captured by the database."
                },
                "tokportal_coverage_eligible_for_accounts_created_at_or_after": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Accounts already present before this database-owned cutoff are permanently grandfathered."
                },
                "account_creation_credits": {
                  "type": "integer",
                  "enum": [
                    32
                  ]
                },
                "advanced_warming_per_term_credits": {
                  "type": "integer",
                  "enum": [
                    5
                  ]
                }
              },
              "additionalProperties": false
            },
            "users_with_paid_credit_purchase_before_transition": {
              "type": "object",
              "required": [
                "effective_at",
                "tokportal_coverage_eligible_for_accounts_created_at_or_after",
                "before_effective_at",
                "after_effective_at"
              ],
              "properties": {
                "effective_at": {
                  "type": "string",
                  "format": "date-time",
                  "enum": [
                    "2026-08-14T11:00:00.000Z"
                  ]
                },
                "tokportal_coverage_eligible_for_accounts_created_at_or_after": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Global database-owned saved-account cutoff; independent from the workspace action-pricing grace deadline."
                },
                "before_effective_at": {
                  "type": "object",
                  "required": [
                    "account_creation_credits",
                    "advanced_warming_per_term_credits"
                  ],
                  "properties": {
                    "account_creation_credits": {
                      "type": "integer",
                      "enum": [
                        25
                      ]
                    },
                    "advanced_warming_per_term_credits": {
                      "type": "integer",
                      "enum": [
                        3
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "after_effective_at": {
                  "type": "object",
                  "required": [
                    "account_creation_credits",
                    "advanced_warming_per_term_credits"
                  ],
                  "properties": {
                    "account_creation_credits": {
                      "type": "integer",
                      "enum": [
                        32
                      ]
                    },
                    "advanced_warming_per_term_credits": {
                      "type": "integer",
                      "enum": [
                        5
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            },
            "managed_account_eligibility_at": {
              "type": "string",
              "format": "date-time",
              "description": "Immutable production PRE-migration cutoff used for permanent saved-account grandfathering."
            },
            "managed_account_eligibility_at_deprecated": {
              "type": "boolean",
              "enum": [
                false
              ]
            },
            "managed_account_eligibility_note": {
              "type": "string"
            },
            "grandfathering": {
              "type": "string",
              "description": "Account-level permanent grandfathering for TokPortal Coverage and credential reveal. The saved-account creation cutoff is independent from the workspace action-pricing transition."
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false,
  "$defs": {
    "ContractBundleAllowance": {
      "type": "object",
      "required": [
        "policy_key",
        "applies_at",
        "atomic_with_credit_debit",
        "qualifying_bundle",
        "bundle_limit",
        "consumed",
        "remaining",
        "account_creation_credits",
        "advanced_warming_per_term_credits",
        "coverage_exempt",
        "note"
      ],
      "properties": {
        "policy_key": {
          "type": [
            "string",
            "null"
          ]
        },
        "applies_at": {
          "type": "string",
          "enum": [
            "bundle_creation_checkout"
          ]
        },
        "atomic_with_credit_debit": {
          "type": "boolean",
          "enum": [
            true
          ]
        },
        "qualifying_bundle": {
          "type": "object",
          "required": [
            "platform",
            "country",
            "new_account_only",
            "bundle_types"
          ],
          "properties": {
            "platform": {
              "type": "string"
            },
            "country": {
              "type": "string"
            },
            "new_account_only": {
              "type": "boolean",
              "enum": [
                true
              ]
            },
            "bundle_types": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "account_only",
                  "account_and_videos"
                ]
              }
            }
          },
          "additionalProperties": false
        },
        "bundle_limit": {
          "type": "integer",
          "minimum": 1
        },
        "consumed": {
          "type": "integer",
          "minimum": 0
        },
        "remaining": {
          "type": "integer",
          "minimum": 0
        },
        "account_creation_credits": {
          "type": "integer",
          "minimum": 1
        },
        "advanced_warming_per_term_credits": {
          "type": "integer",
          "minimum": 1
        },
        "coverage_exempt": {
          "type": "boolean"
        },
        "note": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "CreditCost": {
      "type": "object",
      "required": [
        "credits",
        "description",
        "note"
      ],
      "properties": {
        "credits": {
          "type": "integer",
          "minimum": 0
        },
        "description": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "CreditCostExample": {
      "type": "object",
      "required": [
        "description",
        "total"
      ],
      "properties": {
        "description": {
          "type": "string"
        },
        "total": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false
    }
  }
}