---
title: Run Test Plan
slug: suite-documentation/run-test-plan
docTags: 
createdAt: 2026-04-29T13:58:12.821Z
---

The endpoint starts the execution of a specific test plan. The user must have the `PLAN_RUN` authority to access this endpoint.

***

### Endpoint Information

- **URL**: [https://gateway.testinium.io/queue](https://gateway.testinium.io/queue)
- **Method**: `POST`
- **Authentication**: Required (`Bearer Token`)

***

### Request Body

```javascript
{
  "planId": 12345,
  "userId": 67890
}
```

***

### Request Body Parameters

| Parameter | Type   | Required | Description                                |
| --------- | ------ | -------- | ------------------------------------------ |
| `planId`  | `Long` | Yes      | The unique ID of the test plan to execute. |
| `userId`  | `Long` | Yes      | The unique ID of the user who runs plan.   |

***

### Response

This response indicates that the operation was completed successfully, with no additional data returned.

```javascript
{
    "data": null,
    "result": {
        "code": 0,
        "message": "success"
    }
}
```

### Response Fields

| Field          | Type    | Description                                                                       |
| -------------- | ------- | --------------------------------------------------------------------------------- |
| data           | Object  | The payload of the response. In this case `null` since no extra data is returned. |
| result         | Object  | Contains details about the outcome of the operation.                              |
| result.code    | Integer | The result code (e.g., `0` indicates success).                                    |
| result.message | String  | A message describing the outcome (e.g., `"success"`).                             |

***

### Error Codes

| HTTP Code | Error Message           | Description                                      |
| --------- | ----------------------- | ------------------------------------------------ |
| `400`     | `INVALID_REQUEST`       | The request was malformed or contained errors.   |
| `500`     | `INTERNAL_SERVER_ERROR` | An unexpected error occurred on the server side. |

***

### Application Error Codes

| &#x20; |   |
| ------ | - |
|        |   |

```javascript
10000
```

```javascript
"Plan not found!"
```

```javascript
10002
```

```javascript
User not found!
```

### Example Request

```javascript
curl 'https://gateway.testinium.io/queue' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'authorization: Bearer <your_access_token>' \
  -H 'content-type: application/json' \
  --data-raw '{"planId":<plan_id>,"userId":<user_id>}'
```

