Creating a Campaign
Overview
This guide provides a complete walkthrough for creating training campaigns using the NINJIO API v2.2.0. Training campaigns allow you to organize and deliver security awareness content to targeted groups of employees within your organization.
What You'll Accomplish
- Create a campaign container to organize your training initiatives
- Configure training simulations with specific content and targeting
- Automatically activate campaigns and begin content delivery to employees
- Verify successful deployment and monitor campaign status
Prerequisites
- Valid NINJIO API key
- Access to customer accounts with training permissions
- Basic understanding of REST API calls
Workflow Summary
| Step | Action | Endpoint | Purpose |
|---|---|---|---|
| 1 | Discover Resources | Multiple GET endpoints | Gather template, employee, and group IDs |
| 2 | Create Campaign | POST /campaigns/training/ | Create campaign container |
| 3 | Create Simulation | POST /simulations/training/ | Link content to campaign with targeting |
| 4 | Activate Campaign | PUT /campaigns/training/{id} | Manually set campaign to active |
| 5 | Verify Deployment | GET /campaigns/training/{id} | Confirm campaign is active |
Expected Outcome: Active training campaign delivering content to targeted employees.
Step 1: Resource Discovery
Before creating campaigns, collect the required IDs for templates, employees, and groups.
1.1 Training Templates
Discover available training content templates.
Endpoint: Get All Training Templates
curl -X GET "https://apigw.goninjio.com/api/api_gateway/customer/templates/training/" \
-H "apiKey: YOUR_API_KEY"
Key Fields: Save id values for use in simulation creation.
1.2 Email Templates
Discover available email delivery templates.
Endpoint: Get All Email Templates
curl -X GET "https://apigw.goninjio.com/api/api_gateway/customer/templates/email/" \
-H "apiKey: YOUR_API_KEY"
Key Fields: Save id values - email templates are required for simulation creation and newly available in this API version.