Create Storage
API server
https://app.coolify.io/api/v1Create a persistent storage or file storage for a service sub-resource.
Authorization
bearerAuth Go to Keys & Tokens / API tokens and create a new token. Use the token as the bearer token.
In: header
Path Parameters
UUID of the service.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The type of storage.
"persistent" | "file"UUID of the service application or database sub-resource.
Volume name (persistent only, required for persistent).
The container mount path.
File content (file only, optional).
Whether this is a directory mount (file only, default false).
Host path. Required for directory mounts and host file mounts. Optional for file mounts with content (default: inside the resource directory). An absolute path can be anywhere on the host; a relative path is inside the resource directory. A directory or file mount outside the resource directory needs a token with the deploy permission. Coolify never deletes a path outside the resource directory.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.coolify.io/api/v1/services/string/storages" \ -H "Content-Type: application/json" \ -d '{ "type": "persistent", "resource_uuid": "string", "mount_path": "string" }'{}{ "message": "Invalid token."}{ "message": "Unauthenticated."}{ "message": "Resource not found."}{ "message": "Validation error.", "errors": { "name": [ "The name field is required." ], "api_url": [ "The api url field is required.", "The api url format is invalid." ] }}