Skip to main content
POST
/
api
/
v1
/
agents
/
{id}
/
deploy
curl --request POST \
  --url https://api.staging.getmodus.com/api/v1/agents/{id}/deploy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "agent": {
    "id": 42,
    "slug": "customer-churn-agent-a3f",
    "name": "Customer Churn Analyzer",
    "status": "active",
    "type": "task",
    "orgUuid": "00000000-0000-0000-0000-000000000001",
    "hasUnpublishedChanges": false,
    "isEnabled": true,
    "accessConfig": {
      "visibility": "shared",
      "groupPermissions": {
        "group_eng_uuid": {
          "use": true,
          "manage": false
        }
      },
      "sharedWith": [],
      "ownerUserId": "user_2abc",
      "ownerEmail": "alice@example.com"
    },
    "createdAt": "2026-05-01T10:00:00.000Z",
    "updatedAt": "2026-05-11T10:00:00.000Z",
    "canManage": true,
    "canUse": true,
    "description": "Predicts churn risk for a customer given a 90-day usage window.",
    "activeVariationId": "00000000-0000-4000-a000-000000000100",
    "draftVariationId": "00000000-0000-4000-a000-000000000101",
    "pendingOwnershipTransfer": {
      "pendingOwnerUserId": "user_2abc123def456",
      "requestedByUserId": "user_2xyz789ghi012",
      "requestedAt": "2026-06-05T12:00:00.000Z",
      "pendingOwnerEmail": "newowner@example.com"
    },
    "variation": {
      "trigger": {},
      "workflowStructure": {},
      "agentSelection": {}
    },
    "deletedAt": null
  },
  "deployedAt": "2026-05-11T10:00:00.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
number
required

Numeric agent id.

Example:

42

Body

application/json
expectedMainShaOverride
string

SHA the SPA last saw the remote file at; lets the user force-push past a previous drift by acknowledging the version they are overwriting. Empty string is treated as absent.

Maximum string length: 200
Example:

"a1b2c3d4e5f607890123456789abcdef01234567"

Response

agent
object
required

The agent after the deploy. hasUnpublishedChanges is false and activeVariationId matches the newly-published variation.

deployedAt
string
required

Server-side timestamp at which the deploy completed.

Example:

"2026-05-11T10:00:00.000Z"