API documentation
    API documentation
    • Back to home
    • Bucket
    • Create
      POST
    • Update
      PUT
    • Delete
      DELETE
    • Check size
      GET

      Create

      POST
      https://api.everabyte.io/api/buckets/create
      This endpoint creates a new bucket within a specified data hub.
      Endpoint: /bucket/create
      Method: POST
      Request Body Parameters:
      {
        "datacenterId": "idsmjz8hspfvgatfrece4gtl",
        "name": "Data"
      }
      datacenterId (required, string): The ID of the datacenter where the bucket will be created. Example: idsmjz8hspfvgatfrece4gtl
      name (optional, string): The name of the bucket to be created. Example: Data
      Example Request:
      POST /bucket/create
      Content-Type: application/json
      
      {
        "datacenterId": "idsmjz8hspfvgatfrece4gtl",
        "name": "MyNewBucket"
      }
      This request creates a new bucket named "MyNewBucket" within the data hub with the ID idsmjz8hspfvgatfrece4gtl.
      Response Codes:
      201 Created: Bucket successfully created. The response body might include details of the created bucket (e.g., its ID).
      400 Bad Request: Invalid request body (e.g., missing required fields, invalid datacenterId or name).
      404 Not Found: Data hub with the given ID not found.
      409 Conflict: A bucket with the same name already exists within the specified data hub.
      500 Internal Server Error: Server error.

      Request

      Authorization
      Provide your bearer token in the
      Authorization
      header when making requests to protected resources.
      Example:
      Authorization: Bearer ********************
      Body Params application/json

      Example
      {
          "datacenterId": "askgxz5v57zehu303kf7agex",
          "name": "Data"
      }

      Request Code Samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://api.everabyte.io/api/buckets/create' \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "datacenterId": "askgxz5v57zehu303kf7agex",
          "name": "Data"
      }'

      Responses

      🟢200Create
      application/json
      Body

      Examples
      {
          "status": 201,
          "message": "Bucket success created",
          "data": {
              "id": "c0awv0oseisvm83lru953k12",
              "code": "buc-1209-rlazyu2m",
              "name": "Data",
              "isDelete": false,
              "createdAt": "2024-12-09T21:18:26.371Z",
              "updatedAt": "2024-12-09T21:18:26.371Z",
              "deletedAt": null
          }
      }
      🟠400Bad Request
      Modified at 2025-09-12 18:07:06
      Next
      Update
      Built with