---
title: "Retry provisioning a hosted agent on the hosting runtime"
method: POST
path: "/api/v1/agents/{id}/retry_hosting"
tags: ["Agents"]
---

# Retry provisioning a hosted agent on the hosting runtime

`POST /api/v1/agents/{id}/retry_hosting`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/agents/{id}/retry_hosting`
- Auth: API key in header `api-key`

Owner/root-owner only. Two cases: never provisioned (the runtime was unreachable at creation) tries the full provisioning call again, rotating the agent's api-key to hand the runtime a fresh one (safe -- a still-pending agent's key was never handed to anything else); already provisioned but the key never landed (the browser closed before the upload finished) mints a fresh one-time upload link for the SAME runtime agent, without touching its bound api-key.

## Path parameters

- `id` string, required

## Response `200`

OK.

- object
  - `hosting` string
  - `runtime_agent_id` string
  - `upload_token` string
  - `upload_url` string

## Other responses

- `401`: Missing or invalid credentials.
- `403`: Forbidden -- not this agent's owner or root owner.
- `422`: This agent isn't hosted by Salt, or hosting isn't configured in this environment.
- `503`: Couldn't reach the hosting runtime.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
