Create or return a retargetable CRID
Méthode 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.
Autorisation
Scope requis
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.
Paramètres
| Nom | Emplacement | Type | Requis | Contraintes | Description |
|---|---|---|---|---|---|
key |
Chemin | string |
Requis |
API key kept in the URL for V2 compatibility. Requires client_v2 or user_v2 depending on the route.
|
|
crid |
Chemin | string |
Requis | Client reference ID, usually an order or campaign reference. |
Corps de la requête
| Nom | Type | Requis | Description |
|---|---|---|---|
email |
string
|
Facultatif | Sender or retargeting email stored in Code data. Contraintes format email |
language |
string
|
Facultatif | Language code stored in Code data. |
codeGroup |
string
|
Facultatif | Public CodeGroup identifier. |
additionalData |
object
|
Facultatif | Extra data merged into Code data. |
Réponses
Code ready for retargeting.
Invalid key, CRID, payload, message state or business precondition.
{
"status": 1,
"error": "key_invalid"
}
keyInvalid
{
"status": 1,
"error": "key_invalid"
}
cridUnknown
{
"status": 1,
"error": "crid_unknown"
}
dataInvalid
{
"status": 1,
"error": "data_invalid"
}
noMessage
{
"status": 1,
"error": "no_message_for_this_crid"
}
messageMissing
{
"status": 1,
"error": "message_missing"
}
noLanguage
{
"status": 1,
"error": "no_language_found"
}
noPdfTemplate
{
"status": 1,
"error": "no_pdf_template"
}
webhookNotFound
{
"status": 1,
"error": "webhook_not_found"
}
Key is authenticated but scope or platform constraints are invalid.
{
"status": 1,
"error": "forbidden"
}
forbidden
{
"status": 1,
"error": "forbidden"
}
invalidPlatformConstraint
{
"status": 1,
"error": "key_invalid"
}
API key backend is temporarily unavailable.
{
"status": 1,
"error": "auth_unavailable"
}