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

# Update an event (deprecated)

> Deprecated. Use `PUT /v1/events/{event_id}` instead.




## OpenAPI

````yaml put /events
openapi: 3.0.3
info:
  title: HoneyHive API
  version: 1.0.1
servers:
  - url: https://api.honeyhive.ai
security:
  - BearerAuth: []
paths:
  /events:
    put:
      tags:
        - Events
      summary: Update an event
      operationId: updateEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_id:
                  type: string
                metadata:
                  type: object
                  additionalProperties: true
                feedback:
                  type: object
                  additionalProperties: true
                metrics:
                  type: object
                  additionalProperties: true
                outputs:
                  type: object
                  additionalProperties: true
              required:
                - event_id
            example:
              event_id: 7f22137a-6911-4ed3-bc36-110f1dde6b66
              metadata:
                cost: 0.00008
                completion_tokens: 23
                prompt_tokens: 35
                total_tokens: 58
              feedback:
                rating: 5
              metrics:
                num_words: 2
              outputs:
                role: assistant
                content: Hello world
      responses:
        '200':
          description: Event updated
        '400':
          description: Bad request
      x-codeSamples:
        - lang: python
          label: updateEvent
          source: >-
            import honeyhive

            from honeyhive.models import operations


            s = honeyhive.HoneyHive(
                bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
            )



            res =
            s.events.update_event(request=operations.UpdateEventRequestBody(
                event_id='7f22137a-6911-4ed3-bc36-110f1dde6b66',
                metadata={
                    'cost': 0.00008,
                    'completion_tokens': 23,
                    'prompt_tokens': 35,
                    'total_tokens': 58,
                },
                feedback={
                    'rating': 5,
                },
                metrics={
                    'num_words': 2,
                },
                outputs={
                    'role': 'assistant',
                    'content': 'Hello world',
                },
                config={
                    'template': [
                        {
                            'role': 'system',
                            'content': 'Hello, {{ name }}!',
                        },
                    ],
                },
                user_properties={
                    'user_id': '691b1f94-d38c-4e92-b051-5e03fee9ff86',
                },
                duration=42,
            ))


            if res is not None:
                # handle response
                pass
        - lang: typescript
          label: updateEvent
          source: |-
            import { HoneyHive } from "honeyhive";

            async function run() {
              const sdk = new HoneyHive({
                bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
              });

              const res = await sdk.events.updateEvent({
                eventId: "<value>",
                metadata: {
                  "key": "<value>",
                },
                feedback: {
                  "key": "<value>",
                },
                metrics: {
                  "key": "<value>",
                },
                outputs: {
                  "key": "<value>",
                },
                config: {
                  "key": "<value>",
                },
                userProperties: {
                  "key": "<value>",
                },
              });

              if (res.statusCode == 200) {
                // handle response
              }
            }

            run();
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````