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

# Create a CloudFS filesystem

> Creates a CloudFS filesystem. Provisioning is synchronous — typically a few seconds, up to a few minutes — and the filesystem is returned with status `ready`, together with its S3 bucket and metadata connection details. This response is the only time the filesystem's `meta_token` — and the credential-bearing `meta_url` — are returned; store them securely. If the token is lost, issue a new one with the rotate-meta-token action. Names are unique within your organization: creating with an existing name returns a `422`. Requests are idempotent: retrying with the same `Idempotency-Key` within 24 hours replays the original response instead of creating another filesystem.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/edge-compute.yml post /storage/cloudfs
openapi: 3.1.0
info:
  title: Telnyx Edge Compute API
  version: 2.0.0
  description: API for Edge Compute key-value storage (namespaces and keys).
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /storage/cloudfs:
    post:
      tags:
        - cloudfs filesystems
      summary: Create a CloudFS filesystem
      description: >-
        Creates a CloudFS filesystem. Provisioning is synchronous — typically a
        few seconds, up to a few minutes — and the filesystem is returned with
        status `ready`, together with its S3 bucket and metadata connection
        details. This response is the only time the filesystem's `meta_token` —
        and the credential-bearing `meta_url` — are returned; store them
        securely. If the token is lost, issue a new one with the
        rotate-meta-token action. Names are unique within your organization:
        creating with an existing name returns a `422`. Requests are idempotent:
        retrying with the same `Idempotency-Key` within 24 hours replays the
        original response instead of creating another filesystem.
      operationId: CreateCloudfsFilesystem
      parameters:
        - description: >-
            Unique key that makes the request idempotent (1-255 characters:
            letters, numbers, `_`, and `-`). Retrying with the same key within
            24 hours replays the original response (marked with an
            `Idempotent-Replayed: true` header) instead of repeating the action.
            Reusing a key with a different request returns a `422`; sending a
            key while the original request is still being processed returns a
            `409`.
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            pattern: ^[A-Za-z0-9_-]+$
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCloudfsFilesystemRequest'
        description: CloudFS filesystem creation request
        required: true
      responses:
        '201':
          description: >-
            CloudFS filesystem created successfully. This is the only response
            (besides rotate-meta-token) that includes `meta_token`.
          headers:
            Idempotent-Replayed:
              $ref: '#/components/headers/IdempotentReplayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudfsFilesystemResponseWrapper'
        '400':
          description: >-
            Bad request — malformed JSON, unknown field, or a missing or invalid
            `Idempotency-Key` header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/edge-compute_Errors'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/edge-compute_Errors'
        '409':
          description: >-
            Conflict — a request with this `Idempotency-Key` is still being
            processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/edge-compute_Errors'
        '422':
          description: >-
            Unprocessable entity — missing or invalid `name` or `region`, a
            filesystem with this name already exists for your organization, or
            the `Idempotency-Key` was already used for a different request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/edge-compute_Errors'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const CloudfsFilesystemResponseWrapper = await
            client.storage.cloudfs.create({
              name: 'agent-fs',
              region: 'us-east-1',
            });


            console.log(CloudfsFilesystemResponseWrapper.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            cloudfs_filesystem_response_wrapper = client.storage.cloudfs.create(
                name="agent-fs",
                region="us-east-1",
            )
            print(cloudfs_filesystem_response_wrapper.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcloudf, err := client.Storage.Cloudfs.New(\n\t\tcontext.TODO(),\n\t\ttelnyx.StorageCloudfsNewParams{,\n\t\t\t\tName: telnyx.String(\"agent-fs\"),,\n\t\t\t\tRegion: telnyx.Enumregion,,\n\t\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", cloudf.Data)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

            import com.telnyx.sdk.client.TelnyxClient;
            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    Params params = Params.builder()
                        .name("agent-fs")
                        .region(US_EAST_1)
                        .build();
                    CloudfsFilesystemResponseWrapper response = client.storage()cloudfs()create(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            cloudfs_filesystem_response_wrapper =
            telnyx.storage.cloudfs.create(name: "agent-fs", region:
            :"us-east-1")


            puts(cloudfs_filesystem_response_wrapper)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $cloudfs_filesystem_response_wrapper = $client->storage->cloudfs->create(
                name: 'agent-fs',
                region: 'us-east-1',
              );

              var_dump($cloudfs_filesystem_response_wrapper);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx storage:cloudfs create \
              --api-key 'My API Key' \
              --name agent-fs \
              --region us-east-1
components:
  schemas:
    CreateCloudfsFilesystemRequest:
      type: object
      properties:
        name:
          type: string
          description: >-
            Filesystem name, unique within your organization. Names are trimmed
            and lowercased; after normalization they may contain lowercase
            letters, numbers, `.`, `_`, and `-` only.
          pattern: ^[a-z0-9._-]+$
          minLength: 1
          maxLength: 63
          example: agent-fs
        region:
          type: string
          description: Region where the filesystem's storage and metadata are provisioned.
          enum:
            - us-central-1
            - us-east-1
            - us-west-1
          example: us-east-1
      required:
        - name
        - region
    CloudfsFilesystemResponseWrapper:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CloudfsFilesystem'
    edge-compute_Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/edge-compute_Error'
    GenericErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/edge-compute_Error'
    CloudfsFilesystem:
      type: object
      description: >-
        A CloudFS filesystem, including its metadata credential. This shape is
        returned only by create and rotate-meta-token.
      properties:
        record_type:
          type: string
          example: cloudfs
        id:
          type: string
          format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
        name:
          type: string
          example: agent-fs
        status:
          $ref: '#/components/schemas/CloudfsFilesystemStatus'
        meta_url:
          type: string
          description: >-
            PostgreSQL connection URL for the filesystem's metadata database. In
            create and rotate-meta-token responses it embeds the metadata token
            as the password:
            `postgres://<database>:<meta_token>@us-east-1.telnyxcloudfs.com:5432/<database>?sslmode=require`
            (the example below is shown without the credential; the actual
            response includes it). Pass it to `juicefs mount`: the storage
            configuration is baked in at provisioning, so the metadata URL is
            all a client needs to mount the filesystem.
          example: >-
            postgres://fs_0123456789abcdef@us-east-1.telnyxcloudfs.com:5432/fs_0123456789abcdef?sslmode=require
        meta_token:
          type: string
          description: >-
            Metadata access token, in cleartext. Returned only by create and
            rotate-meta-token and not retrievable afterwards — store it
            securely.
          example: cloudfs_tok_0123456789abcdef0123456789abcdef
        s3_endpoint:
          type: string
          description: URL of the Telnyx Cloud Storage endpoint backing this filesystem.
          example: https://us-east-1.telnyxcloudstorage.com
        s3_bucket:
          type: string
          description: >-
            Name of the bucket that stores this filesystem's data. Created
            during provisioning.
          example: cloudfs-fs-0123456789abcdef
        region:
          type: string
          example: us-east-1
        created_at:
          type: string
          format: date-time
          example: '2026-07-14T21:42:01Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-07-14T21:42:01Z'
    edge-compute_Error:
      type: object
      properties:
        code:
          type: string
          example: '10005'
        detail:
          type: string
          example: The requested function does not exist or you don't have access to it
        meta:
          $ref: '#/components/schemas/ErrorMeta'
        source:
          $ref: '#/components/schemas/ErrorSource'
        title:
          type: string
          example: Function not found
    CloudfsFilesystemStatus:
      type: string
      description: >-
        Lifecycle status of the filesystem. `ready` means it is fully
        provisioned and usable. `needs_format` means the storage bucket and
        metadata database were provisioned but the filesystem has not yet been
        formatted — run `juicefs format` with the filesystem's `meta_url` before
        mounting. `failed` means the last lifecycle action failed — see the
        filesystem's `error` message. `deleted` appears only in the delete
        response: deleted filesystems are excluded from list results and return
        a `404` on retrieval.
      enum:
        - provisioning
        - ready
        - needs_format
        - deleting
        - failed
        - deleted
      example: ready
    ErrorMeta:
      type: object
      properties:
        url:
          type: string
          example: https://docs.telnyx.com/api/errors/10005
    ErrorSource:
      type: object
      properties:
        parameter:
          type: string
          example: id
        pointer:
          type: string
          example: /id
  headers:
    IdempotentReplayed:
      description: >-
        Present with value `true` when Edge replayed a stored successful
        response for the supplied Idempotency-Key. Omitted for first-time
        requests and error responses.
      schema:
        type: boolean
        enum:
          - true
        example: true
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````