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

# Create S3 bucket CORS

> Configures Cross-Origin Resource Sharing (CORS) rules for an S3 bucket, allowing web applications from specified domains to access bucket resources directly from browsers.

Deprecated: Use PATCH /v4/`object_storages`/{`storage_id`}/buckets/{`bucket_name`} with {"cors": {"allowed_origins": [...]}} instead.



## OpenAPI

````yaml /api-reference/services_docs_mintlify_enriched/object_storage_api.yaml post /storage/provisioning/v1/storage/{storage_id}/s3/bucket/{bucket_name}/cors
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Object Storage API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: 31c2a314a9bd
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Notifications
  - name: S3-Compatible Storage
  - name: SFTP Storage
  - name: SSHKeys
  - name: Storage
  - name: Storage Locations
  - name: Storage Statistics
paths:
  /storage/provisioning/v1/storage/{storage_id}/s3/bucket/{bucket_name}/cors:
    parameters:
      - name: Accept-Language
        in: header
        required: false
        description: >-
          Preferred language of error texts. Supported: en, fr, de, ru, es, pt,
          zh, ja, ko, tr, az. Anything else, or no header, gives en.
        schema:
          type: string
          maxLength: 256
          example: de-DE,de;q=0.9,en;q=0.8
    post:
      tags:
        - Storage
      summary: Create S3 bucket CORS
      description: >-
        Configures Cross-Origin Resource Sharing (CORS) rules for an S3 bucket,
        allowing web applications from specified domains to access bucket
        resources directly from browsers.


        Deprecated: Use PATCH
        /v4/`object_storages`/{`storage_id`}/buckets/{`bucket_name`} with
        {"cors": {"allowed_origins": [...]}} instead.
      operationId: storageBucketCORSCreateHttp
      parameters:
        - name: storage_id
          in: path
          description: Unique identifier for the storage instance
          required: true
          schema:
            type: integer
            format: int64
        - name: bucket_name
          in: path
          description: Name of the S3 bucket to configure CORS for
          required: true
          schema:
            type: string
      requestBody:
        description: CORS configuration for the bucket
        content:
          application/json:
            schema:
              type: object
              properties:
                allowedOrigins:
                  type: array
                  description: List of allowed origins for CORS requests
                  example:
                    - https://example.com
                    - https://app.example.com
                    - '*'
                  items:
                    type: string
        required: true
      responses:
        '204':
          description: >-
            A SuccessResponse is a response that shows that operations was
            completed successfully
          content: {}
        '400':
          description: ErrResponse
          headers:
            Content-Language:
              description: >-
                Language of the problem text: en, fr, de, ru, es, pt, zh, ja,
                ko, tr or az.
              schema:
                type: string
                enum:
                  - en
                  - fr
                  - de
                  - ru
                  - es
                  - pt
                  - zh
                  - ja
                  - ko
                  - tr
                  - az
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrResponse'
      deprecated: true
components:
  schemas:
    ErrResponse:
      required:
        - detail
        - error
        - request_id
        - status
        - title
        - type
      type: object
      properties:
        context:
          $ref: '#/components/schemas/ErrResponseContext'
        detail:
          type: string
          description: The facts of this occurrence, rendered in the negotiated language.
        error:
          type: string
          description: The legacy error key. Always present, always in English.
        errors:
          type: array
          description: >-
            Field-level items of a validation-error. Only validation-error sends
            them.
          items:
            $ref: '#/components/schemas/ErrResponseError'
        hint:
          type: string
          description: What to do next, rendered in the negotiated language.
        request_id:
          type: string
          description: The X-Request-Id value of the request. Always present.
          example: 8f1c9a2e4d6b4f0e9a1b3c5d7e9f0a1b
        status:
          type: integer
          description: HTTP status actually sent.
          format: int64
        title:
          type: string
          description: Fixed sentence for the type, rendered in the negotiated language.
        trace_id:
          type: string
          description: >-
            The W3C trace ID of the request's span. Absent when the request has
            no valid span.
          example: 4bf92f3577b34da6a3ce929d0e0e4736
        type:
          type: string
          description: Stable error classification; clients branch on it.
          enum:
            - validation-error
            - resource-in-use
            - quota-exceeded
            - not-available
            - unauthorized
            - permission-denied
            - not-found
            - method-not-allowed
            - resource-busy
            - rate-limited
            - internal-server-error
            - service-unavailable
      description: >-
        ErrResponse is an error response in the application/problem+json format
        (RFC 9457), with

        the legacy error key kept next to it.
    ErrResponseContext:
      type: object
      properties:
        allowed_methods:
          type: array
          description: Methods the route allows.
          items:
            type: string
        blocking_count:
          type: integer
          description: How many resources block the operation.
          format: int64
          nullable: true
        blocking_resources:
          type: array
          description: Resources that block the operation.
          nullable: true
          items:
            $ref: '#/components/schemas/ErrResponseResource'
        client_id:
          type: integer
          description: Client identifier.
          format: int64
          nullable: true
        operation:
          type: string
          description: Operation that was denied.
          nullable: true
        project_id:
          type: integer
          description: Project identifier.
          format: int64
          nullable: true
        quotas:
          type: array
          description: Quota items of a quota-exceeded problem.
          items:
            $ref: '#/components/schemas/ErrResponseQuota'
        reason:
          type: string
          description: Why a resource type is not available.
          nullable: true
          enum:
            - region
            - account
            - plan
            - capacity
            - balance
        region_id:
          type: integer
          description: Region identifier. Null when the region is not the reason.
          format: int64
          nullable: true
        resource_id:
          type: string
          description: Resource identifier, always a string.
          nullable: true
          example: '123'
        resource_status:
          type: string
          description: Status of a busy resource.
          nullable: true
        resource_type:
          type: string
          description: Resource type in plural, for example `object_storages`.
          nullable: true
          example: object_storages
        retry_after:
          type: integer
          description: Seconds to wait before retrying.
          format: int64
          nullable: true
      description: >-
        ErrResponseContext is the context object of a problem body. Every
        property is optional: a

        type sends only its own keys, null when unknown.
    ErrResponseError:
      title: ErrResponseError is one item of a validation-error's errors array.
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code, from RFC Appendix D.
          example: missing
        ctx:
          type: object
          additionalProperties: {}
          description: Values the code carries.
        detail:
          type: string
          description: Human-readable description, rendered in the negotiated language.
        loc:
          type: array
          description: Where the error is, from the request.
          example:
            - body
            - name
          items:
            type: string
    ErrResponseResource:
      title: >-
        ErrResponseResource is one resource reference of a resource-in-use
        problem.
      type: object
      properties:
        resource_id:
          type: string
          description: Resource identifier, always a string.
          example: '123'
        resource_name:
          type: string
          description: Resource name. Null when the server does not know it.
          nullable: true
          example: my-storage
        resource_type:
          type: string
          description: Resource type in plural, for example `object_storages`.
          example: object_storages
    ErrResponseQuota:
      title: ErrResponseQuota is one quota item of a quota-exceeded problem.
      type: object
      properties:
        available:
          type: integer
          description: Remaining allowance.
          format: int64
        limit:
          type: integer
          description: Quota limit.
          format: int64
        name:
          type: string
          description: Quota name.
          example: access_keys
        overflow:
          type: integer
          description: Units beyond the limit.
          format: int64
        region_id:
          type: integer
          description: Region identifier. Null when not regional.
          format: int64
          nullable: true
        requested:
          type: integer
          description: Units requested by the call.
          format: int64
        resulting_usage:
          type: integer
          description: Usage after the request.
          format: int64
        scope:
          type: string
          description: Quota scope. Null when not scoped.
          nullable: true
        unit:
          type: string
          description: Quota unit. Null when unitless.
          nullable: true
        usage:
          type: integer
          description: Current usage.
          format: int64
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234_abcdef`
      type: apiKey
      in: header
      name: Authorization

````