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

# Initialize a new package/app

> Creates a new package (identified by `packageName`) under which credentials can be grouped. Returns a conflict if a package with the same name already exists for the user.



## OpenAPI

````yaml /api-reference/phones.yaml post /credentials/packages
openapi: 3.1.0
info:
  title: Phones
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /credentials/packages:
    post:
      tags:
        - App Credentials
      summary: Initialize a new package/app
      description: >-
        Creates a new package (identified by `packageName`) under which
        credentials can be grouped. Returns a conflict if a package with the
        same name already exists for the user.
      operationId: initializePackage
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PackageSchema'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/PackageSchema'
                  message:
                    type: string
                  success:
                    enum:
                      - true
                    type: boolean
                required:
                  - success
                  - message
                  - data
                type: object
          description: Package initialized
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '409':
          description: Conflict
        '500':
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


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


            const _package = await client.credentials.packages.create({
            packageName: 'x' });


            console.log(_package.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            package = client.credentials.packages.create(
                package_name="x",
            )
            print(package.data)
components:
  schemas:
    PackageSchema:
      properties:
        packageName:
          maxLength: 200
          minLength: 1
          type: string
      required:
        - packageName
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.