Authentication

Merge Anonymous Account

Converts an anonymous user to a real account, or merges anonymous data into an existing account if the email is already taken. Names are needed only for a new account; an existing account needs just its email and password, and one with two factor sign in on answers the challenge (merge waits for verify-2fa).

post/api/v1/auth/merge

Request

  • Base URL: https://www.endlesstravelplans.com
  • URL: https://www.endlesstravelplans.com/api/v1/auth/merge
  • Auth: HTTP bearer

Request body

first_namestring

Required when the email has no account yet.

last_namestring

Required when the email has no account yet.

emailstring required
passwordstring required
marketing_consentboolean
timezonestring nullable

Must not be greater than 64 characters.

partner_codestring nullable

A partner code typed in the app, claimed only when the merge creates the account.

password_confirmationstring required

Example request

{
  "first_name": "John",
  "last_name": "Doe",
  "email": "john@example.com",
  "password": "password123",
  "timezone": "America/Caracas",
  "partner_code": "SAMTRAVEL",
  "password_confirmation": "password123"
}

Response

OR
OR

Example response

{
  "user": {
    "id": 42,
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "phone": null,
    "bio": null,
    "preferred_language": null,
    "timezone": "America/New_York",
    "profile_photo_url": null,
    "has_pro_access": false,
    "subscription_plan": "free",
    "can_create_trip": true,
    "max_saved_trips": 1,
    "is_anonymous": false,
    "marketing_consent": true,
    "marketing_consent_source": "api:notice-us",
    "created_at": "2026-10-13T09:00:00+00:00"
  },
  "token": "eyJ0eXAi...",
  "expires_in": 31536000,
  "expires_at": "2027-10-13T09:00:00Z",
  "merged": false
}

Changes

No recorded changes to this operation across all 1 revision of this API.