Campaigns

Create a campaign

Changed on

Creates a reusable outreach campaign template — a named sequence of 1–20 steps — under a project (entityType: "project" → candidate outreach) or an opportunity (entityType: "opportunity" → prospect outreach). The campaign type is derived from the parent; do not send it.

Step subject/body may contain {{variable}} placeholders (see the Campaigns tag for the full variable reference). Standard placeholders are validated at create time — an unknown name is rejected with 422. {{ai:...}} variables are stored verbatim and returned per step under aiVariables for you to resolve before launch. {{manual:...}} is not supported and is rejected with 422.

This endpoint does not resolve variables and does not send anything. To launch the template at a person, use POST /api/v1/campaigns/{id}/launch.

post/api/v1/campaigns

Request

Request body

namestring required

Campaign name

entityType'project' | 'opportunity' required

Parent entity type

entityIdstring uuid required

Parent id — a project id when entityType is "project", otherwise an opportunity id.

ownerEmailstring email required

Email of the campaign owner. Must match an active user in your agency, otherwise 404.

Example request

{
  "name": "Q1 Senior Engineers Outreach",
  "entityType": "project",
  "entityId": "550e8400-e29b-41d4-a716-446655440000",
  "ownerEmail": "recruiter@agency.com",
  "steps": [
    {
      "position": 1,
      "type": "email",
      "dispatchType": "new_thread",
      "subject": "Exciting {{job_role}} role at {{client_name}}",
      "scheduledOn": "2026-07-01",
      "intervalTime": "09:00",
      "intervalDays": 3,
      "timezone": "Europe/London"
    }
  ]
}

Response

Created campaign with its steps

status'ok' required

Example response

{
  "data": {
    "name": "Q1 Outreach",
    "status": "active",
    "type": "candidate_outreach",
    "createdAt": "2025-01-01T00:00:00.000Z",
    "steps": [
      {
        "position": 1,
        "type": "email",
        "dispatchType": "new_thread",
        "subject": "Exciting opportunity at {{client_name}}",
        "variables": [
          {
            "type": "person_first_name",
            "name": "firstName"
          }
        ],
        "aiVariables": [
          {
            "name": "List the full and entire job description including formatting"
          }
        ],
        "scheduledOn": "2026-05-10",
        "intervalTime": "09:00",
        "intervalDays": 3,
        "timezone": "Europe/London",
        "fileIds": []
      }
    ]
  }
}

Changes

    • warning

      added the new undefined enum value to the /// response property for the response status

    • info

      added the optional property / to the response with the status