Rafobase Logo

List all campaigns

Retrieve all campaigns configured for your account.

GET
/campaigns

Retrieve all campaigns configured for your account.

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication. Use your API key as the bearer token.

In: header

Query Parameters

is_active?boolean

Filter by active status

Response Body

application/json

application/json

curl -X GET "https://api-base.rafo.work/api/v1/campaigns"
{
  "data": [
    {
      "id": "camp_xxxxx",
      "name": "Default Referral Program",
      "reward_type": "percentage",
      "reward_value": 0,
      "warranty_days": 0,
      "min_redemption": 0,
      "is_active": true,
      "is_default": true,
      "auto_register": true,
      "stats": {
        "total_members": 0,
        "total_referrals": 0,
        "total_rewards_paid": 0
      },
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid or missing API key"
  }
}