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

# Update a person activity

> Updates the content of an existing person activity. 
    Supports both plain text and HTML content formats.
    
    - For plain text, the content will be wrapped in a paragraph structure
    - For HTML, the content will be parsed and converted to the appropriate format while preserving formatting
    
    The activity must belong to the authenticated organization and team.



## OpenAPI

````yaml PUT /v0/person-activities/{id}
openapi: 3.1.0
info:
  title: Stardex API (v0)
  version: 0.0.1
  description: Stardex ATS legacy API.
servers:
  - url: https://api.stardex.ai
    description: Production API server
security:
  - bearerAuth: []
tags: []
paths:
  /v0/person-activities/{id}:
    put:
      tags:
        - people
        - activities
      summary: Update a person activity
      description: |-
        Updates the content of an existing person activity. 
            Supports both plain text and HTML content formats.
            
            - For plain text, the content will be wrapped in a paragraph structure
            - For HTML, the content will be parsed and converted to the appropriate format while preserving formatting
            
            The activity must belong to the authenticated organization and team.
      parameters:
        - in: path
          name: id
          required: true
          description: The unique identifier of the activity to update
          schema:
            type: string
          example: 123e4567-e89b-12d3-a456-426614174000
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V0UpdatePersonActivityBody'
            examples:
              plainText:
                summary: Plain Text Update
                value:
                  activity_content: This is a simple text update
                  content_type: text
              htmlContent:
                summary: HTML Content Update
                value:
                  activity_content: >-
                    <p>This is a <strong>formatted</strong> update with
                    <em>styling</em></p>
                  content_type: html
      responses:
        '200':
          description: Activity successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0UpdatePersonActivityResponse'
              example:
                error: null
                data:
                  id: 123e4567-e89b-12d3-a456-426614174000
                  updated_at: '2024-03-15T12:00:00Z'
        '400':
          description: Invalid request parameters or body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0UpdatePersonActivityResponse'
              example:
                error: Invalid content format
                data: null
        '404':
          description: Activity not found or does not belong to the organization/team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0UpdatePersonActivityResponse'
              example:
                error: Activity not found
                data: null
        '500':
          description: Internal server error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0UpdatePersonActivityResponse'
              example:
                error: Internal server error
                data: null
components:
  schemas:
    V0UpdatePersonActivityBody:
      type: object
      properties:
        activity_content:
          type: string
          description: >-
            Content to update the activity with. Can be plain text or HTML
            depending on content_type
          examples:
            - This is plain text content
            - <p>This is <strong>HTML</strong> content</p>
        content_type:
          type: string
          enum:
            - text
            - html
          default: text
          description: >-
            Specifies the format of the provided content. Use "text" for plain
            text or "html" for HTML formatted content
          example: text
      required:
        - activity_content
    V0UpdatePersonActivityResponse:
      type: object
      properties:
        error:
          type:
            - string
            - 'null'
        data:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            updated_at:
              type: string
          required:
            - id
            - updated_at
      required:
        - error
        - data
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authenticate with a Bearer token: API key, OAuth token, or session
        token.

````