# Adapty Mail API

Version: `1.0.0`

> The Adapty Mail API lets you send user profiles and transaction events to Adapty Mail directly
> from your server, without routing the data through the Adapty SDK.
>
> Use it to:
>
> Add subscribers when you don't have a base in Adapty Mail yet.
> Reuse the subscriber base from your other apps.
> Feed Adapty Mail server-to-server, with your backend as the source of truth.
>
> A profile with an email is enough for the **never purchased** flow. Every other flow
> (renewal cancelled, billing issue, expired, refunded) is driven by purchase history, so those
> profiles also need transaction events to be placed in the right flow.
>
> For a step-by-step walkthrough, see [Send emails and transactions via the Adapty Mail API](/docs/mail-send-data-via-api).

## Servers

- `https://api-mail.adapty.io` — Production server

## Authentication

### apikeyAuth

type: `apiKey` · in: `header` · header: `Authorization`

Authenticate every request with your Adapty Mail secret API key, sent as the **Authorization**
header with the value `Bearer {your_secret_api_key}`, for example, `Bearer secret_live_...`.

Find this key in Adapty Mail under **Settings**. The key is project-specific — it identifies the
project the data belongs to, so the profile and transaction endpoints don't take a project ID.

## Operations

- **POST** `/api/v1/profile/save/` — [Save profile](https://adapty.io/docs/zh/api-mail/operations/saveProfile.md)
- **POST** `/api/v1/profile/transaction-event/save/` — [Save transaction event](https://adapty.io/docs/zh/api-mail/operations/saveTransactionEvent.md)
