AgentScheduleService
Agent Schedules

Update a schedule

Updates a schedule for an agent

patch/v1/workspaces/{workspaceId}/agents/{agentId}/schedules/{id}

Path parameters

workspaceIdstring required
Example:workspace_01HXKD2E5NQM3T9AYWCF133E3Q

Workspace ID.

agentIdstring required
Example:agent_01HXKD2E5NQM3T9AYWCFMGWT9Y

Agent ID. Accepts the canonical agent_… form or the external_id:<value> form.

idstring required
Example:as_01HXKD2E5NQM3T9AYWCFMZZZBD

Schedule ID. Accepts the canonical as_… form or the external_id:<value> form.

Request body

workspaceIdstring

Workspace ID.

agentIdstring

Agent ID. Accepts the canonical agent_… form or the external_id:<value> form.

idstring

Schedule ID. Accepts the canonical as_… form or the external_id:<value> form.

updateMaskstring field-mask

Fields to update.

Example request

{
  "workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
  "agentId": "agent_01HXKD2E5NQM3T9AYWCFMGWT9Y",
  "id": "as_01HXKD2E5NQM3T9AYWCFMZZZBD",
  "spec": {
    "variationId": "agentvar_01HXKD2E5NQM3T9AYWCF32BSPP"
  }
}

Response

OK

state'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_PAUSED' | 'STATE_ARCHIVED' enum required

The current lifecycle state of the schedule. Output only. Schedules are created STATE_ACTIVE; use the :pause, :resume, and :archive actions to transition between states.

Example response

{
  "metadata": {
    "accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
    "workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
    "profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
  },
  "spec": {
    "variationId": "agentvar_01HXKD2E5NQM3T9AYWCF32BSPP"
  },
  "info": {
    "lastObjectiveId": "obj_01HXKD2E5NQM3T9AYWCFQAZGFV",
    "createdBy": {
      "metadata": {
        "accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
        "profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
      }
    }
  }
}

Changes

Changed in 5 of the 57 revisions of this API.11112

    • removed the request property spec/data

      request-property-removed

    • removed the request property spec/initialMessage

      request-property-removed

    • removed the request property spec/userData

      request-property-removed

    • removed the optional property spec/data from the response with the 200 status

      response-optional-property-removed

    • removed the optional property spec/initialMessage from the response with the 200 status

      response-optional-property-removed

    • removed the optional property spec/userData from the response with the 200 status

      response-optional-property-removed

    • added the new optional request property spec/firstUserMessage

      new-optional-request-property

    • added the new optional request property spec/firstUserMessageData

      new-optional-request-property

    • added the new optional request property spec/systemPromptData

      new-optional-request-property

    • added the optional property spec/firstUserMessage to the response with the 200 status

      response-optional-property-added

    • added the optional property spec/firstUserMessageData to the response with the 200 status

      response-optional-property-added

    • added the optional property spec/systemPromptData to the response with the 200 status

      response-optional-property-added

    • removed the request property metadata/bundleKey

      request-property-removed

    • removed the optional property metadata/bundleKey from the response with the 200 status

      response-optional-property-removed

    • added the optional property info/createdBy/metadata/createdAt to the response with the 200 status

      response-optional-property-added

    This revision also has 27 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • d2d65c2665bd13See the full diff
    • the response property spec/initialMessage became optional for the status 200

      response-property-became-optional

    • added the new optional request property spec/userData

      new-optional-request-property

    • the request property spec/initialMessage became optional

      request-property-became-optional

    • added the optional property spec/userData to the response with the 200 status

      response-optional-property-added

    • removed the request property spec/status

      request-property-removed

    • removed the optional property spec/status from the response with the 200 status

      response-optional-property-removed

    • added the optional property metadata/updatedAt to the response with the 200 status

      response-optional-property-added

    • added the required property state to the response with the 200 status

      response-required-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new PROFILE_TYPE_UNSPECIFIED enum value to the info/createdBy/spec/type response property for the response status 200

      response-property-enum-value-added