> ## 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.

# Upload an Archive for a Product

> Send the file as the `archive` field of a `multipart/form-data` body.

Accepts an fwup archive (`.fw`) signed against an Ed25519 key registered to
the organization. Its `meta-version` must be SemVer.




## OpenAPI

````yaml https://manage.nervescloud.com/api/openapi post /api/orgs/{org_name}/products/{product_name}/archives
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}/archives:
    post:
      tags:
        - Archives
      summary: Upload an Archive for a Product
      description: >
        Send the file as the `archive` field of a `multipart/form-data` body.


        Accepts an fwup archive (`.fw`) signed against an Ed25519 key registered
        to

        the organization. Its `meta-version` must be SemVer.
      operationId: NervesHubWeb.API.ArchiveController.create
      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
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ArchiveUploadRequest'
        description: Archive file upload
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchiveResponse'
          description: Archive response
        '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/ArchiveUploadErrorResponse'
          description: Upload rejected
      callbacks: {}
      security:
        - bearer_auth: []
components:
  schemas:
    ArchiveUploadRequest:
      description: The archive file, sent as the `archive` field of a multipart form
      properties:
        archive:
          description: A signed fwup archive (`.fw`)
          format: binary
          type: string
      required:
        - archive
      title: ArchiveUploadRequest
      type: object
    ArchiveResponse:
      description: Response schema for a single Archive
      example:
        data:
          architecture: arm
          author: NervesHub
          description: Supporting files
          inserted_at: '2026-01-15T09:34:27'
          misc: null
          platform: rpi0
          size: 1048576
          uuid: d9f8c63a-1234-5678-abcd-ef0123456789
          vcs_identifier: a1b2c3d
          version: 1.0.0
      properties:
        data:
          $ref: '#/components/schemas/Archive'
      title: ArchiveResponse
      type: object
    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
    ArchiveUploadErrorResponse:
      description: |
        Upload failure.

        Changeset failures (a duplicate UUID, a version that is not SemVer) are
        keyed by field. A signature failure carries a single `detail` message
        instead.
      example:
        errors:
          detail: >-
            The signature does not match any of this organization's signing
            keys, or the file is corrupt.
      oneOf:
        - $ref: '#/components/schemas/ChangesetErrorResponse'
        - $ref: '#/components/schemas/ErrorResponse'
      title: ArchiveUploadErrorResponse
      type: object
    Archive:
      example:
        architecture: arm
        author: NervesHub
        description: Supporting files
        inserted_at: '2026-01-15T09:34:27'
        misc: null
        platform: rpi0
        size: 1048576
        uuid: d9f8c63a-1234-5678-abcd-ef0123456789
        vcs_identifier: a1b2c3d
        version: 1.0.0
      properties:
        architecture:
          type: string
        author:
          nullable: true
          type: string
        description:
          nullable: true
          type: string
        inserted_at:
          description: >-
            When it was created, in UTC. Written without an offset, such as
            `2026-01-15T09:34:27`, so not an RFC 3339 `date-time`.
          type: string
        misc:
          nullable: true
          type: string
        platform:
          type: string
        size:
          description: Size in bytes
          type: integer
        uuid:
          format: uuid
          type: string
        vcs_identifier:
          nullable: true
          type: string
        version:
          type: string
      title: Archive
      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.