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

# IP → Mobile Device IDs

> Find the mobile advertising IDs seen at an IP address.

Provide an IPv4 or IPv6 `ip_address`. We use our proprietary identity resolution technology to return the mobile advertising IDs (MAIDs) recently observed at the IP address.

**Billing:** 1 credit per successful lookup (HTTP 200), regardless of how many device IDs are returned. Misses (404) and request errors (4xx) are not billed.



## OpenAPI

````yaml POST /api/v1/ip_to_maid
openapi: 3.0.1
info:
  title: Retention API
  version: v1
  description: Retention.com identity & data resolution APIs.
servers:
  - url: https://api.rb2b.com
security: []
tags:
  - name: Identity
    description: >-
      Core Identity. Resolve a hashed email (or batch) into a shaped person
      profile.
paths:
  /api/v1/ip_to_maid:
    post:
      tags:
        - IP
      summary: IP → Mobile Device IDs
      description: >-
        Find the mobile advertising IDs seen at an IP address.


        Provide an IPv4 or IPv6 `ip_address`. We use our proprietary identity
        resolution technology to return the mobile advertising IDs (MAIDs)
        recently observed at the IP address.


        **Billing:** 1 credit per successful lookup (HTTP 200), regardless of
        how many device IDs are returned. Misses (404) and request errors (4xx)
        are not billed.
      operationId: ipToMaid
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - ip_address
              properties:
                ip_address:
                  type: string
                  description: IPv4 or IPv6 address of the visitor.
                  example: 203.0.113.42
        required: true
      responses:
        '200':
          description: Matches found (1 credit charged)
          content:
            application/json:
              schema:
                type: object
                required:
                  - results
                properties:
                  results:
                    type: array
                    description: Mobile advertising IDs seen at the supplied IP address.
                    items:
                      $ref: '#/components/schemas/Maid'
        '400':
          description: Missing or invalid IP
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    enum:
                      - missing ip_address
                      - invalid ip_address
                      - unexpected connection error
                      - unexpected error
                    description: >-
                      `missing ip_address`: no `ip_address` was provided.
                      `invalid ip_address`: the value is not a valid IPv4 or
                      IPv6 address. `unexpected connection error` / `unexpected
                      error`: temporary error; safe to retry.
        '401':
          description: Missing, malformed, or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsufficientCreditsError'
        '403':
          description: Service not enabled for this API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceDisabledError'
        '404':
          description: No results (not billed)
          content:
            application/json:
              schema:
                type: object
                required:
                  - results
                properties:
                  results:
                    type: array
                    description: Always empty; no device IDs found for the supplied IP.
                    items: {}
                    maxItems: 0
      security:
        - api_key: []
components:
  schemas:
    Maid:
      type: object
      description: >-
        Mobile advertising ID (MAID) entry. Either field can be null when only
        one side of the pair is known.
      properties:
        device_id:
          type: string
          nullable: true
          example: 6D92078A-8246-4BA4-AE5B-76104861E7DC
        device_type:
          type: string
          nullable: true
          example: idfa
    AuthError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          enum:
            - missing_api_key
            - invalid_api_key_format
            - invalid_api_key
          description: >-
            `missing_api_key`: no key supplied. `invalid_api_key_format`: key
            does not match the expected format. `invalid_api_key`: key does not
            belong to any account.
    InsufficientCreditsError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          enum:
            - insufficient_api_credits
        required:
          type: string
          description: Credits needed for this request.
          example: '1.0'
        remaining:
          type: string
          description: Credits currently remaining on the account.
          example: '0.0'
    ServiceDisabledError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          enum:
            - service_unavailable_for_key
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Per-account API key. Also accepted as `Api-Key` or `Authorization:
        Bearer <key>`.

````

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