Videos
Check out our tutorial video series.
Discover the Power of GraphQL with MailSlurp's Email API- Send and receive emails through GraphQL. Check out the free email address API endpoint now!
GraphQL is a hot new technology for fetching data using a graph. MailSlurp offers a free email address API that you can use to create inboxes, read email, send emails and more. Let's see how it works.
Access the MailSlurp GraphQL email API endpoint at https://graphql.mailslurp.com. If you load the url in a browser you'll see the GraphQL explorer. You can use it to perform queries or use your own graphql client locally.
You can install MailSlurp's graphQL library using NPM:
Note you will need a free MailSlurp API key. Create an API key at MailSlurp account dashboard and store the value safely. Then use the key in code to configure the client. We must create a client that sets an header using your MailSlurp account API KEY.
You can make queries like so. Note that the example method call should use backticks
to use template string invocation. Note you can use raw strings without gql too if you prefer.
The great thing about graphql is that you can explore the MailSlurp API schema yourself using the provided GraphQL Playground
Here is how you can perform mutations.
And here is a way to send emails using GraphQL.
For more information please see the GraphQL email guide.
Check out our tutorial video series.
Email and SMS guides for automation and testing.
View github project code for multiple languages.
Latest posts from the MailSlurp team.
Test, build, and automate messaging with a free MailSlurp account.