---
title: "PATCH /backlog/agent-space/{agentSpaceId}/goals/{goalId}"
method: PATCH
path: "/backlog/agent-space/{agentSpaceId}/goals/{goalId}"
---

# PATCH /backlog/agent-space/{agentSpaceId}/goals/{goalId}

`PATCH /backlog/agent-space/{agentSpaceId}/goals/{goalId}`

Update an existing goal

## Path parameters

- `agentSpaceId` string, required — Unique identifier for an agent space (allows alphanumeric characters and hyphens; 1-64 characters)
- `goalId` string, required

## Request body

- object
  - `evaluationSchedule` object — Schedule configuration for updating goal evaluations
    - `state` 'ENABLED' | 'DISABLED' — Whether the schedule is enabled or disabled
  - `clientToken` string — Client-provided token for idempotent operations

## Response `200`

Success

- UpdateGoalResponse — Response structure containing the updated goal
  - `goal` object, required — The updated goal object
    - `agentSpaceArn` string, required — The unique identifier for the agent space containing this goal
    - `goalId` string, required — The unique identifier for this goal
    - `title` string, required — The title of the goal
    - `content` object, required — Content of the goal
      - `description` string, required — A detailed description of the goal.
      - `objectives` string, required — The objectives to be achieved for this goal.
    - `status` 'ACTIVE' | 'PAUSED' | 'COMPLETE', required — Current status of the goal itself
    - `goalType` 'CUSTOMER_DEFINED' | 'ONCALL_REPORT', required — Type of goal based on its origin
    - `createdAt` string, date-time, required — Timestamp when this goal was created
    - `updatedAt` string, date-time, required — Timestamp when this goal was last updated
    - `lastEvaluatedAt` string, date-time — Timestamp when the goal was last evaluated
    - `lastTaskId` string — ID of the most recent task associated with this goal
    - `lastSuccessfulTaskId` string — ID of the most recent successful task associated with this goal
    - `version` integer, required — Version number for optimistic locking
    - `evaluationSchedule` object — Goal Schedule. Allows to schedule the goal to run periodically, as well as disable a goal temporarily
      - `state` 'ENABLED' | 'DISABLED', required — Whether the schedule is enabled or disabled
      - `expression` string — Schedule expression (e.g., 'rate(7 days)')

## Other responses

- `480` — ValidationException
- `481` — ContentSizeExceededException
- `482` — ServiceQuotaExceededException
- `483` — ConflictException
- `484` — InternalServerException
- `485` — AccessDeniedException
- `486` — ResourceNotFoundException
- `487` — ThrottlingException
- `488` — InvalidParameterException

---

[API](https://skmtc.net/aws/apis/devops-agent.md) · [All operations](https://skmtc.net/aws/apis/devops-agent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/devops-agent/versions/ca2af02d3853/schema)
