Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview

List mutations

Lists your organization’s Mutations, newest first.

One page at a time: limit rows at most, 100 by default. When the answer holds nextCursor, more rows exist: send it back as cursor to get the next page. When it is absent, you have the last page. The cursor is opaque: send it back with no change, and do not build one.

A row that is still running is checked against the change itself as the page is read, so a Mutation that finished after its row was written shows its true outcome here.

This is the history read, and it needs mutation:read. Starting a Mutation and polling the one you started need mutation:write.

GET/mutations
Authorization
AuthorizationBearer token · headerrequired

Send Authorization: Bearer <credential>.

Use an API key (acr_…), from the AdCrunch console under Settings → API keys.

The credential names the organization, and no operation takes an organization parameter.

See https://docs.adcrunch.dev/api/authentication.

Query parameters
cursorstring
min length 1
limitintegerrequired
min 1 · max 500 · default: 100
Responses
200

One page of Mutations, newest first. This one is the last page, so it carries no nextCursor.

dataobject[]required
Show properties
Array of object
actionanyrequired

What was asked for, in the shape POST /mutations accepts.

advertiserIdstringrequired

The advertiser that was changed.

completedAtnumber | nullrequired

When it finished, as a Unix timestamp in milliseconds. Null while it runs.

createdAtnumberrequired

When it started, as a Unix timestamp in milliseconds.

organizationIdstringrequired

The organization it belongs to.

providerstringrequired

The ad platform the advertiser belongs to. It is meta today.

resultany | nullrequired

How the change ended, in the shape GET /mutations/{id} answers. Null while the Mutation runs.

statusstringrequired

How it ended, or that it has not.

Allowed:runningcompleteerrored
toolstringrequired

Which action was asked for, for example meta_set_status. It is the kind of the action above.

userIdstringrequired

Who asked for it.

workflowIdstringrequired

The Mutation id. The same id POST /mutations returned.

nextCursorstring

Send this value as cursor to get the next page. It is absent on the last page.

400

The request does not match the schema of this operation: a field is missing or has the wrong type, or the body is not valid JSON. error is invalid_request, and issues names each field. Nothing was changed. Or AdCrunch cannot use the cursor: it cannot read it, or the cursor belongs to a different query. Then error is invalid_cursor. Send the nextCursor of the previous page with no change, or omit cursor to get the first page.

Any of:
object
issuesobject[]required

One entry for each field that does not match.

Show properties
Array of object
instringrequired

The part of the request that holds the field.

Allowed:bodycookieheadersparamsquery
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

pathstringrequired

A JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:invalid_request
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

object
errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:invalid_cursor
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

401

No API key, or one that does not resolve. See the security scheme. error is unauthorized.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:unauthorized
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

403

The caller does not hold mutation:read. error is forbidden.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:forbidden
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

Request
curl -X GET "https://api.pr-701.adcrunch.dev/mutations?limit=100" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "data": [
    {
      "action": {
        "dailyBudget": 50,
        "kind": "meta_create_campaign",
        "name": "Spring sale prospecting",
        "objective": "OUTCOME_SALES",
        "specialAdCategories": []
      },
      "advertiserId": "acc_1203456789012345",
      "completedAt": null,
      "createdAt": 1790000060000,
      "organizationId": "org_3a7f10",
      "provider": "meta",
      "result": null,
      "status": "running",
      "tool": "meta_create_campaign",
      "userId": "usr_4e8b23",
      "workflowId": "7e5a2d19-0c4b-4e6a-8f31-5b9d7a02c6e8"
    },
    {
      "action": {
        "id": "120210000000000",
        "kind": "meta_set_status",
        "level": "campaign",
        "status": "PAUSED"
      },
      "advertiserId": "acc_1203456789012345",
      "completedAt": 1790000004000,
      "createdAt": 1790000000000,
      "organizationId": "org_3a7f10",
      "provider": "meta",
      "result": {
        "ok": true,
        "result": {
          "success": true
        }
      },
      "status": "complete",
      "tool": "meta_set_status",
      "userId": "usr_4e8b23",
      "workflowId": "b3d1f0c4-6a2e-4a1f-9f77-2c0d1e5a8b94"
    }
  ]
}