{"templateId":"markdown","sharedDataIds":{},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Mailbox API","siteUrl":"https://documentation.mailgun.com","llmstxt":{"title":"Mailgun Documentation","description":"LLMS.txt containing a map of all the documentation files for Mailgun.","sections":[{"title":"Mailgun Send Documentation","description":"All of the Mailgun Send documentation.","includeFiles":["docs/mailgun/**/*.md"],"excludeFiles":["docs/mailgun/index.md"]},{"title":"Mailgun Send OAS","description":"All of the Mailgun Send API specifications.","includeFiles":["docs/mailgun/**/mailgun.yaml"]},{"title":"Mailgun Optimize Documentation","description":"All of the Mailgun Optimize documentation.","includeFiles":["docs/inboxready/**/*.md"],"excludeFiles":["docs/inboxready/index.md"]},{"title":"Mailgun Optimize OAS","description":"All of the Mailgun Optimize API specifications","includeFiles":["docs/inboxready/**/inboxready.yaml"]},{"title":"Mailgun Validate Documentation","description":"All of the Mailgun Validate documentation.","includeFiles":["docs/validate/**/*.md"],"excludeFiles":["docs/validate/index.md"]},{"title":"Mailgun Validate OAS","description":"All of the Mailgun Validate API specifications.","includeFiles":["docs/validate/**/*.yaml"]},{"title":"Mailgun Inspect Documentation","description":"All of the Mailgun Inspect documentation.","includeFiles":["docs/inspect/**/overview.md"]},{"title":"Mailgun Inspect OAS","description":"All of the Mailgun Inspect API specifications.","includeFiles":["docs/inspect/**/*.yaml"]}]},"description":"Mailgun Mailbox API allows you to programmatically create as many mailboxes as you wish"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"mailboxes-api-mailboxes","__idx":0},"children":["Mailboxes {#api-mailboxes}"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mailgun Mailbox API allows you to programmatically create as many"," ","mailboxes as you wish. The incoming messages can be stored in mailboxes."," ","There is no HTTP API to fetch the contents of the mailboxes: you need to"," ","use POP3 or IMAP protocols for that."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["::: warning"," ","::: title"," ","Warning"," ",":::"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mailboxes is a legacy feature of Mailgun that is no longer offered to"," ","new customers. Please utilize the Store() endpoint instead."," ",":::"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["::: warning"," ","::: title"," ","Warning"," ",":::"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Currently Mailgun stores mailbox passwords in plain text. This is not"," ","acceptable for some applications. We are considering changing this in"," ","the future."," ",":::"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET /<domain>/mailboxes\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fetches the list of mailboxes for a given domain."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["::: {.container .ptable}"," ","Parameter   Description"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["limit       Maximum number of records to return. (100 by default)"," ","skip        Number of records to skip. (0 by default)"," ",":::"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST /<domain>/mailboxes\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Creates a new mailbox for a supplied domain"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["::: {.container .ptable}"," ","Parameter   Description"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["mailbox     The name of the mailbox, for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bob.bar"]}," ","password    Mailbox password."," ",":::"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"PUT /<domain>/mailboxes/<mailbox>\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Updates the specified mailbox. Currently only the password can be"," ","changed."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["::: {.container .ptable}"," ","Parameter   Description"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["password    Mailbox password."," ",":::"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"DELETE /<domain>/mailboxes/<mailbox>\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deletes the given mailbox."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"examples","__idx":1},"children":["Examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Listing all mailboxes:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sample response:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"total_count\": 2,\n  \"items\": [\n    {\n      \"size_bytes\": 0,\n      \"created_at\": \"Tue, 27 Sep 2011 20:24:22 GMT\",\n      \"mailbox\": \"postmaster@samples.mailgun.org\"\n    },\n    {\n      \"size_bytes\": 0,\n      \"created_at\": \"Thu, 06 Oct 2011 10:22:36 GMT\",\n      \"mailbox\": \"user@samples.mailgun.org\"\n    }\n  ]\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Creating a new mailbox:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sample response:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"message\": \"Created 1 mailboxes\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Updating the password for a given mailbox:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sample response:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"message\": \"Password changed\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deleting a given mailbox:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sample response:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"message\": \"Mailbox has been deleted\",\n  \"spec\": \"alice@samples.mailgun.org\"\n}\n"},"children":[]}]},"headings":[{"value":"Mailboxes {#api-mailboxes}","id":"mailboxes-api-mailboxes","depth":1},{"value":"Examples","id":"examples","depth":2}],"frontmatter":{"seo":{"title":"Mailbox API","description":"Mailgun Mailbox API allows you to programmatically create as many mailboxes as you wish"}},"lastModified":"2026-10-28T19:46:32.469Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/mailgun/api-reference/mailboxes","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}