# Create a review campaign

```http
POST https://api.synup.com/api/v4/locations/review-campaigns
```

This API creates a review campaign to request customer reviews for a specific location.

**Behavior:**
- Sends review requests to customers via supported channels (e.g., email, SMS).
- Allows customization of campaign message and branding.
- Supports targeting options, such as specific customer segments.

Source: https://developer.synup.com/api/review-campaigns/create-a-review-campaign

## Request body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `input` | object | required |  |
| `input.locationId` | string | required | Encoded Location ID |
| `input.name` | string | required | Review Campaign Name |
| `input.locationCustomers` | array of object | required | Campaign customers to create |
| `input.locationCustomers[].name` | string | required |  |
| `input.locationCustomers[].email` | string | optional |  |
| `input.locationCustomers[].phone` | string | optional |  |
| `input.screening` | boolean | optional | Flag for screening enabled/disabled |
| `input.landingPageTemplate` | object | optional | Landing page template(Use only when screening = true). |
| `input.landingPageTemplate.content` | string | optional |  |
| `input.landingPageTemplate.heading` | string | optional |  |
| `input.landingPageTemplate.reviewSiteHash` | array of object | optional |  |
| `input.landingPageTemplate.reviewSiteHash[].name` | string | optional |  |
| `input.landingPageTemplate.reviewSiteHash[].url` | string | optional | URL for connected sites (maps.google.com, facebook.com, foursquare.com) or custom sites |
| `input.openingEmailTemplate` | object | optional | Template for the very first email sent out. |
| `input.openingEmailTemplate.replyTo` | string | optional |  |
| `input.openingEmailTemplate.subject` | string | optional |  |
| `input.openingEmailTemplate.heading` | string | optional |  |
| `input.openingEmailTemplate.content` | string | optional |  |
| `input.openingEmailTemplate.reviewSiteHash` | array of object | optional | Not required when screening is true |
| `input.openingEmailTemplate.reviewSiteHash[].name` | string | optional |  |
| `input.openingEmailTemplate.reviewSiteHash[].url` | string | optional | URL for connected sites (maps.google.com, facebook.com, foursquare.com) or custom sites |
| `input.smsTemplate` | object | optional | Template for the very first SMS sent out. |
| `input.smsTemplate.content` | string | optional |  |
| `input.smsTemplate.reviewSiteHash` | array of object | optional | Max 1 for smsTemplate Not required when screening is true |
| `input.smsTemplate.reviewSiteHash[].name` | string | optional |  |
| `input.smsTemplate.reviewSiteHash[].url` | string | optional | URL for connected sites (maps.google.com, facebook.com, foursquare.com) or custom sites |

## Example request

```bash
curl -X POST 'https://api.synup.com/api/v4/locations/review-campaigns' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "locationId": "TG9jYXRpb246MTQwMjQ=",
    "name": "Christmas Sale Feedback",
    "locationCustomers": [
      {
        "name": "John",
        "email": "xyz@gmail.com",
        "phone": "3863443131"
      }
    ],
    "screening": true,
    "landingPageTemplate": {
      "content": "Please take a moment to review your experience with us on one of these review sites.",
      "heading": "Thank you. We are glad to hear that you had a great experience with us.",
      "reviewSiteHash": [
        {
          "name": "Google",
          "url": "maps.google.com"
        },
        {
          "name": "Yelp",
          "url": "www.yelp.com/biz"
        }
      ]
    },
    "openingEmailTemplate": {
      "replyTo": "user@domain.com",
      "subject": "Tell us how we did",
      "heading": "ASD is committed to providing the best experience and service possible!",
      "content": "Please take 5 minutes to share some feedback on your experience!"
    },
    "smsTemplate": {
      "content": "Hi, Thank you for visiting ASD. Can you take a few seconds to review your experience with us? {{short_url}}"
    }
  }
}'
```

## Responses

| Status | Description |
| --- | --- |
| `200` | Successfully created review campaign |
| `403` | Insufficient permissions to create campaigns |
