Référence MCP
create_campaign
Créer une campagne (brouillon)
Rôle#
Un BROUILLON, jamais plus : nom, objet, segment, modèle. L'envoi est send_campaign, sous approbation. Segment et modèle doivent exister et ne pas être archivés.
Accès#
Scope principal : marketing:write. Le scope ne remplace pas les gardes de visibilité, d'organisation, de module ni les scopes complémentaires des gestes composés.
Catalogue complet · Approbations
Paramètres#
Le schéma ci-dessous est produit par la fonction qui enregistre les outils, y compris idempotency_key lorsqu'elle s'applique. Consultez les objets imbriqués dans le schéma complet.
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
name | string | Oui | |
subject | string | Oui | |
kind | string | Non | Défaut : email Valeurs : email, invitation, container |
segmentId | union | Non | |
templateId | union | Non | |
senderMode | string | Non | Valeurs : org, owner |
senderUserId | union | Non | |
businessUnitId | union | Non | |
ownerId | union | Non | Défaut : l'utilisateur d'intégration du jeton |
text | union | Non | Contenu brut sans modèle (sinon le modèle rend le message) |
idempotency_key | string | Non | Clé d'idempotence (recommandée) : rejouer la MÊME mutation avec la même clé renvoie la réponse originale sans ré-exécuter - TTL 24 h |
Schéma JSON complet des paramètres
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"subject": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"kind": {
"description": "Défaut : email",
"type": "string",
"enum": [
"email",
"invitation",
"container"
]
},
"segmentId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"templateId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"senderMode": {
"type": "string",
"enum": [
"org",
"owner"
]
},
"senderUserId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"businessUnitId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"ownerId": {
"description": "Défaut : l'utilisateur d'intégration du jeton",
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"text": {
"description": "Contenu brut sans modèle (sinon le modèle rend le message)",
"anyOf": [
{
"type": "string",
"maxLength": 20000
},
{
"type": "null"
}
]
},
"idempotency_key": {
"description": "Clé d'idempotence (recommandée) : rejouer la MÊME mutation avec la même clé renvoie la réponse originale sans ré-exécuter - TTL 24 h",
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"name",
"subject"
],
"additionalProperties": false
}