Tailscale Devices API

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

Operations 15

GET /tailnet/{tailnet}/devices List devices in a tailnet #
GET /tailnet/{tailnet}/device-attributes List device attributes for a tailnet #
GET /device/{deviceId} Get a device #
DELETE /device/{deviceId} Delete a device #
POST /device/{deviceId}/expire Expire a device's key #
GET /device/{deviceId}/routes Get device routes #
POST /device/{deviceId}/routes Set device routes #
POST /device/{deviceId}/authorized Authorize a device #
POST /device/{deviceId}/name Set device name #
POST /device/{deviceId}/tags Set device tags #
POST /device/{deviceId}/key Update device key #
POST /device/{deviceId}/ip Set device IP #
GET /device/{deviceId}/attributes Get device attributes #
POST /device/{deviceId}/attributes/{attributeKey} Set a device attribute #
DELETE /device/{deviceId}/attributes/{attributeKey} Delete a device attribute #

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-devices-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. 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.