{
  "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": "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 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 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 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 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 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 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 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 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 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 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 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 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 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": "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": "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"
      }
    },
    "/api_keys": {
      "post": {
        "summary": "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 brand metadata.",
        "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 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 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 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"
      }
    },
    "/ad_account_creation_sessions": {
      "post": {
        "summary": "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": "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 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": "View spend limit windows with inclusive start dates and exclusive end dates, ordered by start time ascending.",
        "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 a spend limit window with an inclusive start date and exclusive end date.",
        "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": "Edit a spend limit window with an inclusive start date and exclusive end date.",
        "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 an active or scheduled spend limit window before it ends.",
        "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/insights": {
      "get": {
        "summary": "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": "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_account_insights.GetAdAccountInsightsMethod"
      }
    },
    "/campaigns/{campaign_id}/insights": {
      "get": {
        "summary": "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": "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 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": "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 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": "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": "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": "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 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 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 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 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 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 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 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 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 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": "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": "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 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 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 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 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 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 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": "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 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 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 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}/preview": {
      "post": {
        "summary": "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 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 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 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 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 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}/archive": {
      "post": {
        "summary": "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 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 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 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": "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": "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 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": "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": "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": "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"]
          }
        ]
      }
    },
    "/partner_data/uploads": {
      "post": {
        "summary": "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 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"],
        "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"
              }
            ]
          },
          "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"
          }
        },
        "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"
      },
      "CustomAudienceMembershipOperationBody": {
        "properties": {
          "operation_id": {
            "type": "string"
          },
          "custom_audience_id": {
            "type": "string"
          },
          "operation": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "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"
      },
      "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"
          },
          "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": {
          "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"
      },
      "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"
      },
      "AdAccountSpendLimitWindowsListResource": {
        "properties": {
          "object": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AdAccountSpendLimitWindowBody"
            },
            "type": "array"
          }
        },
        "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"
      },
      "InsightItemBody": {
        "properties": {
          "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": {
          "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"
          }
        },
        "type": "object",
        "required": [
          "object",
          "data",
          "count",
          "first_id",
          "last_id",
          "has_more"
        ],
        "x-openai-class-name": "sofa.api.resources.insights.InsightsBody"
      },
      "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"
      },
      "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": {
          "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"
          }
        },
        "type": "object",
        "required": ["aggregation_level", "time_ranges"],
        "x-openai-class-name": "sofa.api.params.insights.InsightsConversionsBody"
      },
      "ConversionSummaryRowBody": {
        "properties": {
          "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"
          }
        },
        "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"
          }
        },
        "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"
              }
            ]
          },
          "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"
          },
          "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"
      },
      "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"
      },
      "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"
          },
          "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"
              }
            ]
          },
          "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"
      },
      "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"]
                }
              ]
            }
          }
        ]
      }
    }
  }
}
