You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: platform/smallstep-api.mdx
+20-29Lines changed: 20 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,28 @@
1
1
---
2
+
updated_at: June 18, 2025
2
3
title: Smallstep API
3
4
html_title: Smallstep API
4
5
description: The Smallstep platform is used across security, IT, and DevOps teams to enable end-to-end network encryption, privileged access management, passwordless authentication, and much more.
5
6
---
6
7
7
-
With the Smallstep API, you can:
8
+
With the Smallstep API, you can manage:
8
9
9
-
-Register new devices in your Smallstep inventory
10
-
-Manage your high-level protected resources, such as Wi-Fi or VPN configurations
11
-
-Manage low-level resources like X.509 CAs, Attestation authorities, and provisioners
12
-
-Manage hosts, host grants, and tags for [Smallstep SSH](../ssh/README.mdx)
10
+
-Devices in your Smallstep inventory
11
+
-High-level protected resources, such as Wi-Fi or VPN configurations
12
+
-Lower-level PKI resources like X.509 CAs and provisioners
13
+
-[Smallstep SSH](../ssh/README.mdx)hosts, host grants, and tags (use the [2023-11-01](https://gateway.smallstep.com/v2023-11-01) API version for this)
13
14
- And more!
14
15
15
16
The Smallstep API is [OpenAPI conformant](https://www.openapis.org/), with JSON requests and responses.
16
17
17
18
### Smallstep API Setup and Usage
18
19
19
-
👉 [Smallstep API Specification and Playground](https://gateway.smallstep.com)
20
+
👉 [Smallstep API Specification and Playground](https://gateway.smallstep.com/v2025-01-01)
20
21
21
22
You can get an API token in two ways:
22
-
-**Long-term token**: In your [Smallstep settings](https://smallstep.com/app?next=/settings). Under **API Tokens**, choose **+ Add Token.** This token has a 10 year validity period and will only be displayed once. Please store it in a safe place!
23
-
-**Short-term token**: On the command line, using the [`step` CLI](../step-cli/README.mdx). The [`step api token create`](../step-cli/reference/api/token/create/README.mdx) command accepts a client certificate and private key to authenticate with Smallstep and issue a temporary API token with a 1 hour validity period.
24
-
To use this option, you must configure a trusted root CA in your [Smallstep settings](https://smallstep.com/app?next=/settings). The trusted root can be a Smallstep CA or an external CA. Only one trusted root CA may be configured.
23
+
-**Smallstep UI**: [Add a token in Smallstep settings](https://smallstep.com/app/?next=/settings/api/tokens/add). You can choose the validity period and scopes here.
24
+
-**Command Line**: On the command line, using the [`step` CLI](../step-cli/README.mdx). The [`step api token create`](../step-cli/reference/api/token/create/README.mdx) command accepts a client certificate and private key to authenticate with Smallstep and issue a temporary API token with a 1 hour validity period.
25
+
To use this option, you must [configure one or more trusted root CAs in the Smallstep UI](https://smallstep.com/app/?next=/settings/api/trusted-roots/edit). Trusted roots can be Smallstep CAs or external CAs.
25
26
26
27
### API Clients
27
28
@@ -36,34 +37,24 @@ Devices added via API are automatically approved.
36
37
but they will not be marked as high-assurance
37
38
until Smallstep receives an attestation from the device.
38
39
39
-
For each device, use the [Save Collection Instance](https://gateway.smallstep.com/v2023-11-01/operations/PutCollectionInstance) endpoint to create a device.
40
-
- For the `collectionSlug`, use `default`
41
-
- For Apple devices, the `instanceID` must be the device's serial number.
42
-
- For TPM 2.0 devices, the `instanceID` must be the TPM Endorsement Key URI, in the format `urn:ek:sha256:ul3sYf6uQ6jVEXAMPLEXoAuHI10U8gTvEJ6bMj95LXI=`. (You can retrieve the EK URI by running `step agent tpm --fingerprint` on the device.)
43
-
44
-
For the body of the request,
45
-
create a user using the following value
46
-
(replacing `[email protected]` with the device owner's email address):
Use the [Add Device](https://gateway.smallstep.com/v2025-01-01/operations/PostDevices) endpoint to create a device.
41
+
- For Apple devices, the `permanentIdentifier` must be the device's 9-character serial number.
42
+
- For TPM 2.0 devices, the `permanentIdentifier` must be the TPM Endorsement Key URI, in the format `urn:ek:sha256:ul3sYf6uQ6jVEXAMPLEXoAuHI10U8gTvEJ6bMj95LXI=`. (You can retrieve the EK URI by running `step agent tpm --fingerprint` on the device.)
43
+
- To create and assign a user to a device, fill in the `user` fields.
56
44
57
45
Once added,
58
46
the devices will be automatically approved.
59
47
60
-
You can see the device using the [ListCollectionInstances](https://gateway.smallstep.com/v2023-11-01/operations/ListCollectionInstances) endpoint:
48
+
You can see the device using the [List Devices](https://gateway.smallstep.com/v2025-01-01/operations/ListDevices) endpoint:
0 commit comments