{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenAI API",
    "version": "2.3.0"
  },
  "servers": [
    {
      "url": "https://api.ads.openai.com/v1"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "AdsOAuth": ["ads.admin.all.read"]
    }
  ],
  "paths": {
    "/campaigns": {
      "get": {
        "summary": "List Campaigns",
        "description": "Get all campaigns for an ad account",
        "operationId": "ListCampaignsMethod",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/CampaignListIncludeParam"
              }
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 1000,
              "pattern": "^.*\\S.*$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ListOrderParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.campaigns.list_campaigns.ListCampaignsMethod"
      },
      "post": {
        "summary": "Create Campaign",
        "description": "Create a campaign for an ad account",
        "operationId": "CreateCampaignMethod",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key for retrying this create request. If a matching prior create is visible, the existing object is returned instead of creating a duplicate. Must contain at least one non-whitespace character and be at most 255 characters.",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": ".*\\S.*"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCampaignBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.campaigns.create_campaign.CreateCampaignMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/campaigns/{campaign_id}": {
      "get": {
        "summary": "Get Campaign",
        "description": "Get a campaign",
        "operationId": "GetCampaignMethod",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/CampaignGetItemIncludeParam"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.campaigns.get_campaign.GetCampaignMethod"
      },
      "post": {
        "summary": "Update Campaign",
        "description": "Update a campaign",
        "operationId": "UpdateCampaignMethod",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCampaignBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.campaigns.update_campaign.UpdateCampaignMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/campaigns/{campaign_id}/activate": {
      "post": {
        "summary": "Activate Campaign",
        "description": "Activate a campaign",
        "operationId": "ActivateCampaignMethod",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.campaigns.activate_campaign.ActivateCampaignMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/campaigns/{campaign_id}/pause": {
      "post": {
        "summary": "Pause Campaign",
        "description": "Pause a campaign",
        "operationId": "PauseCampaignMethod",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.campaigns.pause_campaign.PauseCampaignMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/campaigns/{campaign_id}/archive": {
      "post": {
        "summary": "Archive Campaign",
        "description": "Archive a campaign",
        "operationId": "ArchiveCampaignMethod",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.campaigns.archive_campaign.ArchiveCampaignMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/custom_audiences": {
      "get": {
        "summary": "List Custom Audiences",
        "description": "List custom audiences for the authenticated ad account.",
        "operationId": "ListCustomAudiencesMethod",
        "parameters": [
          {
            "name": "intended_use",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CustomAudienceIntendedUseParam"
            }
          },
          {
            "name": "custom_audience_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 500
            }
          },
          {
            "name": "policy_revision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 64,
              "maxLength": 64
            }
          },
          {
            "name": "matched_count_granularity",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CustomAudienceMatchedCountGranularityParam"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ListOrderParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudiencesResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.list_custom_audiences.ListCustomAudiencesMethod"
      },
      "post": {
        "summary": "Create Custom Audience",
        "description": "Create a custom audience from an uploaded file, or without a file when small audiences are enabled for the account. Processing and publication are asynchronous.",
        "operationId": "CreateCustomAudienceMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomAudienceBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudienceItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.create_custom_audience.CreateCustomAudienceMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/custom_audiences/{custom_audience_id}": {
      "get": {
        "summary": "Get Custom Audience",
        "description": "Get a custom audience for the authenticated ad account.",
        "operationId": "GetCustomAudienceMethod",
        "parameters": [
          {
            "name": "custom_audience_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "matched_count_granularity",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CustomAudienceMatchedCountGranularityParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudienceItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.get_custom_audience.GetCustomAudienceMethod"
      }
    },
    "/custom_audiences/{custom_audience_id}/archive": {
      "post": {
        "summary": "Archive Custom Audience",
        "description": "Archive a custom audience for the authenticated ad account.",
        "operationId": "ArchiveCustomAudienceMethod",
        "parameters": [
          {
            "name": "custom_audience_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudienceItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.archive_custom_audience.ArchiveCustomAudienceMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/custom_audiences/{custom_audience_id}/add": {
      "post": {
        "summary": "Add Custom Audience Members",
        "description": "Add uploaded or inline identifiers to an existing custom audience.",
        "operationId": "AddCustomAudienceMembersMethod",
        "parameters": [
          {
            "name": "custom_audience_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key for retrying this create request. If a matching prior create is visible, the existing object is returned instead of creating a duplicate. Must contain at least one non-whitespace character and be at most 255 characters.",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": ".*\\S.*"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomAudienceMembershipMutationBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudienceMembershipOperationBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.mutate_custom_audience_members.AddCustomAudienceMembersMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/custom_audiences/{custom_audience_id}/remove": {
      "post": {
        "summary": "Remove Custom Audience Members",
        "description": "Remove uploaded or inline identifiers from an existing custom audience.",
        "operationId": "RemoveCustomAudienceMembersMethod",
        "parameters": [
          {
            "name": "custom_audience_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key for retrying this create request. If a matching prior create is visible, the existing object is returned instead of creating a duplicate. Must contain at least one non-whitespace character and be at most 255 characters.",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": ".*\\S.*"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomAudienceMembershipMutationBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudienceMembershipOperationBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.mutate_custom_audience_members.RemoveCustomAudienceMembersMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/custom_audiences/{custom_audience_id}/replace": {
      "post": {
        "summary": "Replace Custom Audience Members",
        "description": "Replace an existing audience using an uploaded file and its current revision.",
        "operationId": "ReplaceCustomAudienceMembersMethod",
        "parameters": [
          {
            "name": "custom_audience_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key for retrying this create request. If a matching prior create is visible, the existing object is returned instead of creating a duplicate. Must contain at least one non-whitespace character and be at most 255 characters.",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": ".*\\S.*"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceCustomAudienceMembersBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudienceMembershipOperationBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.mutate_custom_audience_members.ReplaceCustomAudienceMembersMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/custom_audiences/merge": {
      "post": {
        "summary": "Merge Custom Audiences",
        "description": "Create an independent custom audience containing all matched source members.",
        "operationId": "MergeCustomAudiencesMethod",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key for retrying this create request. If a matching prior create is visible, the existing object is returned instead of creating a duplicate. Must contain at least one non-whitespace character and be at most 255 characters.",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": ".*\\S.*"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MergeCustomAudiencesBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudienceMembershipOperationBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.mutate_custom_audience_members.MergeCustomAudiencesMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/custom_audiences/{custom_audience_id}/operations/{operation_id}": {
      "get": {
        "summary": "Get Custom Audience Operation",
        "description": "Retrieve the privacy-safe lifecycle state of a custom audience operation.",
        "operationId": "GetCustomAudienceOperationMethod",
        "parameters": [
          {
            "name": "custom_audience_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudienceMembershipOperationBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.mutate_custom_audience_members.GetCustomAudienceOperationMethod"
      }
    },
    "/custom_audiences/{custom_audience_id}/operations": {
      "get": {
        "summary": "List Custom Audience Operations",
        "description": "List accepted custom audience operations for the authenticated ad account.",
        "operationId": "ListCustomAudienceOperationsMethod",
        "parameters": [
          {
            "name": "custom_audience_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudienceMembershipOperationsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.mutate_custom_audience_members.ListCustomAudienceOperationsMethod"
      }
    },
    "/custom_audiences/{custom_audience_id}/operations/{operation_id}/cancel": {
      "post": {
        "summary": "Cancel Custom Audience Operation",
        "description": "Cancel an accepted ADD or REMOVE operation before membership changes begin. Operations already applying changes cannot be canceled.",
        "operationId": "CancelCustomAudienceOperationMethod",
        "parameters": [
          {
            "name": "custom_audience_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudienceMembershipOperationBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.mutate_custom_audience_members.CancelCustomAudienceOperationMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/custom_audiences/{custom_audience_id}/operations/{operation_id}/resume": {
      "post": {
        "summary": "Resume Custom Audience Operation",
        "description": "Resume an existing ADD or REMOVE operation using its original inputs and checkpoints. No request body or Idempotency-Key is required.",
        "operationId": "ResumeCustomAudienceOperationMethod",
        "parameters": [
          {
            "name": "custom_audience_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAudienceMembershipOperationBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.custom_audiences.mutate_custom_audience_members.ResumeCustomAudienceOperationMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/api_keys": {
      "post": {
        "summary": "Create Api Key",
        "description": "Create an API key scoped to the selected ad account.",
        "operationId": "CreateApiKeyMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.create_api_key.CreateApiKeyMethod",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/ad_account/brand": {
      "post": {
        "summary": "Update Ad Account",
        "description": "Update ad account brand metadata. The legacy name field synchronizes all three names; legal_name, account_name, and brand_name update independently and cannot be combined with name.",
        "operationId": "UpdateAdAccountMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAdAccountBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.update_ad_account.UpdateAdAccountMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_account/activate": {
      "post": {
        "summary": "Activate Ad Account",
        "description": "Activate the ad account.",
        "operationId": "ActivateAdAccountMethod",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.activate_ad_account.ActivateAdAccountMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_account/pause": {
      "post": {
        "summary": "Pause Ad Account",
        "description": "Pause the ad account.",
        "operationId": "PauseAdAccountMethod",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.pause_ad_account.PauseAdAccountMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_accounts": {
      "get": {
        "summary": "List Ad Accounts",
        "description": "List ad accounts accessible to the authenticated API key",
        "operationId": "ListAdAccountsMethod",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.list_ad_accounts.ListAdAccountsMethod"
      }
    },
    "/audit_logs": {
      "get": {
        "summary": "List Audit Logs",
        "description": "List audit logs for the authenticated ad account.",
        "operationId": "ListAuditLogsMethod",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ListOrderParam"
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "description": "Object ID of the campaign. Includes logs for the campaign and its ad groups and ads.",
            "required": false,
            "schema": {
              "description": "Object ID of the campaign. Includes logs for the campaign and its ad groups and ads.",
              "type": "string"
            }
          },
          {
            "name": "ad_group_id",
            "in": "query",
            "description": "Object ID of the ad group. Includes logs for the ad group and its ads.",
            "required": false,
            "schema": {
              "description": "Object ID of the ad group. Includes logs for the ad group and its ads.",
              "type": "string"
            }
          },
          {
            "name": "ad_id",
            "in": "query",
            "description": "Object ID of the ad.",
            "required": false,
            "schema": {
              "description": "Object ID of the ad.",
              "type": "string"
            }
          },
          {
            "name": "actor_id",
            "in": "query",
            "description": "ID of the actor who made the change, not the affected user.",
            "required": false,
            "schema": {
              "description": "ID of the actor who made the change, not the affected user.",
              "type": "string"
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "description": "Inclusive start time as a Unix timestamp in seconds.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 946684800,
              "maximum": 4102444800
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "description": "Inclusive end time as a Unix timestamp in seconds.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 946684800,
              "maximum": 4102444800
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListAuditLogsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.list_audit_logs.ListAuditLogsMethod",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/ad_account_creation_sessions": {
      "post": {
        "summary": "Create Ad Account Creation Session",
        "description": "Start OpenAI-hosted Ads account creation for an authorized partner user.",
        "operationId": "CreateAdAccountCreationSessionMethod",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key for retrying this create request. If a matching prior create is visible, the existing object is returned instead of creating a duplicate. Reusing a key with a different request body is rejected. Must contain at least one non-whitespace character and be at most 255 characters.",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": ".*\\S.*"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAdAccountCreationSessionBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountCreationSessionResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ad_account_creation_sessions.CreateAdAccountCreationSessionMethod",
        "security": [
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/me": {
      "get": {
        "summary": "Retrieve the current user identity",
        "description": "Return the authenticated user's stable application-scoped opaque identifier.",
        "operationId": "GetAdsOAuthMeMethod",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdsOAuthMeResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.me.GetAdsOAuthMeMethod",
        "security": [
          {
            "AdsOAuth": ["ads.admin.all.read"]
          }
        ]
      }
    },
    "/ad_account": {
      "get": {
        "summary": "Get Ad Account",
        "description": "Get metadata for the ad account",
        "operationId": "GetAdAccountMethod",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.get_ad_account.GetAdAccountMethod"
      }
    },
    "/ad_account/spend_limit_windows": {
      "get": {
        "summary": "Get Ad Account Spend Limit Windows",
        "description": "View spend limit windows with inclusive start dates and exclusive end dates, ordered by start time ascending. Active and upcoming Daily recurrence rules are returned separately in daily_limits; daily_limit retains the active or earliest upcoming rule for legacy clients. data remains dated windows only. Creating account spending limits requires an ad account on postpaid invoice billing.",
        "operationId": "GetAdAccountSpendLimitWindowsMethod",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountSpendLimitWindowsListResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.get_ad_account_spend_limit_windows.GetAdAccountSpendLimitWindowsMethod"
      },
      "post": {
        "summary": "Create Ad Account Spend Limit Window",
        "description": "Create a spend limit window with an inclusive start date and exclusive end date. Available only for ad accounts on postpaid invoice billing.",
        "operationId": "CreateAdAccountSpendLimitWindowMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAdAccountSpendLimitWindowBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountSpendLimitWindowBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.create_ad_account_spend_limit_window.CreateAdAccountSpendLimitWindowMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_account/spend_limit_windows/{window_id}": {
      "post": {
        "summary": "Update Ad Account Spend Limit Window",
        "description": "Edit a spend limit window with an inclusive start date and exclusive end date. Available only for ad accounts on postpaid invoice billing.",
        "operationId": "UpdateAdAccountSpendLimitWindowMethod",
        "parameters": [
          {
            "name": "window_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAdAccountSpendLimitWindowBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountSpendLimitWindowBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.update_ad_account_spend_limit_window.UpdateAdAccountSpendLimitWindowMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_account/spend_limit_windows/{window_id}/delete": {
      "post": {
        "summary": "Delete Ad Account Spend Limit Window",
        "description": "Delete an active or scheduled spend limit window before it ends. Available only for ad accounts on postpaid invoice billing.",
        "operationId": "DeleteAdAccountSpendLimitWindowMethod",
        "parameters": [
          {
            "name": "window_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteAdAccountSpendLimitWindowResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.delete_ad_account_spend_limit_window.DeleteAdAccountSpendLimitWindowMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_account/daily_spend_limit": {
      "post": {
        "summary": "Set Ad Account Daily Spend Limit",
        "description": "Set an account-wide daily billable ad-spend limit, with an optional exclusive end date. Send window_id=null to create a separate non-overlapping schedule, or a rule ID to edit. Omitting window_id retains legacy singleton upsert and rejects ambiguous configurations. Creating or editing a daily limit requires an ad account on postpaid invoice billing. Omit end_date to retain an existing end, or send null for no end. First activation takes effect no earlier than the next account-local day. Increases and decreases apply on save and retain today's counted spend; a decrease below recorded spend is rejected. Like Date range limits, edits are not retroactive: delayed charges use the settings effective at their event time, and the spend check is not atomic with concurrent billing. The saved amount repeats each day in the recorded account timezone, without carryover, proration, or campaign-style flexibility. Use the latest configuration revision.",
        "operationId": "SetAdAccountDailySpendLimitMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAdAccountDailySpendLimitBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountDailySpendLimitChangeResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ad_account_daily_spend_limit.SetAdAccountDailySpendLimitMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_account/daily_spend_limit/delete": {
      "post": {
        "summary": "Delete Ad Account Daily Spend Limit",
        "description": "Remove the selected daily limit on save. Omit window_id only when at most one active or upcoming Daily rule exists. Historical protected days and their billable allowances are retained for late events and corrections. Does not delete dated or IO limits.",
        "operationId": "DeleteAdAccountDailySpendLimitMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAdAccountDailySpendLimitBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountDailySpendLimitChangeResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ad_account_daily_spend_limit.DeleteAdAccountDailySpendLimitMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_account/insights": {
      "get": {
        "summary": "Get Ad Account Insights",
        "description": "Get ad account insights aggregated by time granularity. Attribution metrics for the current account-local day are preliminary and may change as conversions are processed.",
        "operationId": "GetAdAccountInsightsMethod",
        "parameters": [
          {
            "name": "attribution_window_days",
            "in": "query",
            "description": "Click attribution window: 7, 14, or 30 days. Omitted or null windows independently default to 30-day click and 1-day view.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 7,
              "maximum": 30,
              "enum": [7, 14, 30]
            }
          },
          {
            "name": "view_through_attribution_window_days",
            "in": "query",
            "description": "View attribution window: 0 excludes views; 1 includes one-day views.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1,
              "enum": [0, 1]
            }
          },
          {
            "name": "attribution_time_basis",
            "in": "query",
            "description": "Date reports by the attributed ad interaction (ad_event_time) or conversion (conversion_time). Defaults to ad_event_time.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AttributionTimeBasisParam"
            }
          },
          {
            "name": "time_granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aggregation_level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2000
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time_ranges",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "segments",
            "in": "query",
            "description": "Use [\"hotel\"] for enrolled accounts to request Hotel-property reporting. Hotel supports none/daily/monthly, hierarchy aggregation, and forward pagination. Property conversions, carousel-card metrics and geography/device segments are unsupported.",
            "required": false,
            "schema": {
              "description": "Use [\"hotel\"] for enrolled accounts to request Hotel-property reporting. Hotel supports none/daily/monthly, hierarchy aggregation, and forward pagination. Property conversions, carousel-card metrics and geography/device segments are unsupported.",
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "override_segment_group_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "includes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.insights.get_ad_account_insights.GetAdAccountInsightsMethod"
      }
    },
    "/ad_account/hotel_insights": {
      "get": {
        "summary": "Get Hotel Insights",
        "description": "Get Hotel-property Insights for the authenticated ad account. Available only to accounts enrolled in Hotel reporting. Impressions/clicks combine settled and estimated data; spend and cost rates remain settled-only. Inspect coverage before interpreting partial or empty results. Property conversions, geography breakdowns, and metadata sorting are not supported. Current catalog completion is optional and feed-scoped.",
        "operationId": "GetHotelInsightsMethod",
        "parameters": [
          {
            "name": "filters",
            "in": "query",
            "description": "JSON object strings with \"field\", \"operator\", \"value\"; all filters are ANDed. At most 2000 text values are allowed across all filters. hotel_name, hotel_brand, hotel_category, hotel_city, hotel_region and hotel_country_code support IN with string arrays (exact, case-sensitive current metadata). impressions, clicks, spend, ctr, cpc and cpm support GREATER_THAN/LESS_THAN with finite numbers. Metrics filter property/time-bucket totals before pagination and hierarchy expansion; trends use daily property totals. CTR is a ratio; CPC/CPM use settled denominators. Missing metadata does not match a text filter.",
            "required": false,
            "schema": {
              "description": "JSON object strings with \"field\", \"operator\", \"value\"; all filters are ANDed. At most 2000 text values are allowed across all filters. hotel_name, hotel_brand, hotel_category, hotel_city, hotel_region and hotel_country_code support IN with string arrays (exact, case-sensitive current metadata). impressions, clicks, spend, ctr, cpc and cpm support GREATER_THAN/LESS_THAN with finite numbers. Metrics filter property/time-bucket totals before pagination and hierarchy expansion; trends use daily property totals. CTR is a ratio; CPC/CPM use settled denominators. Missing metadata does not match a text filter.",
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 50
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Inclusive YYYY-MM-DD in the ad account timezone. Older ranges are accepted; only retained data is returned. Inspect coverage for unavailable history.",
            "required": true,
            "schema": {
              "description": "Inclusive YYYY-MM-DD in the ad account timezone. Older ranges are accepted; only retained data is returned. Inspect coverage for unavailable history.",
              "type": "string",
              "minLength": 10,
              "maxLength": 10
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Inclusive YYYY-MM-DD in the ad account timezone, no later than today.",
            "required": true,
            "schema": {
              "description": "Inclusive YYYY-MM-DD in the ad account timezone, no later than today.",
              "type": "string",
              "minLength": 10,
              "maxLength": 10
            }
          },
          {
            "name": "campaign_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 2000
            }
          },
          {
            "name": "ad_group_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 2000
            }
          },
          {
            "name": "ad_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 2000
            }
          },
          {
            "name": "inventory_items",
            "in": "query",
            "description": "Optional exact feed/property pairs. Each entry is a JSON object string with \"inventory_feed_id\" and \"inventory_item_id\". A property ID is scoped to its feed; entries are ORed as pairs and combined with the other filters. Omitted or empty selects all properties within the other filters.",
            "required": false,
            "schema": {
              "description": "Optional exact feed/property pairs. Each entry is a JSON object string with \"inventory_feed_id\" and \"inventory_item_id\". A property ID is scoped to its feed; entries are ORed as pairs and combined with the other filters. Omitted or empty selects all properties within the other filters.",
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 2000
            }
          },
          {
            "name": "include_zero_activity",
            "in": "query",
            "description": "Include current active, unexpired properties from owned Hotel feeds even without activity. Hierarchy filters constrain configured feeds, not exact Hotel Set membership. Daily/monthly results add a zero only in the latest requested bucket. Catalog-only rows retain bucket-mutability data_status; page coverage remains the metric-completeness signal.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "time_granularity",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/HotelInsightsGranularity"
            }
          },
          {
            "name": "breakdown",
            "in": "query",
            "description": "Expand properties into hierarchy rows. Each row retains its own metrics and repeats hotel_impressions/clicks/spend/ctr/cpc/cpm for the filtered property/time-bucket total. Do not sum these repeated parent metrics across child rows.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/HotelInsightsBreakdown"
            }
          },
          {
            "name": "sort_field",
            "in": "query",
            "description": "Sort property totals before paging or expanding hierarchy rows. Rates use ratios of totals; spend/CPC/CPM use settled data only. Time buckets remain newest first.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/HotelInsightsSortField"
            }
          },
          {
            "name": "sort_direction",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/HotelInsightsSortDirection"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum property/time-bucket groups; each may expand into multiple hierarchy rows.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2000
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "include_total_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HotelInsightsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.insights.get_hotel_insights.GetHotelInsightsMethod"
      }
    },
    "/ad_account/hotel_insights/timeseries": {
      "get": {
        "summary": "Get Hotel Insights Timeseries",
        "description": "Get daily Hotel Insights totals across the selected properties for the authenticated ad account, independently of property pagination. Dates use the account timezone. Impressions/clicks combine settled and estimated data; spend and cost rates are settled-only. Missing dates are not filled with zeros: inspect coverage before interpreting partial or empty results. Requires enrollment in Hotel reporting.",
        "operationId": "GetHotelInsightsTimeseriesMethod",
        "parameters": [
          {
            "name": "filters",
            "in": "query",
            "description": "JSON object strings with \"field\", \"operator\", \"value\"; all filters are ANDed. At most 2000 text values are allowed across all filters. hotel_name, hotel_brand, hotel_category, hotel_city, hotel_region and hotel_country_code support IN with string arrays (exact, case-sensitive current metadata). impressions, clicks, spend, ctr, cpc and cpm support GREATER_THAN/LESS_THAN with finite numbers. Metrics filter property/time-bucket totals before pagination and hierarchy expansion; trends use daily property totals. CTR is a ratio; CPC/CPM use settled denominators. Missing metadata does not match a text filter.",
            "required": false,
            "schema": {
              "description": "JSON object strings with \"field\", \"operator\", \"value\"; all filters are ANDed. At most 2000 text values are allowed across all filters. hotel_name, hotel_brand, hotel_category, hotel_city, hotel_region and hotel_country_code support IN with string arrays (exact, case-sensitive current metadata). impressions, clicks, spend, ctr, cpc and cpm support GREATER_THAN/LESS_THAN with finite numbers. Metrics filter property/time-bucket totals before pagination and hierarchy expansion; trends use daily property totals. CTR is a ratio; CPC/CPM use settled denominators. Missing metadata does not match a text filter.",
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 50
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Inclusive YYYY-MM-DD in the ad account timezone. Older ranges are accepted; only retained data is returned. Inspect coverage for unavailable history.",
            "required": true,
            "schema": {
              "description": "Inclusive YYYY-MM-DD in the ad account timezone. Older ranges are accepted; only retained data is returned. Inspect coverage for unavailable history.",
              "type": "string",
              "minLength": 10,
              "maxLength": 10
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Inclusive YYYY-MM-DD in the ad account timezone, no later than today.",
            "required": true,
            "schema": {
              "description": "Inclusive YYYY-MM-DD in the ad account timezone, no later than today.",
              "type": "string",
              "minLength": 10,
              "maxLength": 10
            }
          },
          {
            "name": "campaign_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 2000
            }
          },
          {
            "name": "ad_group_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 2000
            }
          },
          {
            "name": "ad_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 2000
            }
          },
          {
            "name": "inventory_items",
            "in": "query",
            "description": "Optional exact feed/property pairs. Each entry is a JSON object string with \"inventory_feed_id\" and \"inventory_item_id\". A property ID is scoped to its feed; entries are ORed as pairs and combined with the other filters. Omitted or empty selects all properties within the other filters.",
            "required": false,
            "schema": {
              "description": "Optional exact feed/property pairs. Each entry is a JSON object string with \"inventory_feed_id\" and \"inventory_item_id\". A property ID is scoped to its feed; entries are ORed as pairs and combined with the other filters. Omitted or empty selects all properties within the other filters.",
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 2000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HotelInsightsTimeseriesResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.insights.get_hotel_insights_timeseries.GetHotelInsightsTimeseriesMethod"
      }
    },
    "/campaigns/{campaign_id}/insights": {
      "get": {
        "summary": "Get Campaign Insights",
        "description": "Get campaign insights aggregated by time granularity. Attribution metrics for the current account-local day are preliminary and may change as conversions are processed.",
        "operationId": "GetCampaignInsightsMethod",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attribution_window_days",
            "in": "query",
            "description": "Click attribution window: 7, 14, or 30 days. Omitted or null windows independently default to 30-day click and 1-day view.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 7,
              "maximum": 30,
              "enum": [7, 14, 30]
            }
          },
          {
            "name": "view_through_attribution_window_days",
            "in": "query",
            "description": "View attribution window: 0 excludes views; 1 includes one-day views.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1,
              "enum": [0, 1]
            }
          },
          {
            "name": "attribution_time_basis",
            "in": "query",
            "description": "Date reports by the attributed ad interaction (ad_event_time) or conversion (conversion_time). Defaults to ad_event_time.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AttributionTimeBasisParam"
            }
          },
          {
            "name": "time_granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aggregation_level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2000
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time_ranges",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "segments",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "override_segment_group_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "includes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.insights.get_campaign_insights.GetCampaignInsightsMethod"
      }
    },
    "/ad_groups/{ad_group_id}/insights": {
      "get": {
        "summary": "Get Ad Group Insights",
        "description": "Get ad group insights aggregated by time granularity. Attribution metrics for the current account-local day are preliminary and may change as conversions are processed.",
        "operationId": "GetAdGroupInsightsMethod",
        "parameters": [
          {
            "name": "ad_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attribution_window_days",
            "in": "query",
            "description": "Click attribution window: 7, 14, or 30 days. Omitted or null windows independently default to 30-day click and 1-day view.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 7,
              "maximum": 30,
              "enum": [7, 14, 30]
            }
          },
          {
            "name": "view_through_attribution_window_days",
            "in": "query",
            "description": "View attribution window: 0 excludes views; 1 includes one-day views.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1,
              "enum": [0, 1]
            }
          },
          {
            "name": "attribution_time_basis",
            "in": "query",
            "description": "Date reports by the attributed ad interaction (ad_event_time) or conversion (conversion_time). Defaults to ad_event_time.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AttributionTimeBasisParam"
            }
          },
          {
            "name": "time_granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aggregation_level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2000
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time_ranges",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "segments",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "override_segment_group_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "includes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.insights.get_ad_group_insights.GetAdGroupInsightsMethod"
      }
    },
    "/ads/{ad_id}/insights": {
      "get": {
        "summary": "Get Ad Insights",
        "description": "Get ad insights aggregated by time granularity. Attribution metrics for the current account-local day are preliminary and may change as conversions are processed.",
        "operationId": "GetAdInsightsMethod",
        "parameters": [
          {
            "name": "ad_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attribution_window_days",
            "in": "query",
            "description": "Click attribution window: 7, 14, or 30 days. Omitted or null windows independently default to 30-day click and 1-day view.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 7,
              "maximum": 30,
              "enum": [7, 14, 30]
            }
          },
          {
            "name": "view_through_attribution_window_days",
            "in": "query",
            "description": "View attribution window: 0 excludes views; 1 includes one-day views.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1,
              "enum": [0, 1]
            }
          },
          {
            "name": "attribution_time_basis",
            "in": "query",
            "description": "Date reports by the attributed ad interaction (ad_event_time) or conversion (conversion_time). Defaults to ad_event_time.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AttributionTimeBasisParam"
            }
          },
          {
            "name": "time_granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aggregation_level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2000
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time_ranges",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "segments",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "override_segment_group_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "includes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.insights.get_ad_insights.GetAdInsightsMethod"
      }
    },
    "/geo_lookup/search": {
      "get": {
        "summary": "Get Geo Lookup",
        "description": "Search Market locations and standard region codes for advertiser geo targeting.",
        "operationId": "GetGeoLookupMethod",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeoLookupSearchResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.geo_lookup.GetGeoLookupMethod"
      }
    },
    "/lead_sync_subscriptions": {
      "post": {
        "summary": "Create Lead Sync Subscription",
        "description": "Provision lead delivery to a managed Webhooks endpoint.",
        "operationId": "CreateLeadSyncSubscriptionMethod",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key for retrying this create request. If a matching prior create is visible, the existing object is returned instead of creating a duplicate. Reusing a key with a different request body is rejected. Must contain at least one non-whitespace character and be at most 255 characters.",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": ".*\\S.*"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLeadSyncSubscriptionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedLeadSyncSubscriptionResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.lead_sync_subscriptions.CreateLeadSyncSubscriptionMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      },
      "get": {
        "summary": "List Lead Sync Subscriptions",
        "description": "List the lead-sync subscription for an authorized Ad Account.",
        "operationId": "ListLeadSyncSubscriptionsMethod",
        "parameters": [
          {
            "name": "ad_account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadSyncSubscriptionsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.lead_sync_subscriptions.ListLeadSyncSubscriptionsMethod"
      }
    },
    "/lead_sync_subscriptions/{subscription_id}": {
      "get": {
        "summary": "Get Lead Sync Subscription",
        "description": "Get a lead-sync subscription.",
        "operationId": "GetLeadSyncSubscriptionMethod",
        "parameters": [
          {
            "name": "subscription_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadSyncSubscriptionResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.lead_sync_subscriptions.GetLeadSyncSubscriptionMethod"
      },
      "delete": {
        "summary": "Delete Lead Sync Subscription",
        "description": "Delete a lead-sync subscription.",
        "operationId": "DeleteLeadSyncSubscriptionMethod",
        "parameters": [
          {
            "name": "subscription_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedLeadSyncSubscriptionResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.lead_sync_subscriptions.DeleteLeadSyncSubscriptionMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/conversions/api_keys": {
      "post": {
        "summary": "Create Conversion Api Key",
        "description": "Create a Conversions API key for the currently authenticated ad account.",
        "operationId": "CreateConversionApiKeyMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversionApiKeyBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionApiKeyResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.conversions.create_conversion_api_key.CreateConversionApiKeyMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/conversions/event_settings": {
      "post": {
        "summary": "Create Conversion Event Setting",
        "description": "Create a conversion event setting for the currently authenticated ad account.",
        "operationId": "CreateConversionEventSettingMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversionEventSettingBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionEventSettingItemResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.conversions.create_conversion_event_setting.CreateConversionEventSettingMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      },
      "get": {
        "summary": "List Conversion Event Settings",
        "description": "List conversion event settings for the currently authenticated ad account.",
        "operationId": "ListConversionEventSettingsMethod",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ListOrderParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListConversionEventSettingsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.conversions.list_conversion_event_settings.ListConversionEventSettingsMethod"
      }
    },
    "/conversions/pixels": {
      "post": {
        "summary": "Create Conversion Source",
        "description": "Create a conversion pixel.",
        "operationId": "CreateConversionSourceMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversionSourceBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientDataSourceItemResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.conversions.create_conversion_source.CreateConversionSourceMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      },
      "get": {
        "summary": "List Conversion Sources",
        "description": "List conversion pixels and connected pixel ids for the acting ad account.",
        "operationId": "ListConversionSourcesMethod",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ListOrderParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListClientDataSourceItemsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.conversions.list_conversion_sources.ListConversionSourcesMethod"
      }
    },
    "/conversions/events": {
      "get": {
        "summary": "List Conversion Events",
        "description": "List recent sampled conversion events for the acting ad account.",
        "operationId": "ListConversionEventsMethod",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Pixel ID to query within the acting ad account.",
            "required": true,
            "schema": {
              "description": "Pixel ID to query within the acting ad account.",
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum conversion events to return.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionEventsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.conversions.list_conversion_events.ListConversionEventsMethod",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/conversions/insights": {
      "post": {
        "summary": "Post Conversion Insights",
        "description": "Get attributed conversion totals or daily values for the authenticated ad account.",
        "operationId": "PostConversionInsightsMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostConversionInsightsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionSummaryRowsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.conversions.post_conversion_insights.PostConversionInsightsMethod"
      }
    },
    "/ad_groups": {
      "get": {
        "summary": "List Ad Groups",
        "description": "Get ad groups for the ad account, optionally filtered by campaign",
        "operationId": "ListAdGroupsMethod",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AdGroupsListIncludeParam"
              }
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 1000,
              "pattern": "^.*\\S.*$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ListOrderParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdGroupsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ad_groups.list_ad_groups.ListAdGroupsMethod"
      },
      "post": {
        "summary": "Create Ad Group",
        "description": "Create an ad group for a campaign",
        "operationId": "CreateAdGroupMethod",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key for retrying this create request. If a matching prior create is visible, the existing object is returned instead of creating a duplicate. Must contain at least one non-whitespace character and be at most 255 characters.",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": ".*\\S.*"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAdGroupBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdGroupItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ad_groups.create_ad_group.CreateAdGroupMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_groups/{ad_group_id}": {
      "get": {
        "summary": "Get Ad Group",
        "description": "Get an ad group",
        "operationId": "GetAdGroupMethod",
        "parameters": [
          {
            "name": "ad_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AdGroupItemIncludeParam"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdGroupItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ad_groups.get_ad_group.GetAdGroupMethod"
      },
      "post": {
        "summary": "Update Ad Group",
        "description": "Update an ad group",
        "operationId": "UpdateAdGroupMethod",
        "parameters": [
          {
            "name": "ad_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAdGroupBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdGroupItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ad_groups.update_ad_group.UpdateAdGroupMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_groups/{ad_group_id}/activate": {
      "post": {
        "summary": "Activate Ad Group",
        "description": "Activate an ad group",
        "operationId": "ActivateAdGroupMethod",
        "parameters": [
          {
            "name": "ad_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdGroupItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ad_groups.activate_ad_group.ActivateAdGroupMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_groups/{ad_group_id}/pause": {
      "post": {
        "summary": "Pause Ad Group",
        "description": "Pause an ad group",
        "operationId": "PauseAdGroupMethod",
        "parameters": [
          {
            "name": "ad_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdGroupItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ad_groups.pause_ad_group.PauseAdGroupMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ad_groups/{ad_group_id}/archive": {
      "post": {
        "summary": "Archive Ad Group",
        "description": "Archive an ad group",
        "operationId": "ArchiveAdGroupMethod",
        "parameters": [
          {
            "name": "ad_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdGroupItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ad_groups.archive_ad_group.ArchiveAdGroupMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ads": {
      "get": {
        "summary": "List Ads",
        "description": "Get ads for the ad account, optionally filtered by ad group",
        "operationId": "ListAdsMethod",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AdsListIncludeParam"
              }
            }
          },
          {
            "name": "ad_group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 1000,
              "pattern": "^.*\\S.*$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ListOrderParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ads.list_ads.ListAdsMethod"
      },
      "post": {
        "summary": "Create Ad",
        "description": "Create an ad for an ad group",
        "operationId": "CreateAdMethod",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key for retrying this create request. If a matching prior create is visible, the existing object is returned instead of creating a duplicate. Must contain at least one non-whitespace character and be at most 255 characters.",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": ".*\\S.*"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAdBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ads.create_ad.CreateAdMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ads/{ad_id}": {
      "get": {
        "summary": "Get Ad",
        "description": "Get an ad",
        "operationId": "GetAdMethod",
        "parameters": [
          {
            "name": "ad_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AdItemIncludeParam"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ads.get_ad.GetAdMethod"
      },
      "post": {
        "summary": "Update Ad",
        "description": "Update an ad",
        "operationId": "UpdateAdMethod",
        "parameters": [
          {
            "name": "ad_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAdBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ads.update_ad.UpdateAdMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ads/{ad_id}/landing_page_crawl": {
      "get": {
        "summary": "Get Landing Page Crawler Evidence",
        "description": "Get saved landing-page crawler evidence for an ad's submitted version. Includes metadata for successful and failed captures and, when available, a read-only screenshot URL valid for up to 24 hours. Returns 404 when no capture is available and 409 while the capture is pending. The status describes the crawl job, not the destination's HTTP status. This read-only operation does not start a crawl.",
        "operationId": "GetLandingPageCrawlerEvidenceMethod",
        "parameters": [
          {
            "name": "ad_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LandingPageCrawlerPublicEvidenceResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ads.get_landing_page_crawler_evidence.GetLandingPageCrawlerEvidenceMethod"
      }
    },
    "/ads/{ad_id}/preview": {
      "post": {
        "summary": "Create Ad Preview",
        "description": "Create a temporary iframe preview for an existing ad.",
        "operationId": "CreateAdPreviewMethod",
        "parameters": [
          {
            "name": "ad_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdPreviewResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ads.preview.CreateAdPreviewMethod"
      }
    },
    "/ads/{ad_id}/activate": {
      "post": {
        "summary": "Activate Ad",
        "description": "Activate an ad",
        "operationId": "ActivateAdMethod",
        "parameters": [
          {
            "name": "ad_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ads.activate_ad.ActivateAdMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ads/{ad_id}/pause": {
      "post": {
        "summary": "Pause Ad",
        "description": "Pause an ad",
        "operationId": "PauseAdMethod",
        "parameters": [
          {
            "name": "ad_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ads.pause_ad.PauseAdMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/ads/{ad_id}/archive": {
      "post": {
        "summary": "Archive Ad",
        "description": "Archive an ad",
        "operationId": "ArchiveAdMethod",
        "parameters": [
          {
            "name": "ad_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdItemBody"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.ads.archive_ad.ArchiveAdMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/uploads": {
      "post": {
        "summary": "Upload Blob",
        "description": "Upload a file and return a file id",
        "operationId": "UploadBlobMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UploadBlobBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadBlobResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.uploads.upload_blob.UploadBlobMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/upload": {
      "post": {
        "summary": "Upload Image",
        "description": "Upload an image URL or image file and return a file id",
        "operationId": "UploadImageMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadImageBody"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UploadImageBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadImageResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.uploads.upload_image.UploadImageMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/feeds/{feed_id}/settings": {
      "get": {
        "summary": "Get Product Feed Settings",
        "description": "Get display and organic-listing settings for an owned feed.",
        "operationId": "GetProductFeedSettingsMethod",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductFeedSettingsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.product_feed_settings.GetProductFeedSettingsMethod"
      },
      "patch": {
        "summary": "Patch Product Feed Settings",
        "description": "Update the display name and organic-listing settings for an owned feed.",
        "operationId": "PatchProductFeedSettingsMethod",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchProductFeedSettingsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductFeedSettingsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.product_feed_settings.PatchProductFeedSettingsMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/feeds/{feed_id}/archive": {
      "post": {
        "summary": "Archive Product Feed",
        "description": "Archive a product feed for the authenticated ad account.",
        "operationId": "ArchiveProductFeedMethod",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArchivedProductFeedResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.archive_product_feed.ArchiveProductFeedMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/feeds": {
      "post": {
        "summary": "Create Product Feed",
        "description": "Create a product feed for the authenticated ad account.",
        "operationId": "CreateProductFeedMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductFeedBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductFeedResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.create_product_feed.CreateProductFeedMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      },
      "get": {
        "summary": "List Product Feeds",
        "description": "List product feeds for the authenticated ad account.",
        "operationId": "ListProductFeedsMethod",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ProductFeedsListIncludeParam"
              }
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListProductFeedsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.list_product_feeds.ListProductFeedsMethod"
      }
    },
    "/feeds/uploads": {
      "get": {
        "summary": "List Product Feed Uploads",
        "description": "List recent product feed uploads for the authenticated ad account.",
        "operationId": "ListProductFeedUploadsMethod",
        "parameters": [
          {
            "name": "paginate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListProductFeedUploadsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.list_product_feed_uploads.ListProductFeedUploadsMethod"
      }
    },
    "/feeds/{feed_id}/products/query": {
      "post": {
        "summary": "Query Product Feed Products",
        "description": "List products in a feed that match the supplied ad group product filters.",
        "operationId": "QueryProductFeedProductsMethod",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryProductFeedProductsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryProductFeedProductsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.query_product_feed_products.QueryProductFeedProductsMethod"
      }
    },
    "/feeds/{feed_id}/products": {
      "patch": {
        "summary": "Patch Product Feed Products",
        "description": "Update product availability and prices for an authenticated ad account feed.",
        "operationId": "PatchProductFeedProductsMethod",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchProductFeedProductsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductFeedDeltaResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.patch_product_feed_products.PatchProductFeedProductsMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/feeds/{feed_id}/sftp_access": {
      "get": {
        "summary": "Get Product Feed Sftp Access",
        "description": "Get SFTP access details for an authenticated ad account product feed.",
        "operationId": "GetProductFeedSftpAccessMethod",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductFeedSftpAccessResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.get_product_feed_sftp_access.GetProductFeedSftpAccessMethod"
      },
      "post": {
        "summary": "Post Product Feed Sftp Access",
        "description": "Create or replace SFTP access credentials for an authenticated ad account product feed.",
        "operationId": "PostProductFeedSftpAccessMethod",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostProductFeedSftpAccessBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductFeedSftpAccessCredentialsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.post_product_feed_sftp_access.PostProductFeedSftpAccessMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/feeds/{feed_id}/sftp_access/activate": {
      "post": {
        "summary": "Post Product Feed Sftp Access Activate",
        "description": "Activate SFTP access for an authenticated ad account product feed.",
        "operationId": "PostProductFeedSftpAccessActivateMethod",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductFeedSftpAccessResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.post_product_feed_sftp_access_activate.PostProductFeedSftpAccessActivateMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/feeds/{feed_id}/sftp_access/pause": {
      "post": {
        "summary": "Post Product Feed Sftp Access Pause",
        "description": "Pause SFTP access for an authenticated ad account product feed.",
        "operationId": "PostProductFeedSftpAccessPauseMethod",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductFeedSftpAccessResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.product_feeds.post_product_feed_sftp_access_pause.PostProductFeedSftpAccessPauseMethod",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/sandbox/ad_eligibility_jobs": {
      "post": {
        "summary": "Submit Partner Eligibility Job",
        "description": "Submit independent synthetic prompts for current campaign eligibility observations.",
        "operationId": "SubmitPartnerEligibilityJobMethod",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key for retrying this create request. If a matching prior create is visible, the existing object is returned instead of creating a duplicate. Reusing a key with a different request body is rejected. Must contain at least one non-whitespace character and be at most 128 UTF-8 bytes.",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": ".*\\S.*"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitPartnerEligibilityJobBody"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedPartnerEligibilityJobResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.partner_eligibility_jobs.SubmitPartnerEligibilityJobMethod",
        "security": [
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/sandbox/ad_eligibility_jobs/{batch_id}": {
      "get": {
        "summary": "Get Partner Eligibility Job",
        "description": "Read an authorized partner eligibility job.",
        "operationId": "GetPartnerEligibilityJobMethod",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedPartnerEligibilityJobResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.partner_eligibility_jobs.GetPartnerEligibilityJobMethod",
        "security": [
          {
            "AdsOAuth": ["ads.admin.all.read"]
          }
        ]
      }
    },
    "/sandbox/ad_eligibility_jobs/{batch_id}/results": {
      "get": {
        "summary": "Get Partner Eligibility Results",
        "description": "Read a bounded page in submission order; pending entries must be polled again.",
        "operationId": "GetPartnerEligibilityResultsMethod",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerEligibilityResultsResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.partner_eligibility_jobs.GetPartnerEligibilityResultsMethod",
        "security": [
          {
            "AdsOAuth": ["ads.admin.all.read"]
          }
        ]
      }
    },
    "/sandbox/ad_eligibility_jobs/{batch_id}/cancel": {
      "post": {
        "summary": "Cancel Partner Eligibility Job",
        "description": "Request cancellation of unfinished items; completed observations retain their normal expiry.",
        "operationId": "CancelPartnerEligibilityJobMethod",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedPartnerEligibilityJobResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.partner_eligibility_jobs.CancelPartnerEligibilityJobMethod",
        "security": [
          {
            "AdsOAuth": ["ads.admin.all.read", "ads.admin.all.write"]
          }
        ]
      }
    },
    "/partner_data/uploads": {
      "post": {
        "summary": "Create Partner Data Upload",
        "description": "Create an Ads partner-data upload.",
        "operationId": "CreatePartnerDataUploadMethod",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerDataUploadBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePartnerDataUploadResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.partner_data.create_upload.CreatePartnerDataUploadMethod",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/partner_data/uploads/{upload_id}": {
      "get": {
        "summary": "Get Partner Data Upload",
        "description": "Get an Ads partner-data upload.",
        "operationId": "GetPartnerDataUploadMethod",
        "parameters": [
          {
            "name": "upload_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^pdu_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerDataUploadResource"
                }
              }
            }
          }
        },
        "x-openai-class-name": "sofa.api.methods.partner_data.get_upload.GetPartnerDataUploadMethod",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    }
  },
  "webhooks": {
    "lead_form.response.created": {
      "post": {
        "operationId": "ReceiveLeadFormResponseCreated",
        "summary": "Receive a signed lead-form response for a lead-sync subscription.",
        "security": [],
        "parameters": [
          {
            "name": "OpenAI-Subscription-Id",
            "in": "header",
            "required": true,
            "description": "Select the candidate signing secret and, after signature verification, require an exact match with the signed body subscription_id.",
            "schema": {
              "type": "string",
              "maxLength": 256,
              "pattern": "^leadsync_[^~]+_g[1-9][0-9]*$"
            }
          },
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "Stable Standard Webhooks delivery identifier for retries.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "Unix time in seconds used to verify signature freshness.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32,
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Standard Webhooks v1 HMAC-SHA256 signature over the exact raw body.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadSyncWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver durably accepted or deduplicated the event."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "in": "header"
      },
      "AdsOAuth": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://auth.openai.com/api/accounts/authorize",
            "tokenUrl": "https://auth.openai.com/api/accounts/oauth/token",
            "scopes": {
              "ads.admin.all.read": "Read advertiser-owned Ads API resources.",
              "ads.admin.all.write": "Create and manage advertiser-owned Ads API resources.",
              "offline_access": "Maintain authorized access using refresh tokens.",
              "openid": "Explicitly consent to OpenID identity access.",
              "profile": "Explicitly consent to share the connected user's display name."
            }
          }
        }
      }
    },
    "schemas": {
      "CampaignListIncludeParam": {
        "type": "string",
        "enum": ["serving_issues"],
        "x-openai-class-name": "sofa.api.params.campaigns.CampaignListIncludeParam"
      },
      "ListOrderParam": {
        "type": "string",
        "enum": ["asc", "desc"],
        "x-openai-class-name": "sofa.api.params.common.ListOrderParam"
      },
      "BudgetBody": {
        "properties": {
          "lifetime_spend_limit_micros": {
            "type": "integer"
          },
          "daily_spend_limit_micros": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.resources.campaigns.BudgetBody"
      },
      "TargetingGeoLocationBody": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "region_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["id", "name", "type", "country_code", "region_code"],
        "x-openai-class-name": "sofa.api.resources.campaigns.TargetingGeoLocationBody"
      },
      "TargetingGeoLocationsBody": {
        "properties": {
          "countries": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "include": {
            "items": {
              "$ref": "#/components/schemas/TargetingGeoLocationBody"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.resources.campaigns.TargetingGeoLocationsBody"
      },
      "TargetingCustomAudiencesBody": {
        "properties": {
          "ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["ids"],
        "x-openai-class-name": "sofa.api.resources.campaigns.TargetingCustomAudiencesBody"
      },
      "CampaignPlatformParam": {
        "type": "string",
        "enum": [
          "ios_app",
          "android_app",
          "web",
          "desktop_web",
          "ios_web",
          "android_web"
        ],
        "x-openai-class-name": "sofa.api.params.campaigns.CampaignPlatformParam"
      },
      "TargetingPlatformsBody": {
        "properties": {
          "included": {
            "items": {
              "$ref": "#/components/schemas/CampaignPlatformParam"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.resources.campaigns.TargetingPlatformsBody"
      },
      "TargetingBody": {
        "properties": {
          "locations": {
            "$ref": "#/components/schemas/TargetingGeoLocationsBody"
          },
          "excluded_locations": {
            "$ref": "#/components/schemas/TargetingGeoLocationsBody"
          },
          "custom_audiences": {
            "$ref": "#/components/schemas/TargetingCustomAudiencesBody"
          },
          "excluded_custom_audiences": {
            "$ref": "#/components/schemas/TargetingCustomAudiencesBody"
          },
          "platforms": {
            "$ref": "#/components/schemas/TargetingPlatformsBody"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.resources.campaigns.TargetingBody"
      },
      "LandingPageConfigurationBody": {
        "properties": {
          "query_string_template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["query_string_template"],
        "x-openai-class-name": "sofa.api.resources.campaigns.LandingPageConfigurationBody"
      },
      "CampaignServingIssueCode": {
        "type": "string",
        "enum": [
          "ad_account_suspended",
          "ad_account_brand_review_missing_favicon",
          "ad_account_brand_review_escalated_review",
          "ad_account_brand_review_rejected",
          "ad_account_brand_review_in_progress",
          "ad_account_payment_method_missing_or_unauthorized",
          "ad_account_threshold_payment_failed",
          "ad_account_persona_verification_not_approved",
          "ad_account_persona_verification_step_up_required",
          "campaign_not_active",
          "campaign_not_started",
          "campaign_ended",
          "campaign_has_no_ad_groups",
          "campaign_has_no_serving_ready_ad_groups",
          "ad_group_not_active",
          "ad_group_has_no_ads",
          "campaign_budget_exhausted",
          "ad_account_budget_exhausted",
          "review_not_approved",
          "landing_page_crawl_issue",
          "ad_in_review",
          "partial_serving_review_not_approved",
          "partial_serving_landing_page_crawl_issue",
          "partial_serving_ad_in_review"
        ],
        "x-openai-class-name": "sofa.api.resources.campaigns.CampaignServingIssueCode"
      },
      "CampaignServingIssueBody": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/CampaignServingIssueCode"
          }
        },
        "type": "object",
        "required": ["code"],
        "x-openai-class-name": "sofa.api.resources.campaigns.CampaignServingIssueBody"
      },
      "CampaignItemBody": {
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "unixtime"
          },
          "updated_at": {
            "type": "integer",
            "format": "unixtime"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string"
          },
          "mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_feed_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "business_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "start_time": {
            "anyOf": [
              {
                "type": "integer",
                "format": "unixtime"
              },
              {
                "type": "null"
              }
            ]
          },
          "end_time": {
            "anyOf": [
              {
                "type": "integer",
                "format": "unixtime"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget": {
            "$ref": "#/components/schemas/BudgetBody"
          },
          "bidding_type": {
            "type": "string"
          },
          "objective": {
            "type": "string"
          },
          "billing_event_type": {
            "type": "string"
          },
          "conversion_event_setting_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "targeting": {
            "$ref": "#/components/schemas/TargetingBody"
          },
          "landing_page_configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LandingPageConfigurationBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "geographic_targeting_blocked": {
            "type": "boolean"
          },
          "advertiser_phone_verification_required": {
            "type": "boolean"
          },
          "serving_issues": {
            "items": {
              "$ref": "#/components/schemas/CampaignServingIssueBody"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "updated_at",
          "name",
          "description",
          "status",
          "product_feed_id",
          "start_time",
          "end_time",
          "budget",
          "bidding_type"
        ],
        "x-openai-class-name": "sofa.api.resources.campaigns.CampaignItemBody"
      },
      "CampaignsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/CampaignItemBody"
            },
            "type": "array"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["object", "data", "first_id", "last_id", "has_more"],
        "x-openai-class-name": "sofa.api.resources.campaigns.CampaignsBody"
      },
      "ActivePausedStatusParam": {
        "type": "string",
        "enum": ["active", "paused"],
        "x-openai-class-name": "sofa.api.params.common.ActivePausedStatusParam"
      },
      "BudgetParams": {
        "properties": {
          "lifetime_spend_limit_micros": {
            "type": "integer",
            "minimum": 1000000
          },
          "daily_spend_limit_micros": {
            "type": "integer",
            "minimum": 1000000
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.campaigns.BudgetParams"
      },
      "CampaignBiddingTypeParam": {
        "type": "string",
        "enum": ["impressions", "clicks", "conversions"],
        "x-openai-class-name": "sofa.api.params.campaigns.CampaignBiddingTypeParam"
      },
      "CampaignObjectiveParam": {
        "type": "string",
        "enum": ["reach", "clicks", "conversions"],
        "x-openai-class-name": "sofa.api.params.campaigns.CampaignObjectiveParam"
      },
      "CampaignBillingEventTypeParam": {
        "type": "string",
        "enum": ["impression", "click"],
        "x-openai-class-name": "sofa.api.params.campaigns.CampaignBillingEventTypeParam"
      },
      "CampaignModeParam": {
        "type": "string",
        "enum": ["product_feed", "business_agent"],
        "x-openai-class-name": "sofa.api.params.campaigns.CampaignModeParam"
      },
      "TargetingGeoLocationParams": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "region_code": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["id"],
        "x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationParams"
      },
      "TargetingGeoLocationsParams": {
        "properties": {
          "countries": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "include": {
            "items": {
              "$ref": "#/components/schemas/TargetingGeoLocationParams"
            },
            "type": "array",
            "maxItems": 2500
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationsParams"
      },
      "TargetingCustomAudiencesParams": {
        "properties": {
          "ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.campaigns.TargetingCustomAudiencesParams"
      },
      "TargetingPlatformsParams": {
        "properties": {
          "included": {
            "items": {
              "$ref": "#/components/schemas/CampaignPlatformParam"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.campaigns.TargetingPlatformsParams"
      },
      "TargetingParams": {
        "properties": {
          "locations": {
            "$ref": "#/components/schemas/TargetingGeoLocationsParams"
          },
          "excluded_locations": {
            "$ref": "#/components/schemas/TargetingGeoLocationsParams"
          },
          "custom_audiences": {
            "$ref": "#/components/schemas/TargetingCustomAudiencesParams"
          },
          "excluded_custom_audiences": {
            "$ref": "#/components/schemas/TargetingCustomAudiencesParams"
          },
          "platforms": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TargetingPlatformsParams"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.campaigns.TargetingParams"
      },
      "LandingPageConfigurationParams": {
        "properties": {
          "query_string_template": {
            "type": "string",
            "maxLength": 2048
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.campaigns.LandingPageConfigurationParams"
      },
      "CreateCampaignBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 3,
            "pattern": "^.*\\S.*$"
          },
          "description": {
            "type": "string"
          },
          "start_time": {
            "type": "integer",
            "maximum": 4102444800,
            "minimum": 946684800
          },
          "end_time": {
            "type": "integer",
            "maximum": 4102444800,
            "minimum": 946684800
          },
          "status": {
            "$ref": "#/components/schemas/ActivePausedStatusParam"
          },
          "budget": {
            "$ref": "#/components/schemas/BudgetParams"
          },
          "bidding_type": {
            "$ref": "#/components/schemas/CampaignBiddingTypeParam"
          },
          "objective": {
            "$ref": "#/components/schemas/CampaignObjectiveParam"
          },
          "billing_event_type": {
            "$ref": "#/components/schemas/CampaignBillingEventTypeParam"
          },
          "mode": {
            "$ref": "#/components/schemas/CampaignModeParam"
          },
          "product_feed_id": {
            "type": "string"
          },
          "business_agent_id": {
            "type": "string"
          },
          "targeting": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TargetingParams"
              },
              {
                "type": "null"
              }
            ]
          },
          "landing_page_configuration": {
            "$ref": "#/components/schemas/LandingPageConfigurationParams"
          },
          "conversion_event_setting_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["name", "status", "budget"],
        "x-openai-class-name": "sofa.api.params.campaigns.CreateCampaignBody"
      },
      "CampaignGetItemIncludeParam": {
        "type": "string",
        "enum": ["serving_issues"],
        "x-openai-class-name": "sofa.api.params.campaigns.CampaignGetItemIncludeParam"
      },
      "ActivePausedArchivedStatusParam": {
        "type": "string",
        "enum": ["active", "paused", "archived"],
        "x-openai-class-name": "sofa.api.params.common.ActivePausedArchivedStatusParam"
      },
      "UpdateCampaignBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 3,
            "pattern": "^.*\\S.*$"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "start_time": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 4102444800,
                "minimum": 946684800
              },
              {
                "type": "null"
              }
            ]
          },
          "end_time": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 4102444800,
                "minimum": 946684800
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ActivePausedArchivedStatusParam"
          },
          "budget": {
            "$ref": "#/components/schemas/BudgetParams"
          },
          "targeting": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TargetingParams"
              },
              {
                "type": "null"
              }
            ]
          },
          "landing_page_configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LandingPageConfigurationParams"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversion_event_setting_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.campaigns.UpdateCampaignBody"
      },
      "CustomAudienceIntendedUseParam": {
        "type": "string",
        "enum": ["inclusion", "exclusion", "bid_multiplier"],
        "x-openai-class-name": "sofa.api.params.custom_audiences.CustomAudienceIntendedUseParam"
      },
      "CustomAudienceMatchedCountGranularityParam": {
        "type": "string",
        "enum": ["granular"],
        "x-openai-class-name": "sofa.api.params.custom_audiences.CustomAudienceMatchedCountGranularityParam"
      },
      "CustomAudienceItemBody": {
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "unixtime"
          },
          "updated_at": {
            "type": "integer",
            "format": "unixtime"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string"
          },
          "hash_spec_version": {
            "type": "string"
          },
          "uploaded_identifier_count_range": {
            "type": "string"
          },
          "matched_identifier_count_range": {
            "type": "string"
          },
          "matched_user_count_range": {
            "type": "string"
          },
          "invalid_identifier_count_range": {
            "type": "string"
          },
          "membership_revision": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "updated_at",
          "name",
          "description",
          "status",
          "hash_spec_version",
          "uploaded_identifier_count_range",
          "matched_identifier_count_range",
          "matched_user_count_range",
          "invalid_identifier_count_range"
        ],
        "x-openai-class-name": "sofa.api.resources.custom_audiences.CustomAudienceItemBody"
      },
      "CustomAudiencesResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/CustomAudienceItemBody"
            },
            "type": "array"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "policy_revision": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["object", "data", "first_id", "last_id", "has_more"],
        "x-openai-class-name": "sofa.api.resources.custom_audiences.CustomAudiencesBody"
      },
      "CustomAudienceIdentifierTypeParam": {
        "type": "string",
        "enum": [
          "email",
          "phone",
          "email_sha256",
          "phone_number_sha256",
          "gaid"
        ],
        "x-openai-class-name": "sofa.api.params.custom_audiences.CustomAudienceIdentifierTypeParam"
      },
      "CustomAudienceIdentifierResolutionParam": {
        "type": "string",
        "enum": ["auto"],
        "x-openai-class-name": "sofa.api.params.custom_audiences.CustomAudienceIdentifierResolutionParam"
      },
      "CreateCustomAudienceBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 3,
            "pattern": "^.*\\S.*$"
          },
          "description": {
            "type": "string"
          },
          "file_id": {
            "type": "string",
            "description": "Uploaded file ID. Omit all file fields to create an empty audience when small audiences are enabled for the account."
          },
          "identifier_type": {
            "$ref": "#/components/schemas/CustomAudienceIdentifierTypeParam"
          },
          "identifier_resolution": {
            "$ref": "#/components/schemas/CustomAudienceIdentifierResolutionParam"
          },
          "filename": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1
          },
          "mimetype": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1
          },
          "file_size": {
            "type": "integer",
            "maximum": 500000000,
            "minimum": 1
          }
        },
        "type": "object",
        "required": ["name"],
        "x-openai-class-name": "sofa.api.params.custom_audiences.CreateCustomAudienceBody"
      },
      "CustomAudienceInlineIdentifierParams": {
        "properties": {
          "identifier_type": {
            "$ref": "#/components/schemas/CustomAudienceIdentifierTypeParam"
          },
          "identifier": {
            "type": "string",
            "minLength": 1
          }
        },
        "type": "object",
        "required": ["identifier_type", "identifier"],
        "x-openai-class-name": "sofa.api.params.custom_audiences.CustomAudienceInlineIdentifierParams"
      },
      "CustomAudienceMembershipMutationBody": {
        "properties": {
          "file_id": {
            "type": "string"
          },
          "identifiers": {
            "items": {
              "$ref": "#/components/schemas/CustomAudienceInlineIdentifierParams"
            },
            "type": "array"
          },
          "identifier_type": {
            "$ref": "#/components/schemas/CustomAudienceIdentifierTypeParam"
          },
          "identifier_resolution": {
            "$ref": "#/components/schemas/CustomAudienceIdentifierResolutionParam"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 0
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.custom_audiences.CustomAudienceMembershipMutationBody"
      },
      "CustomAudienceMembershipOperationFailureReasonBody": {
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable code for an advertiser-actionable failure."
          },
          "message": {
            "type": "string",
            "description": "Safe explanation and suggested corrective action."
          }
        },
        "type": "object",
        "required": ["code", "message"],
        "x-openai-class-name": "sofa.api.resources.custom_audiences.CustomAudienceMembershipOperationFailureReasonBody"
      },
      "CustomAudienceMembershipOperationBody": {
        "properties": {
          "operation_id": {
            "type": "string"
          },
          "custom_audience_id": {
            "type": "string"
          },
          "operation": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "failure_reason": {
            "$ref": "#/components/schemas/CustomAudienceMembershipOperationFailureReasonBody",
            "description": "Present only for failed operations with a known advertiser-actionable cause. Omitted for other failures and operations recorded without a failure reason."
          }
        },
        "type": "object",
        "required": [
          "operation_id",
          "custom_audience_id",
          "operation",
          "status"
        ],
        "x-openai-class-name": "sofa.api.resources.custom_audiences.CustomAudienceMembershipOperationBody"
      },
      "ReplaceCustomAudienceMembersBody": {
        "properties": {
          "file_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 0
          },
          "filename": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1
          },
          "mimetype": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1
          },
          "file_size": {
            "type": "integer",
            "maximum": 500000000,
            "minimum": 1
          },
          "identifier_type": {
            "$ref": "#/components/schemas/CustomAudienceIdentifierTypeParam"
          },
          "identifier_resolution": {
            "$ref": "#/components/schemas/CustomAudienceIdentifierResolutionParam"
          }
        },
        "type": "object",
        "required": ["file_id", "expected_revision"],
        "x-openai-class-name": "sofa.api.params.custom_audiences.ReplaceCustomAudienceMembersBody"
      },
      "MergeCustomAudiencesBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 3,
            "pattern": "^.*\\S.*$"
          },
          "custom_audience_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 64
          }
        },
        "type": "object",
        "required": ["name", "custom_audience_ids"],
        "x-openai-class-name": "sofa.api.params.custom_audiences.MergeCustomAudiencesBody"
      },
      "CustomAudienceMembershipOperationsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/CustomAudienceMembershipOperationBody"
            },
            "type": "array"
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["object", "data", "has_more", "next_cursor"],
        "x-openai-class-name": "sofa.api.resources.custom_audiences.CustomAudienceMembershipOperationsBody"
      },
      "CreateApiKeyBody": {
        "properties": {
          "key_name": {
            "type": "string",
            "minLength": 1
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.api_keys.CreateAdAccountApiKeyBody"
      },
      "CreateApiKeyResource": {
        "properties": {
          "api_organization_id": {
            "type": "string"
          },
          "service_account_id": {
            "type": "string"
          },
          "api_key": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["api_organization_id", "service_account_id", "api_key"],
        "x-openai-class-name": "sofa.api.resources.api_keys.CreateApiKeyBody"
      },
      "UpdateAdAccountBody": {
        "properties": {
          "name": {
            "type": "string"
          },
          "legal_name": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "brand_name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1
          },
          "favicon_file_id": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.adaccount.UpdateAdAccountBody"
      },
      "ReviewStatus": {
        "type": "string",
        "enum": ["in_review", "rejected", "approved"],
        "x-openai-class-name": "sofa.api.resources.common.ReviewStatus"
      },
      "ReviewReasonCode": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "string",
            "enum": [
              "crawl_failed",
              "crawler_bot_blocked",
              "crawler_captcha",
              "crawler_login_required",
              "crawler_400",
              "crawler_401",
              "crawler_403",
              "crawler_404",
              "crawler_408",
              "crawler_410",
              "crawler_429",
              "crawler_500",
              "crawler_502",
              "crawler_503",
              "crawler_504",
              "robots_txt",
              "unsupported_content_type",
              "landing_page_image_processing_failed",
              "landing_page_unusable",
              "missing_favicon"
            ]
          }
        ],
        "x-openai-class-name": "sofa.api.resources.common.ReviewReasonCode"
      },
      "ReviewBody": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ReviewStatus"
          },
          "reason": {
            "$ref": "#/components/schemas/ReviewReasonCode"
          },
          "screenshot_url": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["status"],
        "x-openai-class-name": "sofa.api.resources.common.ReviewBody"
      },
      "AccountIntegrityReviewDetailsBody": {
        "properties": {
          "decision": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "status_updated_at": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.resources.adaccount.AccountIntegrityReviewDetailsBody"
      },
      "AccountIntegrityReviewBody": {
        "properties": {
          "review": {
            "$ref": "#/components/schemas/ReviewBody"
          },
          "details": {
            "$ref": "#/components/schemas/AccountIntegrityReviewDetailsBody"
          }
        },
        "type": "object",
        "required": ["review"],
        "x-openai-class-name": "sofa.api.resources.adaccount.AccountIntegrityReviewBody"
      },
      "AdAccountResource": {
        "properties": {
          "legal_name": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "brand_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "preview_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "currency_code": {
            "type": "string"
          },
          "review": {
            "$ref": "#/components/schemas/ReviewBody"
          },
          "account_integrity_review": {
            "$ref": "#/components/schemas/AccountIntegrityReviewBody"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "url",
          "preview_url",
          "timezone",
          "currency_code",
          "review"
        ],
        "x-openai-class-name": "sofa.api.resources.adaccount.AdAccountBody"
      },
      "AdAccountsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AdAccountResource"
            },
            "type": "array"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["object", "data"],
        "x-openai-class-name": "sofa.api.resources.adaccount.AdAccountsBody"
      },
      "AuditLogItemBody": {
        "properties": {
          "id": {
            "type": "string"
          },
          "audit_log_type": {
            "type": "string"
          },
          "obj_type": {
            "type": "string"
          },
          "obj_id": {
            "type": "string",
            "description": "Object ID without the Habitat partition key."
          },
          "item_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "actor_type": {
            "type": "string"
          },
          "actor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_group_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "changes": {},
          "hierarchy_info": {},
          "ts": {
            "anyOf": [
              {
                "type": "integer",
                "format": "unixtime"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "audit_log_type",
          "obj_type",
          "obj_id",
          "item_name",
          "actor_type",
          "actor_id",
          "campaign_id",
          "ad_group_id",
          "changes",
          "hierarchy_info",
          "ts"
        ],
        "x-openai-class-name": "sofa.api.resources.audit_logs.AuditLogItemBody"
      },
      "ListAuditLogsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AuditLogItemBody"
            },
            "type": "array"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["object", "data", "first_id", "last_id", "has_more"],
        "x-openai-class-name": "sofa.api.resources.audit_logs.ListAuditLogsBody"
      },
      "CreateAdAccountCreationSessionBody": {
        "properties": {
          "return_uri": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "x-openai-client-enforce-constraints": true
          },
          "state": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1,
            "x-openai-client-enforce-constraints": true
          }
        },
        "type": "object",
        "required": ["return_uri", "state"],
        "x-openai-class-name": "sofa.api.params.ad_account_creation_sessions.CreateAdAccountCreationSessionBody"
      },
      "AdAccountCreationSessionResource": {
        "properties": {
          "url": {
            "type": "string"
          },
          "expires_in": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": ["url", "expires_in"],
        "x-openai-class-name": "sofa.api.resources.ad_account_creation_sessions.AdAccountCreationSessionBody"
      },
      "AdsOAuthMeResource": {
        "properties": {
          "id": {
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["id"],
        "x-openai-class-name": "sofa.api.resources.me.AdsOAuthMeBody"
      },
      "AdAccountSpendLimitWindowBody": {
        "properties": {
          "window_id": {
            "type": "string"
          },
          "start_date": {
            "type": "string"
          },
          "end_date": {
            "type": "string"
          },
          "amount_micros": {
            "type": "integer"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "io_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string"
          },
          "can_edit": {
            "type": "boolean"
          },
          "can_edit_start_date": {
            "type": "boolean"
          },
          "can_delete": {
            "type": "boolean"
          },
          "spent_micros": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": [
          "window_id",
          "start_date",
          "end_date",
          "amount_micros",
          "name",
          "io_id",
          "status",
          "can_edit",
          "can_edit_start_date",
          "can_delete"
        ],
        "x-openai-class-name": "sofa.api.resources.ad_account_spend_limit_windows.AdAccountSpendLimitWindowBody"
      },
      "AdAccountDailySpendLimitBody": {
        "properties": {
          "window_id": {
            "type": "string",
            "description": "Immutable Daily rule ID for targeted edits and removal."
          },
          "amount_micros": {
            "type": "integer",
            "description": "Current daily billable ad-spend cap."
          },
          "start_date": {
            "type": "string",
            "description": "First protected account-local date, YYYY-MM-DD."
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "description": "Exclusive account-local end date, YYYY-MM-DD; null means no end."
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "type": "string",
            "description": "Recorded IANA timezone; immutable while Daily exists."
          },
          "status": {
            "type": "string",
            "description": "active or upcoming."
          },
          "spent_micros": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Enforcement-backed spend for this day; null if unavailable or not active."
              },
              {
                "type": "null"
              }
            ]
          },
          "remaining_micros": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "spend_as_of": {
            "anyOf": [
              {
                "type": "string",
                "description": "Actual enforcement counter update timestamp, ISO 8601; null if unavailable."
              },
              {
                "type": "null"
              }
            ]
          },
          "next_reset": {
            "anyOf": [
              {
                "type": "string",
                "description": "Next account-local midnight with a fresh allowance, ISO 8601; null before activation or on the final protected day."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "amount_micros",
          "start_date",
          "end_date",
          "timezone",
          "status",
          "spent_micros",
          "remaining_micros",
          "spend_as_of",
          "next_reset"
        ],
        "x-openai-class-name": "sofa.api.resources.ad_account_spend_limit_windows.AdAccountDailySpendLimitBody"
      },
      "AdAccountSpendLimitWindowsListResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AdAccountSpendLimitWindowBody"
            },
            "type": "array"
          },
          "daily_limit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AdAccountDailySpendLimitBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "daily_limits": {
            "items": {
              "$ref": "#/components/schemas/AdAccountDailySpendLimitBody"
            },
            "type": "array",
            "description": "Active and upcoming Daily rules, ordered by start date ascending."
          },
          "revision": {
            "type": "integer",
            "description": "Current configuration revision for conditional Daily mutations."
          },
          "evaluated_at": {
            "type": "string",
            "description": "Evaluation timestamp, ISO 8601; distinct from spend reporting freshness."
          },
          "earliest_daily_start_date": {
            "type": "string",
            "description": "Earliest accounting-safe account-local start date for a new Daily rule; activation is never same-day. The full interval must also avoid dated and IO limits."
          },
          "earliest_dated_start_date": {
            "anyOf": [
              {
                "type": "string",
                "description": "Earliest account-local start date, YYYY-MM-DD, for new or retimed Date range limits after retained Daily protection; null if none. Does not restrict amount or metadata edits when the existing dates are unchanged."
              },
              {
                "type": "null"
              }
            ]
          },
          "can_create_daily_limit": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["object", "data"],
        "x-openai-class-name": "sofa.api.resources.ad_account_spend_limit_windows.AdAccountSpendLimitWindowsListBody"
      },
      "CreateAdAccountSpendLimitWindowBody": {
        "properties": {
          "start_date": {
            "type": "string",
            "maxLength": 10,
            "minLength": 10
          },
          "end_date": {
            "type": "string",
            "maxLength": 10,
            "minLength": 10
          },
          "amount_micros": {
            "type": "integer",
            "minimum": 0
          },
          "name": {
            "type": "string",
            "maxLength": 256
          },
          "io_id": {
            "type": "string",
            "maxLength": 256
          }
        },
        "type": "object",
        "required": ["start_date", "end_date", "amount_micros"],
        "x-openai-class-name": "sofa.api.params.ad_account_spend_limit_windows.CreateAdAccountSpendLimitWindowBody"
      },
      "UpdateAdAccountSpendLimitWindowBody": {
        "properties": {
          "start_date": {
            "type": "string",
            "maxLength": 10,
            "minLength": 10
          },
          "end_date": {
            "type": "string",
            "maxLength": 10,
            "minLength": 10
          },
          "amount_micros": {
            "type": "integer",
            "minimum": 0
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ]
          },
          "io_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.ad_account_spend_limit_windows.UpdateAdAccountSpendLimitWindowBody"
      },
      "DeleteAdAccountSpendLimitWindowResource": {
        "properties": {
          "window_id": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["window_id", "object", "deleted"],
        "x-openai-class-name": "sofa.api.resources.ad_account_spend_limit_windows.DeleteAdAccountSpendLimitWindowBody"
      },
      "SetAdAccountDailySpendLimitBody": {
        "properties": {
          "window_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Daily rule ID to edit. Send null to create a new non-overlapping Daily rule. Omit only for legacy singleton upsert; multiple active or upcoming rules require an ID."
              },
              {
                "type": "null"
              }
            ]
          },
          "amount_micros": {
            "type": "integer",
            "minimum": 0,
            "description": "Maximum billable ad spend for each account-local day, in account-currency micros."
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 0,
            "description": "Revision from the latest account-limit list response; use 0 when absent."
          },
          "start_date": {
            "type": "string",
            "maxLength": 10,
            "minLength": 10,
            "description": "Account-local activation date (YYYY-MM-DD). Defaults to earliest_daily_start_date from the list response on first creation; required when recreating a removed or expired limit. New limits cannot start before earliest_daily_start_date. Omit when editing an existing active or upcoming limit; its start date cannot change."
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10,
                "minLength": 10,
                "description": "Optional exclusive account-local end date (YYYY-MM-DD). Omit to retain an existing end, or send null for no end. Must be after the start date and in the future. Expired limits cannot be edited."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["amount_micros", "expected_revision"],
        "x-openai-class-name": "sofa.api.params.ad_account_daily_spend_limit.SetAdAccountDailySpendLimitBody"
      },
      "AdAccountDailySpendLimitChangeResource": {
        "properties": {
          "spend_limits": {
            "$ref": "#/components/schemas/AdAccountSpendLimitWindowsListResource"
          }
        },
        "type": "object",
        "required": ["spend_limits"],
        "x-openai-class-name": "sofa.api.resources.ad_account_spend_limit_windows.AdAccountDailySpendLimitChangeBody"
      },
      "DeleteAdAccountDailySpendLimitBody": {
        "properties": {
          "window_id": {
            "type": "string",
            "minLength": 1,
            "description": "Daily rule ID to remove. Omit only when at most one active or upcoming Daily rule exists."
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 0
          }
        },
        "type": "object",
        "required": ["expected_revision"],
        "x-openai-class-name": "sofa.api.params.ad_account_daily_spend_limit.DeleteAdAccountDailySpendLimitBody"
      },
      "AttributionTimeBasisParam": {
        "type": "string",
        "enum": ["conversion_time", "ad_event_time"],
        "x-openai-class-name": "sofa.api.params.insights.AttributionTimeBasisParam"
      },
      "HotelInsightsCoverageBody": {
        "properties": {
          "availability": {
            "type": "string",
            "description": "available, partial, or unavailable. Estimates remain mutable even when available."
          },
          "retention_start_date": {
            "type": "string"
          },
          "settled_through_hour_utc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "estimated_from_hour_utc": {
            "type": "string"
          },
          "estimated_through_exclusive_utc": {
            "type": "string"
          },
          "missing_settled_watermark": {
            "type": "boolean"
          },
          "has_retention_gap": {
            "type": "boolean"
          },
          "includes_pre_v3_interval": {
            "type": "boolean"
          },
          "estimated_tail_unconfirmed": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": [
          "availability",
          "retention_start_date",
          "settled_through_hour_utc",
          "estimated_from_hour_utc",
          "estimated_through_exclusive_utc",
          "missing_settled_watermark",
          "has_retention_gap",
          "includes_pre_v3_interval",
          "estimated_tail_unconfirmed"
        ],
        "x-openai-class-name": "sofa.api.resources.hotel_insights.HotelInsightsCoverageBody"
      },
      "InsightItemBody": {
        "properties": {
          "inventory_type": {
            "type": "string"
          },
          "schema_profile": {
            "type": "string"
          },
          "inventory_feed_id": {
            "type": "string"
          },
          "inventory_item_id": {
            "type": "string"
          },
          "hotel_name": {
            "type": "string"
          },
          "hotel_brand": {
            "type": "string"
          },
          "hotel_description": {
            "type": "string"
          },
          "hotel_url": {
            "type": "string"
          },
          "hotel_primary_image_url": {
            "type": "string"
          },
          "hotel_base_price": {
            "type": "string"
          },
          "hotel_star_rating": {
            "type": "number"
          },
          "hotel_category": {
            "type": "string"
          },
          "hotel_city": {
            "type": "string"
          },
          "hotel_region": {
            "type": "string"
          },
          "hotel_country_code": {
            "type": "string"
          },
          "hotel_impressions": {
            "type": "integer",
            "description": "Property/bucket total repeated on hierarchy children; do not sum."
          },
          "hotel_clicks": {
            "type": "integer"
          },
          "hotel_spend": {
            "type": "number"
          },
          "hotel_ctr": {
            "type": "number"
          },
          "hotel_cpc": {
            "type": "number"
          },
          "hotel_cpm": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "start_time": {
            "type": "integer"
          },
          "end_time": {
            "type": "integer"
          },
          "readable_time": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "impressions": {
            "type": "integer"
          },
          "clicks": {
            "type": "integer"
          },
          "spend": {
            "type": "number"
          },
          "attributed_sales_amount": {
            "anyOf": [
              {
                "type": "number",
                "description": "Deprecated. Total value of attributed `order_created` and `subscription_created` events, normalized to the ad account currency. Negative event values are treated as zero. Returns 0 when there are no attributed events and null when at least one attributed event does not have a value that can be normalized to the ad account currency. Rounded to two decimal places. Use `order_created_attributed_sales` instead. Scheduled for removal on August 17, 2026."
              },
              {
                "type": "null"
              }
            ],
            "deprecated": true
          },
          "attributed_sales_count": {
            "type": "integer",
            "description": "Deprecated. Number of attributed `order_created` and `subscription_created` events, including events without a reportable value. This field has no replacement. Scheduled for removal on August 17, 2026.",
            "deprecated": true
          },
          "attributed_sales_currency": {
            "type": "string",
            "description": "Deprecated. ISO 4217 currency code for `attributed_sales_amount`. This is the ad account currency and is returned even when `attributed_sales_amount` is null. Use `order_created_attributed_sales_currency` instead. Scheduled for removal on August 17, 2026.",
            "deprecated": true
          },
          "roas": {
            "anyOf": [
              {
                "type": "number",
                "description": "Deprecated. Return on ad spend from attributed `order_created` and `subscription_created` events, calculated using the unrounded attributed sales value divided by spend for the same insight row. Rounded to at most four decimal places. Returns null when attributed sales are unavailable or spend is not greater than zero. Use `order_created_roas` instead. Scheduled for removal on August 17, 2026."
              },
              {
                "type": "null"
              }
            ],
            "deprecated": true
          },
          "order_created_attributed_sales": {
            "anyOf": [
              {
                "type": "number",
                "description": "Total value of attributed `order_created` events, normalized to the ad account currency. Negative event values are treated as zero. Returns 0 when there are no attributed orders and null when at least one attributed order does not have a value that can be normalized to the ad account currency. Rounded to two decimal places."
              },
              {
                "type": "null"
              }
            ]
          },
          "order_created_attributed_sales_currency": {
            "type": "string",
            "description": "ISO 4217 currency code for `order_created_attributed_sales`. This is the ad account currency and is returned even when `order_created_attributed_sales` is null."
          },
          "order_created_roas": {
            "anyOf": [
              {
                "type": "number",
                "description": "Return on ad spend from attributed `order_created` events, calculated using the unrounded order-created attributed sales value divided by spend for the same insight row. Rounded to at most four decimal places. Returns null when attributed sales are unavailable or spend is not greater than zero."
              },
              {
                "type": "null"
              }
            ]
          },
          "cpa": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "post_click_cvr": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "ctr": {
            "type": "number"
          },
          "cpc": {
            "type": "number"
          },
          "cpm": {
            "type": "number"
          },
          "ad_account_impressions": {
            "type": "integer"
          },
          "ad_account_clicks": {
            "type": "integer"
          },
          "ad_account_spend": {
            "type": "number"
          },
          "ad_account_ctr": {
            "type": "number"
          },
          "ad_account_cpc": {
            "type": "number"
          },
          "ad_account_cpm": {
            "type": "number"
          },
          "campaign_impressions": {
            "type": "integer"
          },
          "campaign_clicks": {
            "type": "integer"
          },
          "campaign_spend": {
            "type": "number"
          },
          "campaign_ctr": {
            "type": "number"
          },
          "campaign_cpc": {
            "type": "number"
          },
          "campaign_cpm": {
            "type": "number"
          },
          "ad_group_impressions": {
            "type": "integer"
          },
          "ad_group_clicks": {
            "type": "integer"
          },
          "ad_group_spend": {
            "type": "number"
          },
          "ad_group_ctr": {
            "type": "number"
          },
          "ad_group_cpc": {
            "type": "number"
          },
          "ad_group_cpm": {
            "type": "number"
          },
          "ad_impressions": {
            "type": "integer"
          },
          "ad_clicks": {
            "type": "integer"
          },
          "ad_spend": {
            "type": "number"
          },
          "ad_ctr": {
            "type": "number"
          },
          "ad_cpc": {
            "type": "number"
          },
          "ad_cpm": {
            "type": "number"
          },
          "product_impressions": {
            "type": "integer"
          },
          "product_clicks": {
            "type": "integer"
          },
          "carousel_product_card_impressions": {
            "type": "integer",
            "description": "Number of carousel product-card impression actions observed for this product. This is not a billable ad impression. Returned only when explicitly requested and available for the requested range."
          },
          "carousel_product_card_clicks": {
            "type": "integer",
            "description": "Number of carousel product-card click actions observed for this product. This is distinct from the ad click metric. Returned only when explicitly requested and available for the requested range."
          },
          "product_spend": {
            "type": "number"
          },
          "product_ctr": {
            "type": "number"
          },
          "product_cpc": {
            "type": "number"
          },
          "product_cpm": {
            "type": "number"
          },
          "country_impressions": {
            "type": "integer"
          },
          "country_clicks": {
            "type": "integer"
          },
          "country_spend": {
            "type": "number"
          },
          "country_ctr": {
            "type": "number"
          },
          "country_cpc": {
            "type": "number"
          },
          "country_cpm": {
            "type": "number"
          },
          "device_impressions": {
            "type": "integer"
          },
          "device_clicks": {
            "type": "integer"
          },
          "device_spend": {
            "type": "number"
          },
          "device_ctr": {
            "type": "number"
          },
          "device_cpc": {
            "type": "number"
          },
          "device_cpm": {
            "type": "number"
          },
          "platform_impressions": {
            "type": "integer"
          },
          "platform_clicks": {
            "type": "integer"
          },
          "platform_spend": {
            "type": "number"
          },
          "platform_ctr": {
            "type": "number"
          },
          "platform_cpc": {
            "type": "number"
          },
          "platform_cpm": {
            "type": "number"
          },
          "conversions": {
            "type": "integer"
          },
          "data_status": {
            "type": "string"
          },
          "ad_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_account_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_account_budget_lifetime": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_account_budget_daily": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_group_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign_start_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign_end_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign_budget_lifetime": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign_budget_daily": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_group_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_group_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_group_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_copy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ad_review_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_feed_id": {
            "type": "string"
          },
          "item_id": {
            "type": "string"
          },
          "product_title": {
            "type": "string"
          },
          "product_description": {
            "type": "string"
          },
          "product_body": {
            "type": "string"
          },
          "product_target_url": {
            "type": "string"
          },
          "product_image_url": {
            "type": "string"
          },
          "product_brand": {
            "type": "string"
          },
          "product_seller_name": {
            "type": "string"
          },
          "product_price": {
            "type": "string"
          },
          "product_availability": {
            "type": "string"
          },
          "device_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "country_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "platform": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["id", "start_time", "end_time"],
        "x-openai-class-name": "sofa.api.resources.insights.InsightItemBody"
      },
      "InsightsResource": {
        "properties": {
          "timezone": {
            "type": "string"
          },
          "coverage": {
            "$ref": "#/components/schemas/HotelInsightsCoverageBody"
          },
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/InsightItemBody"
            },
            "type": "array"
          },
          "count": {
            "type": "integer"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "total_count": {
            "type": "integer",
            "description": "Hotel property/time-bucket groups before pagination."
          }
        },
        "type": "object",
        "required": [
          "object",
          "data",
          "count",
          "first_id",
          "last_id",
          "has_more"
        ],
        "x-openai-class-name": "sofa.api.resources.insights.InsightsBody"
      },
      "HotelInsightsGranularity": {
        "type": "string",
        "enum": ["none", "daily", "monthly"],
        "x-openai-class-name": "sofa.api.methods.insights.get_hotel_insights.HotelInsightsGranularity"
      },
      "HotelInsightsBreakdown": {
        "type": "string",
        "enum": ["campaign", "ad_group", "ad"],
        "x-openai-class-name": "sofa.api.methods.insights.get_hotel_insights.HotelInsightsBreakdown"
      },
      "HotelInsightsSortField": {
        "type": "string",
        "enum": ["impressions", "clicks", "spend", "ctr", "cpc", "cpm"],
        "x-openai-class-name": "sofa.api.methods.insights.get_hotel_insights.HotelInsightsSortField"
      },
      "HotelInsightsSortDirection": {
        "type": "string",
        "enum": ["asc", "desc"],
        "x-openai-class-name": "sofa.api.methods.insights.get_hotel_insights.HotelInsightsSortDirection"
      },
      "HotelInsightRowBody": {
        "properties": {
          "inventory_type": {
            "type": "string"
          },
          "schema_profile": {
            "type": "string"
          },
          "inventory_feed_id": {
            "type": "string"
          },
          "inventory_item_id": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "month": {
            "type": "string"
          },
          "campaign_id": {
            "type": "string"
          },
          "ad_group_id": {
            "type": "string"
          },
          "ad_id": {
            "type": "string"
          },
          "impressions": {
            "type": "integer"
          },
          "clicks": {
            "type": "integer"
          },
          "spend": {
            "type": "number",
            "description": "Settled spend in ad-account currency."
          },
          "ctr": {
            "type": "number"
          },
          "cpc": {
            "type": "number",
            "description": "Settled spend divided by settled clicks."
          },
          "cpm": {
            "type": "number",
            "description": "Settled spend per thousand settled impressions."
          },
          "hotel_impressions": {
            "type": "integer",
            "description": "Property total across the filtered hierarchy rows in this bucket."
          },
          "hotel_clicks": {
            "type": "integer"
          },
          "hotel_spend": {
            "type": "number",
            "description": "Property total settled spend in this bucket."
          },
          "hotel_ctr": {
            "type": "number",
            "description": "Property clicks divided by property impressions."
          },
          "hotel_cpc": {
            "type": "number",
            "description": "Property settled spend divided by settled clicks."
          },
          "hotel_cpm": {
            "type": "number",
            "description": "Property settled spend per thousand settled impressions."
          },
          "data_status": {
            "type": "string",
            "description": "Bucket mutability: final, estimated, or mixed. See page coverage for source gaps."
          },
          "hotel_name": {
            "type": "string"
          },
          "hotel_brand": {
            "type": "string"
          },
          "hotel_description": {
            "type": "string"
          },
          "hotel_url": {
            "type": "string"
          },
          "hotel_primary_image_url": {
            "type": "string"
          },
          "hotel_base_price": {
            "type": "string"
          },
          "hotel_star_rating": {
            "type": "number"
          },
          "hotel_category": {
            "type": "string"
          },
          "hotel_city": {
            "type": "string"
          },
          "hotel_region": {
            "type": "string"
          },
          "hotel_country_code": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "inventory_type",
          "schema_profile",
          "inventory_feed_id",
          "inventory_item_id",
          "impressions",
          "clicks",
          "spend",
          "ctr",
          "cpc",
          "cpm",
          "data_status"
        ],
        "x-openai-class-name": "sofa.api.resources.hotel_insights.HotelInsightRowBody"
      },
      "HotelInsightsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/HotelInsightRowBody"
            },
            "type": "array"
          },
          "count": {
            "type": "integer"
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "total_count": {
            "type": "integer",
            "description": "Number of property/time-bucket groups, before pagination."
          },
          "timezone": {
            "type": "string"
          },
          "coverage": {
            "$ref": "#/components/schemas/HotelInsightsCoverageBody"
          }
        },
        "type": "object",
        "required": [
          "object",
          "data",
          "count",
          "last_id",
          "has_more",
          "timezone",
          "coverage"
        ],
        "x-openai-class-name": "sofa.api.resources.hotel_insights.HotelInsightsBody"
      },
      "HotelInsightsTimeseriesRowBody": {
        "properties": {
          "date": {
            "type": "string",
            "description": "YYYY-MM-DD in the ad account timezone."
          },
          "impressions": {
            "type": "integer"
          },
          "clicks": {
            "type": "integer"
          },
          "spend": {
            "type": "number",
            "description": "Settled spend in ad-account currency."
          },
          "ctr": {
            "type": "number"
          },
          "cpc": {
            "type": "number",
            "description": "Settled spend divided by settled clicks."
          },
          "cpm": {
            "type": "number",
            "description": "Settled spend per thousand settled impressions."
          },
          "data_status": {
            "type": "string",
            "description": "final, estimated, or mixed. See coverage for source gaps."
          }
        },
        "type": "object",
        "required": [
          "date",
          "impressions",
          "clicks",
          "spend",
          "ctr",
          "cpc",
          "cpm",
          "data_status"
        ],
        "x-openai-class-name": "sofa.api.resources.hotel_insights_timeseries.HotelInsightsTimeseriesRowBody"
      },
      "HotelInsightsTimeseriesResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/HotelInsightsTimeseriesRowBody"
            },
            "type": "array"
          },
          "count": {
            "type": "integer"
          },
          "timezone": {
            "type": "string"
          },
          "coverage": {
            "$ref": "#/components/schemas/HotelInsightsCoverageBody"
          }
        },
        "type": "object",
        "required": ["object", "data", "count", "timezone", "coverage"],
        "x-openai-class-name": "sofa.api.resources.hotel_insights_timeseries.HotelInsightsTimeseriesBody"
      },
      "GeoLookupEntry": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "canonical_name": {
            "type": "string"
          },
          "region_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "canonical_name",
          "type",
          "country_code",
          "parent_id",
          "parent_country"
        ],
        "x-openai-class-name": "sofa.api.resources.geo_lookup.GeoLookupEntry"
      },
      "GeoLookupSearchResource": {
        "properties": {
          "query": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/GeoLookupEntry"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["query", "count", "results"],
        "x-openai-class-name": "sofa.api.resources.geo_lookup.GeoLookupSearchBody"
      },
      "LeadSyncSubscriptionListItemBody": {
        "properties": {
          "subscription_id": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["subscription_id", "object", "status"],
        "x-openai-class-name": "sofa.api.resources.lead_sync_subscriptions.LeadSyncSubscriptionListItemBody"
      },
      "LeadSyncSubscriptionsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/LeadSyncSubscriptionListItemBody"
            },
            "type": "array"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["object", "data", "first_id", "last_id", "has_more"],
        "x-openai-class-name": "sofa.api.resources.lead_sync_subscriptions.LeadSyncSubscriptionsBody"
      },
      "CreateLeadSyncSubscriptionBody": {
        "properties": {
          "ad_account_id": {
            "type": "string",
            "minLength": 1
          },
          "destination_url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "pattern": "^https://"
          },
          "signing_secret": {
            "type": "string",
            "maxLength": 50,
            "minLength": 50,
            "pattern": "^whsec_[A-Za-z0-9+/]{42}[AEIMQUYcgkosw048]=$"
          }
        },
        "type": "object",
        "required": ["ad_account_id", "destination_url"],
        "x-openai-class-name": "sofa.api.params.lead_sync_subscriptions.CreateLeadSyncSubscriptionBody"
      },
      "CreatedLeadSyncSubscriptionResource": {
        "properties": {
          "subscription_id": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "signing_secret": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["subscription_id", "object", "status", "signing_secret"],
        "x-openai-class-name": "sofa.api.resources.lead_sync_subscriptions.CreatedLeadSyncSubscriptionBody"
      },
      "LeadSyncSubscriptionResource": {
        "properties": {
          "subscription_id": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["subscription_id", "object", "status"],
        "x-openai-class-name": "sofa.api.resources.lead_sync_subscriptions.LeadSyncSubscriptionBody"
      },
      "DeletedLeadSyncSubscriptionResource": {
        "properties": {
          "subscription_id": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["subscription_id", "object", "status", "deleted"],
        "x-openai-class-name": "sofa.api.resources.lead_sync_subscriptions.DeletedLeadSyncSubscriptionBody"
      },
      "CreateConversionApiKeyBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 3,
            "pattern": "^.*\\S.*$"
          }
        },
        "type": "object",
        "required": ["name"],
        "x-openai-class-name": "sofa.api.params.api_keys.CreateConversionApiKeyBody"
      },
      "ConversionApiKeyResource": {
        "properties": {
          "name": {
            "type": "string"
          },
          "api_key": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["name", "api_key"],
        "x-openai-class-name": "sofa.api.resources.api_keys.ConversionApiKeyBody"
      },
      "ConversionEventSettingSourceBody": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["id", "name"],
        "x-openai-class-name": "sofa.api.resources.conversion_event_settings.ConversionEventSettingSourceBody"
      },
      "ConversionEventSettingCampaignBody": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["id", "name"],
        "x-openai-class-name": "sofa.api.resources.conversion_event_settings.ConversionEventSettingCampaignBody"
      },
      "ConversionEventSettingItemResource": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "custom_event_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attribution_window_days": {
            "type": "integer"
          },
          "ad_account_id": {
            "type": "string"
          },
          "source_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/ConversionEventSettingSourceBody"
            },
            "type": "array"
          },
          "campaigns": {
            "items": {
              "$ref": "#/components/schemas/ConversionEventSettingCampaignBody"
            },
            "type": "array"
          },
          "archived": {
            "type": "boolean"
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "event_type",
          "custom_event_name",
          "attribution_window_days",
          "ad_account_id",
          "source_ids",
          "sources",
          "campaigns",
          "archived",
          "version"
        ],
        "x-openai-class-name": "sofa.api.resources.conversion_event_settings.ConversionEventSettingItemBody"
      },
      "ListConversionEventSettingsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ConversionEventSettingItemResource"
            },
            "type": "array"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["object", "data", "first_id", "last_id", "has_more"],
        "x-openai-class-name": "sofa.api.resources.conversion_event_settings.ListConversionEventSettingsBody"
      },
      "CreateConversionEventSettingBody": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "event_type": {
            "type": "string",
            "minLength": 1
          },
          "custom_event_name": {
            "type": "string",
            "minLength": 1
          },
          "attribution_window_days": {
            "type": "integer"
          },
          "source_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1
          }
        },
        "type": "object",
        "required": [
          "name",
          "event_type",
          "attribution_window_days",
          "source_ids"
        ],
        "x-openai-class-name": "sofa.api.params.conversion_event_settings.CreateConversionEventSettingBody"
      },
      "ClientDataSourceItemResource": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "client_type": {
            "type": "string"
          },
          "pixel_id": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["id", "name", "client_type", "pixel_id"],
        "x-openai-class-name": "sofa.api.resources.client_data_sources.ClientDataSourceItemBody"
      },
      "ListClientDataSourceItemsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ClientDataSourceItemResource"
            },
            "type": "array"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["object", "data", "first_id", "last_id", "has_more"],
        "x-openai-class-name": "sofa.api.resources.client_data_sources.ListClientDataSourceItemsBody"
      },
      "ClientDataSourceTypeParam": {
        "type": "string",
        "enum": ["web"],
        "x-openai-class-name": "sofa.api.params.client_data_sources.ClientDataSourceTypeParam"
      },
      "CreateConversionSourceBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 3,
            "pattern": "^.*\\S.*$"
          },
          "client_type": {
            "$ref": "#/components/schemas/ClientDataSourceTypeParam"
          }
        },
        "type": "object",
        "required": ["name", "client_type"],
        "x-openai-class-name": "sofa.api.methods.conversions.create_conversion_source.CreateConversionSourceBody"
      },
      "ConversionEventBody": {
        "properties": {
          "data_source_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "custom_event_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "action_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "event_timestamp_ms": {
            "type": "integer",
            "description": "Advertiser event time as Unix epoch milliseconds."
          },
          "received_at_ms": {
            "type": "integer",
            "description": "Wadi receive time as Unix epoch milliseconds."
          },
          "api_channel": {
            "type": "string"
          },
          "event_data_json": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "data_source_id",
          "event_type",
          "custom_event_name",
          "action_source",
          "event_timestamp_ms",
          "received_at_ms",
          "api_channel",
          "event_data_json"
        ],
        "x-openai-class-name": "sofa.api.resources.conversion_diagnostics.ConversionEventBody"
      },
      "ConversionEventsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ConversionEventBody"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["object", "data"],
        "x-openai-class-name": "sofa.api.resources.conversion_diagnostics.ConversionEventsBody"
      },
      "ConversionInsightsIncludeParam": {
        "type": "string",
        "enum": ["attributed_events"],
        "x-openai-class-name": "sofa.api.params.insights.ConversionInsightsIncludeParam"
      },
      "ConversionTimeGranularityParam": {
        "type": "string",
        "enum": ["none", "daily"],
        "x-openai-class-name": "sofa.api.params.insights.ConversionTimeGranularityParam"
      },
      "ConversionBreakdownParam": {
        "type": "string",
        "enum": ["device", "country"],
        "x-openai-class-name": "sofa.api.params.insights.ConversionBreakdownParam"
      },
      "PostConversionInsightsBody": {
        "properties": {
          "include": {
            "items": {
              "$ref": "#/components/schemas/ConversionInsightsIncludeParam"
            },
            "type": "array",
            "description": "Add event details; clock, windows and goal totals are unchanged. count counts summary rows."
          },
          "event_names": {
            "description": "Requires include=[attributed_events]. Omit for all; select configured or published account events.",
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "x-openai-client-enforce-constraints": true
            },
            "minItems": 1,
            "maxItems": 500
          },
          "attribution_time_basis": {
            "$ref": "#/components/schemas/AttributionTimeBasisParam",
            "description": "Defaults: ad_event_time; omitted/null windows independently use 30-day click/1-day view. conversion_time has limited non-goal coverage."
          },
          "aggregation_level": {
            "type": "string"
          },
          "time_granularity": {
            "$ref": "#/components/schemas/ConversionTimeGranularityParam"
          },
          "breakdown": {
            "$ref": "#/components/schemas/ConversionBreakdownParam"
          },
          "time_ranges": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "entity_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "group_by_entity": {
            "type": "boolean"
          },
          "include_zero_rows": {
            "type": "boolean"
          },
          "attribution_window_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 7,
                "maximum": 30,
                "enum": [7, 14, 30]
              },
              {
                "type": "null"
              }
            ]
          },
          "view_through_attribution_window_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1,
                "enum": [0, 1]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["aggregation_level", "time_ranges"],
        "x-openai-class-name": "sofa.api.params.insights.InsightsConversionsBody"
      },
      "ConversionEventSettingBreakdownBody": {
        "properties": {
          "conversion_event_setting_id": {
            "type": "string"
          },
          "click_through_conversions": {
            "type": "integer"
          },
          "view_through_conversions": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": [
          "conversion_event_setting_id",
          "click_through_conversions",
          "view_through_conversions"
        ],
        "x-openai-class-name": "sofa.api.resources.insights.ConversionEventSettingBreakdownBody"
      },
      "AttributedEventRowBody": {
        "properties": {
          "date": {
            "type": "string"
          },
          "device": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "click_through_conversions": {
            "type": "integer"
          },
          "view_through_conversions": {
            "type": "integer"
          },
          "conversion_event_setting_breakdowns": {
            "items": {
              "$ref": "#/components/schemas/ConversionEventSettingBreakdownBody"
            },
            "type": "array"
          },
          "entity_id": {
            "type": "string"
          },
          "event_name": {
            "type": "string"
          },
          "event_kind": {
            "type": "string"
          },
          "attributed_event_count": {
            "type": "integer"
          },
          "attributed_event_value_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "attributed_event_value_count": {
            "type": "integer"
          },
          "attributed_event_value_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "entity_id",
          "event_name",
          "event_kind",
          "attributed_event_count",
          "attributed_event_value_amount",
          "attributed_event_value_count",
          "attributed_event_value_currency"
        ],
        "x-openai-class-name": "sofa.api.resources.insights.AttributedEventRowBody"
      },
      "ConversionSummaryRowBody": {
        "properties": {
          "attributed_events": {
            "items": {
              "$ref": "#/components/schemas/AttributedEventRowBody"
            },
            "type": "array"
          },
          "entity_id": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "device": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "conversions": {
            "type": "integer"
          },
          "click_through_conversions": {
            "type": "integer"
          },
          "view_through_conversions": {
            "type": "integer"
          },
          "order_created_attributed_sales": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "order_created_attributed_sales_currency": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["entity_id", "conversions"],
        "x-openai-class-name": "sofa.api.resources.insights.ConversionSummaryRowBody"
      },
      "ConversionSummaryRowsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ConversionSummaryRowBody"
            },
            "type": "array"
          },
          "count": {
            "type": "integer"
          },
          "account_currency": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["object", "data", "count"],
        "x-openai-class-name": "sofa.api.resources.insights.ConversionSummaryRowsBody"
      },
      "AdGroupsListIncludeParam": {
        "type": "string",
        "enum": ["serving_issues"],
        "x-openai-class-name": "sofa.api.params.ad_groups.AdGroupsListIncludeParam"
      },
      "ProductSetFilterBody": {
        "properties": {
          "field": {
            "type": "string"
          },
          "operator": {
            "type": "string"
          },
          "values": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["field", "operator", "values"],
        "x-openai-class-name": "sofa.api.resources.ad_groups.ProductSetFilterBody"
      },
      "ProductSetBody": {
        "properties": {
          "product_feed_id": {
            "type": "string"
          },
          "filters": {
            "items": {
              "$ref": "#/components/schemas/ProductSetFilterBody"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["product_feed_id", "filters"],
        "x-openai-class-name": "sofa.api.resources.ad_groups.ProductSetBody"
      },
      "BiddingStrategyTypeBody": {
        "type": "string",
        "enum": [
          "fixed_bid",
          "automated_bid",
          "maximize_clicks",
          "maximize_conversions"
        ],
        "x-openai-class-name": "sofa.api.resources.ad_groups.BiddingStrategyTypeBody"
      },
      "CustomAudienceBidMultiplierBody": {
        "properties": {
          "custom_audience_id": {
            "type": "string"
          },
          "bid_multiplier_micros": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": ["custom_audience_id", "bid_multiplier_micros"],
        "x-openai-class-name": "sofa.api.resources.ad_groups.CustomAudienceBidMultiplierBody"
      },
      "BiddingConfigBody": {
        "properties": {
          "billing_event_type": {
            "type": "string"
          },
          "strategy": {
            "$ref": "#/components/schemas/BiddingStrategyTypeBody"
          },
          "max_bid_micros": {
            "type": "integer"
          },
          "custom_audience_bid_multipliers": {
            "items": {
              "$ref": "#/components/schemas/CustomAudienceBidMultiplierBody"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["billing_event_type"],
        "x-openai-class-name": "sofa.api.resources.ad_groups.BiddingConfigBody"
      },
      "AdGroupServingIssueCode": {
        "type": "string",
        "enum": [
          "ad_account_suspended",
          "ad_account_brand_review_missing_favicon",
          "ad_account_brand_review_escalated_review",
          "ad_account_brand_review_rejected",
          "ad_account_brand_review_in_progress",
          "ad_account_payment_method_missing_or_unauthorized",
          "ad_account_threshold_payment_failed",
          "ad_account_persona_verification_not_approved",
          "ad_account_persona_verification_step_up_required",
          "campaign_not_active",
          "campaign_not_started",
          "campaign_ended",
          "ad_group_not_active",
          "ad_group_has_no_ads",
          "ad_group_has_no_serving_ready_ads",
          "campaign_budget_exhausted",
          "ad_account_budget_exhausted",
          "review_not_approved",
          "landing_page_crawl_issue",
          "ad_in_review",
          "partial_serving_review_not_approved",
          "partial_serving_landing_page_crawl_issue",
          "partial_serving_ad_in_review"
        ],
        "x-openai-class-name": "sofa.api.resources.ad_groups.AdGroupServingIssueCode"
      },
      "AdGroupServingIssueBody": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/AdGroupServingIssueCode"
          }
        },
        "type": "object",
        "required": ["code"],
        "x-openai-class-name": "sofa.api.resources.ad_groups.AdGroupServingIssueBody"
      },
      "AdGroupItemBody": {
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "unixtime"
          },
          "updated_at": {
            "type": "integer",
            "format": "unixtime"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "context_hints": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "product_set": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProductSetBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string"
          },
          "bidding_config": {
            "$ref": "#/components/schemas/BiddingConfigBody"
          },
          "landing_page_configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LandingPageConfigurationBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "geographic_targeting_blocked": {
            "type": "boolean"
          },
          "advertiser_phone_verification_required": {
            "type": "boolean"
          },
          "serving_issues": {
            "items": {
              "$ref": "#/components/schemas/AdGroupServingIssueBody"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "updated_at",
          "name",
          "description",
          "context_hints",
          "status",
          "bidding_config"
        ],
        "x-openai-class-name": "sofa.api.resources.ad_groups.AdGroupItemBody"
      },
      "AdGroupsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AdGroupItemBody"
            },
            "type": "array"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["object", "data", "first_id", "last_id", "has_more"],
        "x-openai-class-name": "sofa.api.resources.ad_groups.AdGroupsBody"
      },
      "BillingEventTypeParam": {
        "type": "string",
        "enum": ["impression", "click"],
        "x-openai-class-name": "sofa.api.params.ad_groups.BillingEventTypeParam"
      },
      "BiddingStrategyTypeParam": {
        "type": "string",
        "enum": ["fixed_bid", "maximize_clicks", "maximize_conversions"],
        "x-openai-class-name": "sofa.api.params.ad_groups.BiddingStrategyTypeParam"
      },
      "CustomAudienceBidMultiplierParams": {
        "properties": {
          "custom_audience_id": {
            "type": "string"
          },
          "bid_multiplier_micros": {
            "type": "integer",
            "maximum": 10000000,
            "minimum": 100000
          }
        },
        "type": "object",
        "required": ["custom_audience_id", "bid_multiplier_micros"],
        "x-openai-class-name": "sofa.api.params.ad_groups.CustomAudienceBidMultiplierParams"
      },
      "BiddingConfigParams": {
        "properties": {
          "billing_event_type": {
            "$ref": "#/components/schemas/BillingEventTypeParam"
          },
          "strategy": {
            "$ref": "#/components/schemas/BiddingStrategyTypeParam",
            "description": "Bidding strategy. When omitted, max_bid_micros selects fixed bidding if present or the campaign-compatible AutoBid strategy if omitted."
          },
          "max_bid_micros": {
            "type": "integer",
            "maximum": 30400000000000,
            "minimum": 1,
            "description": "Maximum advertiser bid in micros. When strategy is omitted, omit this field to select AutoBid."
          },
          "custom_audience_bid_multipliers": {
            "items": {
              "$ref": "#/components/schemas/CustomAudienceBidMultiplierParams"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["billing_event_type"],
        "x-openai-class-name": "sofa.api.params.ad_groups.BiddingConfigParams"
      },
      "ProductSetFilterOperatorParam": {
        "type": "string",
        "enum": [
          "in",
          "not_in",
          "gt",
          "gte",
          "lt",
          "lte",
          "contains",
          "not_contains",
          "starts_with"
        ],
        "x-openai-class-name": "sofa.api.params.ad_groups.ProductSetFilterOperatorParam"
      },
      "ProductSetFilterParams": {
        "properties": {
          "field": {
            "type": "string"
          },
          "operator": {
            "$ref": "#/components/schemas/ProductSetFilterOperatorParam"
          },
          "values": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["field", "operator", "values"],
        "x-openai-class-name": "sofa.api.params.ad_groups.ProductSetFilterParams"
      },
      "ProductSetParams": {
        "properties": {
          "product_feed_id": {
            "type": "string"
          },
          "filters": {
            "items": {
              "$ref": "#/components/schemas/ProductSetFilterParams"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["product_feed_id"],
        "x-openai-class-name": "sofa.api.params.ad_groups.ProductSetParams"
      },
      "CreateAdGroupBody": {
        "properties": {
          "campaign_id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 3,
            "pattern": "^.*\\S.*$"
          },
          "description": {
            "type": "string"
          },
          "context_hints": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 2000
          },
          "status": {
            "$ref": "#/components/schemas/ActivePausedStatusParam"
          },
          "bidding_config": {
            "$ref": "#/components/schemas/BiddingConfigParams"
          },
          "product_set": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProductSetParams"
              },
              {
                "type": "null"
              }
            ]
          },
          "landing_page_configuration": {
            "$ref": "#/components/schemas/LandingPageConfigurationParams"
          }
        },
        "type": "object",
        "required": ["campaign_id", "name", "status", "bidding_config"],
        "x-openai-class-name": "sofa.api.params.ad_groups.CreateAdGroupBody"
      },
      "AdGroupItemIncludeParam": {
        "type": "string",
        "enum": ["serving_issues"],
        "x-openai-class-name": "sofa.api.params.ad_groups.AdGroupItemIncludeParam"
      },
      "UpdateAdGroupBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 3,
            "pattern": "^.*\\S.*$"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "context_hints": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 2000
          },
          "status": {
            "$ref": "#/components/schemas/ActivePausedArchivedStatusParam"
          },
          "bidding_config": {
            "$ref": "#/components/schemas/BiddingConfigParams"
          },
          "product_set": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProductSetParams"
              },
              {
                "type": "null"
              }
            ]
          },
          "landing_page_configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LandingPageConfigurationParams"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.ad_groups.UpdateAdGroupBody"
      },
      "AdsListIncludeParam": {
        "type": "string",
        "enum": ["serving_issues"],
        "x-openai-class-name": "sofa.api.params.ads.AdsListIncludeParam"
      },
      "AdSpecType": {
        "type": "string",
        "enum": ["chat_card", "product_ad_template"],
        "x-openai-class-name": "sofa.api.resources.ads.AdSpecType"
      },
      "AdImageCropBody": {
        "properties": {
          "x": {
            "type": "number",
            "description": "Horizontal offset as a fraction of the EXIF-oriented source image (0-1)."
          },
          "y": {
            "type": "number",
            "description": "Vertical offset as a fraction of the EXIF-oriented source image (0-1)."
          },
          "width": {
            "type": "number",
            "description": "Crop width as a fraction of the EXIF-oriented source image (0-1)."
          },
          "height": {
            "type": "number",
            "description": "Crop height as a fraction of the EXIF-oriented source image (0-1)."
          }
        },
        "type": "object",
        "required": ["x", "y", "width", "height"],
        "x-openai-class-name": "sofa.api.resources.ads.AdImageCropBody"
      },
      "ConversationalBottomOtmSpecBody": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/AdSpecType"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "file_id": {
            "type": "string"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "image_crop": {
            "$ref": "#/components/schemas/AdImageCropBody",
            "description": "Normalized square crop for a chat_card creative, when present."
          },
          "target_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["type", "title", "body", "target_url"],
        "x-openai-class-name": "sofa.api.resources.ads.ConversationalBottomOtmSpecBody"
      },
      "AppealStatus": {
        "type": "string",
        "enum": ["requested", "approved", "rejected", "superseded", "failed"],
        "x-openai-class-name": "sofa.api.resources.ads.AppealStatus"
      },
      "AdAppealBody": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/AppealStatus"
          },
          "requested_at": {
            "type": "integer",
            "format": "unixtime"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "integer",
                "format": "unixtime"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["status", "requested_at", "resolved_at"],
        "x-openai-class-name": "sofa.api.resources.ads.AdAppealBody"
      },
      "AdServingIssueCode": {
        "type": "string",
        "enum": [
          "ad_account_suspended",
          "ad_account_brand_review_missing_favicon",
          "ad_account_brand_review_escalated_review",
          "ad_account_brand_review_rejected",
          "ad_account_brand_review_in_progress",
          "ad_account_payment_method_missing_or_unauthorized",
          "ad_account_threshold_payment_failed",
          "ad_account_persona_verification_not_approved",
          "ad_account_persona_verification_step_up_required",
          "campaign_not_active",
          "campaign_not_started",
          "campaign_ended",
          "ad_group_not_active",
          "campaign_budget_exhausted",
          "ad_account_budget_exhausted",
          "ad_not_active",
          "review_not_approved",
          "landing_page_crawl_issue",
          "ad_in_review",
          "ad_over_18_only",
          "policy_country_targeting_blocked",
          "policy_country_targeting_limited",
          "title_missing",
          "advertiser_name_missing",
          "image_or_favicon_missing",
          "target_url_invalid",
          "reserved_query_params_present",
          "product_feed_id_missing"
        ],
        "x-openai-class-name": "sofa.api.resources.ads.AdServingIssueCode"
      },
      "AdServingIssueBody": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/AdServingIssueCode"
          }
        },
        "type": "object",
        "required": ["code"],
        "x-openai-class-name": "sofa.api.resources.ads.AdServingIssueBody"
      },
      "AdItemBody": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "unixtime"
          },
          "updated_at": {
            "type": "integer",
            "format": "unixtime"
          },
          "creative": {
            "$ref": "#/components/schemas/ConversationalBottomOtmSpecBody"
          },
          "status": {
            "type": "string"
          },
          "review_status": {
            "$ref": "#/components/schemas/ReviewStatus"
          },
          "landing_page_configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LandingPageConfigurationBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "appeal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AdAppealBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "review": {
            "$ref": "#/components/schemas/ReviewBody"
          },
          "geographic_targeting_blocked": {
            "type": "boolean"
          },
          "advertiser_phone_verification_required": {
            "type": "boolean"
          },
          "serving_issues": {
            "items": {
              "$ref": "#/components/schemas/AdServingIssueBody"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "created_at",
          "updated_at",
          "creative",
          "status",
          "review_status",
          "review"
        ],
        "x-openai-class-name": "sofa.api.resources.ads.AdItemBody"
      },
      "AdsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AdItemBody"
            },
            "type": "array"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["object", "data", "first_id", "last_id", "has_more"],
        "x-openai-class-name": "sofa.api.resources.ads.AdsBody"
      },
      "AdCreativeTypeParam": {
        "type": "string",
        "enum": ["chat_card", "product_ad_template"],
        "x-openai-class-name": "sofa.api.params.ads.AdCreativeTypeParam"
      },
      "AdImageCropParams": {
        "properties": {
          "x": {
            "type": "number",
            "description": "Horizontal offset as a fraction of the EXIF-oriented source image (0-1)."
          },
          "y": {
            "type": "number",
            "description": "Vertical offset as a fraction of the EXIF-oriented source image (0-1)."
          },
          "width": {
            "type": "number",
            "description": "Crop width as a fraction of the EXIF-oriented source image (0-1)."
          },
          "height": {
            "type": "number",
            "description": "Crop height as a fraction of the EXIF-oriented source image (0-1)."
          }
        },
        "type": "object",
        "required": ["x", "y", "width", "height"],
        "description": "Optional normalized square crop for chat_card creatives. Requires file_id and is not supported for product_ad_template creatives.",
        "x-openai-class-name": "sofa.api.params.ads.AdImageCropParams"
      },
      "CreateAdCreativeParams": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/AdCreativeTypeParam"
          },
          "title": {
            "type": "string",
            "maxLength": 50,
            "minLength": 3,
            "pattern": "^.*\\S.*$"
          },
          "body": {
            "type": "string",
            "maxLength": 100
          },
          "price": {
            "type": "string",
            "maxLength": 100
          },
          "target_url": {
            "type": "string",
            "maxLength": 2048
          },
          "file_id": {
            "type": "string"
          },
          "image_crop": {
            "$ref": "#/components/schemas/AdImageCropParams",
            "description": "Optional normalized square crop for chat_card creatives. Requires file_id and is not supported for product_ad_template creatives."
          }
        },
        "type": "object",
        "required": ["type", "title", "body"],
        "x-openai-class-name": "sofa.api.params.ads.CreateAdCreativeParams"
      },
      "CreateAdBody": {
        "properties": {
          "ad_group_id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 3,
            "pattern": "^.*\\S.*$"
          },
          "creative": {
            "$ref": "#/components/schemas/CreateAdCreativeParams"
          },
          "status": {
            "$ref": "#/components/schemas/ActivePausedStatusParam"
          },
          "landing_page_configuration": {
            "$ref": "#/components/schemas/LandingPageConfigurationParams"
          }
        },
        "type": "object",
        "required": ["ad_group_id", "name", "creative", "status"],
        "x-openai-class-name": "sofa.api.params.ads.CreateAdBody"
      },
      "AdItemIncludeParam": {
        "type": "string",
        "enum": ["serving_issues"],
        "x-openai-class-name": "sofa.api.params.ads.AdItemIncludeParam"
      },
      "UpdateAdCreativeParams": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/AdCreativeTypeParam"
          },
          "title": {
            "type": "string",
            "maxLength": 50,
            "minLength": 1,
            "pattern": "^.*\\S.*$"
          },
          "body": {
            "type": "string",
            "maxLength": 100
          },
          "price": {
            "type": "string",
            "maxLength": 100
          },
          "target_url": {
            "type": "string",
            "maxLength": 2048
          },
          "file_id": {
            "type": "string"
          },
          "image_crop": {
            "$ref": "#/components/schemas/AdImageCropParams",
            "description": "Optional normalized square crop for chat_card creatives. Requires file_id and is not supported for product_ad_template creatives."
          }
        },
        "type": "object",
        "required": ["type", "title", "body"],
        "x-openai-class-name": "sofa.api.params.ads.UpdateAdCreativeParams"
      },
      "UpdateAdBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 3,
            "pattern": "^.*\\S.*$"
          },
          "creative": {
            "$ref": "#/components/schemas/UpdateAdCreativeParams"
          },
          "status": {
            "$ref": "#/components/schemas/ActivePausedArchivedStatusParam"
          },
          "landing_page_configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LandingPageConfigurationParams"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.ads.UpdateAdBody"
      },
      "LandingPageCrawlerPublicEvidenceResource": {
        "properties": {
          "snapshot_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "source_url": {
            "type": "string"
          },
          "final_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "captured_at": {
            "type": "integer",
            "format": "unixtime"
          },
          "crawl_profile": {
            "type": "string"
          },
          "failure_code": {
            "type": "string"
          },
          "robots_txt_allowed": {
            "type": "boolean"
          },
          "robots_txt_reason": {
            "type": "string"
          },
          "robots_txt_url": {
            "type": "string"
          },
          "user_agent": {
            "type": "string"
          },
          "screenshot_url": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["snapshot_id", "status", "source_url"],
        "x-openai-class-name": "sofa.api.resources.landing_page_crawler_evidence.LandingPageCrawlerPublicEvidenceBody"
      },
      "AdPreviewItemBody": {
        "properties": {
          "body": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["body"],
        "x-openai-class-name": "sofa.api.resources.ad_previews.AdPreviewItemBody"
      },
      "AdPreviewResource": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AdPreviewItemBody"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["data"],
        "x-openai-class-name": "sofa.api.resources.ad_previews.AdPreviewBody"
      },
      "UploadBlobPurposeParam": {
        "type": "string",
        "enum": ["custom_audience"],
        "x-openai-class-name": "sofa.api.params.uploads.UploadBlobPurposeParam"
      },
      "UploadBlobBody": {
        "properties": {
          "file": {
            "type": "string",
            "format": "binary"
          },
          "purpose": {
            "$ref": "#/components/schemas/UploadBlobPurposeParam",
            "description": "The upload's intended use. This field is required unless the authenticated ad account is enrolled in the custom-audience compatibility rollout. For enrolled accounts, an omitted value defaults to `custom_audience`."
          }
        },
        "type": "object",
        "required": ["file"],
        "x-openai-class-name": "sofa.api.params.uploads.UploadBlobBody"
      },
      "UploadBlobResource": {
        "properties": {
          "file_id": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["file_id"],
        "x-openai-class-name": "sofa.api.resources.uploads.UploadBlobBody"
      },
      "UploadImagePurposeParam": {
        "type": "string",
        "enum": ["account_favicon"],
        "x-openai-class-name": "sofa.api.params.uploads.UploadImagePurposeParam"
      },
      "UploadImageBody": {
        "properties": {
          "image_url": {
            "type": "string"
          },
          "file": {
            "type": "string",
            "format": "binary"
          },
          "purpose": {
            "$ref": "#/components/schemas/UploadImagePurposeParam"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.uploads.UploadImageBody"
      },
      "UploadImageResource": {
        "properties": {
          "file_id": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["file_id"],
        "x-openai-class-name": "sofa.api.resources.uploads.UploadImageBody"
      },
      "ProductFeedSettingsResource": {
        "properties": {
          "feed_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "is_search_eligible_respected": {
            "type": "boolean"
          },
          "countries": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "feed_id",
          "name",
          "is_search_eligible_respected",
          "countries"
        ],
        "x-openai-class-name": "sofa.api.resources.product_feed_settings.ProductFeedSettingsBody"
      },
      "PatchProductFeedSettingsBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1
          },
          "is_search_eligible_respected": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.product_feed_settings.PatchProductFeedSettingsBody"
      },
      "ArchivedProductFeedResource": {
        "properties": {
          "feed_id": {
            "type": "string"
          },
          "archived_at": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["feed_id", "archived_at"],
        "x-openai-class-name": "sofa.api.resources.product_feeds.ArchivedProductFeedResponseBody"
      },
      "ProductFeedsListIncludeParam": {
        "type": "string",
        "enum": ["product_count"],
        "x-openai-class-name": "sofa.api.params.product_feeds.ProductFeedsListIncludeParam"
      },
      "ListProductFeedBody": {
        "properties": {
          "name": {
            "type": "string"
          },
          "feed_id": {
            "type": "string"
          },
          "countries": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "currencies": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "is_shopify_managed": {
            "type": "boolean"
          },
          "product_count": {
            "type": "integer"
          },
          "campaign_count": {
            "type": "integer"
          },
          "hosted_url_configured": {
            "type": "boolean"
          },
          "sftp_configured": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": [
          "name",
          "feed_id",
          "countries",
          "currencies",
          "created_at",
          "updated_at"
        ],
        "x-openai-class-name": "sofa.api.resources.product_feeds.ListProductFeedBody"
      },
      "ListProductFeedsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ListProductFeedBody"
            },
            "type": "array"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["object", "data", "first_id", "last_id", "has_more"],
        "x-openai-class-name": "sofa.api.resources.product_feeds.ListProductFeedsResponseBody"
      },
      "CreateProductFeedBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "countries": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": ["name"],
        "x-openai-class-name": "sofa.api.params.product_feeds.CreateProductFeedBody"
      },
      "ProductFeedResource": {
        "properties": {
          "name": {
            "type": "string"
          },
          "feed_id": {
            "type": "string"
          },
          "countries": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "currencies": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "name",
          "feed_id",
          "countries",
          "currencies",
          "created_at",
          "updated_at"
        ],
        "x-openai-class-name": "sofa.api.resources.product_feeds.ProductFeedBody"
      },
      "ProductFeedUploadStatusResource": {
        "type": "string",
        "enum": [
          "scanning",
          "received",
          "processing",
          "completed",
          "completed_with_errors",
          "skipped",
          "failed"
        ],
        "x-openai-class-name": "sofa.api.resources.product_feed_uploads.ProductFeedUploadStatusResource"
      },
      "ProductFeedUploadDiagnosticCodeResource": {
        "type": "string",
        "enum": [
          "missing_required_column",
          "invalid_value",
          "unsupported_file_type",
          "invalid_sftp_directory_layout"
        ],
        "x-openai-class-name": "sofa.api.resources.product_feed_uploads.ProductFeedUploadDiagnosticCodeResource"
      },
      "ProductFeedUploadDiagnosticSeverityResource": {
        "type": "string",
        "enum": ["warning", "error"],
        "x-openai-class-name": "sofa.api.resources.product_feed_uploads.ProductFeedUploadDiagnosticSeverityResource"
      },
      "ProductFeedUploadDiagnosticBody": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ProductFeedUploadDiagnosticCodeResource"
          },
          "severity": {
            "$ref": "#/components/schemas/ProductFeedUploadDiagnosticSeverityResource"
          },
          "field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "rows_affected": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["code", "severity", "field", "rows_affected"],
        "x-openai-class-name": "sofa.api.resources.product_feed_uploads.ProductFeedUploadDiagnosticBody"
      },
      "ProductFeedUploadBody": {
        "properties": {
          "feed_id": {
            "type": "string"
          },
          "upload_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ProductFeedUploadStatusResource"
          },
          "uploaded_at": {
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "rows_accepted": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "rows_rejected": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "rows_ads_eligible": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Accepted ads-eligible product count; null when not reported."
              },
              {
                "type": "null"
              }
            ]
          },
          "diagnostics": {
            "items": {
              "$ref": "#/components/schemas/ProductFeedUploadDiagnosticBody"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "feed_id",
          "upload_id",
          "status",
          "uploaded_at",
          "completed_at",
          "rows_accepted",
          "rows_rejected",
          "diagnostics"
        ],
        "x-openai-class-name": "sofa.api.resources.product_feed_uploads.ProductFeedUploadBody"
      },
      "ListProductFeedUploadsResource": {
        "properties": {
          "uploads": {
            "items": {
              "$ref": "#/components/schemas/ProductFeedUploadBody"
            },
            "type": "array"
          },
          "latest_uploads": {
            "items": {
              "$ref": "#/components/schemas/ProductFeedUploadBody"
            },
            "type": "array"
          },
          "truncated": {
            "type": "boolean"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["uploads", "latest_uploads", "truncated"],
        "x-openai-class-name": "sofa.api.resources.product_feed_uploads.ListProductFeedUploadsResponseBody"
      },
      "QueryProductFeedProductsBody": {
        "properties": {
          "filters": {
            "items": {
              "$ref": "#/components/schemas/ProductSetFilterParams"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer",
            "maximum": 500,
            "minimum": 1
          },
          "after": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.product_feeds.QueryProductFeedProductsBody"
      },
      "ProductFeedProductBody": {
        "properties": {
          "product_id": {
            "type": "string"
          },
          "item_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "offer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "price": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "variant": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "availability": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "filter_values": {
            "additionalProperties": {},
            "type": "object",
            "x-oaiTypeLabel": "map"
          }
        },
        "type": "object",
        "required": [
          "product_id",
          "item_id",
          "offer_id",
          "brand",
          "title",
          "body",
          "target_url",
          "image_url",
          "price",
          "filter_values"
        ],
        "x-openai-class-name": "sofa.api.resources.product_feeds.ProductFeedProductBody"
      },
      "QueryProductFeedProductsResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ProductFeedProductBody"
            },
            "type": "array"
          },
          "total_count": {
            "type": "integer"
          },
          "matched_count": {
            "type": "integer"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": [
          "object",
          "data",
          "total_count",
          "matched_count",
          "first_id",
          "last_id",
          "has_more"
        ],
        "x-openai-class-name": "sofa.api.resources.product_feeds.QueryProductFeedProductsResponseBody"
      },
      "ProductFeedDeltaPriceBodyParam": {
        "properties": {
          "amount": {
            "type": "integer",
            "minimum": 0
          },
          "currency": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3
          }
        },
        "type": "object",
        "required": ["amount", "currency"],
        "x-openai-class-name": "sofa.api.params.product_feeds.ProductFeedDeltaPriceBody"
      },
      "ProductFeedDeltaAvailabilityBodyParam": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [],
        "x-openai-class-name": "sofa.api.params.product_feeds.ProductFeedDeltaAvailabilityBody"
      },
      "ProductFeedDeltaVariantBodyParam": {
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/ProductFeedDeltaPriceBodyParam"
          },
          "availability": {
            "$ref": "#/components/schemas/ProductFeedDeltaAvailabilityBodyParam"
          }
        },
        "type": "object",
        "required": ["id"],
        "x-openai-class-name": "sofa.api.params.product_feeds.ProductFeedDeltaVariantBody"
      },
      "ProductFeedDeltaProductBodyParam": {
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "variants": {
            "items": {
              "$ref": "#/components/schemas/ProductFeedDeltaVariantBodyParam"
            },
            "type": "array",
            "minItems": 1
          }
        },
        "type": "object",
        "required": ["id", "variants"],
        "x-openai-class-name": "sofa.api.params.product_feeds.ProductFeedDeltaProductBody"
      },
      "PatchProductFeedProductsBody": {
        "properties": {
          "products": {
            "items": {
              "$ref": "#/components/schemas/ProductFeedDeltaProductBodyParam"
            },
            "type": "array",
            "minItems": 1
          }
        },
        "type": "object",
        "required": ["products"],
        "x-openai-class-name": "sofa.api.params.product_feeds.PatchProductFeedProductsBody"
      },
      "ProductFeedDeltaResource": {
        "properties": {
          "id": {
            "type": "string"
          },
          "accepted": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": ["id", "accepted"],
        "x-openai-class-name": "sofa.api.resources.product_feeds.ProductFeedDeltaResponseBody"
      },
      "ProductFeedSftpAuthenticationMethodResource": {
        "type": "string",
        "enum": ["password", "ssh_key"],
        "x-openai-class-name": "sofa.api.resources.product_feeds.ProductFeedSftpAuthenticationMethodResource"
      },
      "ProductFeedSftpAccessResource": {
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "connection_uri": {
            "type": "string"
          },
          "authentication_method": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProductFeedSftpAuthenticationMethodResource"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["enabled", "connection_uri", "authentication_method"],
        "x-openai-class-name": "sofa.api.resources.product_feeds.ProductFeedSftpAccessResponseBody"
      },
      "ProductFeedSftpAuthenticationMethodParam": {
        "type": "string",
        "enum": ["password", "ssh_key"],
        "x-openai-class-name": "sofa.api.params.product_feeds.ProductFeedSftpAuthenticationMethodParam"
      },
      "PostProductFeedSftpAccessBody": {
        "properties": {
          "authentication_method": {
            "$ref": "#/components/schemas/ProductFeedSftpAuthenticationMethodParam"
          },
          "ssh_public_key": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["authentication_method"],
        "x-openai-class-name": "sofa.api.params.product_feeds.PostProductFeedSftpAccessBody"
      },
      "ProductFeedSftpAccessCredentialsResource": {
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "connection_uri": {
            "type": "string"
          },
          "authentication_method": {
            "$ref": "#/components/schemas/ProductFeedSftpAuthenticationMethodResource"
          },
          "password": {
            "type": "string"
          }
        },
        "type": "object",
        "required": ["enabled", "connection_uri", "authentication_method"],
        "x-openai-class-name": "sofa.api.resources.product_feeds.ProductFeedSftpAccessCredentialsResponseBody"
      },
      "PartnerEligibilityContextParams": {
        "properties": {
          "country_code": {
            "type": "string",
            "maxLength": 8,
            "minLength": 1
          },
          "locale": {
            "type": "string",
            "maxLength": 32,
            "minLength": 1
          },
          "region_code": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1
          }
        },
        "type": "object",
        "required": ["country_code", "locale", "region_code"],
        "x-openai-class-name": "sofa.api.params.partner_eligibility_jobs.PartnerEligibilityContextParams"
      },
      "PartnerEligibilityQueryParams": {
        "properties": {
          "query_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          },
          "prompt": {
            "type": "string",
            "maxLength": 65536,
            "minLength": 1
          }
        },
        "type": "object",
        "required": ["query_id", "prompt"],
        "x-openai-class-name": "sofa.api.params.partner_eligibility_jobs.PartnerEligibilityQueryParams"
      },
      "SubmitPartnerEligibilityJobBody": {
        "properties": {
          "schema_version": {
            "type": "string",
            "enum": ["1.0"],
            "default": "1.0",
            "x-stainless-const": true
          },
          "ad_account_id": {
            "type": "string"
          },
          "campaign_id": {
            "type": "string"
          },
          "association_id": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1
          },
          "enrollment_generation": {
            "type": "integer",
            "minimum": 1
          },
          "consent_revision": {
            "type": "integer",
            "minimum": 1
          },
          "evaluation_context": {
            "$ref": "#/components/schemas/PartnerEligibilityContextParams"
          },
          "queries": {
            "items": {
              "$ref": "#/components/schemas/PartnerEligibilityQueryParams"
            },
            "type": "array",
            "maxItems": 1000,
            "minItems": 1
          }
        },
        "type": "object",
        "required": [
          "schema_version",
          "ad_account_id",
          "campaign_id",
          "association_id",
          "enrollment_generation",
          "consent_revision",
          "evaluation_context",
          "queries"
        ],
        "x-openai-class-name": "sofa.api.params.partner_eligibility_jobs.SubmitPartnerEligibilityJobBody"
      },
      "PartnerEligibilityJobStatus": {
        "type": "string",
        "enum": [
          "preparing",
          "pending",
          "running",
          "cancelling",
          "completed",
          "partially_failed",
          "failed",
          "cancelled",
          "expired"
        ],
        "x-openai-class-name": "sofa.api.resources.partner_eligibility_jobs.PartnerEligibilityJobStatus"
      },
      "AcceptedPartnerEligibilityJobResource": {
        "properties": {
          "schema_version": {
            "type": "string",
            "enum": ["1.0"],
            "default": "1.0",
            "x-stainless-const": true
          },
          "batch_id": {
            "type": "string"
          },
          "ad_account_id": {
            "type": "string"
          },
          "campaign_id": {
            "type": "string"
          },
          "association_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PartnerEligibilityJobStatus"
          },
          "total_count": {
            "type": "integer"
          },
          "completed_count": {
            "type": "integer"
          },
          "failed_count": {
            "type": "integer"
          },
          "cancelled_count": {
            "type": "integer"
          },
          "expired_count": {
            "type": "integer"
          },
          "execution_deadline": {
            "type": "string"
          },
          "result_expires_at": {
            "type": "string"
          },
          "results_available": {
            "type": "boolean"
          },
          "retry_after_seconds": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": [
          "schema_version",
          "batch_id",
          "ad_account_id",
          "campaign_id",
          "association_id",
          "status",
          "total_count",
          "completed_count",
          "failed_count",
          "cancelled_count",
          "expired_count",
          "execution_deadline",
          "result_expires_at",
          "results_available",
          "retry_after_seconds"
        ],
        "x-openai-class-name": "sofa.api.resources.partner_eligibility_jobs.PartnerEligibilityJobBody"
      },
      "PartnerEligibilityQueryStatus": {
        "type": "string",
        "enum": [
          "pending",
          "evaluated",
          "not_evaluable",
          "failed",
          "cancelled",
          "expired"
        ],
        "x-openai-class-name": "sofa.api.resources.partner_eligibility_jobs.PartnerEligibilityQueryStatus"
      },
      "PartnerEligibilityQueryResultBody": {
        "properties": {
          "query_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PartnerEligibilityQueryStatus"
          },
          "eligible": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "retryable": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["query_id", "status", "eligible", "retryable"],
        "x-openai-class-name": "sofa.api.resources.partner_eligibility_jobs.PartnerEligibilityQueryResultBody"
      },
      "PartnerEligibilityResultsResource": {
        "properties": {
          "schema_version": {
            "type": "string",
            "enum": ["1.0"],
            "default": "1.0",
            "x-stainless-const": true
          },
          "batch_id": {
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/PartnerEligibilityQueryResultBody"
            },
            "type": "array"
          },
          "next_offset": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": ["schema_version", "batch_id", "results", "next_offset"],
        "x-openai-class-name": "sofa.api.resources.partner_eligibility_jobs.PartnerEligibilityResultsBody"
      },
      "PartnerDataTypeParam": {
        "type": "string",
        "enum": ["identity_graph"],
        "x-openai-class-name": "sofa.api.params.partner_data.PartnerDataTypeParam"
      },
      "CreatePartnerDataUploadBody": {
        "properties": {
          "data_type": {
            "$ref": "#/components/schemas/PartnerDataTypeParam"
          },
          "snapshot_date": {
            "type": "string",
            "maxLength": 10,
            "minLength": 10,
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "file_name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*\\.parquet$"
          },
          "file_size_bytes": {
            "type": "integer",
            "maximum": 107374182400,
            "minimum": 1
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "type": "object",
        "required": [
          "data_type",
          "snapshot_date",
          "file_name",
          "file_size_bytes",
          "sha256"
        ],
        "x-openai-class-name": "sofa.api.params.partner_data.CreatePartnerDataUploadBody"
      },
      "CreatePartnerDataUploadResource": {
        "properties": {
          "upload_id": {
            "type": "string"
          },
          "data_type": {
            "type": "string"
          },
          "snapshot_date": {
            "type": "string"
          },
          "file_name": {
            "type": "string"
          },
          "file_size_bytes": {
            "type": "integer"
          },
          "sha256": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "upload_url": {
            "type": "string"
          },
          "upload_url_expires_at": {
            "type": "string"
          },
          "upload_method": {
            "type": "string"
          },
          "upload_headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "x-oaiTypeLabel": "map"
          }
        },
        "type": "object",
        "required": [
          "upload_id",
          "data_type",
          "snapshot_date",
          "file_name",
          "file_size_bytes",
          "sha256",
          "status",
          "created_at",
          "completed_at",
          "upload_url",
          "upload_url_expires_at",
          "upload_method",
          "upload_headers"
        ],
        "x-openai-class-name": "sofa.api.resources.partner_data.CreatePartnerDataUploadBody"
      },
      "PartnerDataUploadResource": {
        "properties": {
          "upload_id": {
            "type": "string"
          },
          "data_type": {
            "type": "string"
          },
          "snapshot_date": {
            "type": "string"
          },
          "file_name": {
            "type": "string"
          },
          "file_size_bytes": {
            "type": "integer"
          },
          "sha256": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "upload_id",
          "data_type",
          "snapshot_date",
          "file_name",
          "file_size_bytes",
          "sha256",
          "status",
          "created_at",
          "completed_at"
        ],
        "x-openai-class-name": "sofa.api.resources.partner_data.PartnerDataUploadBody"
      },
      "LeadSyncWebhookScalarResponse": {
        "additionalProperties": true,
        "properties": {
          "field_id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Field Id",
            "type": "string"
          },
          "field_type": {
            "enum": ["name", "email", "phone", "free_form"],
            "title": "Field Type",
            "type": "string"
          },
          "label": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "value": {
            "maxLength": 4096,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": ["field_id", "field_type", "label", "value"],
        "title": "LeadSyncWebhookScalarResponse",
        "type": "object"
      },
      "LeadSyncWebhookOption": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Id",
            "type": "string"
          },
          "label": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          }
        },
        "required": ["id", "label"],
        "title": "LeadSyncWebhookOption",
        "type": "object"
      },
      "LeadSyncWebhookMultipleChoiceResponse": {
        "additionalProperties": true,
        "properties": {
          "field_id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Field Id",
            "type": "string"
          },
          "field_type": {
            "const": "multiple_choice",
            "title": "Field Type",
            "type": "string"
          },
          "label": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "option": {
            "$ref": "#/components/schemas/LeadSyncWebhookOption"
          }
        },
        "required": ["field_id", "field_type", "label", "option"],
        "title": "LeadSyncWebhookMultipleChoiceResponse",
        "type": "object"
      },
      "LeadSyncWebhookData": {
        "additionalProperties": true,
        "allOf": [
          {
            "anyOf": [
              {
                "properties": {
                  "ad_id": {
                    "type": "null"
                  },
                  "ad_group_id": {
                    "type": "null"
                  },
                  "campaign_id": {
                    "type": "null"
                  },
                  "ad_account_id": {
                    "type": "null"
                  }
                }
              },
              {
                "properties": {
                  "ad_id": {
                    "type": "string"
                  },
                  "ad_group_id": {
                    "type": "string"
                  },
                  "campaign_id": {
                    "type": "string"
                  },
                  "ad_account_id": {
                    "type": "string"
                  }
                }
              }
            ]
          },
          {
            "not": {
              "anyOf": [
                {
                  "required": ["business_profile_id"]
                },
                {
                  "required": ["source"]
                },
                {
                  "required": ["answers"]
                },
                {
                  "required": ["signing_secret"]
                },
                {
                  "required": ["encrypted_signing_secret"]
                },
                {
                  "required": ["metadata_json"]
                },
                {
                  "required": ["private_payload_json"]
                },
                {
                  "required": ["redeemable_token"]
                },
                {
                  "required": ["brte_token"]
                },
                {
                  "required": ["subscription_id"]
                }
              ]
            }
          }
        ],
        "properties": {
          "lead_id": {
            "maxLength": 256,
            "pattern": "^leadformresp_[^~]+$",
            "title": "Lead Id",
            "type": "string"
          },
          "submitted_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$",
            "title": "Submitted At",
            "type": "string"
          },
          "form_id": {
            "maxLength": 256,
            "pattern": "^leadform_[^~]+$",
            "title": "Form Id",
            "type": "string"
          },
          "form_revision_id": {
            "maxLength": 256,
            "pattern": "^leadformrev_[^~]+$",
            "title": "Form Revision Id",
            "type": "string"
          },
          "responses": {
            "items": {
              "discriminator": {
                "mapping": {
                  "email": "#/components/schemas/LeadSyncWebhookScalarResponse",
                  "free_form": "#/components/schemas/LeadSyncWebhookScalarResponse",
                  "multiple_choice": "#/components/schemas/LeadSyncWebhookMultipleChoiceResponse",
                  "name": "#/components/schemas/LeadSyncWebhookScalarResponse",
                  "phone": "#/components/schemas/LeadSyncWebhookScalarResponse"
                },
                "propertyName": "field_type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/LeadSyncWebhookScalarResponse"
                },
                {
                  "$ref": "#/components/schemas/LeadSyncWebhookMultipleChoiceResponse"
                }
              ]
            },
            "maxItems": 5,
            "minItems": 1,
            "title": "Responses",
            "type": "array"
          },
          "ad_id": {
            "anyOf": [
              {
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ad Id"
          },
          "ad_group_id": {
            "anyOf": [
              {
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ad Group Id"
          },
          "campaign_id": {
            "anyOf": [
              {
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Id"
          },
          "ad_account_id": {
            "anyOf": [
              {
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ad Account Id"
          }
        },
        "required": [
          "lead_id",
          "submitted_at",
          "form_id",
          "form_revision_id",
          "responses",
          "ad_id",
          "ad_group_id",
          "campaign_id",
          "ad_account_id"
        ],
        "title": "LeadSyncWebhookData",
        "type": "object"
      },
      "LeadSyncWebhookEvent": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Id",
            "type": "string"
          },
          "object": {
            "const": "event",
            "title": "Object",
            "type": "string"
          },
          "created_at": {
            "minimum": 0,
            "title": "Created At",
            "type": "integer"
          },
          "subscription_id": {
            "maxLength": 256,
            "pattern": "^leadsync_[^~]+_g[1-9][0-9]*$",
            "title": "Subscription Id",
            "type": "string"
          },
          "type": {
            "const": "lead_form.response.created",
            "title": "Type",
            "type": "string"
          },
          "synthetic": {
            "anyOf": [
              {
                "const": true,
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Synthetic"
          },
          "data": {
            "$ref": "#/components/schemas/LeadSyncWebhookData"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "subscription_id",
          "type",
          "data"
        ],
        "title": "LeadSyncWebhookEvent",
        "type": "object",
        "allOf": [
          {
            "not": {
              "anyOf": [
                {
                  "required": ["business_profile_id"]
                },
                {
                  "required": ["source"]
                },
                {
                  "required": ["answers"]
                },
                {
                  "required": ["signing_secret"]
                },
                {
                  "required": ["encrypted_signing_secret"]
                },
                {
                  "required": ["metadata_json"]
                },
                {
                  "required": ["private_payload_json"]
                },
                {
                  "required": ["redeemable_token"]
                },
                {
                  "required": ["brte_token"]
                }
              ]
            }
          }
        ]
      }
    }
  }
}
