Requires Go 1.7+. Install with
go get mailslurp/mailslurp-client-go
MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more.
- Homepage
- Get an API KEY
- Generated SDK Clients
- Examples repository
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: d1659dc1567a5b62f65d0612107a50aace03e085
- Package version: 7.0.10
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional
Put the package under your project folder and add the following in import:
import "./mailslurp"
All URIs are relative to https://api.mailslurp.com
Class | Method | HTTP request | Description |
---|---|---|---|
AliasControllerApi | CreateAlias | Post /aliases | Create an email alias |
AliasControllerApi | CreateAnonymousAlias | Post /aliases/anonymous | Create an anonymous email alias |
AliasControllerApi | DeleteAlias | Delete /aliases/{aliasId} | Delete an owned alias |
AliasControllerApi | GetAlias | Get /aliases/{aliasId} | Get an email alias |
AliasControllerApi | GetAliases | Get /aliases | Get all email aliases |
AliasControllerApi | UpdateAlias | Put /aliases/{aliasId} | Update an owned alias |
AttachmentControllerApi | UploadAttachment | Post /attachments | Upload an attachment for sending |
AttachmentControllerApi | UploadMultipartForm | Post /attachments/multipart | Upload an attachment for sending using Multipart Form |
BulkActionsControllerApi | BulkCreateInboxes | Post /bulk/inboxes | Bulk create Inboxes (email addresses) |
BulkActionsControllerApi | BulkDeleteInboxes | Delete /bulk/inboxes | Bulk Delete Inboxes |
BulkActionsControllerApi | BulkSendEmails | Post /bulk/send | Bulk Send Emails |
CommonActionsControllerApi | CreateNewEmailAddress | Post /createInbox | Create new random inbox |
CommonActionsControllerApi | CreateNewEmailAddress1 | Post /newEmailAddress | Create new random inbox |
CommonActionsControllerApi | EmptyInbox | Delete /emptyInbox | Delete all emails in an inbox |
CommonActionsControllerApi | SendEmailSimple | Post /sendEmail | Send an email |
ContactControllerApi | CreateContact | Post /contacts | Create a contact |
ContactControllerApi | DeleteContact | Delete /contacts/{contactId} | Delete contact |
ContactControllerApi | GetAllContacts | Get /contacts/paginated | Get all contacts |
ContactControllerApi | GetContact | Get /contacts/{contactId} | Get contact |
ContactControllerApi | GetContacts | Get /contacts | Get all contacts |
DomainControllerApi | CreateDomain | Post /domains | Create Domain |
DomainControllerApi | DeleteDomain | Delete /domains/{id} | Delete a domain |
DomainControllerApi | GetDomain | Get /domains/{id} | Get a domain |
DomainControllerApi | GetDomains | Get /domains | Get domains |
EmailControllerApi | DeleteAllEmails | Delete /emails | Delete all emails |
EmailControllerApi | DeleteEmail | Delete /emails/{emailId} | Delete an email |
EmailControllerApi | DownloadAttachment | Get /emails/{emailId}/attachments/{attachmentId} | Get email attachment bytes |
EmailControllerApi | ForwardEmail | Post /emails/{emailId}/forward | Forward email |
EmailControllerApi | GetAttachmentMetaData | Get /emails/{emailId}/attachments/{attachmentId}/metadata | Get email attachment metadata |
EmailControllerApi | GetAttachments | Get /emails/{emailId}/attachments | Get all email attachment metadata |
EmailControllerApi | GetEmail | Get /emails/{emailId} | Get email content |
EmailControllerApi | GetEmailHTML | Get /emails/{emailId}/html | Get email content as HTML |
EmailControllerApi | GetEmailsPaginated | Get /emails | Get all emails |
EmailControllerApi | GetRawEmailContents | Get /emails/{emailId}/raw | Get raw email string |
EmailControllerApi | GetRawEmailJson | Get /emails/{emailId}/raw/json | Get raw email in JSON |
EmailControllerApi | GetUnreadEmailCount | Get /emails/unreadCount | Get unread email count |
EmailControllerApi | ValidateEmail | Post /emails/{emailId}/validate | Validate email |
FormControllerApi | SubmitForm | Post /forms | Submit a form to be parsed and sent as an email to an address determined by the form fields |
GroupControllerApi | AddContactsToGroup | Put /groups/{groupId}/contacts | Add contacts to a group |
GroupControllerApi | CreateGroup | Post /groups | Create a group |
GroupControllerApi | DeleteGroup | Delete /groups/{groupId} | Delete group |
GroupControllerApi | GetAllGroups | Get /groups/paginated | Get all Contact Groups in paginated format |
GroupControllerApi | GetGroup | Get /groups/{groupId} | Get group |
GroupControllerApi | GetGroupWithContacts | Get /groups/{groupId}/contacts | Get group and contacts belonging to it |
GroupControllerApi | GetGroups | Get /groups | Get all groups |
GroupControllerApi | RemoveContactsFromGroup | Delete /groups/{groupId}/contacts | Remove contacts from a group |
InboxControllerApi | CreateInbox | Post /inboxes | Create an Inbox (email address) |
InboxControllerApi | DeleteAllInboxes | Delete /inboxes | Delete all inboxes |
InboxControllerApi | DeleteInbox | Delete /inboxes/{inboxId} | Delete inbox |
InboxControllerApi | GetAllInboxes | Get /inboxes/paginated | List Inboxes Paginated |
InboxControllerApi | GetEmails | Get /inboxes/{inboxId}/emails | Get emails in an Inbox |
InboxControllerApi | GetInbox | Get /inboxes/{inboxId} | Get Inbox |
InboxControllerApi | GetInboxEmailsPaginated | Get /inboxes/{inboxId}/emails/paginated | Get inbox emails paginated |
InboxControllerApi | GetInboxTags | Get /inboxes/tags | Get inbox tags |
InboxControllerApi | GetInboxes | Get /inboxes | List Inboxes / Email Addresses |
InboxControllerApi | SendEmail | Post /inboxes/{inboxId} | Send Email |
InboxControllerApi | SetInboxFavourited | Put /inboxes/{inboxId}/favourite | Set inbox favourited state |
InboxControllerApi | UpdateInbox | Patch /inboxes/{inboxId} | Update Inbox |
TemplateControllerApi | CreateTemplate | Post /templates | Create a Template |
TemplateControllerApi | DeleteTemplate | Delete /templates/{TemplateId} | Delete Template |
TemplateControllerApi | GetAllTemplates | Get /templates/paginated | Get all Templates in paginated format |
TemplateControllerApi | GetTemplate | Get /templates/{TemplateId} | Get Template |
TemplateControllerApi | GetTemplates | Get /templates | Get all Templates |
WaitForControllerApi | WaitFor | Post /waitFor | Wait for conditions to be met |
WaitForControllerApi | WaitForEmailCount | Get /waitForEmailCount | Wait for and return count number of emails |
WaitForControllerApi | WaitForLatestEmail | Get /waitForLatestEmail | Fetch inbox's latest email or if empty wait for an email to arrive |
WaitForControllerApi | WaitForMatchingEmail | Post /waitForMatchingEmails | Wait or return list of emails that match simple matching patterns |
WaitForControllerApi | WaitForNthEmail | Get /waitForNthEmail | Wait for or fetch the email with a given index in the inbox specified |
WebhookControllerApi | CreateWebhook | Post /inboxes/{inboxId}/webhooks | Attach a WebHook URL to an inbox |
WebhookControllerApi | DeleteWebhook | Delete /inboxes/{inboxId}/webhooks/{webhookId} | Delete and disable a Webhook for an Inbox |
WebhookControllerApi | GetAllWebhooks | Get /webhooks/paginated | List Webhooks Paginated |
WebhookControllerApi | GetWebhook | Get /webhooks/{webhookId} | Get a webhook for an Inbox |
WebhookControllerApi | GetWebhooks | Get /inboxes/{inboxId}/webhooks | Get all Webhooks for an Inbox |
WebhookControllerApi | SendTestData | Post /webhooks/{webhookId}/test | Send webhook test data |
- Alias
- AttachmentMetaData
- BasicAuthOptions
- BulkSendEmailOptions
- ContactDto
- ContactProjection
- CreateAnonymousAliasOptions
- CreateContactOptions
- CreateDomainOptions
- CreateGroupOptions
- CreateOwnedAliasOptions
- CreateTemplateOptions
- CreateWebhookOptions
- DomainDto
- DomainPreview
- EmailAnalysis
- EmailPreview
- EmailProjection
- ForwardEmailOptions
- GroupContactsDto
- GroupDto
- GroupProjection
- HtmlValidationResult
- Inbox
- InboxProjection
- JsonNode
- MatchOption
- MatchOptions
- PageAlias
- PageContactProjection
- PageEmailPreview
- PageEmailProjection
- PageGroupProjection
- PageInboxProjection
- PageTemplateProjection
- PageWebhookProjection
- Pageable
- RawEmailJson
- SendEmailOptions
- SetInboxFavouritedOptions
- SimpleSendEmailOptions
- Sort
- TemplateDto
- TemplateProjection
- TemplateVariable
- UnreadCount
- UpdateGroupContacts
- UpdateInboxOptions
- UploadAttachmentOptions
- ValidationDto
- ValidationMessage
- WaitForConditions
- WebhookDto
- WebhookProjection
- WebhookTestRequest
- WebhookTestResponse
- WebhookTestResult
- Type: API key
Example
auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
Key: "APIKEY",
Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)