TombaTomba
Start free
  • Documentation
  • API reference
  • SDKs & CLI
  • AI & MCP
  • Integrations
  • Enterprise
  • Migration guides

Find, verify and enrich B2B contacts from public sources, in the app, your spreadsheet or through the API.

GDPR & CCPA

// docs

  • API changelog
  • Support options
  • Security

// platform

  • Dashboard
  • Pricing
  • API status

// resources

  • Help center
  • Product updates
  • TombaBot crawler

// company

  • Website
  • Contact us
  • Edit or remove your data

© 2021–2026 Tomba.io

  • Terms of service
  • Privacy policy
  • Cookie policy
  • Security policy
  • GDPR
  • CCPA
SDKs
    SDK overviewC# SDKDart SDKDeno SDKElixir SDKGo SDKLua SDKNode.js SDKPerl SDKPHP SDKPython SDKR SDKRuby SDKRust SDK
CLI
SDKs

C# SDK

The Tomba NuGet package is the official .NET client for the Tomba API. Each API area is a service class, and each method sends one request and returns the raw HttpResponseMessage.

Requirements

  • .NET 10. Version 1.0.1 of the package targets net10.0 only.
  • Newtonsoft.Json, installed as a dependency.

Install

TerminalCode
dotnet add package Tomba

The classes are in the Tomba namespace.

Authenticate

Create an API key and copy your secret on the API keys page, then export both:

TerminalCode
export TOMBA_API_KEY="ta_xxxx" export TOMBA_SECRET_KEY="ts_xxxx"

The SDK doesn't read environment variables. Pass the values to SetKey() and SetSecret(), and the client sends them as the X-Tomba-Key and X-Tomba-Secret headers. Call each setter once per client: a second call throws ArgumentException. Key expiry and rotation are covered in Authentication.

First request

Verify an email address.

Code
using Newtonsoft.Json.Linq; using Tomba; var client = new Client() .SetKey(Environment.GetEnvironmentVariable("TOMBA_API_KEY")) .SetSecret(Environment.GetEnvironmentVariable("TOMBA_SECRET_KEY")); var response = await new Verifier(client).EmailVerifier("jane.doe@stripe.com"); var body = JObject.Parse(await response.Content.ReadAsStringAsync()); Console.WriteLine(body["data"]?["email"]?["status"]);

The example is a dotnet new console program with top-level statements. Methods return the HttpResponseMessage unparsed, so read and parse the JSON body yourself. The API wraps its payload in a data object (Response format); the verification status is at data.email.status.

Errors

The SDK throws TombaException when the API responds with status 400 or higher and when the request fails. For API errors, the exception is wrapped: the outer TombaException has the API's errors.message as Message, and its InnerException is a TombaException whose Code is the HTTP status and whose Response is the raw response body.

Code
using Newtonsoft.Json.Linq; using Tomba; var client = new Client() .SetKey(Environment.GetEnvironmentVariable("TOMBA_API_KEY")) .SetSecret(Environment.GetEnvironmentVariable("TOMBA_SECRET_KEY")); try { var response = await new Verifier(client).EmailVerifier("jane.doe@stripe.com"); var body = JObject.Parse(await response.Content.ReadAsStringAsync()); Console.WriteLine(body["data"]?["email"]?["status"]); } catch (TombaException e) { var inner = e.InnerException as TombaException; Console.WriteLine($"{inner?.Code} {e.Message}"); Console.WriteLine(inner?.Response); }

inner is null when the request failed before a response arrived. The raw Response is the JSON error body; each errors.type in it is described in Errors.

Rate limits and retries

The SDK doesn't retry. Client.ParseRateLimit(response) reads the rate limit headers of a successful response into a RateLimit with the int? properties SecondRateLimit, MinuteRateLimit, DailyRateLimit, MinuteRequestLeft, DailyRequestLeft, MinuteResetSeconds, DailyResetSeconds, and RetryAfter, and the string properties RateLimitPolicy and RateLimitValue.

A 429 throws TombaException without the response headers. Wait before retrying as described in Handle 429 responses.

Requests time out after 120 seconds.

Method reference

Create each service with the client, for example new Verifier(client). Every method returns Task<HttpResponseMessage>.

MethodEndpoint
Account.GetAccount()GET /me
Usage.GetUsage()GET /usage
Logs.GetLogs(int? page = null, int? limit = null)GET /logs
Format.EmailFormatAsync(string domain)GET /email-format
Count.EmailCount(string domain)GET /email-count
Verifier.EmailVerifier(string email, string webhookUrl = null)GET /email-verifier
Sources.EmailSources(string email)GET /email-sources
Phone.FinderAsync(Dictionary<string, object> parameters, string webhookUrl = null)GET /phone-finder
Phone.ValidatorAsync(string phone, string countryCode = null)GET /phone-validator
Status.DomainStatus(string domain)GET /domain-status
Status.AutoComplete(string query)GET /domain-suggestions
Keys.GetKeys()GET /keys
Keys.GetKey(string id)GET /keys/{id}
Keys.CreateKey()POST /keys
Keys.ResetKey(string id)PUT /keys/{id}
Keys.DeleteKey(string id)DELETE /keys/{id}
Leads.ListLeadsAsync(int? page = 1, int? limit = 10, string domain = null)GET /leads
Leads.GetLeadAsync(string id)GET /leads/{id}
Leads.CreateLeadAsync(Dictionary<string, object> data)POST /leads
Leads.UpdateLeadAsync(string id, Dictionary<string, object> data)PUT /leads/{id}
Leads.DeleteLeadAsync(string id)DELETE /leads/{id}
LeadsLists.GetLists()GET /leads_lists
LeadsLists.DeleteListId(string id)DELETE /leads_lists/{id}
Bulk.ListAsync(string type, Dictionary<string, object> parameters = null)GET /bulk/{type}
Bulk.CreateAsync(string type, Dictionary<string, object> data)POST /bulk/{type}
Bulk.GetAsync(string type, string id)GET /bulk/{type}/{id}
Bulk.ProgressAsync(string type, string id)GET /bulk/{type}/{id}/progress
Bulk.DownloadAsync(string type, string id)GET /bulk/{type}/{id}/download
Bulk.RenameAsync(string type, string id, string name)PUT /bulk/{type}/{id}/rename

type is the {type} segment listed in Bulk types. CreateAsync sends a JSON body, so it can't create jobs that need a CSV upload, such as email finder jobs.

Source

github.com/tomba-io/csharp (Apache-2.0). Release notes are in CHANGELOG.md.

Last modified on September 30, 2026
SDK overviewDart SDK
On this page
  • Requirements
  • Install
  • Authenticate
  • First request
  • Errors
  • Rate limits and retries
  • Method reference
  • Source
C#
C#