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

# Register an Iroh Endpoint for an Organization

> Records an endpoint id nobody has proven yet, which is the point and also
the risk. A key already registered anywhere is refused, without saying
where — whether another organization holds one is that organization's
business.

A key registered here for a device in this organization is claimed by that
device the next time it connects and proves it, so registering ahead of
provisioning needs no cleanup.




## OpenAPI

````yaml https://manage.nervescloud.com/api/openapi post /api/orgs/{org_name}/iroh_endpoints
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: 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: >-
      Device management, including action requests eg. upgrade, reboot,
      reconnect
    name: Devices (short URL)
  - description: Device Certificate management
    name: Device Certificates
  - 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: Platform healthcheck
    name: Platform Status
paths:
  /api/orgs/{org_name}/iroh_endpoints:
    post:
      tags:
        - Iroh Endpoints
      summary: Register an Iroh Endpoint for an Organization
      description: >
        Records an endpoint id nobody has proven yet, which is the point and
        also

        the risk. A key already registered anywhere is refused, without saying

        where — whether another organization holds one is that organization's

        business.


        A key registered here for a device in this organization is claimed by
        that

        device the next time it connects and proves it, so registering ahead of

        provisioning needs no cleanup.
      operationId: NervesHubWeb.API.IrohEndpointController.create
      parameters:
        - description: Organization Name
          example: example_org
          in: path
          name: org_name
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IrohEndpointCreateRequest'
        description: Iroh Endpoint registration request body
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IrohEndpointShowResponse'
          description: Iroh Endpoint
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Already registered
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangesetErrorResponse'
          description: Unprocessable Entity
      callbacks: {}
      security:
        - bearer_auth: []
components:
  schemas:
    IrohEndpointCreateRequest:
      description: POST body for registering an Iroh Endpoint against an Organization
      example:
        identifier: c8924b6c9b7a8528b1365ebec4b2e43b6edebef684f8521f12b8caaf6e1b2302
        instance: console
        user_email: member@example.com
      properties:
        details:
          additionalProperties: true
          description: >-
            Anything worth recording alongside the key. Non-authoritative, and
            never a secret
          type: object
        identifier:
          description: >-
            The endpoint id — the public key the endpoint proves it holds, not a
            ticket or a relay url
          type: string
        instance:
          default: default
          description: >-
            Names which endpoint this is, for something running more than one.
            Omit for a single one
          type: string
        user_email:
          description: >-
            Attach the endpoint to this member of the organization — their
            laptop, say. Omit for one the organization holds directly, or for a
            device that will claim it on its next connection. The address must
            belong to a member
          nullable: true
          type: string
      required:
        - identifier
      title: IrohEndpointCreateRequest
      type: object
    IrohEndpointShowResponse:
      description: Iroh Endpoint show response
      example:
        data:
          details: {}
          identifier: c8924b6c9b7a8528b1365ebec4b2e43b6edebef684f8521f12b8caaf6e1b2302
          inserted_at: '2026-08-14T11:02:31Z'
          instance: default
          last_reported_at: '2026-08-16T09:14:00Z'
          owner:
            device_identifier: example_device
            type: device
            user_email: null
            user_name: null
          service: iroh
          source: device_reported
          updated_at: '2026-08-16T09:14:00Z'
      properties:
        data:
          $ref: '#/components/schemas/IrohEndpoint'
      title: IrohEndpointShowResponse
      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
    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
    IrohEndpoint:
      description: An iroh endpoint id registered to an organization
      example:
        details: {}
        identifier: c8924b6c9b7a8528b1365ebec4b2e43b6edebef684f8521f12b8caaf6e1b2302
        inserted_at: '2026-08-14T11:02:31Z'
        instance: default
        last_reported_at: '2026-08-16T09:14:00Z'
        owner:
          device_identifier: example_device
          type: device
          user_email: null
          user_name: null
        service: iroh
        source: device_reported
        updated_at: '2026-08-16T09:14:00Z'
      properties:
        details:
          additionalProperties: true
          type: object
        identifier:
          description: The endpoint id — 64 hex characters
          type: string
        inserted_at:
          format: date-time
          type: string
        instance:
          description: >-
            Which endpoint of iroh this is. `default` for anything running a
            single one
          type: string
        last_reported_at:
          format: date-time
          nullable: true
          type: string
        owner:
          $ref: '#/components/schemas/IrohEndpointOwner'
        service:
          enum:
            - iroh
          type: string
        source:
          description: >-
            `device_reported` means a device proved this key; `operator` means
            it was registered by hand
          enum:
            - device_reported
            - operator
          type: string
        updated_at:
          format: date-time
          type: string
      title: IrohEndpoint
      type: object
    IrohEndpointOwner:
      description: What holds this endpoint id
      example:
        device_identifier: example_device
        type: device
        user_email: null
        user_name: null
      properties:
        device_identifier:
          description: Set when `type` is `device`
          nullable: true
          type: string
        type:
          description: >-
            `device` for one a device proved, `user` for a member's own machine,
            `none` for one the organization holds directly
          enum:
            - device
            - user
            - none
          type: string
        user_email:
          description: Set when `type` is `user`
          nullable: true
          type: string
        user_name:
          description: Set when `type` is `user`
          nullable: true
          type: string
      title: IrohEndpointOwner
      type: object
  securitySchemes:
    bearer_auth:
      scheme: bearer
      type: http

````