Skip to content
OperadeDocs

Search documentation

Type to search documentation.

Documentation
Copy page
Open raw Markdown

Import agent procedures

Extract up to ten free-form procedures from a supported SOP file.

Endpoint

POST/api/v1/workspaces/{workspace_id}/agents/{agent_id}/procedures/import

Authentication

Operation classAuthenticationMinimum roleAPI key
customer-apiBearer API key or dashboard session cookie; dashboard mutations also require X-CX-Request: 1.memberAllowed

Parameters

NameInTypeRequiredDescription
workspace_idpathstringYes—
agent_idpathstringYes—
branch_idquerystring or nullNo—

Request body

multipart/form-data request schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectBody_importAgentProcedures—NoYes——
filestring——NoYes——

Example

cURL
curl --request POST 'https://operade.ai/api/v1/workspaces/ws_demo/agents/agt_demo/procedures/import' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --form 'file=@./example-sop.txt'
Request body JSON
{
  "file": "./example-sop.txt"
}

Responses

StatusDescriptionContent
4XXHandled client errorapplication/json: ErrorResponse
200Successful Responseapplication/json: ProcedureImportResponse

4XX application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectErrorResponse—NoYes——
errorobjectErrorItem—NoYes——
error.codestring——NoYes——
error.detailsobject——NoNo——
error.messagestring——NoYes——

200 application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectProcedureImportResponse—NoYes——
itemsarray<FreeFormProcedure>——NoYes——
items[]objectFreeFormProcedure—NoYes——
items[].contentstring——NoYes——
items[].guardrailsarray<CustomGuardrail>——NoNo——
items[].guardrails[]objectCustomGuardrail—NoYes——
items[].guardrails[].execution_modestring——NoNo"streaming", "blocking"—
items[].guardrails[].history_message_countinteger——NoNo——
items[].guardrails[].idstring——NoYes——
items[].guardrails[].is_enabledboolean——NoNo——
items[].guardrails[].modelstring——NoNo——
items[].guardrails[].namestring——NoNo——
items[].guardrails[].promptstring——NoNo——
items[].guardrails[].trigger_actionobjectTriggerAction—NoNo——
items[].guardrails[].trigger_action.feedbackstring——NoNo——
items[].guardrails[].trigger_action.typestring——NoNo"end_call", "retry"—
items[].idstring——NoYes——
items[].namestring——NoYes——
items[].triggerstring——NoYes——
items[].typestring——NoNo"free_form"—

Response example

Response body JSON
{
  "items": []
}

Errors

Reviewed common and route-declared errors are summarized here; the list is not exhaustive. Start with the distributed error index to find each code's canonical domain page.

StatusCodeDescription
401unauthenticatedAuthentication is missing, invalid, or revoked.
403forbiddenThe authenticated caller does not have access to this operation.
404not_foundThe requested workspace resource was not found.
422validation_failedThe request did not pass field or business validation.
403workspace_not_activatedThe workspace is not active for model-backed configuration work.
On this page
  1. Endpoint
  2. Authentication
  3. Parameters
  4. Request body
  5. multipart/form-data request schema
  6. Example
  7. Responses
  8. 4XX application/json response schema
  9. 200 application/json response schema
  10. Response example
  11. Errors
  12. Related operations