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

# Update device names (bulk)

> Bulk update device name prefixes. Each device is renamed to `{prefix} ({last 5 ICCID digits})` unless `skipPostfix` is true. Devices are selected via `deviceids`, bulk-selection filters, or a combination of both. Requires the `bulk_rename` feature flag on the organization.



## OpenAPI

````yaml /api/1/openapi.yaml post /devices/names
openapi: 3.0.0
info:
  title: Hologram REST API v1
  description: >-
    The Hologram HTTP API is a REST-style interface for managing Hologram
    devices, accounts, and cloud data.


    Using the Hologram REST API, you can activate SIMs, get your devices
    approximate location, send SMS to your devices, update a device's usage
    limit, and much more.


    ## Authentication


    Hologram supports **HTTP Basic authentication** using API keys. Simply set
    the username of the request to `apikey`. The password field is the API key
    itself.


    You can find your API key on the Hologram Dashboard under [Account
    Settings](https://dashboard.hologram.io/settings/api).


    Your API key gives you access to your personal account, as well as any
    organizations you are a member of. Make sure you don't store your API key in
    a publicly accessible place like GitHub. If you are a member of multiple
    organizations, many endpoints accept an `orgid` argument to filter for
    devices or other objects within a specific organization.


    You can find your `orgid` by following [this guide from our Help
    Center](https://support.hologram.io/hc/en-us/articles/360035421234-What-is-my-organization-ID-orgid).


    ### Header Example


    ```

    curl --verbose GET \

    'https://dashboard.hologram.io/api/1/users/me' \

    -u apikey:YOUR_API_KEY

    ```


    You can also base64 encode "apikey:YOUR_API_KEY" and include it directly in
    the header.


    ```

    curl --verbose GET \

    'https://dashboard.hologram.io/api/1/users/me' \

    --header "Authorization: Basic BASE64(apikey:YOUR_API_KEY)"

    ```


    ## Requests


    Request bodies can be provided in either JSON or form-urlencoded formats.
    Please note that the examples in this documentation will only display JSON
    bodies.


    ### **JSON body**


    ```

    curl --verbose --request POST \

    --header "Content-Type: application/json" \

    --header "Authorization: Basic BASE64(apikey:YOUR_API_KEY)" \

    --data '{"deviceid": 56668, "body": "Hello device!"}' \

    'https://dashboard.hologram.io/api/1/sms/incoming'

    ```


    ### **form-urlencoded body**


    ```

    curl --verbose --request POST \

    --header "Content-Type: application/x-form-urlencoded" \

    --header "Authorization: Basic BASE64(apikey:YOUR_API_KEY)" \

    --data 'deviceid=56668&body=Hello%20device!' \

    'https://dashboard.hologram.io/api/1/sms/incoming'

    ```


    ## Responses


    All API responses are returned as JSON objects with the following fields:


    * `success` (boolean) - Indicates whether the request was successful.

    * `data` (object or array) - Contains the requested data or information
    about the operation that was performed. Only present when `success` is true.

    * `error` (string) - Information about why the request failed. Only present
    when `success` is false.


    Most GET responses will also include the following fields if a limit is
    included as part of the query string:


    * `limit` (number) - The query limit, some have this value built in and
    others often have a maximum value that the limit can be

    * `size` (number) - The number of values returned by the query

    * `continues` (boolean, optional) - This is only returned if there are more
    values than were returned

    * `links` (array) - Contains information related to the query performed
      * `path` (string) - The API endpoint path
      * `base` (string) - API base URL
      * `next` (string) - URL with query string to get the next results

    Note that all dates and times are returned in UTC.


    ## Rate Limiting


    In order to provide a good quality of service to all of our customers, we
    enforce a rate limit on all API requests.


    If you exceed the rate limit you will receive a HTTP 429 response with a
    JSON response body like this:


    ```

    {
      "success":false,
      "error":"API rate limit exceeded"
    }

    ```


    If you receive this response, you should refrain from making requests for
    5-10 seconds and then retry the request.


    Hologram's REST API provides methods to perform many requests in bulk. For
    example, you can change the data plans of multiple SIMs at once using
    https://dashboard.hologram.io/api/1/links/cellular/changeplan.


    If there is request you would like to make in bulk but cannot, please reach
    out to [support@hologram.io](mailto:support@hologram.io) for assistance.
  version: '1'
servers:
  - url: https://dashboard.hologram.io/api/1
    description: Hologram REST API v1
security: []
tags:
  - name: Devices
    description: Devices
  - name: SIM Configuration
    description: SIM Configuration
    x-group: SIM Configuration - Conductor
  - name: Organizations
    description: Organizations
  - name: Personal account
    description: Personal account
  - name: Async Change Requests
    description: Async Change Requests
paths:
  /devices/names:
    post:
      tags:
        - Devices
      summary: Update device names (bulk)
      description: >-
        Bulk update device name prefixes. Each device is renamed to `{prefix}
        ({last 5 ICCID digits})` unless `skipPostfix` is true. Devices are
        selected via `deviceids`, bulk-selection filters, or a combination of
        both. Requires the `bulk_rename` feature flag on the organization.
      operationId: updateDeviceNames
      parameters:
        - name: preview
          in: query
          description: >-
            When true, return a sample of devices that would be renamed without
            making changes
          required: false
          schema:
            type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - prefix
              properties:
                prefix:
                  description: >-
                    String prepended to every renamed device. The last 5 digits
                    of the active ICCID are appended in parentheses unless
                    skipPostfix is true.
                  type: string
                skipPostfix:
                  description: >-
                    When true, set each device name to the prefix exactly, with
                    no ICCID suffix appended.
                  type: boolean
                deviceids:
                  description: Explicit list of device IDs to rename.
                  type: array
                  items:
                    type: integer
                allSelected:
                  description: >-
                    When true, select all devices in the organization (subject
                    to excludedDeviceIds).
                  type: boolean
                useSearch:
                  description: >-
                    When true, resolve the device selection from the search
                    index using deviceFilters instead of the database.
                  type: boolean
                deviceFilters:
                  description: >-
                    Filter criteria used to select devices when allSelected is
                    true or useSearch is true.
                  properties:
                    limit:
                      description: Maximum number of devices per page.
                      type: integer
                    pageIdsSelected:
                      description: >-
                        Cursor IDs (startafter values) that identify which pages
                        of the device list to include.
                      type: array
                      items:
                        type: integer
                    pagesSelected:
                      description: Page numbers selected.
                      type: array
                      items:
                        type: integer
                    states:
                      description: Filter devices by state (e.g. LIVE, PAUSED-USER).
                      type: array
                      items:
                        type: string
                    hitsPerPage:
                      description: >-
                        Number of results per page used to compute page
                        boundaries.
                      type: integer
                    orgid:
                      description: Organization ID.
                      type: integer
                    query:
                      description: Search query string (used when useSearch is true).
                      type: string
                    sort:
                      description: >-
                        Sort field and direction (used when useSearch is true).
                        Example: {"links_cur_billing_data_used": "ASC"}
                      type: object
                    filters:
                      description: >-
                        Additional search filter criteria (used when useSearch
                        is true).
                      type: object
                  type: object
                excludedDeviceIds:
                  description: Device IDs to exclude from the bulk selection.
                  type: array
                  items:
                    type: integer
                linkids:
                  description: Cellular link IDs to include in the selection.
                  type: array
                  items:
                    type: integer
                pagesSelected:
                  description: >-
                    Top-level page numbers selected; presence triggers bulk
                    device selection.
                  type: array
                  items:
                    type: integer
              type: object
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleSuccessResponse'
        '401':
          description: Unauthorized
        '403':
          description: Organization does not have the bulk_rename feature flag enabled
      security:
        - apiKeyAuth: []
components:
  schemas:
    SimpleSuccessResponse:
      properties:
        success:
          $ref: '#/components/schemas/SuccessProperty'
      type: object
    SuccessProperty:
      description: Indicates whether the request was successful.
      type: boolean
      example: true
  securitySchemes:
    apiKeyAuth:
      type: http
      description: >-
        HTTP Basic authentication using API keys. Set the username to `apikey`
        and the password to your API key. You can find your API key on the
        Hologram Dashboard under Account Settings.
      scheme: basic

````