Skip to content

Make sure a folder exists

PUT
/assets/management/v1/folders/ensure
curl --request PUT \
--url https://api.ebitex.io/assets/management/v1/folders/ensure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "path": "example" }'

Takes a path such as Website/Screenshots and creates whichever folders along it are missing, returning the id of the last one. Calling it again with the same path changes nothing. A path is 1 to 8 names of at most 200 characters, separated by /.

Key: an Assets management key with assets.management.write.

Media typeapplication/json
object
path
required
null | string
Examplegenerated
{
"path": "example"
}

OK

validation_failed: the path is empty, too deep, or has a name that is too long.

missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.

payment_required: the organization’s subscription needs attention.

scope_denied: the key is not an Assets management key. permission_denied: a read key was used for a write. app_not_available: Assets is not enabled for the organization. origin_denied or ip_denied: the key was used from an origin or address outside its restrictions.

too_many_failed_authentications: too many bad keys from this address; rate_limited: too many requests from the organization. Retry-After says how long to wait.