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

# Email Activity Check

> See when an email was last active online. Send one email address per request, or an array of up to 1,000 addresses in a single request.

Batch endpoint: provide `emails` (an array of up to 1,000 plaintext addresses) or a single `email`. Duplicate addresses count once (matching is case-insensitive and ignores surrounding whitespace). The response lists only the addresses with known activity, each with its `last_active` date; addresses with no match are omitted from `results`.

**Billing:** 1 credit per matched email. Misses are free. Matches are billed in input order until the account's credit balance runs out; any further matches are dropped from the response and `credits_exhausted` is returned as `true`. `match_count` and `credits_charged` both reflect the number of matches actually returned and billed.



## OpenAPI

````yaml POST /api/v1/email_to_activity
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/email_to_activity:
    post:
      tags:
        - Email
      summary: Email Activity Check
      description: >-
        See when an email was last active online. Send one email address per
        request, or an array of up to 1,000 addresses in a single request.


        Batch endpoint: provide `emails` (an array of up to 1,000 plaintext
        addresses) or a single `email`. Duplicate addresses count once (matching
        is case-insensitive and ignores surrounding whitespace). The response
        lists only the addresses with known activity, each with its
        `last_active` date; addresses with no match are omitted from `results`.


        **Billing:** 1 credit per matched email. Misses are free. Matches are
        billed in input order until the account's credit balance runs out; any
        further matches are dropped from the response and `credits_exhausted` is
        returned as `true`. `match_count` and `credits_charged` both reflect the
        number of matches actually returned and billed.
      operationId: emailToActivity
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                Provide `emails` (preferred, up to 1,000 addresses) or a single
                `email`. When both are present, `emails` wins.
              properties:
                emails:
                  type: array
                  maxItems: 1000
                  items:
                    type: string
                    format: email
                  description: >-
                    Email addresses to check, up to 1,000 per request. Blank
                    entries are ignored; duplicates count once (matching is
                    case-insensitive and ignores surrounding whitespace).
                  example:
                    - alice@example.com
                    - bob@example.com
                email:
                  type: string
                  format: email
                  description: Single email address (alternative to the `emails` array).
                  example: alice@example.com
        required: true
      responses:
        '200':
          description: Activity results for matched emails (1 credit per match)
          content:
            application/json:
              schema:
                type: object
                required:
                  - results
                  - match_count
                  - credits_charged
                  - credits_exhausted
                properties:
                  results:
                    type: array
                    description: >-
                      One entry per matched (and billed) email, in input order.
                      Emails with no known activity are omitted.
                    items:
                      type: object
                      required:
                        - email
                        - last_active
                      properties:
                        email:
                          type: string
                          format: email
                          description: The input email address, echoed back as supplied.
                          example: alice@example.com
                        last_active:
                          type: string
                          format: date
                          description: >-
                            Date the email was last seen active online (ISO
                            8601).
                          example: '2026-05-01'
                  match_count:
                    type: integer
                    description: Number of matched emails returned in `results`.
                    example: 1
                  credits_charged:
                    type: integer
                    description: >-
                      Credits charged for this request; equal to the number of
                      matches returned (1 credit per match).
                    example: 1
                  credits_exhausted:
                    type: boolean
                    description: >-
                      `true` when the account ran out of credits before all
                      matches could be billed; the unbilled matches are not
                      returned.
                    example: false
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    enum:
                      - missing emails
                      - too_many_emails
                      - invalid email
                      - unexpected error
                    description: >-
                      `missing emails`: neither `emails` nor `email` was
                      provided (or all entries were blank). `too_many_emails`:
                      more than 1,000 addresses were submitted; see `max`.
                      `invalid email`: at least one entry is not a valid email
                      address. `unexpected error`: temporary error; safe to
                      retry.
                  max:
                    type: integer
                    description: Maximum batch size. Present only with `too_many_emails`.
                    example: 1000
        '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'
      security:
        - api_key: []
components:
  schemas:
    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.