Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1353 lines (995 sloc) 41.9 KB

ExtraOperationsApi

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

Method HTTP request Description
bulkCreateInboxes POST /bulk/inboxes Bulk create Inboxes (email addresses)
bulkDeleteInboxes DELETE /bulk/inboxes Bulk Delete Inboxes
bulkSendEmails POST /bulk/send Bulk Send Emails
createDomain POST /domains Create Domain
createInbox POST /inboxes Create an Inbox (email address)
createWebhook POST /inboxes/{inboxId}/webhooks Attach a WebHook URL to an inbox
deleteDomain DELETE /domains/{id} Delete a domain
deleteEmail1 DELETE /emails/{emailId} Delete Email
deleteInbox DELETE /inboxes/{inboxId} Delete Inbox / Email Address
deleteWebhook DELETE /inboxes/{inboxId}/webhooks/{webhookId} Delete and disable a WebHook for an Inbox
downloadAttachment GET /emails/{emailId}/attachments/{attachmentId} Get email attachment
forwardEmail POST /emails/{emailId}/forward Forward Email
getDomain GET /domains/{id} Get a domain
getDomains GET /domains Get domains
getEmail GET /emails/{emailId} Get Email Content
getEmails GET /inboxes/{inboxId}/emails List Emails in an Inbox / EmailAddress
getEmailsPaginated GET /emails Get all emails
getInbox GET /inboxes/{inboxId} Get Inbox / EmailAddress
getInboxes GET /inboxes List Inboxes / Email Addresses
getRawEmailContents GET /emails/{emailId}/raw Get Raw Email Content
getWebhooks GET /inboxes/{inboxId}/webhooks Get all WebHooks for an Inbox
sendEmail POST /inboxes/{inboxId} Send Email
uploadAttachment POST /attachments Upload an attachment for sending
uploadMultipartForm POST /attachments/multipart Upload an attachment for sending using Multipart Form

bulkCreateInboxes

List<Inbox> bulkCreateInboxes(count)

Bulk create Inboxes (email addresses)

Enterprise Plan Required

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
Integer count = 56; // Integer | Number of inboxes to be created in bulk
try {
    List<Inbox> result = apiInstance.bulkCreateInboxes(count);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#bulkCreateInboxes");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
count Integer Number of inboxes to be created in bulk

Return type

List<Inbox>

Authorization

API_KEY

HTTP request headers

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

bulkDeleteInboxes

bulkDeleteInboxes(UUID)

Bulk Delete Inboxes

Enterprise Plan Required

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
List<UUID> UUID = Arrays.asList(); // List<UUID> | ids
try {
    apiInstance.bulkDeleteInboxes(UUID);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#bulkDeleteInboxes");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
UUID List<UUID> ids

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

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

bulkSendEmails

bulkSendEmails(bulkSendEmailOptions)

Bulk Send Emails

Enterprise Plan Required

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
BulkSendEmailOptions bulkSendEmailOptions = new BulkSendEmailOptions(); // BulkSendEmailOptions | bulkSendEmailOptions
try {
    apiInstance.bulkSendEmails(bulkSendEmailOptions);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#bulkSendEmails");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
bulkSendEmailOptions BulkSendEmailOptions bulkSendEmailOptions

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

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

createDomain

DomainPlusVerificationRecordsAndStatus createDomain(createDomainOptions)

Create Domain

Link a domain that you own with MailSlurp so you can create inboxes with it. Returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain.

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
CreateDomainOptions createDomainOptions = new CreateDomainOptions(); // CreateDomainOptions | domainOptions
try {
    DomainPlusVerificationRecordsAndStatus result = apiInstance.createDomain(createDomainOptions);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#createDomain");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
createDomainOptions CreateDomainOptions domainOptions

Return type

DomainPlusVerificationRecordsAndStatus

Authorization

API_KEY

HTTP request headers

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

createInbox

Inbox createInbox(emailAddress)

Create an Inbox (email address)

Create a new inbox and with a ranmdomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
String emailAddress = "emailAddress_example"; // String | Optional email address including domain you wish inbox to use (eg: test123@mydomain.com). Only supports domains that you have registered and verified with MailSlurp using dashboard or `createDomain` method.
try {
    Inbox result = apiInstance.createInbox(emailAddress);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#createInbox");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
emailAddress String Optional email address including domain you wish inbox to use (eg: test123@mydomain.com). Only supports domains that you have registered and verified with MailSlurp using dashboard or `createDomain` method. [optional]

Return type

Inbox

Authorization

API_KEY

HTTP request headers

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

createWebhook

Webhook createWebhook(inboxId, createWebhookOptions)

Attach a WebHook URL to an inbox

Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID inboxId = new UUID(); // UUID | inboxId
CreateWebhookOptions createWebhookOptions = new CreateWebhookOptions(); // CreateWebhookOptions | webhookOptions
try {
    Webhook result = apiInstance.createWebhook(inboxId, createWebhookOptions);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#createWebhook");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
inboxId UUID inboxId
createWebhookOptions CreateWebhookOptions webhookOptions

Return type

Webhook

Authorization

API_KEY

HTTP request headers

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

deleteDomain

deleteDomain(id)

Delete a domain

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID id = new UUID(); // UUID | id
try {
    apiInstance.deleteDomain(id);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#deleteDomain");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id UUID id

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

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

deleteEmail1

deleteEmail1(emailId)

Delete Email

Deletes an email and removes it from the inbox

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID emailId = new UUID(); // UUID | emailId
try {
    apiInstance.deleteEmail1(emailId);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#deleteEmail1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
emailId UUID emailId

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

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

deleteInbox

deleteInbox(inboxId)

Delete Inbox / Email Address

Permanently delete an inbox and associated email address

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID inboxId = new UUID(); // UUID | inboxId
try {
    apiInstance.deleteInbox(inboxId);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#deleteInbox");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
inboxId UUID inboxId

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

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

deleteWebhook

deleteWebhook(inboxId, webhookId)

Delete and disable a WebHook for an Inbox

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID inboxId = new UUID(); // UUID | inboxId
UUID webhookId = new UUID(); // UUID | webhookId
try {
    apiInstance.deleteWebhook(inboxId, webhookId);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#deleteWebhook");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
inboxId UUID inboxId
webhookId UUID webhookId

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

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

downloadAttachment

downloadAttachment(attachmentId, emailId, apiKey)

Get email attachment

Returns the specified attachment for a given email as a byte stream (file download). Get the attachmentId from the email response. Requires enterprise account.

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
String attachmentId = "attachmentId_example"; // String | attachmentId
UUID emailId = new UUID(); // UUID | emailId
String apiKey = "apiKey_example"; // String | Can pass apiKey in url for this request if you wish to download the file in a browser
try {
    apiInstance.downloadAttachment(attachmentId, emailId, apiKey);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#downloadAttachment");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
attachmentId String attachmentId
emailId UUID emailId
apiKey String Can pass apiKey in url for this request if you wish to download the file in a browser [optional]

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

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

forwardEmail

forwardEmail(emailId, forwardEmailOptions)

Forward Email

Forward email content to given recipients

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID emailId = new UUID(); // UUID | emailId
ForwardEmailOptions forwardEmailOptions = new ForwardEmailOptions(); // ForwardEmailOptions | forwardEmailOptions
try {
    apiInstance.forwardEmail(emailId, forwardEmailOptions);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#forwardEmail");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
emailId UUID emailId
forwardEmailOptions ForwardEmailOptions forwardEmailOptions

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

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

getDomain

DomainPlusVerificationRecordsAndStatus getDomain(id)

Get a domain

Returns domain verification status and tokens

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID id = new UUID(); // UUID | id
try {
    DomainPlusVerificationRecordsAndStatus result = apiInstance.getDomain(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#getDomain");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id UUID id

Return type

DomainPlusVerificationRecordsAndStatus

Authorization

API_KEY

HTTP request headers

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

getDomains

List<DomainPreview> getDomains()

Get domains

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
try {
    List<DomainPreview> result = apiInstance.getDomains();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#getDomains");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<DomainPreview>

Authorization

API_KEY

HTTP request headers

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

getEmail

Email getEmail(emailId)

Get Email Content

Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawMessage endpoint

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID emailId = new UUID(); // UUID | emailId
try {
    Email result = apiInstance.getEmail(emailId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#getEmail");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
emailId UUID emailId

Return type

Email

Authorization

API_KEY

HTTP request headers

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

getEmails

List<EmailPreview> getEmails(inboxId, limit, minCount, retryTimeout, since)

List Emails in an Inbox / EmailAddress

List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID inboxId = new UUID(); // UUID | Id of inbox that emails belongs to
Integer limit = 56; // Integer | Limit the result set, ordered by descending received date time
Long minCount = 56L; // Long | Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
Long retryTimeout = 56L; // Long | Maximum milliseconds to spend retrying inbox database until minCount emails are returned
OffsetDateTime since = new OffsetDateTime(); // OffsetDateTime | Exclude emails received before this ISO 8601 date time
try {
    List<EmailPreview> result = apiInstance.getEmails(inboxId, limit, minCount, retryTimeout, since);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#getEmails");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
inboxId UUID Id of inbox that emails belongs to
limit Integer Limit the result set, ordered by descending received date time [optional]
minCount Long Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. [optional]
retryTimeout Long Maximum milliseconds to spend retrying inbox database until minCount emails are returned [optional]
since OffsetDateTime Exclude emails received before this ISO 8601 date time [optional]

Return type

List<EmailPreview>

Authorization

API_KEY

HTTP request headers

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

getEmailsPaginated

PageEmailProjection getEmailsPaginated(page, size)

Get all emails

Responses are paginated

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
Integer page = 0; // Integer | Optional page index in email list pagination
Integer size = 20; // Integer | Optional page size in email list pagination
try {
    PageEmailProjection result = apiInstance.getEmailsPaginated(page, size);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#getEmailsPaginated");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
page Integer Optional page index in email list pagination [optional] [default to 0]
size Integer Optional page size in email list pagination [optional] [default to 20]

Return type

PageEmailProjection

Authorization

API_KEY

HTTP request headers

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

getInbox

Inbox getInbox(inboxId)

Get Inbox / EmailAddress

Returns an inbox's properties, including its email address and ID.

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID inboxId = new UUID(); // UUID | inboxId
try {
    Inbox result = apiInstance.getInbox(inboxId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#getInbox");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
inboxId UUID inboxId

Return type

Inbox

Authorization

API_KEY

HTTP request headers

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

getInboxes

List<Inbox> getInboxes()

List Inboxes / Email Addresses

List the inboxes you have created

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
try {
    List<Inbox> result = apiInstance.getInboxes();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#getInboxes");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<Inbox>

Authorization

API_KEY

HTTP request headers

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

getRawEmailContents

String getRawEmailContents(emailId)

Get Raw Email Content

Returns a raw, unparsed and unprocessed email

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID emailId = new UUID(); // UUID | emailId
try {
    String result = apiInstance.getRawEmailContents(emailId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#getRawEmailContents");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
emailId UUID emailId

Return type

String

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

getWebhooks

List<Webhook> getWebhooks(inboxId)

Get all WebHooks for an Inbox

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID inboxId = new UUID(); // UUID | inboxId
try {
    List<Webhook> result = apiInstance.getWebhooks(inboxId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#getWebhooks");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
inboxId UUID inboxId

Return type

List<Webhook>

Authorization

API_KEY

HTTP request headers

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

sendEmail

sendEmail(inboxId, sendEmailOptions)

Send Email

Send an email from the inbox's email address. Specify the email recipients and contents in the request body. See the `SendEmailOptions` for more information. Note the `inboxId` refers to the inbox's id NOT its email address

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UUID inboxId = new UUID(); // UUID | inboxId
SendEmailOptions sendEmailOptions = new SendEmailOptions(); // SendEmailOptions | sendEmailOptions
try {
    apiInstance.sendEmail(inboxId, sendEmailOptions);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#sendEmail");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
inboxId UUID inboxId
sendEmailOptions SendEmailOptions sendEmailOptions

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

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

uploadAttachment

List<String> uploadAttachment(uploadAttachmentOptions)

Upload an attachment for sending

When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
UploadAttachmentOptions uploadAttachmentOptions = new UploadAttachmentOptions(); // UploadAttachmentOptions | uploadOptions
try {
    List<String> result = apiInstance.uploadAttachment(uploadAttachmentOptions);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#uploadAttachment");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
uploadAttachmentOptions UploadAttachmentOptions uploadOptions

Return type

List<String>

Authorization

API_KEY

HTTP request headers

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

uploadMultipartForm

List<String> uploadMultipartForm(file, contentType, filename)

Upload an attachment for sending using Multipart Form

When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.

Example

// Import classes:
//import com.mailslurp.client.ApiClient;
//import com.mailslurp.client.ApiException;
//import com.mailslurp.client.Configuration;
//import com.mailslurp.client.auth.*;
//import com.mailslurp.api.api.ExtraOperationsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: API_KEY
ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
API_KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API_KEY.setApiKeyPrefix("Token");

ExtraOperationsApi apiInstance = new ExtraOperationsApi();
File file = new File("/path/to/file"); // File | file
String contentType = "contentType_example"; // String | contentType
String filename = "filename_example"; // String | filename
try {
    List<String> result = apiInstance.uploadMultipartForm(file, contentType, filename);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ExtraOperationsApi#uploadMultipartForm");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
file File file
contentType String contentType [optional]
filename String filename [optional]

Return type

List<String>

Authorization

API_KEY

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json
You can’t perform that action at this time.