> For the complete documentation index, see [llms.txt](https://developer.gyfti.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.gyfti.fr/automate-your-gifts/add-contact-to-campaign.md).

# Add contact to campaign

This call enables you to add a contact to a gyfti campaign.&#x20;

First, you must create your campaign on the gyfti app. It must be a Campaign Type "Trigger".

Secondly, you must retrieve the ID of the campaign you wish to add your contact [Retrieve your gyfti campaigns](/automate-your-gifts/retrieve-your-gyfti-campaigns.md)

Then you can use these calls to add a contact to your campaign.

You have 2 types of campaigns can be automated, therefore, you can use 2 different calls depending if :&#x20;

* [you want to add a contact to a Trigger campaign (email campaign)](#add-new-contact-to-a-trigger-campaign-email)
* [you want to add a contact to a Directe trigger campaign (postal campaign)](#add-new-contact-to-a-trigger-campaign-postal)

## Add new contact to a trigger campaign (email)

<mark style="color:green;">`POST`</mark> `https://app.gyfti.fr/api/1.1/wf/1_zapier_add_contact_trigger/`

Use this call if you want to add a contact to an email campaign

Only Campaign Type accepted: trigger&#x20;

You must retrieve your campaign id to add your contact. The id can be retrieved by a API call or directly on the campaign link when navigating on your account

<https://app.gyfti.fr/offreur?p=campagne\\&campaign="campaign> id"

an example of campaign id : 1795506931386x295342420265398301

The url can be found by opening your campaign in "Your campaigns" menu

The email address of your contact is mandatory

Postal informations are optional

#### Headers

| Name                                            | Type   | Description             |
| ----------------------------------------------- | ------ | ----------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | 'Bearer \[YOUR\_TOKEN]' |

#### Request Body

| Name                                                 | Type   | Description                                                               |
| ---------------------------------------------------- | ------ | ------------------------------------------------------------------------- |
| contact\_firstname<mark style="color:red;">\*</mark> | String | Your recipient first name                                                 |
| contact\_lastname<mark style="color:red;">\*</mark>  | String | Your recipient last name                                                  |
| contact\_email<mark style="color:red;">\*</mark>     | String | Your recipient email address                                              |
| campaign<mark style="color:red;">\*</mark>           | String | The gyfti campaign id from your account you wish to send to the recipient |
| company                                              | String | Your recipient company name                                               |
| jobtitle                                             | String | Your recipient jobtitle                                                   |
| phone                                                | String | Your recipient phone number                                               |
| additional\_address                                  | String | Your recipient additional address                                         |
| address                                              | String | Your recipient address (number and street)                                |
| city                                                 | String | Your recipient's city                                                     |
| postal\_code                                         | String | Your recipient's postal code                                              |
| country                                              | String | Your recipient's country                                                  |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
  "status": "success",
  "response": {}
}
```

{% endtab %}
{% endtabs %}

```json
{
    "campaign": "your campaign id",
    "contact_email": "recipient@email.com",
    "contact_firstname": "recipient firt name",
    "contact_lastname": "recipient last name",
    "company": "recipient company",
    "jobtitle": "recipient jobtitle",
    "phone": "recipient phone number",
    "address": "recipient address ",
    "additional_address": "recipient additional address",
    "postal_code": "recipient postal code",
    "city": "recipient city",
    "country": "recipient country"
  }
```

## Add new contact to a trigger campaign (postal)

<mark style="color:green;">`POST`</mark> `https://app.gyfti.fr/api/1.1/wf/1_zapier_add_contact_trigger_directe/`

Use this call if you want to add a contact to a postal campaign

Only Campaign Type accepted: trigger&#x20;

You must retrieve your campaign id to add your contact. The id can be retrieved by a API call or directly on the campaign link when navigating on your account

<https://app.gyfti.fr/offreur?p=campagne\\&campaign="campaign> id"

an example of campaign id : 1795506931386x295342420265398301

The url can be found by opening your campaign in "Your campaigns" menu

The email address, full address and phone number of your contact are mandatory

#### Request Body

| Name                                                | Type   | Description                                                                                                                                                              |
| --------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| contact\_email<mark style="color:red;">\*</mark>    | String | Your recipient email address                                                                                                                                             |
| contact\_fistname<mark style="color:red;">\*</mark> | String | Your recipient first name                                                                                                                                                |
| contact\_lastname<mark style="color:red;">\*</mark> | String | Your recipient last name                                                                                                                                                 |
| campaign<mark style="color:red;">\*</mark>          | String | The gyfti campaign (postal) from your account you wish to send to the recipient                                                                                          |
| additional\_address                                 | String | Your recipient's additional address (for delivery purposes) useful to add the company name if delivered to an office                                                     |
| address<mark style="color:red;">\*</mark>           | String | Your recipient's address (number and street name) for delivery purposes                                                                                                  |
| phone<mark style="color:red;">\*</mark>             | String | <p>Your recipient phone number (for delivery purposes)</p><p>The phone can be fake if you do not have it (but for some carriers this may block parcel notifications)</p> |
| jobtitle                                            | String | Your recipient jobtitle                                                                                                                                                  |
| city<mark style="color:red;">\*</mark>              | String | Your recipient's city (for delivery purposes)                                                                                                                            |
| postal\_code<mark style="color:red;">\*</mark>      | String | Your recipient's postal code (for delivery purposes)                                                                                                                     |
| country<mark style="color:red;">\*</mark>           | String | Your recipient's country (for delivery purposes)                                                                                                                         |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  "status": "success",
  "response": {}
}
```

{% endtab %}
{% endtabs %}
