> ## 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 User Bundles

> Creates multiple user bundles for the user.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/bundles.yml post /bundle_pricing/user_bundles/bulk
openapi: 3.1.0
info:
  title: Telnyx Bundles API
  version: 2.0.0
  description: API for Bundles.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /bundle_pricing/user_bundles/bulk:
    post:
      tags:
        - User Bundles
      summary: Create User Bundles
      description: Creates multiple user bundles for the user.
      operationId: CreateUserBundlesBulk
      parameters:
        - $ref: '#/components/parameters/AuthorizationBearer'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserBundlesBulkRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedUserBundlesResponse'
        '400':
          $ref: '#/components/responses/bundle-pricing_BadRequestErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedErrorResponse'
        '404':
          $ref: '#/components/responses/bundle-pricing_NotFoundErrorResponse'
        '422':
          $ref: >-
            #/components/responses/bundle-pricing_UnprocessableEntityErrorResponse
        default:
          $ref: '#/components/responses/bundle-pricing_GenericErrorResponse'
      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 userBundle = await client.bundlePricing.userBundles.create();

            console.log(userBundle.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
            )
            user_bundle = client.bundle_pricing.user_bundles.create()
            print(user_bundle.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\tuserBundle, err := client.BundlePricing.UserBundles.New(context.TODO(), telnyx.BundlePricingUserBundleNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", userBundle.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

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

            import
            com.telnyx.sdk.models.bundlepricing.userbundles.UserBundleCreateParams;

            import
            com.telnyx.sdk.models.bundlepricing.userbundles.UserBundleCreateResponse;


            public final class Main {
                private Main() {}

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

                    UserBundleCreateResponse userBundle = client.bundlePricing().userBundles().create();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            user_bundle = telnyx.bundle_pricing.user_bundles.create

            puts(user_bundle)
        - lang: CLI
          source: |-
            telnyx bundle-pricing:user-bundles create \
              --api-key 'My API Key'
components:
  parameters:
    AuthorizationBearer:
      name: authorization_bearer
      in: header
      schema:
        type: string
        description: Authenticates the request with your Telnyx API V2 KEY
      description: 'Format: Bearer <TOKEN>'
  schemas:
    CreateUserBundlesBulkRequest:
      properties:
        idempotency_key:
          type: string
          format: uuid
          example: 12ade33a-21c0-473b-b055-b3c836e1c292
          description: >-
            Idempotency key for the request. Can be any UUID, but should always
            be unique for each request.
        items:
          type: array
          items:
            type: object
            properties:
              billing_bundle_id:
                type: string
                format: uuid
                example: 12ade33a-21c0-473b-b055-b3c836e1c292
                description: Quantity of user bundles to order.
              quantity:
                type: integer
                description: Quantity of user bundles to order.
            required:
              - billing_bundle_id
              - quantity
          writeOnly: true
      type: object
    CreatedUserBundlesResponse:
      title: CreatedUserBundlesResponse
      required:
        - data
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/UserBundle'
    UserBundle:
      type: object
      required:
        - id
        - active
        - user_id
        - created_at
        - billing_bundle
        - resources
      properties:
        id:
          type: string
          format: uuid
          example: ca1d2263-d1f1-43ac-ba53-248e7a4bb26a
          description: >-
            User bundle's ID, this is used to identify the user bundle in the
            API.
        active:
          type: boolean
          example: true
          description: Status of the user bundle.
        user_id:
          type: string
          format: uuid
          example: 16856d8c-cd59-4b08-9ac2-1ebb01d419e1
          description: The customer's ID that owns this user bundle.
        created_at:
          type: string
          format: date
          example: '2025-01-20'
          description: Date the user bundle was created.
        updated_at:
          type:
            - string
            - 'null'
          format: date
          example: '2025-01-20'
          description: Date the user bundle was last updated.
        billing_bundle:
          $ref: '#/components/schemas/BillingBundleSummary'
        resources:
          type: array
          items:
            $ref: '#/components/schemas/UserBundleResourceSchema'
          example: []
    BillingBundleSummary:
      title: BillingBundleSummary
      required:
        - id
        - name
        - cost_code
        - is_public
        - created_at
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          example: 7ecd040e-6bac-4139-9160-3c0427d98fea
          description: Bundle's ID, this is used to identify the bundle in the API.
        name:
          title: Name
          type: string
          example: Australia Basic
          description: Bundle's name, this is used to identify the bundle in the UI.
        slug:
          title: Slug
          type: string
          example: basic-au-e4f8
          description: Slugified version of the bundle's name.
        cost_code:
          title: Cost Code
          type: string
          example: BUNDLE-PRICING-BASIC-MRC
          description: >-
            Bundle's cost code, this is used to identify the bundle in the
            billing system.
        is_public:
          title: Is Public
          type: boolean
          description: Available to all customers or only to specific customers.
        created_at:
          title: Created At
          type: string
          format: date
          description: Date the bundle was created.
        mrc_price:
          title: Mrc Price
          type: number
          format: float
          example: 2
          description: Monthly recurring charge price.
        currency:
          title: Currency
          type: string
          example: USD
          description: Bundle's currency code.
        specs:
          title: Specs
          type: array
          items:
            type: string
          example:
            - 1 AU Number
            - Emergency Calling
            - All inbound and outbound calling billed pay-as-you-go
    UserBundleResourceSchema:
      title: UserBundleResourceSchema
      required:
        - id
        - resource
        - resource_type
        - created_at
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: ca1d2263-d1f1-43ac-ba53-248e7a4bb26a
          description: Resource's ID.
        resource:
          type: string
          example: '+15617819942'
          description: The resource itself (usually a phone number).
        resource_type:
          type: string
          example: number
          description: The type of the resource (usually 'number').
        created_at:
          type: string
          format: date
          example: '2025-01-20'
          description: Date the resource was created.
        updated_at:
          type:
            - string
            - 'null'
          format: date
          example: '2025-01-20'
          description: Date the resource was last updated.
  responses:
    bundle-pricing_BadRequestErrorResponse:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    title:
                      type: string
                    detail:
                      type: string
    UnauthorizedErrorResponse:
      description: Authentication required or invalid credentials
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    title:
                      type: string
                    detail:
                      type: string
    bundle-pricing_NotFoundErrorResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    title:
                      type: string
                    detail:
                      type: string
    bundle-pricing_UnprocessableEntityErrorResponse:
      description: Request cannot be processed
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    title:
                      type: string
                    detail:
                      type: string
    bundle-pricing_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    title:
                      type: string
                    detail:
                      type: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````