---
title: "Retrieve the most recent AI subject line for a lead (free)"
method: GET
path: "/v1/ai/subject/{leadId}"
tags: ["AI Personalization"]
---

# Retrieve the most recent AI subject line for a lead (free)

`GET /v1/ai/subject/{leadId}`

## Request

- Base URL: `https://api.meirra.com`
- URL: `https://api.meirra.com/v1/ai/subject/{leadId}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/meirra/apis/meirra-api/docs/v1/ai/subject/:leadId/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `leadId` string, uuid, required

## Response `200`

Success

- AiSubjectRetrieveResponse
  - `success` boolean
  - `data` AiSubjectRecord: One stored subject generation (retrieve `data` and list item share this shape).
    - `leadId` string, uuid
    - `subject` string, nullable: Null unless `status` is `complete`.
    - `locale` string
    - `mode` 'native' | 'translate'
    - `generatedAt` string, date-time, nullable
    - `modelVersion` string, nullable
    - `status` 'pending' | 'generating' | 'complete' | 'failed'

## Other responses

- `400`: The request is invalid: VALIDATION_ERROR (body fails the schema; see `details`), INVALID_REQUEST (body is not JSON, or a bad parameter), INVALID_IDEMPOTENCY_KEY, or CONFLICTING_API_KEYS (the two key headers differ).
- `401`: MISSING_API_KEY, INVALID_API_KEY (malformed, unknown or revoked) or INVALID_AUTHORIZATION_HEADER (not a single Bearer token).
- `403`: IP_NOT_ALLOWED: the caller is outside the key's IP allowlist. On /v1/jobs/{id}, ACCESS_DENIED: the job belongs to another account.
- `404`: NOT_FOUND: no AI subject line exists for this lead, or the lead is not owned by the caller.
- `429`: RATE_LIMIT_EXCEEDED: more than 1000 requests per key per endpoint per hour. Wait `Retry-After` seconds.
- `500`: SERVICE_ERROR: an internal error. Not charged.

## Changes

- **2026-11-11** `fe00e1fbf676`: 4 breaking, 1 warning, 32 info
  - the `error` response's property type changed from `string` to `object` for status `401`
  - the `success` response's property type changed from `boolean` to no type for status `401`
  - the `success` response's property type changed from `boolean` to no type for status `404`
  - the `success` response's property type changed from `boolean` to no type for status `429`
  - …33 more
- **2026-11-08** `a487d818c900`: 2 info
  - added the optional property `error/details/items/code` to the response with the `404` status
  - added the optional property `error/details/items/code` to the response with the `429` status
- **2026-11-01** `292da843ca31`: 1 info
  - the endpoint scheme security `bearerAuth` was added to the API

[Operation history](https://skmtc.dev/meirra/apis/meirra-api/changes/v1/ai/subject/:leadId/get.md)

---

[API](https://skmtc.dev/meirra/apis/meirra-api.md) - [All operations](https://skmtc.dev/meirra/apis/meirra-api/llms.txt) - [OpenAPI document](https://skmtc.dev/meirra/apis/meirra-api/revisions/fe00e1fbf676?raw)
