---
title: "Create Token"
method: POST
path: "/scanning-agents/{id}/generate/"
tags: ["Scanning Agents"]
---

# Create Token

`POST /scanning-agents/{id}/generate/`

## Path parameters

- `id` string, required

## Request body

- ScanningAgent — Return serializer_class with all fields as read_only except key. The key is the field use to retrieve the object in `to_internal_value`. This is for the drf-spectacular documentation generation.
  - `id` string
  - `name` string, required
  - `installer_generated` boolean, required
  - `online` boolean, required
  - `fallback` boolean, required
  - `rx_bytes` integer, required
  - `tx_bytes` integer, required
  - `latest_handshake` integer, required

## Response `200`

- object
  - `token` string

## Other responses

- `400`
- `401`
- `404`
- `500`

---

[API](https://skmtc.net/probely/apis/snyk-api-web-s-api-reference-documentation.md) · [All operations](https://skmtc.net/probely/apis/snyk-api-web-s-api-reference-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/probely/snyk-api-web-s-api-reference-documentation/versions/e29879bff01b/schema)
