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

# Bulk create Devices from a manifest. Only a Microchip Trust and Go manifest is currently supported. The manifest is read before the import starts: an unknown format, or an entry that can't be read, gets a 422 keyed by where each problem is, such as `entries[3].payload`, and no device is created.



## OpenAPI

````yaml https://manage.nervescloud.com/api/openapi post /api/orgs/{org_name}/products/{product_name}/devices/import
openapi: 3.0.0
info:
  description: >
    The NervesCloud API gives users full access to their

    Orgs, Products, and corresponding Device fleets.


    The API can be used to integrate with your own systems, providing full
    access to your Product and Device data.


    The API is documented using the OpenAPI 3.0 specification.
  title: NervesCloud API
  version: 2.0.0
servers:
  - url: https://manage.nervescloud.com
    variables: {}
security:
  - bearer_auth: []
tags:
  - description: Archive uploading and downloading
    name: Archives
  - description: User authentication and API token creation
    name: Auth
  - description: Organization Certificate Authority management
    name: CA Certificates
  - description: >-
      Device management, including action requests eg. upgrade, reboot,
      reconnect
    name: Devices
  - description: Log lines Devices have sent over the logging extension
    name: Device Logs
  - description: Metric history Devices have reported over the health or metrics extension
    name: Device Metrics
  - description: >-
      Device management, including action requests eg. upgrade, reboot,
      reconnect
    name: Devices (short URL)
  - description: Device Certificate management
    name: Device Certificates
  - description: Keys and secrets a Device can connect with instead of a certificate
    name: Device Shared Secrets
  - description: Identities a Device holds on networks NervesHub does not run
    name: Network Identities
  - description: Deployment Group and release management
    name: Deployment Groups
  - description: Firmware uploading and management
    name: Firmwares
  - description: Organization iroh endpoint id registration
    name: Iroh Endpoints
  - description: Organization management
    name: Organizations
  - description: Organization User membership management
    name: Organization Members
  - description: Product management
    name: Products
  - description: Organization Signing Key management
    name: Signing Keys
  - description: Product Support Script management
    name: Support Scripts
  - description: Endpoints an Organization sends its Products' Device events to
    name: Webhooks
  - description: Platform healthcheck
    name: Platform Status
paths:
  /api/orgs/{org_name}/products/{product_name}/devices/import:
    post:
      tags:
        - Devices
      summary: >-
        Bulk create Devices from a manifest. Only a Microchip Trust and Go
        manifest is currently supported. The manifest is read before the import
        starts: an unknown format, or an entry that can't be read, gets a 422
        keyed by where each problem is, such as `entries[3].payload`, and no
        device is created.
      operationId: NervesHubWeb.API.DevicesController.bulk_import
      parameters:
        - description: Organization Name
          example: example_org
          in: path
          name: org_name
          required: true
          schema:
            type: string
        - description: Product Name
          example: example_product
          in: path
          name: product_name
          required: true
          schema:
            type: string
        - description: The manifest's format
          in: header
          name: format
          required: false
          schema:
            default: microchip_trust_and_go
            enum:
              - microchip_trust_and_go
            type: string
        - description: Comma-separated tags to give every device the manifest creates
          example: prod,batch-12
          in: header
          name: tags
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceBulkImport'
        description: Certificate manifest
        required: true
      responses:
        '201':
          description: Manifest accepted; the devices are created in the background
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangesetErrorResponse'
          description: Unprocessable Entity
      callbacks: {}
      deprecated: false
      security:
        - bearer_auth: []
components:
  schemas:
    DeviceBulkImport:
      description: >
        POST body for bulk creating Devices: the manifest's JSON array of
        entries, as the manifest

        file holds it. Each entry's shape is set by the manifest's format; see
        the Microchip Trust

        and Go Manifest documentation.
      example:
        - header:
            uniqueId: SN1234
          payload: <base64url-encoded JWS payload>
          protected: <base64url-encoded JWS header>
          signature: <base64url-encoded signature>
      items:
        type: object
      title: DeviceBulkImport
      type: array
    ErrorResponse:
      description: Error response
      example:
        errors:
          detail: Resource Not Found or Authorization Insufficient
      properties:
        errors:
          properties:
            detail:
              type: string
          type: object
      title: ErrorResponse
      type: object
    ChangesetErrorResponse:
      description: Validation error response
      example:
        errors:
          identifier:
            - can't be blank
      properties:
        errors:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
      title: ChangesetErrorResponse
      type: object
  securitySchemes:
    bearer_auth:
      description: >
        A user API token, or a product API key created in a product's settings.


        A product API key only works on the routes for its own product, under

        `/api/orgs/{org_name}/products/{product_name}`, and on
        `/api/devices/{identifier}`

        for that product's devices. What it may do there is decided by the role
        it

        holds, the same way a member's role decides what they may do.
      scheme: bearer
      type: http

````

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