Skip to content
Livstick Developers

Create or return a retargetable CRID

Method POST {API_BASE}/v2.1/client/{key}/{crid}/retarget

Create or reuse a Code for the CRID, optionally storing sender email, language, code group and additional metadata. urlRead always points to the non-preview reading URL. urlWrite points to the overwrite route used by UserApp. urlPreview is returned for old integrations that still use preview links.

Authorization

Required scope client_v2

The API key is intentionally kept in the path for V2 compatibility: /v2.1/client/{key}/{crid}/... or /v2.1/user/{key}/{crid}/.... Client routes require the client_v2 scope. User routes require the user_v2 scope. Unknown, expired, revoked, malformed, or wrong-scope keys return the legacy JSON error envelope.

Parameters

Name In Type Required Constraints Description
key Path string Required API key kept in the URL for V2 compatibility. Requires client_v2 or user_v2 depending on the route.
crid Path string Required Client reference ID, usually an order or campaign reference.

Request body

Optional application/json Schema RetargetRequest

Name Type Required Description
email string Optional Sender or retargeting email stored in Code data. Constraints format email
language string Optional Language code stored in Code data.
codeGroup string Optional Public CodeGroup identifier.
additionalData object Optional Extra data merged into Code data.

Responses

200 application/json Schema RetargetResponse

Code ready for retargeting.

400 application/json Schema LegacyError

Invalid key, CRID, payload, message state or business precondition.

json 400
{
  "status": 1,
  "error": "key_invalid"
}

keyInvalid

json 400
{
  "status": 1,
  "error": "key_invalid"
}

cridUnknown

json 400
{
  "status": 1,
  "error": "crid_unknown"
}

dataInvalid

json 400
{
  "status": 1,
  "error": "data_invalid"
}

noMessage

json 400
{
  "status": 1,
  "error": "no_message_for_this_crid"
}

messageMissing

json 400
{
  "status": 1,
  "error": "message_missing"
}

noLanguage

json 400
{
  "status": 1,
  "error": "no_language_found"
}

noPdfTemplate

json 400
{
  "status": 1,
  "error": "no_pdf_template"
}

webhookNotFound

json 400
{
  "status": 1,
  "error": "webhook_not_found"
}

403 application/json Schema LegacyError

Key is authenticated but scope or platform constraints are invalid.

json 403
{
  "status": 1,
  "error": "forbidden"
}

forbidden

json 403
{
  "status": 1,
  "error": "forbidden"
}

invalidPlatformConstraint

json 403
{
  "status": 1,
  "error": "key_invalid"
}

503 application/json Schema LegacyError

API key backend is temporarily unavailable.

json 503
{
  "status": 1,
  "error": "auth_unavailable"
}