Tailscale Devices API

The Devices API from Tailscale — 12 operation(s) for devices.

GitHub OpenAPI

Operations 15

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /tailnet/{tailnet}/devices List devices in a tailnet · List devices in a tailnet #
Ask an LLM
“Which devices are connected to my tailnet?”
“Can I see every device in a tailnet by name and IP?”
Tell an agent
List devices in tailnet {tailnet}.
Show all devices of tailnet {tailnet}.
GET /tailnet/{tailnet}/device-attributes List device attributes in a tailnet · List device attributes for a tailnet #
Ask an LLM
“What attributes are set on devices in my tailnet?”
“Can I see device attributes for every node in a tailnet?”
Tell an agent
List device attributes for tailnet {tailnet}.
Show the attributes set on devices in {tailnet}.
GET /device/{deviceId} Get a device · Get a device #
Ask an LLM
“What details are stored for one device?”
“Can I look up a device by its ID?”
Tell an agent
Get device {deviceId}.
Show the record for device {deviceId}.
DELETE /device/{deviceId} Delete a device · Delete a device #
Ask an LLM
“How do I remove a device from my tailnet?”
“Can I delete a device that left the network?”
Tell an agent destructive · confirm first
Delete device {deviceId}.
Remove device {deviceId} from the tailnet.
POST /device/{deviceId}/expire Expire a device's key · Expire a device's key #
Ask an LLM
“How do I revoke a device's key without deleting it?”
“Can I force a device to re-authenticate by expiring its key?”
Tell an agent destructive · confirm first
Expire the key of device {deviceId}.
Revoke device {deviceId} without deleting it.
GET /device/{deviceId}/routes Get a device's routes · Get device routes #
Ask an LLM
“Which routes does a specific device advertise?”
“Can I see the route table of one device?”
Tell an agent
Get the routes of device {deviceId}.
Show device {deviceId}'s advertised routes.
POST /device/{deviceId}/routes Set a device's routes · Set device routes #
Ask an LLM
“How do I change which routes a device advertises?”
“Can I set a device's route table to specific values?”
Tell an agent
Set the routes of device {deviceId}.
Replace device {deviceId}'s route table with these routes.
POST /device/{deviceId}/authorized Authorize a device · Authorize a device #
Ask an LLM
“How do I approve a device that is waiting for authorization?”
“Can I authorize a device so it can join the tailnet?”
Tell an agent
Authorize device {deviceId}.
Approve device {deviceId} so it can join the tailnet.
POST /device/{deviceId}/name Rename a device · Set device name #
Ask an LLM
“How do I change the name shown for a device?”
“Can I rename a device by its ID?”
Tell an agent
Rename device {deviceId}.
Change the name of device {deviceId}.
POST /device/{deviceId}/tags Set device tags · Set device tags #
Ask an LLM
“How do I tag a device for filtering?”
“Can I set tags on a device by its ID?”
Tell an agent
Set tags on device {deviceId}.
Tag device {deviceId} with these labels.
POST /device/{deviceId}/key Rotate a device's key · Update device key #
Ask an LLM
“How do I rotate a device's key?”
“Can I force a device to generate a new key?”
Tell an agent
Rotate the key of device {deviceId}.
Force device {deviceId} to generate a new key.
POST /device/{deviceId}/ip Set a device's IP address · Set device IP #
Ask an LLM
“How do I assign a static IP to a device?”
“Can I set a device's IP address by its ID?”
Tell an agent
Set the IP of device {deviceId}.
Assign a static IP to device {deviceId}.
GET /device/{deviceId}/attributes Get a device's attributes · Get device attributes #
Ask an LLM
“What attributes are set on a device?”
“Can I read a device's attributes by its ID?”
Tell an agent
Get the attributes of device {deviceId}.
Show device {deviceId}'s attributes.
POST /device/{deviceId}/attributes/{attributeKey} Set a device attribute · Set a device attribute #
Ask an LLM
“How do I set a custom attribute on a device?”
“Can I add an attribute to a device by its ID?”
Tell an agent
Set attribute {attributeKey} on device {deviceId}.
Add {attributeKey} to device {deviceId}'s attributes.
DELETE /device/{deviceId}/attributes/{attributeKey} Delete a device attribute · Delete a device attribute #
Ask an LLM
“How do I remove an attribute from a device?”
“Can I delete a single attribute on a device by its ID?”
Tell an agent destructive · confirm first
Delete attribute {attributeKey} from device {deviceId}.
Remove {attributeKey} from device {deviceId}'s attributes.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/tailscale:tailscale-devices-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

tailscale-devices-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tailscale REST Devices API
  description: 'REST API for managing Tailscale tailnets, devices, users, ACL policy, DNS, keys, logging, and user/device invites. Authenticated via HTTP Basic Auth with the API token as the username, Bearer token, or OAuth client credentials with scoped access. Source: https://api.tailscale.com/api/v2 (OpenAPI), https://tailscale.com/api'
  version: '2'
  contact:
    name: Tailscale
    url: https://tailscale.com/api
servers:
- url: https://api.tailscale.com/api/v2
  description: Production
security:
- BearerAuth: []
- BasicAuth: []
tags:
- name: Devices
paths:
  /tailnet/{tailnet}/devices:
    parameters:
    - name: tailnet
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Devices
      summary: List devices in a tailnet
      operationId: listTailnetDevices
      responses:
        '200':
          description: OK
  /tailnet/{tailnet}/device-attributes:
    parameters:
    - name: tailnet
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Devices
      summary: List device attributes for a tailnet
      operationId: listTailnetDeviceAttributes
      responses:
        '200':
          description: OK
  /device/{deviceId}:
    parameters:
    - name: deviceId
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Devices
      summary: Get a device
      operationId: getDevice
      responses:
        '200':
          description: OK
    delete:
      tags:
      - Devices
      summary: Delete a device
      operationId: deleteDevice
      responses:
        '204':
          description: Deleted
  /device/{deviceId}/expire:
    parameters:
    - name: deviceId
      in: path
      required: true
      schema:
        type: string
    post:
      tags:
      - Devices
      summary: Expire a device's key
      operationId: expireDevice
      responses:
        '200':
          description: OK
  /device/{deviceId}/routes:
    parameters:
    - name: deviceId
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Devices
      summary: Get device routes
      operationId: getDeviceRoutes
      responses:
        '200':
          description: OK
    post:
      tags:
      - Devices
      summary: Set device routes
      operationId: setDeviceRoutes
      responses:
        '200':
          description: OK
  /device/{deviceId}/authorized:
    parameters:
    - name: deviceId
      in: path
      required: true
      schema:
        type: string
    post:
      tags:
      - Devices
      summary: Authorize a device
      operationId: authorizeDevice
      responses:
        '200':
          description: OK
  /device/{deviceId}/name:
    parameters:
    - name: deviceId
      in: path
      required: true
      schema:
        type: string
    post:
      tags:
      - Devices
      summary: Set device name
      operationId: setDeviceName
      responses:
        '200':
          description: OK
  /device/{deviceId}/tags:
    parameters:
    - name: deviceId
      in: path
      required: true
      schema:
        type: string
    post:
      tags:
      - Devices
      summary: Set device tags
      operationId: setDeviceTags
      responses:
        '200':
          description: OK
  /device/{deviceId}/key:
    parameters:
    - name: deviceId
      in: path
      required: true
      schema:
        type: string
    post:
      tags:
      - Devices
      summary: Update device key
      operationId: setDeviceKey
      responses:
        '200':
          description: OK
  /device/{deviceId}/ip:
    parameters:
    - name: deviceId
      in: path
      required: true
      schema:
        type: string
    post:
      tags:
      - Devices
      summary: Set device IP
      operationId: setDeviceIp
      responses:
        '200':
          description: OK
  /device/{deviceId}/attributes:
    parameters:
    - name: deviceId
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Devices
      summary: Get device attributes
      operationId: getDeviceAttributes
      responses:
        '200':
          description: OK
  /device/{deviceId}/attributes/{attributeKey}:
    parameters:
    - name: deviceId
      in: path
      required: true
      schema:
        type: string
    - name: attributeKey
      in: path
      required: true
      schema:
        type: string
    post:
      tags:
      - Devices
      summary: Set a device attribute
      operationId: setDeviceAttribute
      responses:
        '200':
          description: OK
    delete:
      tags:
      - Devices
      summary: Delete a device attribute
      operationId: deleteDeviceAttribute
      responses:
        '204':
          description: Deleted
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Tailscale API access token (prefixed "tskey-api-") passed in the Authorization header. Tokens are created in the admin console with 1-90 day expiry, or via OAuth client credentials with scopes.
    BasicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Auth with the access token as the username and an empty password.