{"openapi":"3.0.3","info":{"title":"Partners API","description":"Partners Hub API documentation","version":"1.0.0"},"servers":[{"url":"https://agency-partner-hub-web.global-aws-use1-p.app-us1.com/","description":"Production"}],"paths":{"/api/ai-customizations/v1/profiles":{"get":{"tags":["AI Customization Profiles"],"operationId":"get_ai_customizations_profiles_list","responses":{"200":{"description":"Profile details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Get a list of AI customization profiles"},"post":{"tags":["AI Customization Profiles"],"operationId":"post_ai_customizations_profiles_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProfileRequest"}}}},"responses":{"201":{"description":"Profile details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProfileResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}},"409":{"description":"Request failed due to a conflict with the current state of AI customization profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":409,"detail":"A profile with this name already exists"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://symfony.com/errors/validation","title":"Validation Failed","status":422,"detail":"assign_to_all_accounts: This value should be of type bool.","violations":[{"propertyPath":"assign_to_all_accounts","title":"This value should be of type bool.","template":"This value should be of type {{ type }}.","parameters":{"{{ type }}":"bool"}}]}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Create a new AI customization profile"}},"/api/ai-customizations/v1/profiles/{id}":{"get":{"tags":["AI Customization Profiles"],"operationId":"get_ai_customizations_profiles_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"responses":{"200":{"description":"Profile details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Get profile by id"},"delete":{"tags":["AI Customization Profiles"],"summary":"Delete profile by id","operationId":"delete_ai_customizations_profiles_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"responses":{"204":{"description":"Profile was successfully deleted (204 No Content)."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]},"patch":{"tags":["AI Customization Profiles"],"operationId":"patch_ai_customizations_profiles_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}}},"responses":{"200":{"description":"Profile updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}},"409":{"description":"Request failed due to a conflict with the current state of AI customization profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":409,"detail":"A profile with this name already exists"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://symfony.com/errors/validation","title":"Validation Failed","status":422,"detail":"assign_to_all_accounts: This value should be of type bool.","violations":[{"propertyPath":"assign_to_all_accounts","title":"This value should be of type bool.","template":"This value should be of type {{ type }}.","parameters":{"{{ type }}":"bool"}}]}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Update profile by id"}},"/api/ai-customizations/v1/profiles/child-accounts/{childAccountId}":{"get":{"tags":["AI Customization Profiles"],"operationId":"get_ai_customizations_profiles_get_by_child_account","parameters":[{"name":"childAccountId","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"responses":{"200":{"description":"AI customization profile assigned to the child account, or null when none is assigned (or the account does not belong to the reseller).","content":{"application/json":{"schema":{"properties":{"profile":{"oneOf":[{"$ref":"#/components/schemas/ChildAccountProfileResponse"}],"nullable":true,"type":"object"}},"type":"object","additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerJwtBearerAuth":[]}],"summary":"Get the AI customization profile assigned to a child account"}},"/api/ai-customizations/v1/profiles/{profile_id}/documents":{"get":{"tags":["AI Customization Documents"],"operationId":"get_ai_customizations_documents_list","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"maximum":100,"minimum":1}}],"responses":{"200":{"description":"Paginated list of documents for the profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileDocumentListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Profile not found"}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Get a list of documents for a profile"},"post":{"tags":["AI Customization Documents"],"operationId":"post_ai_customizations_documents_upload","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","pattern":"[1-9][0-9]{0,18}"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"required":["file"],"properties":{"file":{"type":"string","format":"binary"},"description":{"type":"string","maxLength":2000,"example":"Product knowledge base for AI context"},"tags":{"type":"array","items":{"type":"string","enum":["support_material","campaign_material","brand_rules","benchmark_data","product_info"]}}},"type":"object","additionalProperties":false}}}},"responses":{"201":{"description":"Document uploaded and revision created with extraction pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileDocumentResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Profile not found"},"422":{"description":"Validation failed"}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Upload a document to a profile"}},"/api/ai-customizations/v1/profiles/{profile_id}/documents/{document_id}":{"get":{"tags":["AI Customization Documents"],"operationId":"get_ai_customizations_documents_get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"responses":{"200":{"description":"Document details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileDocumentResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Profile or document not found"}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Get document by id"},"delete":{"tags":["AI Customization Documents"],"operationId":"delete_ai_customizations_documents_delete","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"responses":{"204":{"description":"Document was successfully deleted (204 No Content)."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Profile or document not found"}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Delete document by id"},"patch":{"tags":["AI Customization Documents"],"operationId":"patch_ai_customizations_documents_update","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentRequest"}}}},"responses":{"200":{"description":"Updated document details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileDocumentResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Profile or document not found"},"422":{"description":"Validation failed"}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Update document by id"}},"/api/ai-customizations/v1/profiles/{profile_id}/documents/{document_id}/download":{"get":{"tags":["AI Customization Documents"],"operationId":"get_ai_customizations_documents_download","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"responses":{"200":{"description":"Presigned S3 URL for downloading the document file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDownloadUrlResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Profile, document, or revision not found"}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Get a presigned download URL for a document"}},"/api/ai-customizations/v1/profiles/{profile_id}/instructions":{"get":{"tags":["AI Customization Instructions"],"operationId":"get_ai_customizations_instructions_list","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"responses":{"200":{"description":"List of custom instructions for the profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInstructionListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Get a list of custom instructions for a profile"},"post":{"tags":["AI Customization Instructions"],"operationId":"post_ai_customizations_instructions_create","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"},"example":1}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomInstructionRequest"}}}},"responses":{"201":{"description":"Custom instruction created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomInstructionResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://symfony.com/errors/validation","title":"Validation Failed","status":422,"detail":"assign_to_all_accounts: This value should be of type bool.","violations":[{"propertyPath":"assign_to_all_accounts","title":"This value should be of type bool.","template":"This value should be of type {{ type }}.","parameters":{"{{ type }}":"bool"}}]}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Create a new custom instruction"}},"/api/ai-customizations/v1/profiles/{profile_id}/instructions/{instruction_id}":{"get":{"tags":["AI Customization Instructions"],"operationId":"get_ai_customizations_instructions_get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}},{"name":"instruction_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"responses":{"200":{"description":"Custom instruction details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInstructionResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Get custom instruction by id"},"delete":{"tags":["AI Customization Instructions"],"operationId":"delete_ai_customizations_instructions_delete","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}},{"name":"instruction_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"responses":{"204":{"description":"Custom Instruction was successfully deleted (204 No Content)."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Delete custom instruction by id"},"patch":{"tags":["AI Customization Instructions"],"operationId":"patch_ai_customizations_instructions_update","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}},{"name":"instruction_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomInstructionRequest"}}}},"responses":{"200":{"description":"Profile details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInstructionResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://symfony.com/errors/validation","title":"Validation Failed","status":422,"detail":"assign_to_all_accounts: This value should be of type bool.","violations":[{"propertyPath":"assign_to_all_accounts","title":"This value should be of type bool.","template":"This value should be of type {{ type }}.","parameters":{"{{ type }}":"bool"}}]}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Update custom instruction by id"}},"/api/ai-customizations/v1/profiles/{id}/accounts":{"patch":{"tags":["AI Customization Profiles"],"operationId":"patch_ai_customizations_profiles_assign_accounts","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignAccountsToProfileRequest"}}}},"responses":{"204":{"description":"Accounts successfully assigned to profile"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"One or more accounts are invalid or do not belong to this reseller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":403,"detail":"One or more accounts are invalid or do not belong to this reseller"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://symfony.com/errors/validation","title":"Validation Failed","status":422,"detail":"assign_to_all_accounts: This value should be of type bool.","violations":[{"propertyPath":"assign_to_all_accounts","title":"This value should be of type bool.","template":"This value should be of type {{ type }}.","parameters":{"{{ type }}":"bool"}}]}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Assign child accounts to a profile"}},"/api/child-account-snapshots/v1/status":{"get":{"tags":["Child Account Snapshots"],"summary":"Get a list of account cloning statuses","operationId":"get_child_account_snapshots_get_list","parameters":[{"name":"status","in":"query","description":"Filter by status. Supports multiple comma-separated values (e.g., in_progress,success)","required":false,"schema":{"type":"string","default":null,"example":"in_progress,success","nullable":true}},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","default":1,"maximum":1000000000,"minimum":1}},{"name":"per_page","in":"query","description":"Items per page","required":false,"schema":{"type":"integer","default":20,"maximum":1000,"minimum":1}}],"responses":{"200":{"description":"List of account cloning statuses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCloningStatusListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]}},"/api/child-account-snapshots/v1/":{"get":{"tags":["Child Account Snapshots"],"summary":"Get a list of snapshots","operationId":"get_child_account_snapshots_list_snapshot_by_reseller","parameters":[{"name":"next_cursor","in":"query","description":"Pagination cursor token for the next page of results. Use the value from the previous response's next_cursor.","required":false,"schema":{"type":"string","default":""}},{"name":"limit","in":"query","description":"Number of snapshots per page.","required":false,"schema":{"type":"integer","default":25,"maximum":100,"minimum":1}},{"name":"name","in":"query","description":"Filter snapshots by name.","required":false,"schema":{"type":"string","default":null,"nullable":true}}],"responses":{"200":{"description":"List all snapshots of reseller accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AM2GetSnapshotsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]},"post":{"tags":["Child Account Snapshots"],"summary":"Create a new snapshot","operationId":"post_child_account_snapshots_create_snapshot","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AM2CreateSnapshotRequest"}}}},"responses":{"201":{"description":"Snapshot was created successfully."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://symfony.com/errors/validation","title":"Validation Failed","status":422,"detail":"assign_to_all_accounts: This value should be of type bool.","violations":[{"propertyPath":"assign_to_all_accounts","title":"This value should be of type bool.","template":"This value should be of type {{ type }}.","parameters":{"{{ type }}":"bool"}}]}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]}},"/api/child-account-snapshots/v1/{snapshotId}":{"delete":{"tags":["Child Account Snapshots"],"summary":"Delete snapshot by id","operationId":"delete_child_account_snapshots_delete_snapshot","parameters":[{"name":"snapshotId","in":"path","required":true,"schema":{"type":"string","pattern":"[1-9][0-9]{0,18}"}}],"responses":{"200":{"description":"Snapshot was successfully deleted."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]}},"/api/child-accounts/v1/":{"get":{"tags":["Child Accounts"],"operationId":"get_child_accounts_get_list","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","default":null}},{"name":"id","in":"query","required":false,"schema":{"type":"integer","default":null,"maximum":9223372036854776000,"minimum":1}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"maximum":1000,"minimum":1}},{"name":"is_archived","in":"query","required":false,"schema":{"type":"boolean","nullable":true}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"updated_at","enum":["account_name","created_at","updated_at"]}},{"name":"sort_direction","in":"query","required":false,"schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"List of child accounts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChildAccountListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}],"summary":"Get a list of child accounts"},"post":{"tags":["Child Accounts"],"summary":"Create a new account","description":"For getting list of products use documentation here: https://www.activecampaign.com/partner/api/v2/example.php?call=/api/v1/products.\n More detailed instructions can be found in Step 1 of this document: https://www.activecampaign.com/partner/api/v2/account_add_flow.php","operationId":"post_child_accounts_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountRequestDto"}}}},"responses":{"200":{"description":"Account created successfully."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://symfony.com/errors/validation","title":"Validation Failed","status":422,"detail":"assign_to_all_accounts: This value should be of type bool.","violations":[{"propertyPath":"assign_to_all_accounts","title":"This value should be of type bool.","template":"This value should be of type {{ type }}.","parameters":{"{{ type }}":"bool"}}]}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]}},"/api/child-accounts/v1/snapshots":{"get":{"tags":["Child Accounts"],"summary":"Get a list of accounts that can be used to create snapshots.","operationId":"get_child_accounts_get_for_snapshots","parameters":[{"name":"sort_by","in":"query","description":"Field to sort by (e.g. date_time)","required":false,"schema":{"type":"string"}},{"name":"sort_direction","in":"query","description":"Sort direction: asc or desc","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"search","in":"query","description":"Filter accounts by name","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get List of Accounts for snapshots","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAccountForSnapshotResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":503,"detail":"Failed to get list of accounts for snapshots"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]}},"/api/crm-reporting/v1/pipelines":{"get":{"tags":["CRM Reporting"],"summary":"List sync-enabled pipelines with deal counts, conversion %, revenue, and top account.","operationId":"get_crm_reporting_list_pipelines","parameters":[{"name":"start_date","in":"query","required":true,"schema":{"type":"string","format":"date","example":"2026-03-01"},"example":"2026-03-01"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","format":"date","example":"2026-03-31"},"example":"2026-03-31"},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","default":"UTC","example":"America/New_York"},"example":"America/New_York"},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":null,"nullable":true}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"maximum":100,"minimum":1}}],"responses":{"200":{"description":"Top Deals: per-pipeline counts, conversion, revenue, and top child account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelinesListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]}},"/api/crm-reporting/v1/pipelines/summary":{"get":{"tags":["CRM Reporting"],"summary":"Aggregate summary metric cards: deal counts, revenue, conversion %, average deal revenue.","operationId":"get_crm_reporting_pipelines_summary","parameters":[{"name":"start_date","in":"query","required":true,"schema":{"type":"string","format":"date","example":"2026-03-01"},"example":"2026-03-01"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","format":"date","example":"2026-03-31"},"example":"2026-03-31"},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","default":"UTC","example":"America/New_York"},"example":"America/New_York"},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":null,"nullable":true}}],"responses":{"200":{"description":"Top Deals: aggregate summary rolled up across all sync-enabled pipelines.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelinesSummaryResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]}},"/api/crm-sync/v1/pipelines":{"get":{"tags":["CRM Sync"],"summary":"Get a list of HQ pipelines with CRM sync status","operationId":"get_crm_sync_list_pipelines","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","default":null,"nullable":true}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"maximum":1000,"minimum":1}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"pipeline_name","enum":["pipeline_name"]}},{"name":"sort_direction","in":"query","required":false,"schema":{"type":"string","default":"asc","enum":["asc","desc"]}}],"responses":{"200":{"description":"List of HQ pipelines with CRM sync state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]}},"/api/crm-sync/v1/pipelines/{pipeline_id}/sync":{"get":{"tags":["CRM Sync"],"summary":"Get pipeline CRM sync configuration","operationId":"get_crm_sync_get_pipeline_sync_config","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"responses":{"200":{"description":"Saved CRM sync configuration for the pipeline","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineSyncConfigResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Pipeline is not in the reseller catalogue"}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]},"put":{"tags":["CRM Sync"],"summary":"Upsert pipeline CRM sync configuration (enable/disable and targets)","operationId":"put_crm_sync_put_pipeline_sync_config","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854776000,"minimum":1,"pattern":"[1-9][0-9]{0,18}"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPipelineSyncRequest"}}}},"responses":{"204":{"description":"Configuration saved"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Pipeline is not in the reseller catalogue"},"422":{"description":"Validation failed"}},"security":[{"PartnerApiKey":[]},{"PartnerJwtBearerAuth":[]}]}},"/api/crm-sync/v1/settings":{"get":{"tags":["CRM Sync Settings"],"operationId":"get_crm_sync_settings_get","responses":{"200":{"description":"Current sync settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerJwtBearerAuth":[]}],"summary":"Get CRM sync settings"},"put":{"tags":["CRM Sync Settings"],"operationId":"put_crm_sync_settings_update","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSettingsRequest"}}}},"responses":{"200":{"description":"Settings updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"Validation Failed","status":422,"detail":"sync_every: sync_every must be one of: never, hour, day"}}}}},"security":[{"PartnerJwtBearerAuth":[]}],"summary":"Update CRM sync settings"}},"/api/files/v1/quota":{"get":{"tags":["Files"],"operationId":"get_files_quota_status","responses":{"200":{"description":"Storage quota status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaStatusResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerJwtBearerAuth":[]}],"summary":"Get storage quota status"}},"/api/insight-cards/v1/insights":{"get":{"tags":["Insight Cards"],"operationId":"get_insight_cards_get_list_latest","responses":{"200":{"description":"Insight Cards list for the partner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightCardListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}}},"security":[{"PartnerJwtBearerAuth":[]}],"summary":"Get a list of the latest insight cards"}},"/api/insight-cards/v1/insights/{id}":{"patch":{"tags":["Insight Cards"],"operationId":"patch_insight_cards_update_state","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStateInsightCardRequest"}}}},"responses":{"200":{"description":"Insight Card state update successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightCardResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://symfony.com/errors/validation","title":"Validation Failed","status":422,"detail":"assign_to_all_accounts: This value should be of type bool.","violations":[{"propertyPath":"assign_to_all_accounts","title":"This value should be of type bool.","template":"This value should be of type {{ type }}.","parameters":{"{{ type }}":"bool"}}]}}}}},"security":[{"PartnerJwtBearerAuth":[]}],"summary":"Update insight card state"}},"/api/locales/v1/catalogs":{"get":{"tags":["Locales"],"summary":"Get supported language and timezone catalogs.","description":"Returns the same catalogs ARC uses to validate the language and timezone fields on the child-account PUT endpoint, so dropdowns and write-side validation stay in sync.","operationId":"get_locales_get_catalogs","responses":{"200":{"description":"Supported language and timezone catalogs for the account-edit dropdowns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocaleCatalogsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":400,"detail":"Bad Request"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":404,"detail":"Not Found"}}}},"503":{"description":"ARC is unreachable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"},"example":{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":503,"detail":"Failed to fetch locale catalogs from ARC"}}}}},"security":[{"PartnerJwtBearerAuth":[]}]}}},"components":{"schemas":{"CrmSyncPipelinesListQuery":{"properties":{"search":{"type":"string","default":null,"nullable":true},"page":{"type":"integer","default":1,"minimum":1},"limit":{"type":"integer","default":10,"maximum":1000,"minimum":1},"sort_by":{"type":"string","default":"pipeline_name","enum":["pipeline_name"]},"sort_direction":{"type":"string","default":"asc","enum":["asc","desc"]}},"type":"object","additionalProperties":false},"CrmReportingPipelinesListQuery":{"required":["start_date","end_date"],"properties":{"start_date":{"type":"string","format":"date","example":"2026-03-01"},"end_date":{"type":"string","format":"date","example":"2026-03-31"},"timezone":{"type":"string","default":"UTC","example":"America/New_York"},"search":{"type":"string","default":null,"nullable":true},"page":{"type":"integer","default":1,"minimum":1},"limit":{"type":"integer","default":10,"maximum":100,"minimum":1}},"type":"object","additionalProperties":false},"ChildAccountsPaginationMetadata":{"required":["total","page","limit","total_pages"],"properties":{"total":{"type":"integer"},"page":{"type":"integer"},"limit":{"type":"integer"},"total_pages":{"type":"integer"}},"type":"object","additionalProperties":false},"AICustomizationsPaginationMetadata":{"required":["total","page","limit","total_pages"],"properties":{"total":{"type":"integer","example":42},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":20},"total_pages":{"type":"integer","example":3}},"type":"object","additionalProperties":false},"CreateProfileRequest":{"required":["name"],"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"example":"Gyms"}},"type":"object","additionalProperties":false},"UpdateProfileRequest":{"required":["name"],"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"example":"Gyms and fitness centers"}},"type":"object","additionalProperties":false},"DocumentsListQuery":{"properties":{"page":{"type":"integer","default":1,"minimum":1},"limit":{"type":"integer","default":20,"maximum":100,"minimum":1}},"type":"object","additionalProperties":false},"UpdateDocumentRequest":{"required":["is_enabled"],"properties":{"description":{"type":"string","default":null,"maxLength":2000,"example":"Updated document description","nullable":true},"is_enabled":{"type":"boolean","example":true},"tags":{"type":"array","items":{"type":"string","enum":["support_material","campaign_material","brand_rules","benchmark_data","product_info"]},"default":null,"nullable":true}},"type":"object","additionalProperties":false},"CreateCustomInstructionRequest":{"required":["custom_instruction"],"properties":{"custom_instruction":{"description":"Custom instruction to be used for AI responses. It is validated to ensure it is safe for AI use.","type":"string","maxLength":65535,"minLength":1,"example":"Always respond in a professional and concise tone."},"is_enabled":{"type":"boolean","nullable":true}},"type":"object","additionalProperties":false},"UpdateCustomInstructionRequest":{"description":"At least one of custom_instruction or is_enabled must be provided.","properties":{"custom_instruction":{"description":"Custom instruction to be used for AI responses. It is validated to ensure it is safe for AI use.","type":"string","default":null,"maxLength":65535,"minLength":1,"example":"Always respond in a professional and concise tone.","nullable":true},"is_enabled":{"type":"boolean","nullable":true}},"type":"object","oneOf":[{"required":["custom_instruction"],"properties":{"custom_instruction":{"type":"string","maxLength":65535,"minLength":1}},"additionalProperties":false},{"required":["is_enabled"],"properties":{"is_enabled":{"type":"boolean","nullable":false}},"additionalProperties":false},{"required":["custom_instruction","is_enabled"],"properties":{"custom_instruction":{"type":"string","maxLength":65535,"minLength":1},"is_enabled":{"type":"boolean","nullable":false}},"additionalProperties":false}],"additionalProperties":false},"AssignAccountsToProfileRequest":{"description":"You cannot provide non-empty accountIds and set assignToAllAccounts to true at the same time.","properties":{"account_ids":{"description":"List of account IDs to assign","type":"array","items":{"type":"integer","maximum":9223372036854776000,"minimum":1,"nullable":false},"default":[]},"reassign":{"type":"boolean","default":false},"assign_to_all_accounts":{"type":"boolean","default":false}},"type":"object","oneOf":[{"required":["account_ids"],"properties":{"account_ids":{"type":"array","items":{"type":"integer","minimum":1,"nullable":false},"minItems":1},"reassign":{"type":"boolean"}},"additionalProperties":false},{"required":["assign_to_all_accounts"],"properties":{"reassign":{"type":"boolean"},"assign_to_all_accounts":{"type":"boolean"}},"additionalProperties":false}],"additionalProperties":false},"AM2CreateSnapshotRequest":{"required":["account_id","name"],"properties":{"account_id":{"type":"integer"},"name":{"type":"string"}},"type":"object","additionalProperties":false},"ProductEntitlementLimitDto":{"properties":{"included_units":{"type":"integer","default":0},"purchased_units":{"type":"integer","default":0},"period":{"type":"string","default":null,"nullable":true}},"type":"object","additionalProperties":false},"ProductEntitlementPricingDto":{"required":["recurring","subtotal"],"properties":{"recurring":{"type":"boolean"},"subtotal":{"type":"integer"}},"type":"object","additionalProperties":false},"ProductEntitlementDto":{"properties":{"code":{"type":"string","nullable":true},"limit":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/ProductEntitlementLimitDto"}],"type":"object"},"pricing":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/ProductEntitlementPricingDto"}],"type":"object"}},"type":"object","additionalProperties":false},"ProductDto":{"title":"ChildAccountsProduct","required":["code","tier","entitlements"],"properties":{"addon":{"type":"boolean","nullable":true},"code":{"type":"string","example":"ac"},"tier":{"type":"string","example":"basic"},"name":{"type":"string","nullable":true},"version":{"type":"integer","nullable":true},"entitlements":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ProductEntitlementDto"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ProductEntitlementDto"}}]}},"type":"object","example":{"addon":null,"code":"ac","tier":"basic","name":null,"version":null,"entitlements":[]},"additionalProperties":false},"CreateAccountRequestDto":{"title":"Create Account Request","required":["account_name","name","email","notification","billing_interval","products","country"],"properties":{"account_name":{"description":"Display name for the account","type":"string","example":"My Account"},"cname":{"description":"Custom domain (CNAME) for the account","type":"string","example":"subdomain.example.com","nullable":true},"name":{"description":"Contact or account owner name","type":"string","example":"John Doe"},"email":{"description":"Primary account email","type":"string","format":"email","example":"user@example.com"},"notification":{"description":"Notification email address for account-related alerts","type":"string","example":"notify@example.com"},"language":{"description":"Account language name (e.g. polish, dutch, english)","type":"string","example":"english","nullable":true},"timezone":{"description":"IANA timezone identifier (e.g. Europe/Amsterdam, America/New_York)","type":"string","example":"Europe/Amsterdam","nullable":true},"snapshot":{"description":"Deprecated. Use snapshot_id instead.","type":"string","nullable":true},"currency":{"description":"Currency code (e.g. USD, PLN, EUR)","type":"string","example":"USD","nullable":true},"billing_interval":{"description":"Billing interval in months","type":"integer","example":1},"products":{"description":"Product configuration. Array must be non-empty.","type":"array","items":{"$ref":"#/components/schemas/ProductDto"},"minItems":1},"profile":{"description":"Billing profile identifier. Go to update card/billing settings, copy the string_id from the URL.","type":"string","example":"pm_xxxxxxxxxxxx","nullable":true},"country":{"description":"ISO country code (e.g. US, PL, GB)","type":"string","default":"US","example":"US"},"snapshot_id":{"description":"ID of the snapshot to clone from. Obtain from GET /api/child-account-snapshots/v1/ endpoint.","type":"integer","default":null,"example":123,"nullable":true}},"type":"object","additionalProperties":false},"ChildAccountsListQuery":{"properties":{"search":{"type":"string","default":null},"id":{"type":"integer","default":null,"maximum":9223372036854776000,"minimum":1},"page":{"type":"integer","default":1,"minimum":1},"limit":{"type":"integer","default":20,"maximum":1000,"minimum":1},"is_archived":{"type":"boolean","nullable":true},"sort_by":{"type":"string","default":"updated_at","enum":["account_name","created_at","updated_at"]},"sort_direction":{"type":"string","default":"desc","enum":["asc","desc"]}},"type":"object","additionalProperties":false},"PipelinesSummaryQuery":{"required":["start_date","end_date"],"properties":{"start_date":{"type":"string","format":"date","example":"2026-03-01"},"end_date":{"type":"string","format":"date","example":"2026-03-31"},"timezone":{"type":"string","default":"UTC","example":"America/New_York"},"search":{"type":"string","default":null,"nullable":true}},"type":"object","additionalProperties":false},"UpsertPipelineSyncTargetRequest":{"properties":{"type":{"type":"string","default":null,"enum":["all","label","manual",null],"nullable":true},"account_ids":{"type":"array","items":{"type":"integer"},"default":null,"nullable":true},"label_ids":{"type":"array","items":{"type":"integer"},"default":null,"nullable":true}},"type":"object","additionalProperties":false},"UpsertPipelineSyncRequest":{"required":["sync_enabled"],"properties":{"sync_enabled":{"type":"boolean","default":null,"example":true,"nullable":true},"target":{"default":null,"nullable":true,"oneOf":[{"$ref":"#/components/schemas/UpsertPipelineSyncTargetRequest"}],"type":"object"}},"type":"object","additionalProperties":false},"UpdateSettingsRequest":{"required":["sync_every"],"properties":{"sync_every":{"type":"string","enum":["never","hour","day"],"example":"hour"}},"type":"object","additionalProperties":false},"UpdateStateMetadataInsightCardRequest":{"required":["conversation_id"],"properties":{"conversation_id":{"type":"string","format":"uuid"}},"type":"object","additionalProperties":false},"UpdateStateInsightCardRequest":{"required":["insight","metadata"],"properties":{"insight":{"type":"string"},"metadata":{"$ref":"#/components/schemas/UpdateStateMetadataInsightCardRequest"}},"type":"object","additionalProperties":false},"ApiViolation":{"required":["propertyPath","title","template","parameters"],"properties":{"propertyPath":{"type":"string"},"title":{"type":"string"},"template":{"type":"string"},"parameters":{"oneOf":[{"oneOf":[{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]},{"type":"object","additionalProperties":{"type":"string"}}]}},"type":"object","additionalProperties":true},"ApiErrorResponse":{"required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"violations":{"default":null,"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ApiViolation"},"nullable":true},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ApiViolation"},"nullable":true}]}},"type":"object","additionalProperties":true},"ChildAccountData":{"required":["id","created_at","updated_at"],"properties":{"id":{"type":"integer"},"reseller_id":{"type":"integer","nullable":true},"account_name":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"ProfileResponse":{"required":["id","reseller_id","name","created_at","updated_at","assigned_accounts_count"],"properties":{"id":{"type":"integer"},"reseller_id":{"type":"integer"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"assigned_accounts_count":{"type":"integer"},"assigned_accounts":{"default":null,"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ChildAccountData"},"nullable":true},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ChildAccountData"},"nullable":true}]}},"type":"object","additionalProperties":false},"ProfileListResponse":{"required":["profiles"],"properties":{"profiles":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ProfileResponse"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ProfileResponse"}}]}},"type":"object","additionalProperties":false},"UnauthorizedResponse":{"description":"Unauthorized","example":{"error":"Unauthorized","message":"Invalid credentials"}},"CreateProfileResponse":{"required":["id"],"properties":{"id":{"type":"integer"}},"type":"object","additionalProperties":false},"ChildAccountProfileResponse":{"required":["id","reseller_id","name","created_at","updated_at"],"properties":{"id":{"type":"integer"},"reseller_id":{"type":"integer"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"ProfileDocumentResponse":{"required":["id","description","filename","file_size_bytes","file_extension","status","created_date","enabled"],"properties":{"id":{"type":"integer","example":1},"description":{"type":"string","example":"Product knowledge base for AI context"},"filename":{"type":"string","example":"product-knowledge-base.pdf"},"file_size_bytes":{"type":"integer","example":204800},"file_extension":{"type":"string","example":"pdf"},"status":{"type":"string","example":"pending"},"created_date":{"type":"string","format":"date-time","example":"2026-04-08T12:00:00+00:00"},"enabled":{"type":"boolean","example":true},"tags":{"type":"array","items":{"type":"string","enum":["support_material","campaign_material","brand_rules","benchmark_data","product_info"]},"default":[]}},"type":"object","additionalProperties":false},"ProfileDocumentListResponse":{"required":["data","pagination"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfileDocumentResponse"}},"pagination":{"$ref":"#/components/schemas/AICustomizationsPaginationMetadata"}},"type":"object","additionalProperties":false},"DocumentDownloadUrlResponse":{"required":["url","expires_in"],"properties":{"url":{"type":"string","format":"uri"},"expires_in":{"description":"Seconds until the URL expires","type":"integer"}},"type":"object","additionalProperties":false},"CustomInstructionResponse":{"required":["id","profile_id","custom_instruction","is_enabled","created_at","updated_at"],"properties":{"id":{"type":"integer"},"profile_id":{"type":"integer"},"custom_instruction":{"type":"string"},"is_enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"CustomInstructionListResponse":{"required":["data"],"properties":{"data":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/CustomInstructionResponse"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomInstructionResponse"}}]}},"type":"object","additionalProperties":false},"CreateCustomInstructionResponse":{"required":["id"],"properties":{"id":{"type":"integer"}},"type":"object","additionalProperties":false},"AccountCloningStatusResponse":{"required":["id","workflow_id","reseller_id","target_account","source_account","target_account_id","source_account_id","started_at","updated_at","status"],"properties":{"id":{"type":"string","format":"uuid","example":"01934e8a-1234-7890-abcd-ef1234567890"},"workflow_id":{"type":"string","example":"workflow-123"},"reseller_id":{"type":"integer","example":123},"target_account":{"type":"string","example":"new-account"},"source_account":{"type":"string","example":"source-account"},"target_account_id":{"type":"integer","example":456},"source_account_id":{"type":"integer","example":789},"started_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00+00:00"},"updated_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00+00:00"},"status":{"type":"string","enum":["failed","success","cancelled","in_progress"],"example":"in_progress"},"error_message":{"type":"string","example":null,"nullable":true},"snapshot_id":{"type":"integer","example":5,"nullable":true}},"type":"object","additionalProperties":false},"AccountCloningStatusListPagination":{"required":["total","page","per_page","total_pages"],"properties":{"total":{"type":"integer","example":100},"page":{"type":"integer","example":1},"per_page":{"type":"integer","example":20},"total_pages":{"type":"integer","example":5}},"type":"object","additionalProperties":false},"AccountCloningStatusListResponse":{"required":["items","pagination"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AccountCloningStatusResponse"}},"pagination":{"$ref":"#/components/schemas/AccountCloningStatusListPagination"}},"type":"object","additionalProperties":false},"AM2SnapshotResponse":{"required":["id","source_account_id","status","name","created_at"],"properties":{"id":{"type":"integer","example":1},"source_account_id":{"type":"integer","example":123},"status":{"description":"Snapshot status from the external AM2 system.","type":"string","enum":["failed","success","cancelled","in_progress"],"example":"in_progress"},"creation_status":{"description":"Internal snapshot creation status stored in our system. Possible values from CreateSnapshotStatusEnum. Fallbacks to \"unknown\" when no status is found.","type":"string","enum":["failed","success","cancelled","in_progress","initialized","unknown"],"example":"in_progress","nullable":true},"name":{"type":"string","example":"Backup before migration"},"created_at":{"description":"When the snapshot was created. ISO 8601 date-time format (e.g. 2024-01-01T00:00:00+00:00).","type":"string","format":"date-time","example":"2024-01-01T00:00:00+00:00"},"completed_at":{"description":"When the snapshot was completed. ISO 8601 date-time format (e.g. 2024-01-01T00:00:00+00:00). Null when not yet completed.","type":"string","format":"date-time","example":"2024-01-01T12:00:00+00:00","nullable":true}},"type":"object","additionalProperties":false},"AM2GetSnapshotsResponse":{"required":["next_cursor"],"properties":{"snapshots":{"description":"List of account snapshots for the reseller.","type":"array","items":{"$ref":"#/components/schemas/AM2SnapshotResponse"},"nullable":true},"next_cursor":{"description":"Next cursor token. Use it as query parameter as ?next_cursor=.","type":"string"}},"type":"object","additionalProperties":false},"ChildAccountResponse":{"required":["id","created_at","updated_at"],"properties":{"id":{"type":"integer"},"reseller_id":{"type":"integer","nullable":true},"account_name":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"ChildAccountListResponse":{"required":["hosted_accounts","pagination"],"properties":{"hosted_accounts":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ChildAccountResponse"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ChildAccountResponse"}}]},"pagination":{"$ref":"#/components/schemas/ChildAccountsPaginationMetadata"}},"type":"object","additionalProperties":false},"AccountForSnapshotResponse":{"required":["id","account_name","email"],"properties":{"id":{"type":"integer","example":1},"account_name":{"type":"string","example":"My active sandbox account"},"email":{"type":"string","format":"email","example":"user@example.com"}},"type":"object","additionalProperties":false},"ListAccountForSnapshotResponse":{"required":["accounts"],"properties":{"accounts":{"description":"List of accounts available for snapshots.","type":"array","items":{"$ref":"#/components/schemas/AccountForSnapshotResponse"}}},"type":"object","additionalProperties":false},"RangeInfo":{"required":["start_date","end_date","timezone"],"properties":{"start_date":{"type":"string","format":"date","example":"2026-03-01"},"end_date":{"type":"string","format":"date","example":"2026-03-31"},"timezone":{"type":"string","example":"America/New_York"}},"type":"object","additionalProperties":false},"TopAccount":{"required":["id","name"],"properties":{"id":{"type":"integer","example":101},"name":{"type":"string","example":"Labor Finders - Chicago"}},"type":"object","additionalProperties":false},"PipelineSummary":{"required":["id","name","deals_open","deals_won","deals_lost","conversion_rate_percent","total_revenue_cents"],"properties":{"id":{"type":"integer","example":42},"name":{"type":"string","example":"Dog Bday Party"},"deals_open":{"type":"integer","example":10},"deals_won":{"type":"integer","example":2},"deals_lost":{"type":"integer","example":1},"conversion_rate_percent":{"type":"number","format":"float","example":66.67},"total_revenue_cents":{"type":"integer","example":64000},"top_account":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/TopAccount"}],"type":"object"}},"type":"object","additionalProperties":false},"Pagination":{"required":["total","page","limit","total_pages"],"properties":{"total":{"type":"integer","example":42},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":10},"total_pages":{"type":"integer","example":5}},"type":"object","additionalProperties":false},"PipelinesListResponse":{"required":["range","currency","pipelines","pagination"],"properties":{"range":{"$ref":"#/components/schemas/RangeInfo"},"currency":{"type":"string","example":"USD"},"pipelines":{"type":"array","items":{"$ref":"#/components/schemas/PipelineSummary"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","additionalProperties":false},"DealsBucket":{"required":["count","revenue_cents"],"properties":{"count":{"type":"integer","example":40},"revenue_cents":{"type":"integer","example":20340000}},"type":"object","additionalProperties":false},"PipelinesSummary":{"required":["average_deal_revenue_cents","deals_open","deals_won","deals_lost","conversion_rate_percent"],"properties":{"average_deal_revenue_cents":{"type":"integer","example":423500},"deals_open":{"$ref":"#/components/schemas/DealsBucket"},"deals_won":{"$ref":"#/components/schemas/DealsBucket"},"deals_lost":{"$ref":"#/components/schemas/DealsBucket"},"conversion_rate_percent":{"type":"number","format":"float","example":60}},"type":"object","additionalProperties":false},"PipelinesSummaryResponse":{"required":["range","currency","summary"],"properties":{"range":{"$ref":"#/components/schemas/RangeInfo"},"currency":{"type":"string","example":"USD"},"summary":{"$ref":"#/components/schemas/PipelinesSummary"}},"type":"object","additionalProperties":false},"PipelineResponse":{"required":["id","name","sync_enabled","synced_accounts_count","last_synced_status"],"properties":{"id":{"type":"integer","example":42},"name":{"type":"string","example":"Dog Bday Party"},"sync_enabled":{"type":"boolean","example":true},"synced_accounts_count":{"type":"integer","example":12},"last_synced_at":{"type":"string","format":"date-time","example":"2026-03-16T10:20:30+00:00","nullable":true},"last_synced_status":{"type":"string","example":"success"},"last_synced_error":{"type":"string","example":null,"nullable":true}},"type":"object","additionalProperties":false},"PipelineListPagination":{"required":["total","page","limit","total_pages"],"properties":{"total":{"type":"integer","example":100},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":10},"total_pages":{"type":"integer","example":10}},"type":"object","additionalProperties":false},"PipelineListResponse":{"required":["pipelines","pagination"],"properties":{"pipelines":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/PipelineResponse"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PipelineResponse"}}]},"pagination":{"$ref":"#/components/schemas/PipelineListPagination"}},"type":"object","additionalProperties":false},"PipelineSyncTargetResponse":{"required":["account_ids","label_ids"],"properties":{"type":{"type":"string","enum":["all","label","manual"],"nullable":true},"account_ids":{"type":"array","items":{"type":"integer"}},"label_ids":{"type":"array","items":{"type":"integer"}}},"type":"object","additionalProperties":false},"PipelineSyncConfigResponse":{"required":["id","sync_enabled","target"],"properties":{"id":{"type":"integer","example":42},"sync_enabled":{"type":"boolean","example":true},"target":{"$ref":"#/components/schemas/PipelineSyncTargetResponse"}},"type":"object","additionalProperties":false},"SettingsResponse":{"required":["sync_every"],"properties":{"sync_every":{"type":"string","enum":["never","hour","day"],"example":"hour"}},"type":"object","additionalProperties":false},"QuotaStatusResponse":{"required":["quota_limit_bytes","current_usage_bytes","available_bytes"],"properties":{"quota_limit_bytes":{"type":"integer","example":4294967296},"current_usage_bytes":{"type":"integer","example":1073741824},"available_bytes":{"type":"integer","example":3221225472}},"type":"object","additionalProperties":false},"InsightCardMetadata":{"required":["prompt","title","summary","insight_card_type","insight_card_label"],"properties":{"prompt":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"used":{"type":"string","format":"date-time","nullable":true},"insight_card_type":{"type":"string"},"insight_card_label":{"type":"string"}},"type":"object","additionalProperties":false},"InsightCardResponse":{"required":["reseller_id","resource_id","insight","run_timestamp","metadata"],"properties":{"reseller_id":{"type":"integer"},"resource_id":{"type":"string","format":"uuid"},"insight":{"type":"string"},"run_timestamp":{"type":"string","format":"date-time"},"metadata":{"$ref":"#/components/schemas/InsightCardMetadata"}},"type":"object","additionalProperties":false},"InsightCardListResponse":{"type":"array","items":{"$ref":"#/components/schemas/InsightCardResponse"}},"LocaleCatalogsResponse":{"required":["languages","timezones"],"properties":{"languages":{"description":"Supported language catalog. Keys are the values to send back on writes (e.g. \"english\", \"german\"); values are display labels.","type":"object","additionalProperties":{"type":"string"}},"timezones":{"description":"Supported timezone catalog. Keys are the IANA identifiers to send back on writes (e.g. \"America/Chicago\"); values are display labels.","type":"object","additionalProperties":{"type":"string"}}},"type":"object","additionalProperties":false}},"securitySchemes":{"PartnerApiKey":{"type":"apiKey","description":"API Token Authorization from Partner Portal","name":"api-key","in":"header"},"PartnerJwtBearerAuth":{"type":"http","description":"JWT Authorization header using the Partner JWT token.","bearerFormat":"JWT","scheme":"bearer"}}},"tags":[{"name":"AI Customization Profiles","description":"Manage AI customization profiles."},{"name":"AI Customization Documents","description":"Manage documents attached to AI customization profiles."},{"name":"AI Customization Instructions","description":"Manage custom instructions for AI customization profiles."},{"name":"Child Account Snapshots","description":"Create and manage snapshots of reseller child accounts."},{"name":"Child Accounts","description":"Manage reseller child accounts."},{"name":"CRM Reporting","description":"Read-only CRM pipeline reporting and metrics."},{"name":"CRM Sync","description":"Configure CRM synchronization for HQ pipelines."},{"name":"CRM Sync Settings","description":"Manage CRM synchronization settings."},{"name":"Files","description":"Storage quota information for the partner."},{"name":"Insight Cards","description":"Retrieve and update partner insight cards."},{"name":"Locales","description":"Supported language and timezone catalogs."}]}