Smart Agent Teams
EndpointsRoutines

Update Routine

Update a routine; only fields present in the body are changed. A new `agent_id` or `project_id` must belong to this company (404 `NOT_FOUND` otherwise). Publishes `routine.updated` when something changed.

PATCH
/api/companies/{company_id}/routines/{routine_id}

Update a routine; only fields present in the body are changed.

A new agent_id or project_id must belong to this company (404 NOT_FOUND otherwise). Publishes routine.updated when something changed.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

routine_id*Routine Id
Formatuuid
company_id*Company Id
Formatuuid

Request Body

application/json
  1. body
agent_id?|null
cron?|null
description?string|null
enabled?boolean|null
project_id?|null
title?|null

Response Body

Successful Response

application/json
  1. response
agent_id*Agent Id
Formatuuid
created_at*|null
cron*Cron
description*string|null
enabled*Enabled
id*Id
Formatuuid
last_run_at*|null
project_id*|null
title*Title
curl -X PATCH "https://example.com/api/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/routines/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",  "created_at": "2019-08-24T14:15:22Z",  "cron": "string",  "description": "string",  "enabled": true,  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "last_run_at": "2019-08-24T14:15:22Z",  "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",  "title": "string"}