For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a draft campaign

Create a campaign in a profile.

Create a draft campaign

post

Create a campaign in a profile.

The campaign is created as a draft, so nothing is sent and no contact is touched. It has no audience yet either - targeting and scheduling are not part of this request, the draft is finished and sent from the Reach interface.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
profileUuidstringRequired

Profile uuid parameter

Example: 550e8400-e09b-41d4-a716-400055000000
Body

Create a campaign in draft status

sender_namestring · max: 50Required

From name shown to the recipients.

Example: Marketing Team
sender_emailstringRequired

From address of the campaign. Its domain has to be verified on the profile before the campaign can be sent.

Example: marketing@example.com
titlestringOptional

Name the campaign is listed under. Not shown to the recipients.

Example: Black Friday Campaign
subjectstringOptional

Subject line of the email.

Example: Don't miss our Black Friday deals!
template_uuidstringOptional

Template to send, as returned by the template endpoints. Can be left out and attached later, but the campaign cannot be sent without one.

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
200

Success response

application/json

The campaign as it was stored, without targeting or delivery progress

uuidstringOptionalExample: 550e8400-e29b-41d4-a716-446655440000
titlestringOptionalExample: Black Friday Campaign
subjectstringOptionalExample: Don't miss our Black Friday deals!
sender_namestringOptionalExample: Marketing Team
sender_emailstringOptionalExample: marketing@example.com
template_uuidstring · nullableOptionalExample: 2080cc86-e026-4f7b-9598-d4132f8c7c2f
statusstring · enumOptional

Always draft for a campaign that was just created.

Example: draftPossible values:
typestring · enumOptionalExample: campaignPossible values:
is_all_contactsbooleanOptional

Whether the campaign targets every contact instead of selected segments.

Example: false
created_atstring · date-time · nullableOptionalExample: 2025-02-27T11:54:22Z
updated_atstring · date-time · nullableOptionalExample: 2025-03-04T09:12:07Z
post/api/reach/v1/profiles/{profileUuid}/campaigns
POST /api/reach/v1/profiles/{profileUuid}/campaigns HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 277

{
  "sender_name": "Marketing Team",
  "sender_email": "marketing@example.com",
  "title": "Black Friday Campaign",
  "subject": "Don't miss our Black Friday deals!",
  "template_uuid": "550e8400-e29b-41d4-a716-446655440000",
  "metadata": {
    "preheader": "Our biggest deals of the year",
    "source": "api"
  }
}
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "title": "Black Friday Campaign",
  "subject": "Don't miss our Black Friday deals!",
  "sender_name": "Marketing Team",
  "sender_email": "marketing@example.com",
  "template_uuid": "2080cc86-e026-4f7b-9598-d4132f8c7c2f",
  "status": "draft",
  "type": "campaign",
  "is_all_contacts": false,
  "metadata": {
    "preheader": "Our biggest deals of the year"
  },
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-04T09:12:07Z"
}

Last updated

Was this helpful?