> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create bucket

> Create a new S3 bucket record by specifying its connection details.



## OpenAPI

````yaml post /api/s3/buckets
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/s3/buckets:
    post:
      tags:
        - S3
      summary: Create bucket
      description: Create a new S3 bucket record by specifying its connection details.
      operationId: create_bucket_api_s3_buckets_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBucketRequest'
        required: true
      responses:
        '201':
          description: S3 Bucket created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateBucketResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    CreateBucketRequest:
      properties:
        bucket:
          type: string
          title: Bucket
          description: The unique name of the new S3 bucket.
        endpoint:
          type: string
          title: Endpoint
          description: The endpoint URL for connecting to the S3 service.
        accesskey:
          type: string
          title: Accesskey
          description: Access key for the new S3 bucket.
        secretkey:
          type: string
          title: Secretkey
          description: Secret key for the new S3 bucket.
      type: object
      required:
        - bucket
        - endpoint
        - accesskey
        - secretkey
      title: CreateBucketRequest
    CreateBucketResponse:
      properties:
        bucket:
          type: string
          title: Bucket
          description: The unique name of the created S3 bucket.
        endpoint:
          type: string
          title: Endpoint
          description: The endpoint URL of the created S3 bucket.
        accesskey:
          type: string
          title: Accesskey
          description: Access key for the created S3 bucket.
        secretkey:
          type: string
          title: Secretkey
          description: Secret key for the created S3 bucket.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: S3 bucket creation timestamp.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Timestamp when the S3 bucket was last updated.
      type: object
      required:
        - bucket
        - endpoint
        - accesskey
        - secretkey
        - created_at
        - updated_at
      title: CreateBucketResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````