Skip to main content
POST
/
storage
/
objects
Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os


with Latitudesh(
    bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:

    res = latitudesh.storage.post_storage_objects(data={
        "type": latitudesh_python_sdk.PostStorageObjectsType.OBJECTS,
        "attributes": {
            "project": "proj_6059EqYkOQj8p",
            "name": "my-bucket",
            "region": "DAL",
        },
    })

    # Handle response
    print(res)
{ "data": { "id": "bucket_6VE1Wd37dXnZJ", "type": "object_storages", "attributes": { "name": "my-bucket", "size_in_gb": 0, "created_at": "2026-03-19T15:30:00.000Z", "bucket_name": "my-bucket", "endpoint": "https://s3.latitude.sh", "access_key": [ "AKIAIOSFODNN7EXAMPLE" ], "region": { "id": "DAL", "city": "DAL", "country": "United States" }, "project": { "id": "proj_6059EqYkOQj8p", "name": "My Project", "slug": "my-project", "description": "Project description", "billing_type": "Normal", "billing_method": "Normal", "bandwidth_alert": false, "environment": null, "billing": { "subscription_id": null, "type": "Normal", "method": "Normal" }, "stats": { "databases": 0, "ip_addresses": 0, "prefixes": 0, "servers": 0, "storages": 1, "virtual_machines": 0, "vlans": 0 } }, "team": { "id": "team_lV9Xe2AAK5CbMgGbpPYLskLRXyV", "name": "My Team", "slug": "my-team", "description": "My Team", "address": "123 Main St", "status": "verified", "currency": { "id": "cur_AW6Q2D9lqKLpr", "code": "USD", "name": "US Dollar", "currency_id": null } } } } }

Authorizations

Authorization
string
header
required

Body

application/vnd.api+json
data
object
required

Response

Created

data
object