---
title: "Send Email"
full: true
_openapi:
  method: POST
  toc: []
  structuredData:
    headings: []
    contents:
      - content: "Send a new email message on behalf of a mailbox"
_apiData:
  document: "https://reloop.sh/api/inbox/openapi/json"
  operationData: [{"path":"/api/inbox/v1/messages/send","method":"post"}]
  parameterList: [{"name":"mailboxId","type":"string","required":true,"description":"Sender Mailbox ID","location":"body"},{"name":"to","type":"string | string[]","required":true,"description":"Recipient email address(es)","location":"body"},{"name":"subject","type":"string","required":true,"description":"Email subject","location":"body"},{"name":"text","type":"string","required":false,"description":"Plain text body content","location":"body"},{"name":"html","type":"string","required":false,"description":"HTML body content","location":"body"},{"name":"cc","type":"string | string[]","required":false,"description":"CC recipient address(es)","location":"body"},{"name":"bcc","type":"string | string[]","required":false,"description":"BCC recipient address(es)","location":"body"}]
  responseMap: {"200":{"description":"Response for status 200","schema":{"success":true,"messageId":"example_messageId","status":"example_status","timestamp":"example_timestamp","id":"con_123456789"}},"400":{"description":"Response for status 400","schema":{"message":"Contact already exists","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}},"401":{"description":"Response for status 401","schema":{"message":"Contact already exists","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}},"403":{"description":"Response for status 403","schema":{"message":"Contact already exists","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}},"404":{"description":"Response for status 404","schema":{"message":"Contact already exists","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}},"500":{"description":"Response for status 500","schema":{"message":"Contact already exists","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}}}
  codeSamples:
    - id: node
      lang: javascript
      label: Node.js
      source: |-
        import { Reloop } from "reloop-email";
        
        const reloop = new Reloop({ apiKey: "rl_123456789" });
        
        const { message, messageError } = await reloop.inbox.messages.send({
          mailboxId: "mbx_123456789",
          to: "user@example.com",
          subject: "Hello from Reloop Inbox",
          html: "<p>Thanks for reaching out.</p>",
        });
        if (messageError) throw messageError;
    - id: curl
      lang: bash
      label: cURL
      source: |-
        curl -X POST https://reloop.sh/api/inbox/v1/messages/send \
          -H "x-api-key: rl_123456789" \
          -H "Content-Type: application/json" \
          -d '{"mailboxId":"mbx_123456789","to":"user@example.com","subject":"Hello from Reloop Inbox","html":"<p>Thanks for reaching out.</p>"}'
    - id: python
      lang: python
      label: Python
      source: |-
        from reloop_email import Reloop
        
        reloop = Reloop(api_key="rl_123456789")
        
        result = reloop.inbox.messages.send({
          "mailboxId": "mbx_123456789",
          "to": "user@example.com",
          "subject": "Hello from Reloop Inbox",
          "html": "<p>Thanks for reaching out.</p>",
        })
        if result.message_error:
            raise result.message_error
    - id: php
      lang: php
      label: PHP
      source: |-
        <?php
        
        require 'vendor/autoload.php';
        
        use Reloop\Reloop;
        
        $reloop = Reloop::client('rl_123456789');
        
        $message = $reloop->inbox->messages->send([
            'mailboxId' => 'mbx_123456789',
            'to' => 'user@example.com',
            'subject' => 'Hello from Reloop Inbox',
            'html' => '<p>Thanks for reaching out.</p>',
        ]);
    - id: java
      lang: java
      label: Java
      source: |-
        import sh.reloop.ReloopClient;
        ReloopClient reloop = new ReloopClient("rl_123456789");
        
        SendMessageParams params = new SendMessageParams();
        params.mailboxId = "mbx_123456789";
        params.to = "user@example.com";
        params.subject = "Hello from Reloop Inbox";
        params.html = "<p>Thanks for reaching out.</p>";
        var message = reloop.inbox.messages.send(params);
---
> For the complete documentation index, see [llms-docs.txt](/llms-docs.txt) or the site index [llms.txt](/llms.txt). Full docs corpus: [llms-full-docs.txt](/llms-full-docs.txt). Prefer markdown URLs (append `.md`) for agent consumption. Product skill: [skill.md](/skill.md).


{/* This file was generated by the OpenAPI doc generator. Do not edit this file directly. Run `bun run generate:api-docs` to regenerate. */}

<APIPage />
