import_experiment
Add a concluded experiment. Embeds the title and hypothesis, stores the experiment, and starts a learning extraction job. Do not send processed_results; Garasu computes them from raw_results.
Operation ID: import_experiment
Add a concluded experiment. Embeds the title and hypothesis, stores the experiment, and starts a learning extraction job. Do not send processed_results; Garasu computes them from raw_results.
When to use: You have a concluded test with results and want it stored on a project. Skip drafts and tests that are still running.
Returns: { experiment_id, experiment }
| Field | Type | Required | Description |
|---|---|---|---|
project_id | uuid | Yes | Project id from list_projects. |
experiment | object | Yes | The concluded experiment to store. Garasu computes processed_results. |
experiment fields:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Display title. Max 200 characters. When omitted, Garasu uses the first 200 characters of the hypothesis. |
hypothesis | string | Yes | What was tested and why. 1–8000 characters. |
start_date | string | Yes | When the test started, as ISO 8601. |
end_date | string | Yes | When the test ended, as ISO 8601. Must be on or after start_date. |
variant_keys | string[] | Yes | Every arm, including the control. At least two unique keys. |
control_variant_key | string | Yes | The control arm. Must be one of variant_keys. |
raw_results | object[] | Yes | One row per metric per variant. At least two. Each row needs metric, variant_key, users, and conversions or mean. |
metadata | object | No | Source details, such as source and source_id. Defaults to {}. |
conclusion | string | No | Outcome label, such as won, lost, or inconclusive. Max 40 characters. |
conclusion_summary | string | No | Short write-up of the outcome. Max 8000 characters. |
winning_variant | string | No | Winning arm, when the source named one. Max 80 characters. |
experiment.raw_results[] fields:
| Field | Type | Required | Description |
|---|---|---|---|
metric | string | Yes | Metric name. Max 120 characters. |
variant_key | string | Yes | Arm this row belongs to. Must be one of variant_keys. |
users | integer | Yes | Sample size. Must be greater than 0. |
conversions | integer | No | Conversion count for a rate metric. Cannot exceed users. |
mean | number | No | Observed mean for a continuous metric. Required when conversions is omitted. |
variance | number | No | Sample variance of the per-user metric. Preferred for mean metrics. |
sum_squares | number | No | Sum of squares of the per-user metric. Used when variance is omitted. |
Function schema:
{
"name": "import_experiment",
"description": "Add a concluded experiment. Embeds the title and hypothesis, stores the experiment, and starts a learning extraction job. Do not send processed_results; Garasu computes them from raw_results. You have a concluded test with results and want it stored on a project. Skip drafts and tests that are still running.",
"parameters": {
"type": "object",
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string",
"format": "uuid",
"description": "Project id from list_projects."
},
"experiment": {
"type": "object",
"description": "The concluded experiment to store. Garasu computes processed_results.",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Display title. Max 200 characters. When omitted, Garasu uses the first 200 characters of the hypothesis."
},
"hypothesis": {
"type": "string",
"description": "What was tested and why. 1–8000 characters."
},
"start_date": {
"type": "string",
"description": "When the test started, as ISO 8601."
},
"end_date": {
"type": "string",
"description": "When the test ended, as ISO 8601. Must be on or after start_date."
},
"variant_keys": {
"type": "array",
"description": "Every arm, including the control. At least two unique keys.",
"items": {
"type": "string"
}
},
"control_variant_key": {
"type": "string",
"description": "The control arm. Must be one of variant_keys."
},
"raw_results": {
"type": "array",
"description": "One row per metric per variant. At least two. Each row needs metric, variant_key, users, and conversions or mean.",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"metric": {
"type": "string",
"description": "Metric name. Max 120 characters."
},
"variant_key": {
"type": "string",
"description": "Arm this row belongs to. Must be one of variant_keys."
},
"users": {
"type": "integer",
"description": "Sample size. Must be greater than 0."
},
"conversions": {
"type": "integer",
"description": "Conversion count for a rate metric. Cannot exceed users."
},
"mean": {
"type": "number",
"description": "Observed mean for a continuous metric. Required when conversions is omitted."
},
"variance": {
"type": "number",
"description": "Sample variance of the per-user metric. Preferred for mean metrics."
},
"sum_squares": {
"type": "number",
"description": "Sum of squares of the per-user metric. Used when variance is omitted."
}
},
"required": [
"metric",
"variant_key",
"users"
]
}
},
"metadata": {
"type": "object",
"description": "Source details, such as source and source_id. Defaults to {}.",
"additionalProperties": true,
"properties": {}
},
"conclusion": {
"type": "string",
"description": "Outcome label, such as won, lost, or inconclusive. Max 40 characters."
},
"conclusion_summary": {
"type": "string",
"description": "Short write-up of the outcome. Max 8000 characters."
},
"winning_variant": {
"type": "string",
"description": "Winning arm, when the source named one. Max 80 characters."
}
},
"required": [
"hypothesis",
"start_date",
"end_date",
"variant_keys",
"control_variant_key",
"raw_results"
]
}
},
"required": [
"project_id",
"experiment"
]
}
}Request:
{
"project_id": "11111111-1111-4111-8111-111111111111",
"experiment": {
"name": "Cart shipping estimate",
"hypothesis": "If we show an estimated shipping range on cart, checkout completion will go up because people stop getting surprised by cost at payment.",
"start_date": "2026-03-01T00:00:00.000Z",
"end_date": "2026-03-28T00:00:00.000Z",
"variant_keys": [
"control",
"estimate"
],
"control_variant_key": "control",
"raw_results": [
{
"metric": "Checkout completion",
"variant_key": "control",
"users": 24105,
"conversions": 822
},
{
"metric": "Checkout completion",
"variant_key": "estimate",
"users": 24105,
"conversions": 882
}
],
"metadata": {
"source": "posthog",
"source_id": "cart-shipping-estimate"
}
}
}Response:
{
"experiment_id": "22222222-2222-4222-8222-222222222222",
"experiment": {
"id": "22222222-2222-4222-8222-222222222222",
"project_id": "11111111-1111-4111-8111-111111111111",
"name": "Cart shipping estimate",
"hypothesis": "If we show an estimated shipping range on cart, checkout completion will go up because people stop getting surprised by cost at payment.",
"start_date": "2026-03-01",
"end_date": "2026-03-28",
"variant_keys": [
"control",
"estimate"
],
"control_variant_key": "control",
"metadata": {
"source": "posthog",
"source_id": "cart-shipping-estimate"
},
"headline": {
"metric": "Checkout completion",
"variant_key": "estimate",
"lift_relative": 7.2993,
"p_value": 0.1389,
"control_n": 24105,
"variant_n": 24105
},
"processed_results": [
{
"metric": "Checkout completion",
"variant_key": "estimate",
"control_variant_key": "control",
"control_n": 24105,
"variant_n": 24105,
"control_mean": 0.034101,
"variant_mean": 0.03659,
"lift_absolute": 0.002489,
"lift_relative": 7.2993,
"p_value": 0.1389,
"z_score": 1.4799,
"post_hoc_power": 32,
"mde80_relative": 13.8182,
"kind": "rate",
"control_variance": 0.032939,
"variant_variance": 0.035251
}
],
"related_learning_ids": [],
"related_learnings": [],
"source_url": "https://garasu.co/app/77777777-7777-4777-8777-777777777777/projects/11111111-1111-4111-8111-111111111111/experiments/22222222-2222-4222-8222-222222222222",
"created_at": "2026-03-29T14:12:00.000Z",
"updated_at": "2026-03-29T14:12:00.000Z",
"raw_results": [
{
"metric": "Checkout completion",
"variant_key": "control",
"users": 24105,
"conversions": 822
},
{
"metric": "Checkout completion",
"variant_key": "estimate",
"users": 24105,
"conversions": 882
}
]
}
}