# mailslurp.api.AliasControllerApi

# Load the API package

import 'package:mailslurp/api.dart';

All URIs are relative to https://api.mailslurp.com

Method HTTP request Description
createAlias POST /aliases Create an email alias
createAnonymousAlias POST /aliases/anonymous Create an anonymous email alias
deleteAlias DELETE /aliases/{aliasId} Delete an owned alias
getAlias GET /aliases/{aliasId} Get an email alias
getAliases GET /aliases Get all email aliases
updateAlias PUT /aliases/{aliasId} Update an owned alias

# createAlias

createAlias(createOwnedAliasOptions)

Create an email alias

Create an email alias belonging to a user ID. To create anonymous aliases use the createAnonymousAlias method.

# Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
var api_instance = AliasControllerApi();
var createOwnedAliasOptions = CreateOwnedAliasOptions(); // CreateOwnedAliasOptions | createOwnedAliasOptions
try { 
    api_instance.createAlias(createOwnedAliasOptions);
} catch (e) {
    print("Exception when calling AliasControllerApi->createAlias: $e\n");
}

# Parameters

Name Type Description Notes
createOwnedAliasOptions CreateOwnedAliasOptions createOwnedAliasOptions

# Return type

void (empty response body)

# Authorization

API_KEY

# HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

# createAnonymousAlias

Alias createAnonymousAlias(createAnonymousAliasOptions)

Create an anonymous email alias

# Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
var api_instance = AliasControllerApi();
var createAnonymousAliasOptions = CreateAnonymousAliasOptions(); // CreateAnonymousAliasOptions | createAnonymousAliasOptions
try { 
    var result = api_instance.createAnonymousAlias(createAnonymousAliasOptions);
    print(result);
} catch (e) {
    print("Exception when calling AliasControllerApi->createAnonymousAlias: $e\n");
}

# Parameters

Name Type Description Notes
createAnonymousAliasOptions CreateAnonymousAliasOptions createAnonymousAliasOptions

# Return type

Alias

# Authorization

API_KEY

# HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

# deleteAlias

deleteAlias(aliasId)

Delete an owned alias

# Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
var api_instance = AliasControllerApi();
var aliasId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | aliasId
try { 
    api_instance.deleteAlias(aliasId);
} catch (e) {
    print("Exception when calling AliasControllerApi->deleteAlias: $e\n");
}

# Parameters

Name Type Description Notes
aliasId String aliasId [default to null]

# Return type

void (empty response body)

# Authorization

API_KEY

# HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

# getAlias

Alias getAlias(aliasId)

Get an email alias

Get an email alias by ID

# Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
var api_instance = AliasControllerApi();
var aliasId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | aliasId
try { 
    var result = api_instance.getAlias(aliasId);
    print(result);
} catch (e) {
    print("Exception when calling AliasControllerApi->getAlias: $e\n");
}

# Parameters

Name Type Description Notes
aliasId String aliasId [default to null]

# Return type

Alias

# Authorization

API_KEY

# HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

# getAliases

PageAlias getAliases(page, size, sort)

Get all email aliases

Get all email aliases in paginated form

# Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
var api_instance = AliasControllerApi();
var page = 56; // int | Optional page index in alias list pagination
var size = 56; // int | Optional page size in alias list pagination
var sort = sort_example; // String | Optional createdAt sort direction ASC or DESC
try { 
    var result = api_instance.getAliases(page, size, sort);
    print(result);
} catch (e) {
    print("Exception when calling AliasControllerApi->getAliases: $e\n");
}

# Parameters

Name Type Description Notes
page int Optional page index in alias list pagination [optional] [default to 0]
size int Optional page size in alias list pagination [optional] [default to 20]
sort String Optional createdAt sort direction ASC or DESC [optional] [default to "ASC"]

# Return type

PageAlias

# Authorization

API_KEY

# HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

# updateAlias

updateAlias(aliasId, createOwnedAliasOptions)

Update an owned alias

# Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
var api_instance = AliasControllerApi();
var aliasId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | aliasId
var createOwnedAliasOptions = CreateOwnedAliasOptions(); // CreateOwnedAliasOptions | createOwnedAliasOptions
try { 
    api_instance.updateAlias(aliasId, createOwnedAliasOptions);
} catch (e) {
    print("Exception when calling AliasControllerApi->updateAlias: $e\n");
}

# Parameters

Name Type Description Notes
aliasId String aliasId [default to null]
createOwnedAliasOptions CreateOwnedAliasOptions createOwnedAliasOptions

# Return type

void (empty response body)

# Authorization

API_KEY

# HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]