Skip to content

Campaigns

briansemify edited this page Oct 24, 2025 · 4 revisions

Campaigns

Campaign management endpoints for retrieving campaign information and managing campaign-related operations.

All endpoints require Authorization with Bearer JWT token.

Available Endpoints

List All Campaigns

  • Endpoint: GET /api/v1/campaigns
  • Description: Returns list of campaigns under reseller scope
  • Headers: Authorization: Bearer <TOKEN>

List Campaigns for Specific Account

  • Endpoint: GET /api/v2/accounts/{account_id}/campaigns
  • Description: Returns campaigns associated with a specific account
  • Parameters:
    • account_id (integer): The account ID to retrieve campaigns for

Get Specific Campaign Details

  • Endpoint: GET /api/v1/campaigns/{campaign_id}
  • Description: Returns detailed information for a specific campaign
  • Parameters:
    • campaign_id (integer): The campaign ID to retrieve details for

Campaign Notes Management

  • Get Notes: GET /api/v2/campaigns/notes
  • Update Notes: PUT /api/v2/campaigns/notes
  • Description: Manage notes and metadata associated with campaigns

Example Requests

List All Campaigns

curl -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json" \
     "https://developers.semify.com/api/v1/campaigns"

Get Campaign Details

curl -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json" \
     "https://developers.semify.com/api/v1/campaigns/12345"

List Account Campaigns

curl -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json" \
     "https://developers.semify.com/api/v2/accounts/67890/campaigns"

Get Campaign Notes

curl -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json" \
     "https://developers.semify.com/api/v2/campaigns/notes"

Update Campaign Notes

curl -X PUT \
     -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
       "campaign_id": 12345,
       "notes": "Updated campaign notes - client requested changes to SEO strategy"
     }' \
     "https://developers.semify.com/api/v2/campaigns/notes"

Sample Response

{
  "data": [
    {
      "campaign_id": 12345,
      "account_id": 67890,
      "campaign_name": "Acme Business SEO Campaign",
      "status": "active",
      "created_date": "2024-01-15T10:30:00Z",
      "website_url": "https://www.acmebusiness.com",
      "target_location": "United States",
      "notes": "High priority campaign for Q1"
    }
  ],
  "messages": ["Campaigns retrieved successfully"],
  "error": false,
  "pagination": {
    "totalPages": 1,
    "maxRows": 0,
    "offset": 0,
    "page": 1,
    "totalRecords": 1
  }
}

Campaign Notes Response

Get Notes Response

{
  "data": [
    {
      "campaign_id": 12345,
      "notes": "Initial campaign setup completed. Client approved SEO strategy.",
      "updated_date": "2024-01-15T10:30:00Z",
      "created_date": "2024-01-15T09:00:00Z"
    }
  ],
  "messages": ["Campaign notes retrieved successfully"],
  "error": false
}

Update Notes Response

{
  "data": {
    "campaign_id": 12345,
    "notes": "Updated campaign notes - client requested changes to SEO strategy",
    "updated_date": "2024-01-16T14:20:00Z"
  },
  "messages": ["Campaign notes updated successfully"],
  "error": false
}

Important Notes

  • Campaign Creation: Campaign creation is often returned when creating an account; use the returned campaign_id for subsequent operations
  • Top-Level Campaign: The campaign with camp_stage_id of 5 is the top-level campaign ID that gets automatically assigned to the account during account creation
  • Multiple Campaigns: You can have many campaign IDs associated with any account, but the top-level campaign ID (camp_stage_id = 5) serves as the primary campaign for the account
  • Campaign Notes: Campaigns can have notes and other metadata — check the notes endpoints for adding/updating campaign notes
  • Account Association: Each campaign is associated with a specific account and inherits account-level settings
  • Status Tracking: Monitor campaign status to ensure proper service delivery

Recommendations

  • Store campaign IDs from account creation responses for future reference
  • Use campaign notes to track important milestones or client communications
  • Implement proper error handling for campaign retrieval operations
  • Consider pagination when dealing with large numbers of campaigns

Clone this wiki locally