Créer un contact avec l'API Constant Contact

Crée un contact et le renvoie avec son contact_id. Envoyez create_source et au moins email_address, first_name ou last_name. Une adresse e-mail déjà présente dans le compte répond 409.

Identifiant
constant_contact_create_contact

L'appel

POST https://connect.reportei.com/api/tools/constant_contact_create_contact/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "create_source": "Account"
  }
}

Votre système envoie l'id de la connexion de votre client et les arguments de la tool. Les headers sont les mêmes que pour toute l'API Connect : le token de votre produit et celui de votre client.

Paramètres

Les descriptions des paramètres suivent la documentation officielle de l'app, en anglais.

ParamètreTypeObligatoireDescription
create_sourcestringOuiWho adds the contact: Account when the account user adds it, Contact when the person signed up. Constant Contact requires the right value for compliance.Valeurs : Account, Contact
email_addressobjectNonEmail address of the contact. permission_to_send explicit or implicit is allowed only when the person agreed to receive emails; anti-spam laws and the Constant Contact terms forbid it otherwise.
first_namestringNonFirst name of the contact.
last_namestringNonLast name of the contact.
job_titlestringNonJob title of the contact.
company_namestringNonCompany where the contact works.
birthday_monthintegerNonMonth of the birthday, 1 to 12. Send it together with birthday_day.
birthday_dayintegerNonDay of the birthday, 1 to 31. Send it together with birthday_month.
anniversarystringNonAnniversary date, such as when the contact became a customer, as YYYY-MM-DD or MM/DD/YYYY.
phone_numbersarrayNonUp to 3 phone numbers.
street_addressesarrayNonUp to 3 street addresses, each with its kind.
list_membershipsarrayNonIds of the lists to subscribe the contact to, from List contact lists, up to 50.

Connexions possibles

Votre client connecte son compte Constant Contact une seule fois, avec l'un des modes ci-dessous. La même connexion sert à toutes les tools du toolkit.

OAuth avec l'app de votre produit

Vous enregistrez une fois l'app OAuth de votre produit, avec POST /api/merchants/credentials/constant_contact, et votre client autorise le compte sur un écran de consentement. Connect renouvelle le token avant son expiration.

La réponse

En cas de succès, Connect conserve le statut et le corps de la réponse de l'app. Les erreurs HTTP renvoyées par l'app utilisent l'objet {error, api_error} ; l'authentification ou la validation peuvent échouer avant l'exécution. Le header X-Toolkit-Execution-Id identifie l'exécution enregistrée, consultable avec GET /api/tools/executions/{uuid}.

Prête pour les agents IA

L'input de cette tool est un JSON Schema, disponible via GET /api/tools/constant_contact_create_contact. Il devient la définition de tool de votre agent sans conversion.

Autres tools Constant Contact

Voir les 12 tools

Toolkits de la même catégorie

Voir les 100 toolkits

Voyez Connect appliqué à votre produit.

Essayez-le pendant 15 jours sans carte, ou présentez votre cas à notre équipe.