{
  "_comment": "DRAFT payloads for fictional test profiles. Not to be sent until the user approves. Run only against a test workspace or approved test profiles. The REST key stays in the user's secret store and never appears here. Replace every <current UTC ISO 8601 at send> with the time of sending, never a copied or past time.",
  "users_track_create_fixtures": {
    "endpoint": "POST /users/track",
    "key_permissions": "users.track (test workspace key only)",
    "body": {
      "group_id": "qa-acme-first-import-run-01",
      "attributes": [
        {
          "external_id": "qa-f1-00000000-0000-4000-8000-000000000001",
          "_update_existing_only": false,
          "email": "qa+f1@example.com",
          "email_subscribe": "subscribed",
          "time_zone": "Europe/London",
          "qa_fixture": "F1"
        },
        {
          "external_id": "qa-f2-00000000-0000-4000-8000-000000000002",
          "_update_existing_only": false,
          "email": "qa+f2@example.com",
          "email_subscribe": "subscribed",
          "time_zone": "Europe/London",
          "qa_fixture": "F2"
        },
        {
          "external_id": "qa-f14-00000000-0000-4000-8000-000000000014",
          "_update_existing_only": false,
          "email": "not-an-email",
          "qa_fixture": "F14"
        }
      ]
    },
    "expect": "201 with message success. errors holds one EMAIL_BAD_FORMAT entry for the F14 object, plus a request_status_not_tracked entry if the workspace is not in the status tracking beta; the second is request-level and is not a rejected object. F1 and F2 created. Record whether the F14 profile exists without an email (field dropped) or not at all (object dropped). Confirm with /users/track/status for the group_id if the beta is enabled, otherwise read back with /users/export/ids."
  },
  "canvas_trigger_f1": {
    "endpoint": "POST /canvas/trigger/send",
    "key_permissions": "canvas.trigger.send (test workspace key only)",
    "body": {
      "canvas_id": "CANVAS_ID_PLACEHOLDER",
      "recipients": [
        {
          "external_user_id": "qa-f1-00000000-0000-4000-8000-000000000001",
          "context": {
            "workspace_id": "ws-000101"
          }
        }
      ]
    },
    "expect": "201 with dispatch_id and no notice field. A notice means the Canvas is paused, stopped or archived and nothing was sent."
  },
  "exit_event_f2": {
    "endpoint": "POST /users/track",
    "key_permissions": "users.track (test workspace key only)",
    "body": {
      "events": [
        {
          "external_id": "qa-f2-00000000-0000-4000-8000-000000000002",
          "name": "first_import_succeeded",
          "time": "<current UTC ISO 8601 at send>",
          "properties": {
            "workspace_id": "ws-000102"
          }
        }
      ]
    },
    "expect": "F2 marked to exit; canvases_received.last_exited set; no reminder send."
  },
  "read_back": {
    "endpoint": "POST /users/export/ids",
    "key_permissions": "users.export.ids (read-only key)",
    "body": {
      "external_ids": [
        "qa-f1-00000000-0000-4000-8000-000000000001",
        "qa-f2-00000000-0000-4000-8000-000000000002",
        "qa-f14-00000000-0000-4000-8000-000000000014"
      ],
      "fields_to_export": ["external_id", "email_subscribe", "custom_attributes", "canvases_received"]
    },
    "expect": "canvases_received shows last_entered for F1 and F2, last_exited for F2, steps_received with the reminder step for F1 only. F14 present or absent as recorded above. For real customers, never add email or phone to fields_to_export."
  }
}
