Replace text in a Computer Agent workspace file

Replaces the first exact occurrence of text in a customer-created, workspace-relative file. Read the file first and verify it again after editing. Use the agent configuration workflow for agent instructions and settings.

OpenAPI

````yaml post /api/v2/computer/accounts/{targetAccountId}/workspace/edit
openapi: 3.0.0
info:
version: 2.0.0
title: GetVoiceBot API
description: GetVoiceBot API Documentation
servers:
- url: https://api.getvoicebot.com
description: GetVoiceBot Production
variables:
baseUrl:
default: api.getvoicebot.com
description: Production API Root
security: []
tags:
- name: Agents
- name: Inbound Email
description: Control which senders may create inbound email work for an Agent.
- name: Features
description: Inspect capabilities available within an account hierarchy.
- name: Conversation Logs
description: Query conversation activity and calculate account-level metrics.
- name: Computer Agents
description: Set up, configure, inspect, and manage GetVoiceBot Computer Agents.
- name: Computer Agent Sessions
description: View and reset Computer Agent sessions.
- name: Accounts
- name: Agent Templates
description: Create, manage, and apply reusable Agent configurations.
paths:
/api/v2/computer/accounts/{targetAccountId}/workspace/edit:
post:
tags:
- Computer Agents
summary: Replace text in a Computer Agent workspace file
description: >
Replaces the first exact occurrence of text in a customer-created,
workspace-relative file. Read the file first and verify it again after
editing. Use the agent configuration workflow for agent instructions and
settings.
operationId: workspacePostWorkspaceEdit
parameters:
- name: targetAccountId
in: path
required: true
description: ''
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- path
- oldText
- newText
properties:
path:
type: string
description: Workspace-relative file path.
oldText:
type: string
minLength: 1
description: Exact text that must currently exist in the file.
newText:
type: string
description: >-
Replacement text. Use an empty string to remove the matched
text.
responses:
'200':
description: Successful response
security:
- apiKeyAuth: []
components:
securitySchemes:
apiKeyAuth:
type: apiKey
in: query
name: token
description: GetVoiceBot API Token

````