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

# Create endpoint for an existing Emnify SIM

> Creates an Emnify endpoint/equipment and assigns the provided SIM to it.



## OpenAPI

````yaml /generated/specs/diagnostics.json post /api/v1/emnify/endpoint/for-sim
openapi: 3.0.0
info:
  title: Raul API - Diagnostico
  description: Health, consumo, conectividad, SIMs, webhooks fallidos y estados tecnicos.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.raul.ugps.io
    description: Production
security: []
tags: []
paths:
  /api/v1/emnify/endpoint/for-sim:
    post:
      tags:
        - Endpoint Management
      summary: Create endpoint for an existing Emnify SIM
      description: Creates an Emnify endpoint/equipment and assigns the provided SIM to it.
      operationId: EndpointManagementController_createEndpointForSim
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEndpointForSimRequestDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointDetailResponseDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmnifyErrorDto'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmnifyErrorDto'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateEndpointForSimRequestDto:
      type: object
      properties:
        name:
          type: string
          description: Endpoint/equipment name in Emnify
        sim_id:
          type: number
          description: Emnify SIM ID to assign
        phone_number:
          type: string
          description: SIM phone number/MSISDN used to resolve the real Emnify SIM ID
        service_profile_id:
          type: number
          description: Emnify service profile ID
        tariff_profile_id:
          type: number
          description: Emnify tariff profile ID
        activate:
          type: boolean
          description: Activate SIM while creating endpoint
        tags:
          type: string
          description: Endpoint tags
        imei:
          type: string
          description: IMEI to associate with the endpoint
        imei_lock:
          type: boolean
          description: Whether Emnify should lock the endpoint to the IMEI
      required:
        - name
        - sim_id
    EndpointDetailResponseDto:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
        status:
          $ref: '#/components/schemas/EndpointStatusDto'
        service_profile:
          $ref: '#/components/schemas/EndpointServiceProfileDto'
        tariff_profile:
          $ref: '#/components/schemas/EndpointServiceProfileDto'
        ip_address:
          type: object
        imei:
          type: object
        imei_lock:
          type: object
        tags:
          type: object
        created:
          type: object
        last_updated:
          type: object
        sim:
          $ref: '#/components/schemas/EndpointSimDto'
      required:
        - id
        - name
    EmnifyErrorDto:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: string
      required:
        - error
        - message
    EndpointStatusDto:
      type: object
      properties:
        id:
          type: number
        description:
          type: string
      required:
        - id
        - description
    EndpointServiceProfileDto:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
      required:
        - id
        - name
    EndpointSimDto:
      type: object
      properties:
        id:
          type: number
        iccid:
          type: string
        msisdn:
          type: string
        model:
          type: object
        status:
          $ref: '#/components/schemas/EndpointStatusDto'
      required:
        - id
        - iccid
        - msisdn
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Token de sesión Better Auth para rutas de backoffice; las rutas de
        portal usan su token propio.

````

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