---
updatedAt: 2026-04-21T04:23:54.000Z
agentTools:
  projectIndex: https://developer.blueshift.com/llms.txt
---

# Trigger a campaign

Use this endpoint to trigger an event-triggered or API-triggered campaign for a specific user.

## API at a glance

**Description:** Use this endpoint to trigger an event-triggered or API-triggered campaign for a specific user. This API allows you to programmatically send transactional or event-based campaigns.

> 🚧 Note
>
> The endpoint works for campaigns that are set to trigger using an API call. In an event triggered campaign, in the **Journey Start** trigger, set `When event occurs` to `API Endpoint is called`.

<Image align="center" alt={844} border={false} width="50% " src="https://files.readme.io/5eaabf0-campaign_APItriggered.png" title="campaign_APItriggered.png" />

## Try it out

1. Add the <a href="https://help.blueshift.com/hc/en-us/articles/115002653394-API-Keys#h_01EKWVNJ3TZXXVVFB5F7Q3Z1KX" target="_blank">*User API key*</a> as the **Username** and leave the **Password** field blank.
2. Click the **Base URL** dropdown and select the <a href="https://help.blueshift.com/hc/en-us/articles/4404624313235-Blueshift-global-regions#h_01FC2NRH6E369HM47HK7ZFE3EG" target="_blank">*API endpoint URL*</a> for your Blueshift region.
3. Click **Try It**.

You can also try the API using [Blueshift's API collection in Postman](https://developer.blueshift.com/reference/test-apis#postman-collection).

## Things to know before you start

* This endpoint works **only** with campaigns configured as **event-triggered** or **API-triggered**.
* The campaign must have `triggering_event_name` left blank (for API-triggered) or match the event you're sending.
* **Required identifier:** You must provide a valid user identifier (`email`, `customer_id`, or other configured identifier).
* **Email attachments:** Attachment URLs must be publicly accessible.
* **Transaction UUID:** Use this to prevent duplicate messages. Blueshift returns `200 OK` for duplicate requests with the same `transaction_uuid`.
* **Use case:** Best for sending transactional emails (order confirmations, password resets) or triggering event-based campaigns via API.

> 👍 **Finding the campaign UUID**
>
> The campaign UUID is visible in the browser's address bar when you open a campaign. For example: `https://app.getblueshift.com/dashboard#/app/campaigns/<CAMPAIGN_UUID>/edit_v3/journey`
>
> <Image align="center" border={true} src="https://files.readme.io/7031b939f88a2d435a664ff7587e8b6ea2638924623cb8bdee281853f68899ca-Campaign-UUID.png" className="border" />

## Request parameters

<details>
  <summary><strong>Check out the request parameters</strong></summary>

### **Request body parameters**

| Parameter             | Type      | Required | Description                                                                                                                                                                                                                                                                                       |
| --------------------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `email`               | `string`  | ✅ Yes    | Specify the email address of the user for whom you want to trigger the campaign.                                                                                                                                                                                                                  |
| `campaign_uuid`       | `string`  | ✅ Yes    | Specify the UUID of the campaign that you want to trigger. You can copy the UUID from the URL of the campaign on the Blueshift app. For example, if you open a campaign in the Blueshift app, its URL looks like `https://app.getblueshift.com/dashboard#/app/campaigns/<CAMPAIGN_UUID>/details`. |
| `email_attachments`   | `array`   | ❌ No     | Specify the URLs of the files that you want to send as an attachment along with the email. URLs must be publicly accessible.                                                                                                                                                                      |
| `_bsft_high_priority` | `boolean` | ❌ No     | Set to true if the campaign must be processed as a high priority campaign. Blueshift first processes all high priority campaigns in a first in first out order. This is followed by all other campaigns in a first in first out order. <br /><br />\* **Default:** `false`.                       |
| `transaction_uuid`    | `string`  | ❌ No     | Optionally include the transaction UUID (must be a well formed UUID) to avoid duplicate messages. The API returns a 200 status code for a duplicate request along with a message noting that a request with the given transaction UUID was already processed.                                     |

</details>

## Example requests & responses

<details>
  <summary><strong>Basic campaign trigger</strong></summary>

```json Request
{
  "email": "janedoe@acme.com",
  "campaign_uuid": "a43b685d-65e3-5303-64d8-d4b4ab075b5f"
}
```
```json Response
{
  "success": true
}
```

</details>

<details>
  <summary><strong>Campaign trigger with attachments</strong></summary>

```json Request
{
  "email": "janedoe@acme.com",
  "campaign_uuid": "a43b685d-65e3-5303-64d8-d4b4ab075b5f",
  "email_attachments": [
    "https://cdn.getblueshift.com/examples/sample.pdf",
    "https://cdn.getblueshift.com/static/csv/test.csv"
  ],
  "_bsft_high_priority": false,
  "transaction_uuid": "a0d1a0f3-6596-4e1c-b487-3639e05b6d2f"
}
```
```json Response
{
  "success": true
}
```

</details>

<details>
  <summary><strong>High priority campaign trigger</strong></summary>

```json Request
{
  "email": "vip@acme.com",
  "campaign_uuid": "a43b685d-65e3-5303-64d8-d4b4ab075b5f",
  "_bsft_high_priority": true,
  "transaction_uuid": "b1e2f4g5-7890-5e2f-c598-4740f96e7c3a"
}
```
```json Response
{
  "success": true
}
```

</details>

<details>
  <summary><strong>API error responses</strong></summary>

| Status code                   | Description                                                                                                                                                                                                                                 | Example response                                                                          |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| **400 Bad Request**           | The request is invalid due to missing or incorrect parameters. This includes missing fields, invalid values, formatting issues, or conflicts such as duplicate data.                                                                        | `{ "success": false, "error": "Invalid request parameters" }`                             |
| **401 Unauthorized**          | API authentication failed due to an invalid or missing API key.                                                                                                                                                                             | `{ "message": "Not authorized" }`                                                         |
| **403 Forbidden**             | The API key does not have sufficient permissions to perform this action.                                                                                                                                                                    | `{ "message": "Forbidden" }`                                                              |
| **404 Not Found**             | The specified campaign was not found. Verify the campaign UUID.                                                                                                                                                                             | `{ "message": "Not Found" }`                                                              |
| **422 Unprocessable Entity**  | Request validation failed. Common reasons include: campaign is not event/API triggered (error\_code: 101), campaign cannot be triggered through this endpoint (error\_code: 102), or a valid user identifier is missing (error\_code: 102). | `{ "success": false, "error": "campaign is not event/API triggered", "error_code": 101 }` |
| **429 Too Many Requests**     | The request limit has been exceeded. Reduce request frequency.                                                                                                                                                                              | `{ "message": "Too Many Requests" }`                                                      |
| **500 Internal Server Error** | An unexpected server error occurred. Contact support if the issue persists.                                                                                                                                                                 | `{ "message": "Internal Server Error" }`                                                  |
| **502 Bad Gateway**           | The server received an invalid response. Retry the request.                                                                                                                                                                                 | `{ "message": "Bad Gateway" }`                                                            |
| **503 Service Unavailable**   | The service is temporarily unavailable. Try again later.                                                                                                                                                                                    | `{ "message": "Service Unavailable" }`                                                    |
| **504 Gateway Timeout**       | The server took too long to respond. Retry the request with exponential backoff.                                                                                                                                                            | `{ "message": "Gateway Timeout" }`                                                        |

</details>

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "These APIs will help you manage different workflows in Blueshift. Our powerful REST APIs provide an easy way to integrate your data and third party applications with Blueshift.",
    "version": "1.0.0",
    "title": "Blueshift APIs",
    "contact": {
      "email": "support@getblueshift.com"
    }
  },
  "tags": [
    {
      "name": "Campaigns",
      "description": "Manage your campaigns in Blueshift."
    }
  ],
  "paths": {
    "/api/v1/campaigns/execute": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Trigger a campaign",
        "description": "Use this endpoint to trigger an event-triggered or API-triggered campaign for a specific user.",
        "security": [
          {
            "user_api_auth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "required": [
                  "email",
                  "campaign_uuid"
                ],
                "properties": {
                  "email": {
                    "description": "Specify the email address of the user for whom you want to trigger the campaign.",
                    "type": "string",
                    "example": "janedoe@acme.com"
                  },
                  "campaign_uuid": {
                    "description": "Specify the UUID of the campaign that you want to trigger. You can copy the UUID from the URL of the campaign on the Blueshift app. For example, if you open a campaign in the Blueshift app, its URL looks like `https://app.getblueshift.com/dashboard#/app/campaigns/<CAMPAIGN_UUID>/details`.",
                    "type": "string",
                    "example": "a43b685d-65e3-5303-64d8-d4b4ab075b5f"
                  },
                  "email_attachments": {
                    "type": "array",
                    "description": "Specify the URLs of the files that you want to send as an attachment along with the email.",
                    "example": [
                      "https://cdn.getblueshift.com/examples/sample.pdf",
                      "https://cdn.getblueshift.com/static/csv/test.csv"
                    ],
                    "items": {
                      "type": "string"
                    }
                  },
                  "_bsft_high_priority": {
                    "description": "Set to true if the campaign must be processed as a high priority campaign. Blueshift first processes all high priority campaigns in a first in first out order. This is followed by all other campaigns in a first in first out order. The default value is false.",
                    "type": "boolean",
                    "default": false,
                    "example": false
                  },
                  "transaction_uuid": {
                    "description": "Optionally include the transaction UUID (must be a well formed UUID) to avoid duplicate messages. The API returns a 200 status code for a duplicate request along with a message noting that a request with the given transaction UUID was already processed.",
                    "type": "string",
                    "example": "a0d1a0f3-6596-4e1c-b487-3639e05b6d2f"
                  }
                }
              }
            }
          },
          "description": "Required parameters to trigger a campaign."
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - The request is invalid due to missing or incorrect parameters. This includes missing fields, invalid values, formatting issues, or conflicts such as duplicate data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Invalid request parameters"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API authentication failed due to an invalid or missing API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Not authorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - The API key does not have sufficient permissions to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found - The specified campaign was not found. Verify the campaign UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity - Request validation failed. Common reasons include: campaign is not event/API triggered (error_code: 101), campaign cannot be triggered through this endpoint (error_code: 102), or a valid user identifier is missing (error_code: 102).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "campaign is not event/API triggered"
                    },
                    "error_code": {
                      "type": "integer",
                      "example": 101
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - The request limit has been exceeded. Reduce request frequency.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error - An unexpected server error occurred. Contact support if the issue persists.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Internal Server Error"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway - The server received an invalid response. Retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Bad Gateway"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable - The service is temporarily unavailable. Try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Service Unavailable"
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Gateway Timeout - The server took too long to respond. Retry the request with exponential backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Gateway Timeout"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.getblueshift.com"
    },
    {
      "url": "https://api.eu.getblueshift.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "user_api_auth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```