curl --request POST \
--url https://api.getmodus.com/api/v1/scopes/{id}/deploy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'
{
"scope": {
"id": 42,
"slug": "customer-churn-analyzer-a3f",
"name": "Customer Churn Analyzer",
"status": "active",
"orgUuid": "00000000-0000-0000-0000-000000000001",
"hasUnpublishedChanges": false,
"accessConfig": {
"visibility": "shared",
"groupPermissions": {
"group_eng_uuid": {
"use": true,
"manage": false
}
},
"guardrails": [],
"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,
"manageDenial": "needs_group_manage",
"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": {
"expectedOutput": "A 3-bullet summary highlighting churn risk drivers.",
"instructions": [
"Be concise.",
"Always justify the score."
],
"model": "anthropic/claude-sonnet-4.6",
"toolset": {
"web_search": {
"enabled": true
},
"calculator": {
"enabled": true
}
},
"connectionSet": [
{}
],
"contextSelections": [
{}
],
"evaluations": [
{}
],
"interfaces": [
{}
],
"supervisionSubordinateIds": [
"12",
"17"
],
"supervisionSubordinateDescriptions": {
"12": "Reads warehouse facts",
"17": "Drafts the report"
},
"modelSettings": {
"contextWindow": 2
}
},
"deletedAt": null
},
"deployedAt": "2026-05-11T10:00:00.000Z"
}{
"error": {
"code": "BAD_REQUEST",
"status": "INVALID_ARGUMENT",
"message": "Invalid value for query parameter `pageSize`.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "UNAUTHORIZED",
"status": "UNAUTHENTICATED",
"message": "Missing or invalid access token.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "FORBIDDEN",
"status": "PERMISSION_DENIED",
"message": "Missing required scope(s) for this operation.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS",
"info": {
"missing": [
"<required-scope>"
]
}
}
}{
"error": {
"code": "NOT_FOUND",
"status": "NOT_FOUND",
"message": "Resource not found.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "CONFLICT",
"status": "ALREADY_EXISTS",
"message": "A resource with that identifier already exists.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "VALIDATION",
"status": "INVALID_ARGUMENT",
"message": "Updates that would revoke your own access are not allowed.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"status": "INTERNAL",
"message": "An unexpected error occurred.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}Scopes
Deploy a scope
Publishes the scope’s latest draft as the active version. Returns the published scope (with hasUnpublishedChanges=false) and a deployedAt timestamp.
Requires: scopes:write
POST
/
api
/
v1
/
scopes
/
{id}
/
deploy
curl --request POST \
--url https://api.getmodus.com/api/v1/scopes/{id}/deploy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'
{
"scope": {
"id": 42,
"slug": "customer-churn-analyzer-a3f",
"name": "Customer Churn Analyzer",
"status": "active",
"orgUuid": "00000000-0000-0000-0000-000000000001",
"hasUnpublishedChanges": false,
"accessConfig": {
"visibility": "shared",
"groupPermissions": {
"group_eng_uuid": {
"use": true,
"manage": false
}
},
"guardrails": [],
"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,
"manageDenial": "needs_group_manage",
"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": {
"expectedOutput": "A 3-bullet summary highlighting churn risk drivers.",
"instructions": [
"Be concise.",
"Always justify the score."
],
"model": "anthropic/claude-sonnet-4.6",
"toolset": {
"web_search": {
"enabled": true
},
"calculator": {
"enabled": true
}
},
"connectionSet": [
{}
],
"contextSelections": [
{}
],
"evaluations": [
{}
],
"interfaces": [
{}
],
"supervisionSubordinateIds": [
"12",
"17"
],
"supervisionSubordinateDescriptions": {
"12": "Reads warehouse facts",
"17": "Drafts the report"
},
"modelSettings": {
"contextWindow": 2
}
},
"deletedAt": null
},
"deployedAt": "2026-05-11T10:00:00.000Z"
}{
"error": {
"code": "BAD_REQUEST",
"status": "INVALID_ARGUMENT",
"message": "Invalid value for query parameter `pageSize`.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "UNAUTHORIZED",
"status": "UNAUTHENTICATED",
"message": "Missing or invalid access token.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "FORBIDDEN",
"status": "PERMISSION_DENIED",
"message": "Missing required scope(s) for this operation.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS",
"info": {
"missing": [
"<required-scope>"
]
}
}
}{
"error": {
"code": "NOT_FOUND",
"status": "NOT_FOUND",
"message": "Resource not found.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "CONFLICT",
"status": "ALREADY_EXISTS",
"message": "A resource with that identifier already exists.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "VALIDATION",
"status": "INVALID_ARGUMENT",
"message": "Updates that would revoke your own access are not allowed.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"status": "INTERNAL",
"message": "An unexpected error occurred.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}Authorizations
A Modus personal access token (modus_<orgUuid>_<prefix>_<secret>) or an OAuth 2.1 access token, sent as Authorization: Bearer <token>.
Path Parameters
Numeric scope id.
Example:
42
Body
application/json
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:
200Example:
"a1b2c3d4e5f607890123456789abcdef01234567"
⌘I