# Send email over HTTP API
___

The **HTTP API** is the recommended method for sending emails programmatically. It provides a REST interface with flexible JSON or multipart payloads (depending on API version), making it suitable for most integrations.

To send emails using Infobip over HTTP, follow the steps below. Each step applies regardless of the API version you choose:

1. Choose the appropriate **Email API endpoint** version.
2. Get your **Base URL**.
3. Set up **authorization**.
4. Build and send the **HTTP request** (URL, headers, body).

Refer to the video and sections below for more details on each step.

___

## Choose the Email API endpoint

Infobip provides two APIs for sending email:

### Email API v3 [#email-api-v3-choose-email-api-endpoint]

- Content type: multipart/form-data
- Use when you need to send fully featured emails, including attachments and advanced options.

For more details, see the [Send fully featured email](https://www.infobip.com/docs/api/channels/email/send-fully-featured-email) API endpoint.

### Email API v4 [#email-api-v4-choose-email-api-endpoint]

- Content type: application/json
- Use when you prefer a JSON-based request structure or use templates and more modern payloads.

For more details, see the [Send email messages](https://www.infobip.com/docs/api/channels/email/email-message-sending/send-email-messages-api) API endpoint.

___

## Get your Base URL

Your Infobip account includes a unique Base URL that you must use in every API request.

**Example**:

`https://{base_url}/email/3/send`

To see your base URL, log in to the <apidocslink href="/">Infobip API Resource</apidocslink> hub with your Infobip credentials. Once logged in, on all pages you should see your base URL in this format: `xxxxx.api.infobip.com`

Learn more about the **Base URL** in our [product documentation](https://www.infobip.com/docs/essentials/api-essentials/base-url) and in the <apidocslink href="base-url">API documentation</apidocslink>.

___

## Set up authorization

All Email API requests require an **authorization header**. Infobip supports multiple authentication methods.

Your credentials or token must include at least one of the following scopes:

- `email:manage`
- `email:message:send`
- `message:send`

Learn more about **API authorization** in our [product documentation](https://www.infobip.com/docs/essentials/api-essentials/api-authorization) and in the <apidocslink href="authentication">API documentation</apidocslink>.

For guidance on assigning scopes, see [API scopes](https://www.infobip.com/docs/essentials/api-essentials/api-authorization#api-scopes).

___

## Build the HTTP request

When constructing your HTTP request, include the following components:

- **API URL**: Combine your Base URL with the chosen endpoint. For example: `https://{base_url}/email/3/send`
- **Authorization**: Include the `Authorization` header using the authentication method you selected. Ensure that the credentials or token you use include the required scopes.
- **Content-type**: Set the header according to the Email API version you are using:
  - **v3** → `multipart/form-data`
  - **v4** → `application/json`
- **Body**: The request body consists of required and optional fields.
  - **Required fields** typically include:
    - Sender
    - Recipient(s)
    - Subject
    - Email content
  - **Optional fields** may include:
    - Attachments
    - Custom headers
    - Tracking options
    - Templates
    - Personalization fields
    - Additional metadata

Each endpoint’s documentation includes:

- A **parameter list** showing which fields are required and optional.
- An **Examples** section demonstrating how to construct the request body for various use cases.

___