---
title: "Lease"
method: POST
path: "/api/v1/runner-jobs/lease"
tags: ["runner-jobs"]
---

# Lease

`POST /api/v1/runner-jobs/lease`

## Query parameters

- `runner_host` 'SELF' | 'ASKUI', required
- `runner_id` string, required
- `workspace_id` string, uuid4, nullable
- `tags` string[]

## Response `200`

Successful Response

- LeaseRunnerJobResponseDto
  - `id` string, required
  - `ack` string, required
  - `status` 'PENDING' | 'RUNNING' | 'PASSED' | 'FAILED' | 'CANCELED' | 'MAX_RETRIES_EXCEEDED', required
  - `visible` string, date-time, required
  - `runner_id` string, required
  - `tries` integer, required
  - `data` LeaseRunnerJobResponseDtoData, required
    - `credentials` LeaseRunnerJobResponseDtoDataCredentials, required
      - `workspace_id` string, required
      - `access_token` string, required
    - `workflows` string[], nullable, required
    - `schedule_results_api_url` string, required
    - `results_api_url` string, required
    - `workflows_api_url` string, required
    - `inference_api_url` string, required
    - `data` object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/askui/apis/askui-workspaces-api.md) · [All operations](https://skmtc.dev/askui/apis/askui-workspaces-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/askui/askui-workspaces-api/revisions/b796c74292ac/schema)
