Rawi

API reference · Settings

Download my data

post/settings/export
AuthenticationCustomer token (Bearer)
AccessFree user · Pro user

Customer token (Bearer) — free and paid users

Rate limit5/60min

The account's data as one JSON document, sent as a download (Content-Disposition: attachment; filename="rawi-data-YYYY-MM-DD.json"): the account (email, phone, plan, notification choices), the brand with its products, target customers, competitors and questions, a summary of every scan (answers, and answers naming the brand, per scan and per question; the answer texts stay in the reports), payments and consultation requests. Internal fields (AI costs and routing, admin notes, payer hashes) are left out. Personal data, so like email/phone changes and deletion it needs a fresh reauth_token (used up by the download). Throttle 5 per hour.

Request body

FieldTypeDescription
reauth_tokenstringfrom POST /settings/reauth/verify (10 minutes); without it: 422 {"code":"reauth_required"}
Examplejson
{
  "reauth_token": "{{reauthToken}}"
}

Responses

200

FieldTypeDescription
format*string
version*integer
exported_at*string
account*object
account.id*integerUnique ID.
account.email*string | nullEmail address.
account.phone*string | nullMobile number.
account.name*string | null
account.locale*stringLanguage: fa or en.
account.plan*string ("paid", "free")Plan: free (Free) or paid (Pro).
account.billing_period*string | null
account.plan_expires_at*string | null
account.created_at*string | nullWhen it was created (ISO 8601).
account.last_login_at*string | null
account.email_notifications*object
account.email_notifications.reminders*boolean
account.email_notifications.report_ready*boolean
account.email_notifications.renewal*boolean
account.sms_notifications*boolean
account.referral_code*string
brands*any[] | string[]
payments*object[]
payments[].id*integerUnique ID.
payments[].period*string
payments[].status*stringCurrent status.
payments[].base_amount*integer
payments[].period_discount*integer
payments[].code_discount*integer
payments[].vat*integer
payments[].total*integer
payments[].currency*stringCurrency code, e.g. USD, EUR or IRT.
payments[].tracking_code*string | null
payments[].gateway_message*string | null
payments[].gateway_name*string | null
payments[].period_start*string | null
payments[].period_end*string | null
payments[].paid_at*string | null
payments[].created_at*string | nullWhen it was created (ISO 8601).
payments[].auto_renew*boolean
payments[].renewal_amount*integer | null«Renew automatically» (Stripe subscription)
payments[].amount_refunded*integerRefunds (status refunded / partially_refunded): total refunded so far and when the last one was made.
payments[].refunded_at*string | null
consultation_requests*object[]
consultation_requests[].id*integerUnique ID.
consultation_requests[].name*string
consultation_requests[].phone*stringMobile number.
consultation_requests[].method*string
consultation_requests[].time_slot*string
consultation_requests[].preferred_days*array | null
consultation_requests[].note*string | null
consultation_requests[].status*stringCurrent status.
consultation_requests[].created_at*string | nullWhen it was created (ISO 8601).
json
{
  "format": "rawi-account-export",
  "version": 1,
  "exported_at": "2026-11-26T10:00:00Z",
  "account": {
    "id": 1,
    "email": "demo@rawi.local",
    "phone": null,
    "plan": "free",
    "locale": "en"
  },
  "brands": [
    {
      "name": "Acme Books",
      "domain": "acmebooks.example",
      "products": [],
      "target_customers": [],
      "competitors": [],
      "questions": [
        {
          "id": 1,
          "text": "…",
          "stage": "selection",
          "answers": 6,
          "answers_naming_you": 2
        }
      ],
      "scans": [
        {
          "id": 3,
          "status": "complete",
          "answers": 60,
          "answers_naming_you": 14
        }
      ]
    }
  ],
  "payments": [],
  "consultation_requests": []
}

401 — Missing/invalid token

FieldType
message*string
codestring
json
{
  "message": "Please sign in to continue; your session has ended or is not valid.",
  "code": "unauthenticated"
}

422 — {"code":"reauth_required"}: no valid reauth_token

FieldType
message*string
errors*object
json
{
  "message": "",
  "errors": {
    "email": [
      "ایمیل معتبر نیست."
    ]
  }
}

429 — More than 5 downloads in an hour

FieldTypeDescription
message*string
resend_inintegerSeconds until a new login code may be requested (login-code cooldown only).
json
{
  "message": "Too Many Attempts.",
  "resend_in": 0
}

curl example

bash
curl -X POST 'http://127.0.0.1:8010/api/settings/export' \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $RAWI_USER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "reauth_token": "{{reauthToken}}"
}'

Try it in the console