Seam 1.2.0
dotnet add package Seam --version 1.2.0
NuGet\Install-Package Seam -Version 1.2.0
<PackageReference Include="Seam" Version="1.2.0" />
<PackageVersion Include="Seam" Version="1.2.0" />
<PackageReference Include="Seam" />
paket add Seam --version 1.2.0
#r "nuget: Seam, 1.2.0"
#:package Seam@1.2.0
#addin nuget:?package=Seam&version=1.2.0
#tool nuget:?package=Seam&version=1.2.0
Seam C#
Usage
using Seam.Client;
var seam = new SeamClient(apiToken: "YOUR_API_KEY");
var myDevices = seam.Devices.List();
Console.WriteLine("First Device Name: " + myDevices[0].Properties.Name);
var accessCode = seam.AccessCodes.Create(deviceId: myDevices[0].DeviceId, code: "1234");
Setting a value to null
The Seam API distinguishes three states for an updatable parameter: omitted (leave the stored value unchanged), null (unset the stored value), and a value (set it).
C#'s null means omitted.
The SDK removes null parameters from the request entirely,
so passing null never unsets a value.
To unset a value, pass the Null.Value sentinel,
which the SDK sends as JSON null in request bodies
and as an empty value in query strings:
// Omits custom_metadata, leaving the stored metadata unchanged.
seam.Devices.Update(deviceId: deviceId, customMetadata: null);
// Unsets the sync key of the stored metadata.
seam.Devices.Update(
deviceId: deviceId,
customMetadata: new Dictionary<string, object> { ["sync"] = Null.Value }
);
Only pass Null.Value where the Seam API documents a value as nullable.
A parameter typed as a specific C# type, e.g. string?, does not accept the
sentinel: pass it wherever a parameter is typed object, and to the URL search
params serializer below.
Advanced Usage
Setting the request timeout
Requests time out after 30 seconds by default.
Pass the timeout option, in milliseconds, to override this:
var seam = new SeamClient(apiToken: "YOUR_API_KEY", timeout: 60000);
The default may also be changed for every client at once:
GlobalSeamRequestConfiguration.Instance.Timeout = 60000;
Serializing URL search params
The Seam API parses URL search params as complex types.
The SDK serializes the params of every endpoint
the Seam API prefers to receive as a GET or DELETE this way.
If you call the API with your own HTTP client,
StrictUrlSearchParamsSerializer is exported for that purpose.
The _strict=true parameter is added to any non-empty query
so the Seam API uses strict, schema-aware parsing.
A query with no serializable parameters remains empty.
using Seam.Client;
var query = StrictUrlSearchParamsSerializer.Serialize(
new Dictionary<string, object> { ["device_ids"] = new[] { "device1", "device2" } }
);
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer your-api-key");
var devices = await client.GetStringAsync($"https://connect.getseam.com/devices/list?{query}");
The serialization defines the name and value of each search param,
where every value is a string.
UrlSearchParams holds those pairs and renders the query string,
as URLSearchParams does for the reference implementation:
using Seam.Client;
var searchParams = new UrlSearchParams();
StrictUrlSearchParamsSerializer.Update(
searchParams,
new Dictionary<string, object> { ["device_ids"] = new[] { "device1", "device2" } }
);
searchParams.Select(pair => (pair.Key, pair.Value)).ToList();
// => [("device_ids", "device1"), ("device_ids", "device2"), ("_strict", "true")]
searchParams.ToString();
// => "device_ids=device1&device_ids=device2&_strict=true"
Pass either the query string or the pairs to your HTTP client.
A client may percent-encode a few characters differently
than URLSearchParams does,
which the Seam API reads as the same params either way.
A parameter set to null is omitted,
while a parameter set to Null.Value is serialized to an empty value,
which the Seam API reads as null,
as described in Setting a value to null.
A parameter that cannot be represented throws an UnserializableParamError.
The Seam API parses these params with the corresponding parser.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- JsonSubTypes (>= 2.0.1)
- Newtonsoft.Json (>= 13.0.3)
- Polly (>= 7.2.4)
- RestSharp (>= 112.1.0)
-
net8.0
- JsonSubTypes (>= 2.0.1)
- Newtonsoft.Json (>= 13.0.3)
- Polly (>= 7.2.4)
- RestSharp (>= 112.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.0 | 69 | 8/14/2026 |
| 1.1.0 | 79 | 8/11/2026 |
| 1.0.1 | 299 | 8/6/2026 |
| 1.0.0 | 116 | 7/31/2026 |
| 0.99.0 | 123 | 7/29/2026 |
| 0.98.0 | 157 | 7/24/2026 |
| 0.97.0 | 118 | 7/23/2026 |
| 0.96.0 | 8,154 | 1/21/2026 |
| 0.95.0 | 715 | 9/18/2025 |
| 0.94.1 | 451 | 9/17/2025 |
| 0.94.0 | 2,022 | 9/5/2025 |
| 0.93.0 | 270 | 9/5/2025 |
| 0.92.0 | 511 | 7/15/2025 |
| 0.31.1 | 11,910 | 2/18/2025 |
| 0.31.0 | 240 | 2/17/2025 |
| 0.30.0 | 249 | 2/17/2025 |
| 0.29.0 | 219 | 2/15/2025 |
| 0.28.0 | 278 | 2/14/2025 |
| 0.27.0 | 240 | 2/12/2025 |
| 0.26.0 | 224 | 2/8/2025 |