[{"data":1,"prerenderedAt":906},["ShallowReactive",2],{"navigation":3,"\u002Fsync-api\u002Fapi-reference\u002Fcsharp":99,"\u002Fsync-api\u002Fapi-reference\u002Fcsharp-surround":905},[4,16,52,71,91],{"title":5,"path":6,"stem":7,"children":8,"icon":15},"Getting Started","\u002Fgetting-started","1.getting-started\u002F1.index",[9,11],{"title":10,"path":6,"stem":7},"Introduction",{"title":12,"path":13,"stem":14},"Authentication","\u002Fgetting-started\u002Fauthentication","1.getting-started\u002F2.authentication","i-lucide-rocket",{"title":17,"path":18,"stem":19,"children":20,"icon":51},"GraphQL API","\u002Fgraphql-api","2.graphql-api\u002F1.index",[21,23,27,31,35,39,43,47],{"title":22,"path":18,"stem":19},"API Overview",{"title":24,"path":25,"stem":26},"Querying Patterns","\u002Fgraphql-api\u002Fquerying","2.graphql-api\u002F2.querying",{"title":28,"path":29,"stem":30},"Mutation Patterns","\u002Fgraphql-api\u002Fmutations","2.graphql-api\u002F3.mutations",{"title":32,"path":33,"stem":34},"List SaaS Applications","\u002Fgraphql-api\u002Fguides\u002Flist-applications","2.graphql-api\u002F4.guides\u002F1.list-applications",{"title":36,"path":37,"stem":38},"Find Unused Licenses","\u002Fgraphql-api\u002Fguides\u002Ffind-unused-licenses","2.graphql-api\u002F4.guides\u002F2.find-unused-licenses",{"title":40,"path":41,"stem":42},"Retrieve Upcoming Renewals","\u002Fgraphql-api\u002Fguides\u002Fupcoming-renewals","2.graphql-api\u002F4.guides\u002F3.upcoming-renewals",{"title":44,"path":45,"stem":46},"Handle GraphQL Errors","\u002Fgraphql-api\u002Fguides\u002Fhandle-errors","2.graphql-api\u002F4.guides\u002F4.handle-errors",{"title":48,"path":49,"icon":50},"API Reference","\u002Fgql-schema-reference","i-lucide-file-code","i-lucide-braces",{"title":53,"path":54,"stem":55,"children":56,"icon":70},"Sync API","\u002Fsync-api","3.sync-api\u002F1.index",[57,59,63,67],{"title":58,"path":54,"stem":55},"Viio Sync API",{"title":60,"path":61,"stem":62},"Quickstart","\u002Fsync-api\u002Fquickstart","3.sync-api\u002F2.quickstart",{"title":64,"path":65,"icon":66},"Examples","\u002Fsync-api\u002Faws-lambda-python","i-lucide-code-xml",{"title":68,"path":69,"icon":50},"SDK Reference","\u002Fsync-api\u002Fapi-reference","i-lucide-refresh-cw",{"title":72,"path":73,"stem":74,"children":75,"icon":90},"MCP Server","\u002Fmcp-server","4.mcp-server\u002F1.index",[76,78,82,86],{"title":77,"path":73,"stem":74},"Viio MCP Server",{"title":79,"path":80,"stem":81},"Setup","\u002Fmcp-server\u002Fsetup","4.mcp-server\u002F2.setup",{"title":83,"path":84,"stem":85},"Available Tools","\u002Fmcp-server\u002Ftools","4.mcp-server\u002F3.tools",{"title":87,"path":88,"stem":89},"SaaS Analysis Use Cases","\u002Fmcp-server\u002Fuse-cases","4.mcp-server\u002F4.use-cases","i-lucide-bot",{"title":92,"path":93,"stem":94,"children":95,"icon":98},"AI Integration","\u002Fai","5.ai\u002F1.index",[96],{"title":97,"path":93,"stem":94},"llms.txt","i-lucide-sparkles",{"id":100,"title":101,"body":102,"dateModified":893,"datePublished":893,"description":894,"extension":895,"links":896,"meta":897,"navigation":898,"path":899,"seo":900,"stem":903,"__hash__":904},"docs\u002F3.sync-api\u002F5.api-reference\u002F2.csharp.md","C# SDK",{"type":103,"value":104,"toc":885},"minimark",[105,126,131,166,169,173,562,566,682,693,697,710,773,776,780,854,859,863,875,881],[106,107,108,109,120,121,125],"p",{},"This guide covers behavior specific to ",[110,111,115,119],"a",{"href":112,"rel":113},"https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FViio.SyncApi.Sdk\u002F1.1.0",[114],"nofollow",[116,117,118],"code",{},"Viio.SyncApi.Sdk"," 1.1.0",". For record types and properties, use the ",[110,122,124],{"href":123},"\u002Fsync-api\u002Fapi-reference\u002Fmodels","Model Reference",".",[127,128,130],"h2",{"id":129},"installation","Installation",[132,133,138],"pre",{"className":134,"code":135,"language":136,"meta":137,"style":137},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","dotnet add package Viio.SyncApi.Sdk --version 1.1.0\n","bash","",[116,139,140],{"__ignoreMap":137},[141,142,145,149,153,156,159,162],"span",{"class":143,"line":144},"line",1,[141,146,148],{"class":147},"sBMFI","dotnet",[141,150,152],{"class":151},"sfazB"," add",[141,154,155],{"class":151}," package",[141,157,158],{"class":151}," Viio.SyncApi.Sdk",[141,160,161],{"class":151}," --version",[141,163,165],{"class":164},"sbssI"," 1.1.0\n",[106,167,168],{},"The package targets .NET 10.",[127,170,172],{"id":171},"usage","Usage",[132,174,178],{"className":175,"code":176,"language":177,"meta":137,"style":137},"language-csharp shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","using Viio.SyncApi;\nusing Viio.SyncApi.V1.Contracts;\n\nusing var client = new SyncApiClient(\n    new SyncApiClientOptions(\n        new Uri(\"https:\u002F\u002Fsync.viio.io\"),\n        SyncApiAuthentication.ApiKey(apiKey)\n    )\n);\n\nusing var batch = await client.StartBatch(installationId, cancellationToken);\n\nawait batch.Write(\n    new SyncRecordsRequest\n    {\n        Accounts = new AccountRecords\n        {\n            Records =\n            {\n                new Account\n                {\n                    Generic = new GenericAccountDetails\n                    {\n                        Id = \"account-1\",\n                        Email = \"person@example.com\",\n                    },\n                },\n            },\n        },\n    },\n    cancellationToken\n);\n\nawait batch.Complete(cancellationToken);\n","csharp",[116,179,180,198,221,228,252,263,286,306,312,318,323,358,363,378,386,392,406,412,421,427,436,442,455,461,480,497,503,509,515,521,527,533,538,543],{"__ignoreMap":137},[141,181,182,185,189,192,195],{"class":143,"line":144},[141,183,184],{"class":164},"using",[141,186,188],{"class":187},"sTEyZ"," Viio",[141,190,125],{"class":191},"sMK4o",[141,193,194],{"class":187},"SyncApi",[141,196,197],{"class":191},";\n",[141,199,201,203,205,207,209,211,214,216,219],{"class":143,"line":200},2,[141,202,184],{"class":164},[141,204,188],{"class":187},[141,206,125],{"class":191},[141,208,194],{"class":187},[141,210,125],{"class":191},[141,212,213],{"class":187},"V1",[141,215,125],{"class":191},[141,217,218],{"class":187},"Contracts",[141,220,197],{"class":191},[141,222,224],{"class":143,"line":223},3,[141,225,227],{"emptyLinePlaceholder":226},true,"\n",[141,229,231,234,237,240,243,246,249],{"class":143,"line":230},4,[141,232,184],{"class":233},"s7zQu",[141,235,236],{"class":147}," var",[141,238,239],{"class":147}," client",[141,241,242],{"class":191}," =",[141,244,245],{"class":191}," new",[141,247,248],{"class":147}," SyncApiClient",[141,250,251],{"class":191},"(\n",[141,253,255,258,261],{"class":143,"line":254},5,[141,256,257],{"class":191},"    new",[141,259,260],{"class":147}," SyncApiClientOptions",[141,262,251],{"class":191},[141,264,266,269,272,275,278,281,283],{"class":143,"line":265},6,[141,267,268],{"class":191},"        new",[141,270,271],{"class":147}," Uri",[141,273,274],{"class":191},"(",[141,276,277],{"class":191},"\"",[141,279,280],{"class":151},"https:\u002F\u002Fsync.viio.io",[141,282,277],{"class":191},[141,284,285],{"class":191},"),\n",[141,287,289,292,294,298,300,303],{"class":143,"line":288},7,[141,290,291],{"class":187},"        SyncApiAuthentication",[141,293,125],{"class":191},[141,295,297],{"class":296},"s2Zo4","ApiKey",[141,299,274],{"class":191},[141,301,302],{"class":187},"apiKey",[141,304,305],{"class":191},")\n",[141,307,309],{"class":143,"line":308},8,[141,310,311],{"class":191},"    )\n",[141,313,315],{"class":143,"line":314},9,[141,316,317],{"class":191},");\n",[141,319,321],{"class":143,"line":320},10,[141,322,227],{"emptyLinePlaceholder":226},[141,324,326,328,330,333,335,338,340,342,345,347,350,353,356],{"class":143,"line":325},11,[141,327,184],{"class":233},[141,329,236],{"class":147},[141,331,332],{"class":147}," batch",[141,334,242],{"class":191},[141,336,337],{"class":191}," await",[141,339,239],{"class":187},[141,341,125],{"class":191},[141,343,344],{"class":296},"StartBatch",[141,346,274],{"class":191},[141,348,349],{"class":187},"installationId",[141,351,352],{"class":191},",",[141,354,355],{"class":187}," cancellationToken",[141,357,317],{"class":191},[141,359,361],{"class":143,"line":360},12,[141,362,227],{"emptyLinePlaceholder":226},[141,364,366,369,371,373,376],{"class":143,"line":365},13,[141,367,368],{"class":191},"await",[141,370,332],{"class":187},[141,372,125],{"class":191},[141,374,375],{"class":296},"Write",[141,377,251],{"class":191},[141,379,381,383],{"class":143,"line":380},14,[141,382,257],{"class":191},[141,384,385],{"class":147}," SyncRecordsRequest\n",[141,387,389],{"class":143,"line":388},15,[141,390,391],{"class":191},"    {\n",[141,393,395,398,401,403],{"class":143,"line":394},16,[141,396,397],{"class":187},"        Accounts ",[141,399,400],{"class":191},"=",[141,402,245],{"class":191},[141,404,405],{"class":147}," AccountRecords\n",[141,407,409],{"class":143,"line":408},17,[141,410,411],{"class":191},"        {\n",[141,413,415,418],{"class":143,"line":414},18,[141,416,417],{"class":187},"            Records ",[141,419,420],{"class":191},"=\n",[141,422,424],{"class":143,"line":423},19,[141,425,426],{"class":191},"            {\n",[141,428,430,433],{"class":143,"line":429},20,[141,431,432],{"class":191},"                new",[141,434,435],{"class":147}," Account\n",[141,437,439],{"class":143,"line":438},21,[141,440,441],{"class":191},"                {\n",[141,443,445,448,450,452],{"class":143,"line":444},22,[141,446,447],{"class":187},"                    Generic ",[141,449,400],{"class":191},[141,451,245],{"class":191},[141,453,454],{"class":147}," GenericAccountDetails\n",[141,456,458],{"class":143,"line":457},23,[141,459,460],{"class":191},"                    {\n",[141,462,464,467,469,472,475,477],{"class":143,"line":463},24,[141,465,466],{"class":187},"                        Id ",[141,468,400],{"class":191},[141,470,471],{"class":191}," \"",[141,473,474],{"class":151},"account-1",[141,476,277],{"class":191},[141,478,479],{"class":191},",\n",[141,481,483,486,488,490,493,495],{"class":143,"line":482},25,[141,484,485],{"class":187},"                        Email ",[141,487,400],{"class":191},[141,489,471],{"class":191},[141,491,492],{"class":151},"person@example.com",[141,494,277],{"class":191},[141,496,479],{"class":191},[141,498,500],{"class":143,"line":499},26,[141,501,502],{"class":191},"                    },\n",[141,504,506],{"class":143,"line":505},27,[141,507,508],{"class":191},"                },\n",[141,510,512],{"class":143,"line":511},28,[141,513,514],{"class":191},"            },\n",[141,516,518],{"class":143,"line":517},29,[141,519,520],{"class":191},"        },\n",[141,522,524],{"class":143,"line":523},30,[141,525,526],{"class":191},"    },\n",[141,528,530],{"class":143,"line":529},31,[141,531,532],{"class":187},"    cancellationToken\n",[141,534,536],{"class":143,"line":535},32,[141,537,317],{"class":191},[141,539,541],{"class":143,"line":540},33,[141,542,227],{"emptyLinePlaceholder":226},[141,544,546,548,550,552,555,557,560],{"class":143,"line":545},34,[141,547,368],{"class":191},[141,549,332],{"class":187},[141,551,125],{"class":191},[141,553,554],{"class":296},"Complete",[141,556,274],{"class":191},[141,558,559],{"class":187},"cancellationToken",[141,561,317],{"class":191},[127,563,565],{"id":564},"client-configuration","Client Configuration",[567,568,569,588],"table",{},[570,571,572],"thead",{},[573,574,575,579,582,585],"tr",{},[576,577,578],"th",{},"Property",[576,580,581],{},"Required",[576,583,584],{},"Default",[576,586,587],{},"Description",[589,590,591,608,621,637,652,667],"tbody",{},[573,592,593,599,602,605],{},[594,595,596],"td",{},[116,597,598],{},"Endpoint",[594,600,601],{},"Yes",[594,603,604],{},"—",[594,606,607],{},"Absolute HTTPS Sync API endpoint; HTTP is allowed only for loopback development",[573,609,610,614,616,618],{},[594,611,612],{},[116,613,12],{},[594,615,601],{},[594,617,604],{},[594,619,620],{},"API-key or Viio-managed authentication",[573,622,623,628,631,634],{},[594,624,625],{},[116,626,627],{},"MaxReceiveMessageSize",[594,629,630],{},"No",[594,632,633],{},"16 MiB",[594,635,636],{},"Maximum response-message size accepted by the client",[573,638,639,644,646,649],{},[594,640,641],{},[116,642,643],{},"MaxSendMessageSize",[594,645,630],{},[594,647,648],{},"gRPC default",[594,650,651],{},"Maximum request-message size",[573,653,654,659,661,664],{},[594,655,656],{},[116,657,658],{},"Timeout",[594,660,630],{},[594,662,663],{},"100 seconds",[594,665,666],{},"Per-operation timeout",[573,668,669,674,676,679],{},[594,670,671],{},[116,672,673],{},"HttpMessageHandlerFactory",[594,675,630],{},[594,677,678],{},"SDK default",[594,680,681],{},"Factory for proxies, custom certificates, or test transports",[106,683,684,685,688,689,692],{},"Customer-managed integrations use ",[116,686,687],{},"SyncApiAuthentication.ApiKey(apiKey)",". The key must have the ",[116,690,691],{},"integration:sync"," permission and belong to the target installation's workspace.",[127,694,696],{"id":695},"batch-lifecycle","Batch Lifecycle",[106,698,699,702,703,706,707,125],{},[116,700,701],{},"SyncApiBatch"," implements ",[116,704,705],{},"ISyncApiBatch"," and ",[116,708,709],{},"IDisposable",[567,711,712,721],{},[570,713,714],{},[573,715,716,719],{},[576,717,718],{},"Member",[576,720,587],{},[589,722,723,733,743,753,763],{},[573,724,725,730],{},[594,726,727],{},[116,728,729],{},"BatchId",[594,731,732],{},"Server-generated batch identifier",[573,734,735,740],{},[594,736,737],{},[116,738,739],{},"Write(request, cancellationToken)",[594,741,742],{},"Send one typed collection",[573,744,745,750],{},[594,746,747],{},[116,748,749],{},"Complete(cancellationToken)",[594,751,752],{},"Complete the batch and make the local handle terminal",[573,754,755,760],{},[594,756,757],{},[116,758,759],{},"Abort(cancellationToken)",[594,761,762],{},"Abort the batch and make the local handle terminal",[573,764,765,770],{},[594,766,767],{},[116,768,769],{},"Dispose()",[594,771,772],{},"Release local resources without completing or aborting the server batch",[106,774,775],{},"Writes are serialized. A successful completion or abort rejects later operations on the same batch object.",[127,777,779],{"id":778},"error-handling","Error Handling",[567,781,782,792],{},[570,783,784],{},[573,785,786,789],{},[576,787,788],{},"Exception",[576,790,791],{},"Meaning",[589,793,794,804,814,824,834,844],{},[573,795,796,801],{},[594,797,798],{},[116,799,800],{},"SyncApiBatchAlreadyInProgressException",[594,802,803],{},"Another batch owns the installation lock",[573,805,806,811],{},[594,807,808],{},[116,809,810],{},"SyncApiProtocolException",[594,812,813],{},"The server rejected an SDK operation",[573,815,816,821],{},[594,817,818],{},[116,819,820],{},"SyncApiAuthenticationException",[594,822,823],{},"Authentication could not produce a usable credential",[573,825,826,831],{},[594,827,828],{},[116,829,830],{},"Grpc.Core.RpcException",[594,832,833],{},"Transport or server RPC failure",[573,835,836,841],{},[594,837,838],{},[116,839,840],{},"ArgumentException",[594,842,843],{},"Invalid client input or configuration",[573,845,846,851],{},[594,847,848],{},[116,849,850],{},"InvalidOperationException",[594,852,853],{},"The batch was already completed or aborted",[106,855,856,857,125],{},"For retry and abort guidance, see the ",[110,858,60],{"href":61},[127,860,862],{"id":861},"requests-and-models","Requests and Models",[106,864,865,867,868,871,872,874],{},[116,866,375],{}," accepts ",[116,869,870],{},"SyncRecordsRequest",". Set exactly one typed collection per call; the SDK adds ",[116,873,729],{}," automatically.",[106,876,877,878,880],{},"The dedicated ",[110,879,124],{"href":123}," lists every supported collection and record property, including its C# name, type, and requiredness.",[882,883,884],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}",{"title":137,"searchDepth":144,"depth":200,"links":886},[887,888,889,890,891,892],{"id":129,"depth":200,"text":130},{"id":171,"depth":200,"text":172},{"id":564,"depth":200,"text":565},{"id":695,"depth":200,"text":696},{"id":778,"depth":200,"text":779},{"id":861,"depth":200,"text":862},"2026-08-06","Install, configure, and handle lifecycle and errors with the Viio Sync API C# SDK.","md",null,{},false,"\u002Fsync-api\u002Fapi-reference\u002Fcsharp",{"title":901,"description":902},"Viio Sync API C# SDK","Install and configure the Viio Sync API C# SDK and learn its lifecycle and error-handling behavior.","3.sync-api\u002F5.api-reference\u002F2.csharp","P9eZ5iQnQ5J4_3g7M3Gnt8nxrDqf9mAwQBHmY1_az9I",[896,896],1787319043612]