---
title: "POST Create a one-time download token for a device agent"
description: "Generates and stores a one-time token for downloading a device agent installer. The token expires after 5 minutes."
last_updated: "2026-05-06T07:33:58.717411+00:00"
canonical_url: "https://www.doc0.dev/docs/49c89830-117b-4def-8edc-b5bcc50766e0/api/device-agent/createdownloadtoken"
---

<APIEndpoint
  method={"POST"}
  path={"/api/download-agent/token"}
  summary={"Create a one-time download token for a device agent"}
  description={"Generates and stores a one-time token for downloading a device agent installer. The token expires after 5 minutes."}
  deprecated={false}
  baseUrl={""}
/>

## Request Body

Request body containing organization ID, employee ID, and optionally, the target OS.

<APIRequestBody
  contentType={"application/json"}
  required={true}
  schema={{"type":"object"}}
/>

## Responses

<APIResponse
  statusCode={"200"}
  description={"Successfully created a download token."}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

<APIResponse
  statusCode={"400"}
  description={"Missing orgId or employeeId, or could not determine operating system."}
  contentType={"text/plain"}
  schema={{"type":"string"}}
/>

<APIResponse
  statusCode={"401"}
  description={"Unauthorized. User session not found."}
  contentType={"text/plain"}
  schema={{"type":"string"}}
/>

<APIResponse
  statusCode={"404"}
  description={"Member not found or organization invalid."}
  contentType={"text/plain"}
  schema={{"type":"string"}}
/>

## Try It

<APIPlayground
  method={"POST"}
  path={"/api/download-agent/token"}
  parameters={[]}
  requestBody={{"contentType":"application/json","required":true,"description":"Request body containing organization ID, employee ID, and optionally, the target OS.","schema":{"type":"object"}}}
  baseUrl={""}
/>


## Sitemap

See the full [sitemap](https://www.doc0.dev/docs/49c89830-117b-4def-8edc-b5bcc50766e0/llms.txt) for all pages in this wiki.
