All URIs are relative to https://api.basistheory.com
Method | HTTP request | Description |
---|---|---|
Create | POST /tokens | |
Delete | DELETE /tokens/{id} | |
Get | GET /tokens | |
GetById | GET /tokens/{id} | |
GetV2 | GET /v2/tokens | |
Search | POST /tokens/search | |
SearchV2 | POST /v2/tokens/search | |
Update | PATCH /tokens/{id} |
Token Create (CreateTokenRequest createTokenRequest)
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;
Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");
var apiInstance = new TokensApi(config);
var createTokenRequest = new CreateTokenRequest()
{
Id = ...
Type = ...
Data = ...
Privacy = ...
Metadata = ...
SearchIndexes = ...
FingerprintExpression = ...
Mask = ...
DeduplicateToken = ...
ExpiresAt = ...
Containers = ...
TokenIntentId = ...
};
Token result = apiInstance.Create(createTokenRequest);
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Token> response = apiInstance.CreateWithHttpInfo(createTokenRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TokensApi.CreateWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
createTokenRequest | CreateTokenRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
409 | Conflict | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void Delete (string id)
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;
Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");
var apiInstance = new TokensApi(config);
var id = "";
apiInstance.Delete(id);
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
apiInstance.DeleteWithHttpInfo(id);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TokensApi.DeleteWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TokenPaginatedList Get (List id = null, Dictionary<string, string> metadata = null, int? page = null, string start = null, int? size = null)
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;
Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");
var apiInstance = new TokensApi(config);
var id = new List<string>();
var metadata = new Dictionary<string, string>()
var page = 1;
var start = "";
var size = 1;
TokenPaginatedList result = apiInstance.Get(id, metadata, page, start, size);
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<TokenPaginatedList> response = apiInstance.GetWithHttpInfo(id, metadata, page, start, size);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TokensApi.GetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | List<string> | [optional] | |
metadata | Dictionary<string, string> | [optional] | |
page | int? | [optional] | |
start | string | [optional] | |
size | int? | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Token GetById (string id)
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;
Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");
var apiInstance = new TokensApi(config);
var id = "";
Token result = apiInstance.GetById(id);
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Token> response = apiInstance.GetByIdWithHttpInfo(id);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TokensApi.GetByIdWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TokenCursorPaginatedList GetV2 (string start = null, int? size = null)
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;
Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");
var apiInstance = new TokensApi(config);
var start = "";
var size = 1;
TokenCursorPaginatedList result = apiInstance.GetV2(start, size);
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<TokenCursorPaginatedList> response = apiInstance.GetV2WithHttpInfo(start, size);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TokensApi.GetV2WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
start | string | [optional] | |
size | int? | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TokenPaginatedList Search (SearchTokensRequest searchTokensRequest)
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;
Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");
var apiInstance = new TokensApi(config);
var searchTokensRequest = new SearchTokensRequest()
{
Query = ...
Page = ...
Start = ...
Size = ...
};
TokenPaginatedList result = apiInstance.Search(searchTokensRequest);
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<TokenPaginatedList> response = apiInstance.SearchWithHttpInfo(searchTokensRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TokensApi.SearchWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
searchTokensRequest | SearchTokensRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TokenCursorPaginatedList SearchV2 (SearchTokensRequestV2 searchTokensRequestV2)
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;
Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");
var apiInstance = new TokensApi(config);
var searchTokensRequestV2 = new SearchTokensRequestV2()
{
Query = ...
Start = ...
Size = ...
};
TokenCursorPaginatedList result = apiInstance.SearchV2(searchTokensRequestV2);
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<TokenCursorPaginatedList> response = apiInstance.SearchV2WithHttpInfo(searchTokensRequestV2);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TokensApi.SearchV2WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
searchTokensRequestV2 | SearchTokensRequestV2 |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Token Update (string id, UpdateTokenRequest updateTokenRequest)
using BasisTheory.net.Api;
using BasisTheory.net.Client;
using BasisTheory.net.Model;
Configuration config = new Configuration();
config.BasePath = "https://api.basistheory.com";
config.AddApiKey("BT-API-KEY", "YOUR_API_KEY");
var apiInstance = new TokensApi(config);
var id = "";
var updateTokenRequest = new UpdateTokenRequest()
{
Data = ...
Privacy = ...
Metadata = ...
SearchIndexes = ...
FingerprintExpression = ...
Mask = ...
ExpiresAt = ...
DeduplicateToken = ...
Containers = ...
};
Token result = apiInstance.Update(id, updateTokenRequest);
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Token> response = apiInstance.UpdateWithHttpInfo(id, updateTokenRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TokensApi.UpdateWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | ||
updateTokenRequest | UpdateTokenRequest |
- Content-Type: application/merge-patch+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
409 | Conflict | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]