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

# Update a work item

> Changes one item. The body's type says which: escalation, task, meeting. Send only what should change. Requires write access. This operation can change workspace data or trigger an external side effect; review the request before sending it and do not retry blindly after a timeout.



## OpenAPI

````yaml /openapi.json patch /api/v1/public/work-items/{id}
openapi: 3.1.0
info:
  description: >-
    Customer-facing API for managing outreach, leads, conversations, voice
    agents, knowledge bases, analytics, and webhooks.
  title: Sendora Public API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.sendora.ai
security: []
tags:
  - description: Leads, lead lists, importing, enriching and finding new prospects.
    name: Leads
  - description: Build, run and measure outreach, and enroll leads.
    name: Campaigns
  - description: Read and send messages, and manage who must not be contacted.
    name: Conversations
  - description: >-
      Voice and chat agents, their tools, knowledge bases, voices and website
      widgets.
    name: Agents
  - description: >-
      Start calls, and manage phone numbers, SMS registration, sending accounts
      and email domains.
    name: Calls and numbers
  - description: Webhooks, jobs, analytics and the Copilot assistant.
    name: Platform
  - description: Manage client workspaces, plans and branding.
    name: Agency
paths:
  /api/v1/public/work-items/{id}:
    patch:
      tags:
        - Conversations
      summary: Update a work item
      description: >-
        Changes one item. The body's type says which: escalation, task, meeting.
        Send only what should change. Requires write access. This operation can
        change workspace data or trigger an external side effect; review the
        request before sending it and do not retry blindly after a timeout.
      operationId: update_api_v1_public_work_items__id__patch
      parameters:
        - description: >-
            The item (of the type you read it with)'s id: the `id` from the list
            for this resource.
          in: path
          name: id
          required: true
          schema:
            title: Id
            type: string
        - in: header
          name: X-API-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - in: header
          name: Authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        content:
          application/json:
            schema:
              discriminator:
                mapping:
                  escalation: '#/components/schemas/WorkItemEscalationUpdate'
                  meeting: '#/components/schemas/WorkItemMeetingUpdate'
                  task: '#/components/schemas/WorkItemTaskUpdate'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/WorkItemEscalationUpdate'
                - $ref: '#/components/schemas/WorkItemTaskUpdate'
                - $ref: '#/components/schemas/WorkItemMeetingUpdate'
              title: Body
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '401':
          description: The X-API-Key header is missing, invalid, expired, or revoked.
        '402':
          description: >-
            The workspace is suspended for billing, or the request would exceed
            a plan or usage limit.
        '403':
          description: >-
            The key is valid but lacks the required scope, or the workspace has
            no active plan, lacks the entitlement, or has this feature turned
            off or view-only.
        '404':
          description: >-
            The resource does not exist or is not owned by the authenticated
            workspace.
        '410':
          description: The workspace behind this key has been deleted.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '500':
          description: >-
            An unexpected Sendora error occurred. Retry only if the operation is
            safe to repeat.
        '503':
          description: >-
            An entitlement or billing check is temporarily unavailable. Retry
            after the Retry-After interval.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >-
            curl -X PATCH
            'https://api.sendora.ai/api/v1/public/work-items/YOUR_ID' -H
            "X-API-Key: $SENDORA_API_KEY" -H "Content-Type: application/json" \
              -d '{"status":"acknowledged","type":"example"}'
        - label: Python
          lang: python
          source: >-
            import requests


            url = 'https://api.sendora.ai/api/v1/public/work-items/YOUR_ID'

            headers = {'X-API-Key': '$SENDORA_API_KEY'}

            response = requests.patch(url, headers=headers, json={'status':
            'acknowledged', 'type': 'example'})

            response.raise_for_status()

            print(response.json())
        - label: JavaScript
          lang: javascript
          source: >-
            const response = await
            fetch("https://api.sendora.ai/api/v1/public/work-items/YOUR_ID", {
              method: "PATCH",
              headers: { 'X-API-Key': process.env.SENDORA_API_KEY, 'Content-Type': 'application/json' },
              body: JSON.stringify({"status": "acknowledged", "type": "example"}),
            });

            if (!response.ok) throw new Error(await response.text());

            console.log(await response.json());
        - label: Go
          lang: go
          source: >-
            req, err := http.NewRequest("PATCH",
            "https://api.sendora.ai/api/v1/public/work-items/YOUR_ID",
            bytes.NewBufferString(`{"status": "acknowledged", "type":
            "example"}`))

            if err != nil { log.Fatal(err) }

            req.Header.Set("X-API-Key", os.Getenv("SENDORA_API_KEY"))

            req.Header.Set("Content-Type", "application/json")

            resp, err := http.DefaultClient.Do(req)

            if err != nil { log.Fatal(err) }

            defer resp.Body.Close()
components:
  schemas:
    WorkItemEscalationUpdate:
      properties:
        resolution_type:
          anyOf:
            - enum:
                - retry
                - skip
                - manual
              type: string
            - type: 'null'
          description: Resolution type returned by the Sendora API.
          title: Resolution Type
        status:
          description: Status returned by the Sendora API.
          enum:
            - acknowledged
            - resolved
            - reopened
          title: Status
          type: string
        type:
          const: escalation
          description: 'Must be escalation: this body is for a escalation'
          title: Type
          type: string
      required:
        - status
        - type
      title: WorkItemEscalationUpdate
      type: object
    WorkItemMeetingUpdate:
      properties:
        cancelled_reason:
          anyOf:
            - maxLength: 500
              type: string
            - type: 'null'
          description: Cancelled reason returned by the Sendora API.
          title: Cancelled Reason
        company:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: Company returned by the Sendora API.
          title: Company
        duration_minutes:
          anyOf:
            - maximum: 480
              minimum: 5
              type: integer
            - type: 'null'
          description: Duration minutes returned by the Sendora API.
          title: Duration Minutes
        meeting_link:
          anyOf:
            - maxLength: 500
              type: string
            - type: 'null'
          description: Meeting link returned by the Sendora API.
          title: Meeting Link
        meeting_type:
          anyOf:
            - maxLength: 80
              type: string
            - type: 'null'
          description: Meeting type returned by the Sendora API.
          title: Meeting Type
        notes:
          anyOf:
            - maxLength: 4000
              type: string
            - type: 'null'
          description: Notes returned by the Sendora API.
          title: Notes
        phone:
          anyOf:
            - maxLength: 40
              type: string
            - type: 'null'
          description: Phone returned by the Sendora API.
          title: Phone
        prospect_name:
          anyOf:
            - maxLength: 200
              minLength: 1
              type: string
            - type: 'null'
          description: Prospect name returned by the Sendora API.
          title: Prospect Name
        scheduled_at:
          anyOf:
            - type: string
            - type: 'null'
          description: Scheduled at returned by the Sendora API.
          title: Scheduled At
        status:
          anyOf:
            - enum:
                - confirmed
                - rescheduled
                - cancelled
              type: string
            - type: 'null'
          description: Status returned by the Sendora API.
          title: Status
        type:
          const: meeting
          description: 'Must be meeting: this body is for a meeting'
          title: Type
          type: string
      required:
        - type
      title: WorkItemMeetingUpdate
      type: object
    WorkItemTaskUpdate:
      properties:
        status:
          description: Status returned by the Sendora API.
          enum:
            - open
            - in_progress
            - completed
            - cancelled
          title: Status
          type: string
        type:
          const: task
          description: 'Must be task: this body is for a task'
          title: Type
          type: string
      required:
        - status
        - type
      title: WorkItemTaskUpdate
      type: object
    HTTPValidationError:
      properties:
        detail:
          description: Detail returned by the Sendora API.
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      required: []
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          description: Loc returned by the Sendora API.
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          description: Msg returned by the Sendora API.
          title: Message
          type: string
        type:
          description: Type returned by the Sendora API.
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Customer API key created in the Sendora dashboard.
      in: header
      name: X-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.