Skip to main content
View as Markdown

Create a test result

POST /api/v1/test-results

Called by the mobilewright reporter once a test run completes. Returns the created record including its id, which is used for subsequent asset uploads. The result is filed under the organization the API key is bound to, or the X-Organization-Id header, otherwise the caller's default organization.

Header parameters

NameTypeRequiredDescription
X-Organization-IdintegernoSelects which of the caller's organizations the request acts on. When omitted, the caller's default organization is used.

Request body (application/json)

FieldTypeRequiredDescription
namestringyesHuman-readable name for this test run
userAgentstringyesReporter name and version

Example request

curl https://api.mobilenexthq.com/api/v1/test-results \
-X POST \
-H 'Authorization: Bearer mob_...' \
-H 'Content-Type: application/json' \
-d '{"name":"Smoke suite","userAgent":"mobilewright/0.0.39"}'

Responses

201 — Test result created

{
"id": "string",
"name": "Smoke suite",
"userAgent": "mobilewright/0.0.39",
"createdAt": "2026-01-01T00:00:00Z"
}

400 — Invalid request body

{
"error": {
"code": "string",
"message": "string"
}
}

401 — Missing or invalid Bearer token

{
"error": {
"code": "string",
"message": "string"
}
}