---
title: Get a list of all campaigns of a registered workspace.
slug: get-a-list-of-all-campaigns-of-a-registered-workspace
docTags: 
createdAt: 2025-08-10T07:26:32.595Z
---

{
  "id": "VwglK2VYECMfPvWh0nftZ",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.usetrust.app/v1/campaigns/all/{workspaceId}",
    "servers": [],
    "name": "Get a list of all campaigns of a registered workspace.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "workspaceId",
          "type": "string",
          "description": "<p>The id of the registered workspace (format of Guid).</p>"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "basic",
          "name": "basic",
          "kind": "optional",
          "type": "http",
          "description": "Basic Authentication header",
          "scheme": "basic"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Returns a list with all campaigns.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"registeredWorkspaces\":[\"https://usetrust.io\",\"https://usetrust.site/\",\"https://www.g-tac.de\"],\"workspaceDetails\":[{\"name\":\"Trust\",\"website\":\"https://usetrust.io\",\"workspaceId\":\"c2cd39b7-239c-4455-a4e6-aa5879a1e851\"},{\"name\":\"Trust Demo\",\"website\":\"https://usetrust.site/\",\"workspaceId\":\"c590e306-5dee-5465-a26d-716b73e75903\"}]}",
            "description": "",
            "customType": "Workspaces",
            "schema": [
              {
                "name": "registeredWorkspaces",
                "kind": "optional",
                "type": "array",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "workspaceDetails",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/ToolData",
                "customType": "ToolData[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "Name of your registered website in your Trust account.",
                    "example": ""
                  },
                  {
                    "name": "website",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "workspaceId",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "example": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/Workspaces",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "string",
            "description": "",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "k90OKN-YcmbUKVUyx2mIQ",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.usetrust.app/v1/campaigns/all/{workspaceId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "QugchTxnEe9-l525MGSme",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.usetrust.app/v1/campaigns/all/{workspaceId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Edp_gwR2VMqjKB9PD-oIQ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.usetrust.app/v1/campaigns/all/{workspaceId}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "y8Nuhy-7Ad2Ck24F9P1Zp",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.usetrust.app/v1/campaigns/all/{workspaceId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        },
        {
          "id": "JjVTpMV78ZeZpNGKbrKVa",
          "language": "csharp",
          "label": "C#",
          "code": "var options = new RestClientOptions(\"https://api.usetrust.app\")\n{\n   MaxTimeout = -1,\n};\nvar client = new RestClient(options);\nvar request = new RestRequest(\"/v1/campaigns/all/{workspaceId}\", Method.Get);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        }
      ],
      "selectedLanguageId": "k90OKN-YcmbUKVUyx2mIQ"
    },
    "results": {
      "languages": [
        {
          "id": "5m1An4s1S8e59K1vu8hk6",
          "language": "200",
          "code": "// Returns a list with all campaigns.\n{\n  \"registeredWorkspaces\": [\n    \"\"\n  ],\n  \"workspaceDetails\": [\n    {\n      \"name\": \"\",\n      \"website\": \"\",\n      \"workspaceId\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "n2Dq2mfpIZoVVaUMni0mx",
          "language": "500",
          "code": "// Internal Server Error\n\"\""
        }
      ],
      "selectedLanguageId": "5m1An4s1S8e59K1vu8hk6"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}