> ## Documentation Index
> Fetch the complete documentation index at: https://axiom.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update annotation

> Update annotation



## OpenAPI

````yaml v2 put /annotations/{id}
openapi: 3.0.0
info:
  description: A public and stable API for interacting with axiom services
  title: Axiom
  termsOfService: http://axiom.co/terms
  contact:
    name: Axiom support team
    url: https://axiom.co
    email: hello@axiom.co
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 2.0.0
servers:
  - url: https://api.axiom.co/v2/
security:
  - bearerAuth: []
paths:
  /annotations/{id}:
    put:
      tags:
        - annotations
      description: Update annotation
      operationId: updateAnnotation
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatedAnnotation'
        required: true
      responses:
        '200':
          description: Annotation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Annotation'
      security:
        - Auth:
            - annotations|update
components:
  parameters:
    id:
      description: Unique ID of the annotation
      name: id
      in: path
      required: true
      schema:
        type: string
        pattern: ^ann_
  schemas:
    UpdatedAnnotation:
      type: object
      properties:
        datasets:
          description: >-
            array<string> of dataset names for which the annotation appears on
            charts
          type: array
          items:
            type: string
            minLength: 1
        description:
          description: Explanation of the event the annotation marks on the charts
          type: string
          maxLength: 512
        endTime:
          description: End time of the annotation
          type: string
          format: date-time
        time:
          description: >-
            Time the annotation marks on the charts. If you don't include this
            field, Axiom assigns the time of the API request to the annotation.
          type: string
          format: date-time
        title:
          description: Summary of the annotation that appears on the charts
          type: string
          maxLength: 256
        type:
          description: >-
            Type of the event marked by the annotation. Use only alphanumeric
            characters or hyphens. For example, "production-deployment".
          type: string
          maxLength: 256
          pattern: ^[a-z0-9-]+$
        url:
          description: >-
            URL relevant for the event marked by the annotation. For example,
            link to GitHub pull request.
          type: string
          maxLength: 512
    Annotation:
      type: object
      required:
        - id
        - time
        - datasets
        - type
      properties:
        datasets:
          description: >-
            array<string> of dataset names for which the annotation appears on
            charts
          type: array
          minItems: 1
          items:
            type: string
            minLength: 1
        description:
          description: Explanation of the event the annotation marks on the charts
          type: string
          maxLength: 512
        endTime:
          description: End time of the annotation
          type: string
          format: date-time
          nullable: true
        id:
          $ref: '#/components/schemas/AnnotationID'
        time:
          description: >-
            Time the annotation marks on the charts. If you don't include this
            field, Axiom assigns the time of the API request to the annotation.
          type: string
          format: date-time
        title:
          description: Summary of the annotation that appears on the charts
          type: string
          maxLength: 256
        type:
          description: >-
            Type of the event marked by the annotation. Use only alphanumeric
            characters or hyphens. For example, "production-deployment".
          type: string
          maxLength: 256
          pattern: ^[a-z0-9-]+$
        url:
          description: >-
            URL relevant for the event marked by the annotation. For example,
            link to GitHub pull request.
          type: string
          maxLength: 512
      example:
        datasets:
          - my-dataset
        description: Deploy new feature to the sales form
        endTime: '2024-02-06T11:39:28.382Z'
        id: ann_123
        time: '2024-02-06T10:39:28.382Z'
        title: Production deployment
        type: deploy
        url: https://example.com
    AnnotationID:
      type: string
      x-go-type:
        import:
          package: github.com/axiomhq/axiom/pkg/core/ids
        type: AnnotationID
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate using an API token or personal access token (PAT). Include
        the token as a Bearer token: `Authorization: Bearer <token>`. For more
        information, see [Tokens](/reference/tokens).
    Auth:
      description: >-
        Authenticate using an API token or personal access token (PAT). Include
        the token as a Bearer token: `Authorization: Bearer <token>`. For more
        information, see [Tokens](/reference/tokens).
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          tokenUrl: https://www.googleapis.com/oauth2/v4/token
          scopes: {}

````

Built with [Mintlify](https://mintlify.com).