cURL
curl --request GET \
--url https://api.growi.io/api/public/v1/organizations/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.growi.io/api/public/v1/organizations/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.growi.io/api/public/v1/organizations/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.growi.io/api/public/v1/organizations/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.growi.io/api/public/v1/organizations/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.growi.io/api/public/v1/organizations/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.growi.io/api/public/v1/organizations/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"campaigns": [
{
"id": 16425,
"name": "Campaign Name",
"campaign_type": "Campaign",
"status": "Active"
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"success": false,
"message": "Organization not found"
}Organization API
Get Campaigns
Retrieves a list of all available campaigns for your organization
GET
/
organizations
/
campaigns
cURL
curl --request GET \
--url https://api.growi.io/api/public/v1/organizations/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.growi.io/api/public/v1/organizations/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.growi.io/api/public/v1/organizations/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.growi.io/api/public/v1/organizations/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.growi.io/api/public/v1/organizations/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.growi.io/api/public/v1/organizations/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.growi.io/api/public/v1/organizations/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"campaigns": [
{
"id": 16425,
"name": "Campaign Name",
"campaign_type": "Campaign",
"status": "Active"
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"success": false,
"message": "Organization not found"
}Retrieves a list of all available campaigns for your organization. This endpoint returns basic campaign information including campaign IDs, names, types, and statuses that can be used for filtering and organization purposes.
Common error scenarios:
Request Parameters
This endpoint does not require any specific parameters, but standard authentication is required.| Parameter | Type | Description | Required |
|---|---|---|---|
| None | - | This endpoint does not accept additional parameters | - |
Request Example
curl -X GET "https://api.growi.io/api/public/v1/organizations/campaigns" \
-H "Authorization: Bearer YOUR_PUBLIC_API_KEY" \
-H "Content-Type: application/json"
Response Example
{
"success": true,
"campaigns": [
{
"id": 16425,
"name": "Campaign Name",
"campaign_type": "Campaign",
"status": "Active"
},
{
"id": 16426,
"name": "Summer Collection 2024",
"campaign_type": "Contract",
"status": "Paused"
},
{
"id": 16427,
"name": "Brand Ambassador Program",
"campaign_type": "Ambassador Program",
"status": "Active"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | Boolean | Indicates whether the request was successful |
campaigns | Array | Array of campaign objects |
campaigns[].id | Integer | Unique identifier for the campaign |
campaigns[].name | String | Display name of the campaign |
campaigns[].campaign_type | String | Type of campaign (Campaign, Contract, Ambassador Program) |
campaigns[].status | String | Current status of the campaign (Active, Paused, Canceled, Completed, Archived, Void) |
Use Cases
- Campaign Filtering: Use campaign IDs to filter data in other API endpoints
- Campaign Management: Retrieve available campaigns for management interfaces
- Organization Setup: Get campaign information for initial application setup
- Reporting: Include campaign names and statuses in reports and analytics dashboards
- Status Monitoring: Track campaign statuses across your organization
Error Responses
{
"error": "Not Authenticated"
}
- 401 Unauthorized: Invalid or missing Bearer token
- 403 Forbidden: API key doesn’t have permission to access campaigns
- 422 Unprocessable Entity: Organization not found
- 500 Internal Server Error: Server-side error occurred