Skip to main content

Change AI Agent Status

Used to change the operational status of an AI agent (e.g., active, inactive, paused, archived). This controls whether the agent is currently available for use.

API Endpoint

PropertyValue
Request MethodPOST
Request URLhttps://api.seliseblocks.com/agents/change-status

Request

Request Example

curl -X POST 'https://api.seliseblocks.com/agents/change-status' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"is_disabled": false,
"is_archived": false,
"project_key": "YOUR_PROJECT_KEY"
}'

Request Headers

FieldTypeRequiredDescription
acceptstringYesAccepted response format. Use application/json
Content-Typeapplication/jsonYesData type, must be application/json.

Request Body

Request Body Schema

{
"agent_id": "string",
"is_disabled": true,
"is_archived": true,
"project_key": "string"
}

Request Body Parameters

FieldTypeRequiredDescription
agent_idstringYesUnique identifier of the agent whose status is being changed.
is_disabledbooleanYesWhether the agent should be disabled (inactive) or enabled (active).
is_archivedbooleanYesWhether the agent should be archived.
project_keystringYesThe project key for your project.
note
  • Setting is_disabled to true will make the agent inactive and unavailable for use.
  • Setting is_archived to true will archive the agent, typically used for agents no longer in active use.
  • An agent can be both disabled and archived simultaneously.

Response

Success Response (200 OK)

Returns an object containing the status change result.

{
"is_success": true,
"item_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"detail": "Agent status updated successfully",
"error": {}
}

Response Fields

FieldTypeDescription
is_successbooleanIndicates whether the status change was successful.
item_idstringUnique identifier for the updated agent.
detailstringSuccess or failure message with additional context.
errorobjectError details if the operation failed (empty if successful).

Error Response (422 Unprocessable Entity)

Returns validation error details when the request body is invalid.

{
"detail": [
{
"loc": [
"body",
"agent_id"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}

Error Response Fields

FieldTypeDescription
detailarrayArray of validation error objects.
locarrayLocation of the error in the request (e.g., body field).
msgstringHuman-readable error message.
typestringError type identifier.

Error Codes

Status CodeDescriptionResponse Type
200Successful ResponseSuccess
422Validation Error - Invalid request parametersUnprocessable Entity