---
agentTools:
  projectIndex: https://teamscope-api.readme.io/llms.txt
---

# Update a device

A sample body payload is shown below.

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"token\":\"$REGISTRATION_ID\"\n}",
      "language": "json"
    }
  ]
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "teamscope-api",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.teamscope.co"
    },
    {
      "url": "http://{{workerurl}}"
    }
  ],
  "tags": [
    {
      "name": "HTTP Signed Requests"
    },
    {
      "name": "Notifications and reminders"
    }
  ],
  "paths": {
    "/device/{deviceId}": {
      "patch": {
        "tags": [
          "Notifications and reminders",
          "HTTP Signed Requests"
        ],
        "summary": "Update a device",
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "description": "The device identifier",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "token": "harari"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 97,
      "1": 113,
      "2": 243,
      "3": 128,
      "4": 253,
      "5": 113,
      "6": 214,
      "7": 0,
      "8": 56,
      "9": 102,
      "10": 1,
      "11": 12
    }
  }
}
```