POST /api/v1/profile/save/

Save profile

Creates or updates a profile in Adapty Mail. A profile carries the user's email and attributes that Adapty Mail uses to identify recipients and build segments.

Identify each user by a stable external_profile_id. Sending the same external_profile_id again updates the existing profile rather than creating a duplicate.

Request body

external_profile_idstringrequired

Stable identifier for the user, owned by your app or backend. Reuse the same value across requests so Adapty Mail links emails, clicks, and purchases to one profile. Never use an anonymous or per-install identifier.

external_created_atstringrequired

The user creation time, in ISO 8601 format (for example, "2026-06-01T10:30:00Z"). You can use this date in segments.

emailstringrequired

The user's email address. Adapty Mail delivers campaigns to this address.

first_namestring

The user's first name.

last_namestring

The user's last name.

genderstring

The user's gender.

birthdaystring

The user's date of birth, in ISO 8601 format (for example, "1990-05-21").

countrystring

The user's country as a two-letter uppercase ISO 3166-1 alpha-2 code (for example, US).

store_countrystring

The user's store region as a two-letter uppercase ISO 3166-1 alpha-2 code (for example, US).

custom_attributesobject

Arbitrary key-value pairs (string or number values) to attach to the profile. Use them to build segments — for example, plan, signup_source, or trial_days.

device_infoobject
platformstringrequired

The platform the user is on, for example, iOS or Android.

devicestring

Device model, for example, iPhone15,2.

osstring

Operating system version, for example, 17.5.

localestring

The user's locale, for example, en-US.

timezonestring

The user's timezone, for example, America/New_York.

app_versionstring

Version of your app the user is running, for example, 3.1.0.

Responses

Profile saved successfully. The response body is an empty object.

Schema
object
Example
{}

Validation failed — a required field is missing or invalid. field_name shows which field.

Schema

Standard error response. Every failure returns a 4XX status with this shape.

errorsarray of object
messagestring

Human-readable description of the error.

error_codestring

Machine-readable error identifier.

status_codeinteger

HTTP status code for this error.

field_namestring

The request field that caused the error, or null if the error isn't field-specific.

Example
{
  "errors": [
    {
      "message": "Field required",
      "error_code": "base_error",
      "status_code": 400,
      "field_name": "email"
    }
  ]
}

Missing or invalid secret API key.

Schema

Standard error response. Every failure returns a 4XX status with this shape.

errorsarray of object
messagestring

Human-readable description of the error.

error_codestring

Machine-readable error identifier.

status_codeinteger

HTTP status code for this error.

field_namestring

The request field that caused the error, or null if the error isn't field-specific.

Example
{
  "errors": [
    {
      "message": "Secret key doesn't exist",
      "error_code": "secret_key_does_not_exist_error",
      "status_code": 403,
      "field_name": null
    }
  ]
}