Upload a config version
Validates and uploads a new configuration version, returning its
content-addressed versionId. The version is inactive until you call
/v1/deploys/{versionId}/activate.
extract is the declarative configuration (see the schema). hookScript
and extensionScripts carry the bundled code your config references, if
any. Re-uploading identical content returns 409 version_exists — treat it
as success client-side: that response carries the existing versionId
(the id is stable), so activate it the same way you would a new one.
Body·
required
application/json
- Type:extractrequiredProperties: 3
The declarative configuration uploaded by
portal deploy. - Type:extension
Scripts Properties: 4Optional bundled extension scripts, if your config references extensions.
- Type:hook
Script Properties: 2Optional bundled hooks script, if your config references hooks.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for post/v1/deploys
curl https://api.useportal.co/v1/deploys \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"extract": {
"version": "1",
"project": {
"webhooks": {
"url": "https://hooks.example.com/portal"
}
},
"channels": {
"chat-general": {
"mode": "standard",
"anonymous": true,
"hooks": {
"authz": true,
"onPublish": 1,
"notify": false
},
"extensions": {}
}
}
}
}'
The content-addressed version id
{
"versionId": "cfg_3f1a9b2c8d4e6f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a"
}