# Test devices API

## createTestDevice

Registers a test device for the application.

`POST` `https://api.pushwoosh.com/json/1.3/createTestDevice`

#### Request Body

| Name                                           | Type    | Description                                                 |
| ---------------------------------------------- | ------- | ----------------------------------------------------------- |
| application\*  | string  | [Pushwoosh application code](/developer/api-reference/api-identifiers/#application-code)                             |
| push\_token\*  | string  | [Push token](/developer/api-reference/api-identifiers/#push-token) of the device.                                   |
| device\_type\* | integer | [Device type](/developer/api-reference/api-identifiers/#device-type). See possible values in `/registerDevice` method. |
| name\*         | string  | Test device name.                                           |
| description                                    | string  | Test device description.                                    |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": null
}
```
</TabItem>
</Tabs>


```json title="Example"
{
  "request": {
    "application": "XXXXX-XXXXX",        // required. Pushwoosh application code
    "push_token": "DEVICE_PUSH_TOKEN",   // required.
    "device_type": 1,                    // required. Refer to /registerDevice for device types
    "name": "TEST_DEVICE_1",             // required. Test device name
    "description": "android test device" // optional. Test device description
  }
}
```

## listTestDevices

Returns all the test devices for the specific application.

`POST` `https://api.pushwoosh.com/json/1.3/listTestDevices`

#### Request Body

| Name                                          | Type   | Description                                    |
| --------------------------------------------- | ------ | ---------------------------------------------- |
| auth\*        | string | [API access token](/developer/api-reference/api-identifiers/#api-access-token) from Pushwoosh Control Panel. |
| application\* | string | [Pushwoosh application code](/developer/api-reference/api-identifiers/#application-code)                   |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "TestDevices": [{
      "name": "iosDevice",
      "type": "1",
      "pushtoken": "token",
      "description": "ios device"
    }]
  }
}
```
</TabItem>
</Tabs>



```json title="Example"
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H", // required. API access token from Pushwoosh Control Panel
    "application": "XXXXX-XXXXX"    // required. Pushwoosh application code
  }
}
```

For device types see [`/registerDevice`](/developer/api-reference/device-api/#registerdevice).