Browse documentation
Check a deployment before creating it
Asks the refusals only the server knows, without writing anything, so a deploy that would be refused stops before it changes the agent or one of its variables. Requires agents:write. The CLI calls it first; an API that does not have it answers 404 or 405, and the CLI goes on as it did before.
It takes the agent's slug (the agent may not exist yet), the runtime policy the deployment will be created with, and the variables the deploy is about to set, by name and kind. It never takes a value. It judges, in this order, and answers each refusal with the code and message the create call answers it with:
- an archived agent holding the slug:
409, codeconflict; - when the request has
deployingand the workspace has the credential broker on: an agent with secrets in the old format, a secret variable exposed to the sandbox or a secret a credential exchange names,409, codecredentials_migration_required, with a sentence naming each one. The variables sent replace the agent's of the same name; - a credential-exchange secret that will not exist, will not be a secret, will not be exposed to the sandbox or will not allow the exchange host:
400, codeinvalid_request. The variables sent count as set, and so do those the agent already holds; - a sandbox size the workspace's plan leaves out:
403, codepermission_denied, with the plan sentence; - a workspace with its four deployments already queued or building:
429, coderate_limited, withRetry-After.
Before those, when the request names the agent's model: a built-in provider's model the engine's model library no longer includes answers 400, code invalid_request, param model, with a sentence that names a model to choose instead, the settings file in agentFolder to choose it in, and the way to keep it as a custom provider. A model on a provider listed in customProviderIds, on a provider the library does not have, or of an agent with extensions (hasExtensions, which may register any provider) is never refused; azure-openai-responses/<model> is judged as azure/<model>.
200 means none of those would refuse the deploy now. It is not a reservation: another deploy may take the last place before this one creates its deployment, and the create call decides.
/deployments/validateAuthorization
AuthorizationBearer <token>Headers
Salambo-ClientstringWhich published Salambo client sent the request, as cli/<version> or
sdk/<version>. The CLI and SDK send it on every request; a request
without it, or with a value in another shape, is served as usual.
The API refuses a CLI below its minimum supported version with 426.
- maxLength
100
Bodyrequired
Additional properties are not allowed.
agentSlugstringrequiredThe agent the deploy updates, or creates when none has this slug.
- pattern
"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
runtimeConfigobjectrequiredAdditional properties are not allowed.
Show nested schema
sandboxRegionstring- enum
["us","eu"]
sandboxSizestringThe sandbox size. Small unless named; Large is on Business.
- enum
["s","m","l","small","medium","large"]
egressPolicyModestringrequired- enum
["restricted","full-open"]
egressAllowlistarrayrequired- maxItems
100
Show nested schema
credentialExchangesobject- maxProperties
10
Show nested schema
Additional properties are not allowed.
requestobjectrequiredAdditional properties are not allowed.
Show nested schema
hoststringrequiredmethodstringrequired- const
"POST"
pathstringrequired- maxLength
2048
contentTypestringrequired- const
"application/x-www-form-urlencoded"
requiredFieldsobjectrequired- minProperties
1- maxProperties
8
Show nested schema
- maxLength
256
secretFieldsobjectrequired- minProperties
1- maxProperties
4
Show nested schema
- pattern
"^[A-Z][A-Z0-9_]{0,127}$"
responseobjectrequiredAdditional properties are not allowed.
Show nested schema
contentTypestringrequired- const
"application/json"
credentialFieldstringrequiredtokenTypeFieldstringrequiredexpectedTokenTypestringrequired- const
"Bearer"
expiresInFieldstringrequiredaccessobjectrequiredAdditional properties are not allowed.
Show nested schema
allowedHostsarrayrequired- minItems
1- maxItems
25- uniqueItems
true
Show nested schema
workspaceUpgradePolicystringrequired- enum
["automatic","new-run-only"]
otlpEndpointOverridestring | null- format
"uri"
otelIncludeContentOverrideboolean | nullvariablesarrayrequiredThe variables the deploy is about to set. Names and kinds only, never values.
- maxItems
500
Show nested schema
Additional properties are not allowed.
namestringrequired- maxLength
100- pattern
"^[A-Z][A-Z0-9_]*$"
isSecretbooleanrequiredallowedHostsarrayShow nested schema
exposeToarray- minItems
1- default
["runtime","sandbox"]
Show nested schema
- enum
["runtime","sandbox"]
modelobjectThe model the agent's settings name. Absent, the model is not judged.
Additional properties are not allowed.
Show nested schema
providerstringrequired- minLength
1- maxLength
200
modelIdstringrequired- minLength
1- maxLength
200
customProviderIdsarrayThe providers the agent's settings declare; their models are never refused.
- maxItems
100- default
[]
Show nested schema
- minLength
1- maxLength
200
hasExtensionsbooleanWhether the agent has extensions. An extension may register any provider at the Turn, so with one the model is not judged.
- default
false
agentFolderstringThe folder the project keeps its agent in. A refused model's sentence names the settings file in it.
- enum
[".pi",".salambo"]- default
".pi"
deployingbooleanThe request is a deploy's, so an agent with secrets in the old format is refused. A command that only reads the switches leaves it out.
- default
false
Response
Nothing refuses the deploy now
objectstringrequired- const
"deployment.preflight"
okbooleanrequired- const
true
featuresobjectThe deploy features of the caller's workspace, each on or off. A client that does not know a name ignores it; an absent name is off.
Show nested schema
salambo_layoutbooleanThe agent may live in .salambo/ instead of .pi/.
salambo_devbooleanWhether salambo dev is available to the workspace.