List Campaigns

ReferenceUpdated June 14, 2026

List Campaigns

List campaigns in the workspace associated with your API key. Use this to let users (or agents) pick a campaign by name or ID before calling generate or generate-batch.


List campaigns

GET /api/v1/campaigns · scope campaigns:read

Returns campaigns in the API key's workspace (paginated).

Headers

HeaderRequiredDescription
AuthorizationYesBearer <API_KEY>
or X-API-KeyYes<API_KEY>

Query parameters

ParameterTypeRequiredDescription
qstringNoFilter by campaign name (case-insensitive substring).
namestringNoSame as q.
limitnumberNoMax results (default 50, max 100).
offsetnumberNoPagination offset (default 0).

Example request

curl -X GET "https://app.machfive.io/api/v1/campaigns?q=Q1" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response (200 OK)

{
  "campaigns": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Q1 Outbound",
      "created_at": "2025-01-15T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "total": 1
}
FieldTypeDescription
campaignsarrayList of campaigns.
campaigns[].idstring (UUID)Campaign ID; use in generate and generate-batch.
campaigns[].namestringDisplay name (project_name).
campaigns[].created_atstring (ISO 8601)Creation time.
has_morebooleanWhether more results exist beyond this page.
totalnumberTotal campaigns matching the query.

Error responses

StatusErrorDescription
401UNAUTHORIZEDMissing or invalid API key.
500INTERNAL_ERRORServer error listing campaigns.