---
title: "List roles"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sureshake.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sureshake API › hiring

`GET /v2/hiring/roles`

## Query parameters

- `entityId` (`hiring-list-roles.query.entityId`; string, optional)
  - format `uuid`
- `q` (`hiring-list-roles.query.q`; string, optional)
  - minLength 1; maxLength 255
- `location` (`hiring-list-roles.query.location`; string, optional)
  - minLength 1; maxLength 255
- `remotePolicy` (`hiring-list-roles.query.remotePolicy`; string, optional)
  - one of `"remote"`, `"hybrid"`, `"onsite"`
- `status` (`hiring-list-roles.query.status`; string, optional)
  - one of `"draft"`, `"published"`, `"closed"`
- `visibility` (`hiring-list-roles.query.visibility`; string, optional)
  - one of `"public"`, `"unlisted"`, `"private"`
- `limit` (`hiring-list-roles.query.limit`; integer, optional)
  - min 1; max 100; default `20`
- `offset` (`hiring-list-roles.query.offset`; integer, optional)
  - min 0; default `0`

## Code samples

### cURL

```bash
curl --request GET \
  --url https://api.sureshake.com/v2/hiring/roles
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/hiring/roles';
const options = {method: 'GET'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/hiring/roles"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
      "title": "string",
      "description": "string",
      "location": "string",
      "remotePolicy": "remote",
      "salaryRange": {
        "min": 0,
        "max": 0,
        "currency": "string",
        "period": "hourly"
      },
      "status": "draft",
      "visibility": "public",
      "publishedAt": "2019-08-24T14:15:22Z",
      "closesAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "problemSpecs": [
        {
          "id": "string",
          "prompt": "string",
          "successCriteria": "string",
          "orderIndex": 0
        }
      ],
      "rubric": {
        "version": 0,
        "dimensions": [
          {
            "id": "string",
            "name": "string",
            "description": "string",
            "weight": 0,
            "scaleMin": 0,
            "scaleMax": 0
          }
        ],
        "createdAt": "string"
      },
      "entity": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string",
        "slug": "string",
        "logoUrl": "string",
        "verified": true
      }
    }
  ],
  "meta": {
    "total": 0,
    "limit": 0,
    "offset": 0,
    "hasMore": true,
    "page": 0,
    "totalPages": 0
  }
}
```

- `data` (`hiring-list-roles.response.200.data`; array<object>, required)
  - `id` (`hiring-list-roles.response.200.data.id`; string, required)
    - format `uuid`
  - `entityId` (`hiring-list-roles.response.200.data.entityId`; string, required)
    - format `uuid`
  - `title` (`hiring-list-roles.response.200.data.title`; string, required)
  - `description` (`hiring-list-roles.response.200.data.description`; string, required, nullable)
  - `location` (`hiring-list-roles.response.200.data.location`; string, required, nullable)
  - `remotePolicy` (`hiring-list-roles.response.200.data.remotePolicy`; string, required, nullable)
    - one of `"remote"`, `"hybrid"`, `"onsite"`
  - `salaryRange` (`hiring-list-roles.response.200.data.salaryRange`; object, required, nullable)
    - `min` (`hiring-list-roles.response.200.data.salaryRange.min`; number, optional)
    - `max` (`hiring-list-roles.response.200.data.salaryRange.max`; number, optional)
    - `currency` (`hiring-list-roles.response.200.data.salaryRange.currency`; string, optional)
    - `period` (`hiring-list-roles.response.200.data.salaryRange.period`; string, optional)
      - one of `"hourly"`, `"monthly"`, `"yearly"`
  - `status` (`hiring-list-roles.response.200.data.status`; string, required)
    - one of `"draft"`, `"published"`, `"closed"`
  - `visibility` (`hiring-list-roles.response.200.data.visibility`; string, required)
    - one of `"public"`, `"unlisted"`, `"private"`
  - `publishedAt` (`hiring-list-roles.response.200.data.publishedAt`; string, required, nullable)
    - format `date-time`
  - `closesAt` (`hiring-list-roles.response.200.data.closesAt`; string, required, nullable)
    - format `date-time`
  - `createdAt` (`hiring-list-roles.response.200.data.createdAt`; string, required)
    - format `date-time`
  - `updatedAt` (`hiring-list-roles.response.200.data.updatedAt`; string, required)
    - format `date-time`
  - `problemSpecs` (`hiring-list-roles.response.200.data.problemSpecs`; array<object>, optional)
    - `id` (`hiring-list-roles.response.200.data.problemSpecs.id`; string, required)
    - `prompt` (`hiring-list-roles.response.200.data.problemSpecs.prompt`; string, required)
    - `orderIndex` (`hiring-list-roles.response.200.data.problemSpecs.orderIndex`; number, required)
    - `successCriteria` (`hiring-list-roles.response.200.data.problemSpecs.successCriteria`; string, optional)
  - `rubric` (`hiring-list-roles.response.200.data.rubric`; object, optional, nullable)
    - `version` (`hiring-list-roles.response.200.data.rubric.version`; number, required)
    - `dimensions` (`hiring-list-roles.response.200.data.rubric.dimensions`; array<object>, required)
      - `id` (`hiring-list-roles.response.200.data.rubric.dimensions.id`; string, required)
      - `name` (`hiring-list-roles.response.200.data.rubric.dimensions.name`; string, required)
      - `weight` (`hiring-list-roles.response.200.data.rubric.dimensions.weight`; number, required)
      - `scaleMin` (`hiring-list-roles.response.200.data.rubric.dimensions.scaleMin`; number, required)
      - `scaleMax` (`hiring-list-roles.response.200.data.rubric.dimensions.scaleMax`; number, required)
      - `description` (`hiring-list-roles.response.200.data.rubric.dimensions.description`; string, optional)
    - `createdAt` (`hiring-list-roles.response.200.data.rubric.createdAt`; string, optional)
  - `entity` (`hiring-list-roles.response.200.data.entity`; object, optional)
    - `id` (`hiring-list-roles.response.200.data.entity.id`; string, required)
      - format `uuid`
    - `name` (`hiring-list-roles.response.200.data.entity.name`; string, required)
    - `slug` (`hiring-list-roles.response.200.data.entity.slug`; string, required)
    - `logoUrl` (`hiring-list-roles.response.200.data.entity.logoUrl`; string, required, nullable)
    - `verified` (`hiring-list-roles.response.200.data.entity.verified`; boolean, required)
- `meta` (`hiring-list-roles.response.200.meta`; object, required)
  - `total` (`hiring-list-roles.response.200.meta.total`; number, required) — Total number of items available
  - `limit` (`hiring-list-roles.response.200.meta.limit`; number, required) — Number of items per page
  - `offset` (`hiring-list-roles.response.200.meta.offset`; number, required) — Number of items skipped
  - `hasMore` (`hiring-list-roles.response.200.meta.hasMore`; boolean, required) — Whether more items are available
  - `page` (`hiring-list-roles.response.200.meta.page`; number, optional) — Current page number
  - `totalPages` (`hiring-list-roles.response.200.meta.totalPages`; number, optional) — Total number of pages

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`hiring-list-roles.response.400.error`; object, required)
  - `code` (`hiring-list-roles.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`hiring-list-roles.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`hiring-list-roles.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`hiring-list-roles.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`hiring-list-roles.response.401.error`; object, required)
  - `code` (`hiring-list-roles.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`hiring-list-roles.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`hiring-list-roles.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`hiring-list-roles.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`hiring-list-roles.response.403.error`; object, required)
  - `code` (`hiring-list-roles.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`hiring-list-roles.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`hiring-list-roles.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`hiring-list-roles.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`hiring-list-roles.response.404.error`; object, required)
  - `code` (`hiring-list-roles.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`hiring-list-roles.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`hiring-list-roles.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`hiring-list-roles.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 409

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`hiring-list-roles.response.409.error`; object, required)
  - `code` (`hiring-list-roles.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`hiring-list-roles.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`hiring-list-roles.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`hiring-list-roles.response.409.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`hiring-list-roles.response.500.error`; object, required)
  - `code` (`hiring-list-roles.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`hiring-list-roles.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`hiring-list-roles.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`hiring-list-roles.response.500.error.traceId`; string, optional) — Unique ID for log correlation

### 503

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`hiring-list-roles.response.503.error`; object, required)
  - `code` (`hiring-list-roles.response.503.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`hiring-list-roles.response.503.error.message`; string, required) — Human-readable error message
  - `details` (`hiring-list-roles.response.503.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`hiring-list-roles.response.503.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/hiring-list-roles/index.md
