---
updatedAt: 2026-09-03T15:19:41.000Z
agentTools:
  projectIndex: https://docs.pennsieve.io/llms.txt
---

# Update an annotation

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Pennsieve Swagger",
    "version": "1.0.0",
    "description": "Swagger documentation for the Pennsieve api",
    "termsOfService": "https://docs.pennsieve.io/docs/pennsieve-terms-of-service",
    "contact": {
      "name": "Pennsieve Team",
      "url": "https://docs.pennsieve.io",
      "email": "support@pennsieve.net"
    },
    "license": {
      "name": "All rights reserved",
      "url": "https://docs.pennsieve.io"
    }
  },
  "paths": {
    "/timeseries/{id}/layers/{layerId}/annotations/{annotationId}": {
      "put": {
        "operationId": "updateTimeSeriesAnnotation",
        "summary": "Update an annotation",
        "tags": [
          "TimeSeries"
        ],
        "deprecated": false,
        "parameters": [
          {
            "name": "id",
            "description": "Id of the time series the annotation belongs to",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "layerId",
            "description": "Id of the layer the annotation belongs to",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "annotationId",
            "description": "Id of the annotation to update",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "startAtEpoch",
            "description": "Timestamps in request will be relative to the minimum package time",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeSeriesAnnotationWriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/TimeSeriesAnnotation"
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "//api.pennsieve.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "description": "",
        "name": "api_key",
        "in": "query"
      }
    },
    "schemas": {
      "AnnotationData": {
        "type": "object",
        "properties": {}
      },
      "TimeSeriesAnnotation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "timeSeriesId": {
            "type": "string"
          },
          "channelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "layerId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "start": {
            "type": "integer",
            "format": "int64"
          },
          "end": {
            "type": "integer",
            "format": "int64"
          },
          "data": {
            "$ref": "#/components/schemas/AnnotationData"
          },
          "linkedPackage": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "timeSeriesId",
          "channelIds",
          "layerId",
          "name",
          "label",
          "start",
          "end"
        ]
      },
      "TimeSeriesAnnotationWriteRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "channelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "start": {
            "type": "integer",
            "format": "int64"
          },
          "end": {
            "type": "integer",
            "format": "int64"
          },
          "data": {
            "$ref": "#/components/schemas/AnnotationData"
          },
          "layer_id": {
            "type": "integer",
            "format": "int32"
          },
          "linkedPackage": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "channelIds",
          "label",
          "start",
          "end"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```