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

Read a mutation

Reports how a Mutation ended, or that it has not ended.

running means the change has not finished. Poll again.

complete means the change finished, and result says how. result.ok of true carries what the provider gave back: a create carries the new object id, a copy carries the id of the copy and the budget that the copy carries, and every other action carries success. result.ok of false is a provider refusal, with a stable error code and a sentence. A refusal is complete, not errored.

errored means the Mutation itself broke down. AdCrunch cannot say whether the provider applied the change, so read the object at the provider before you send the action again.

priorValue is present for a change to an object that exists, in each status. It holds the values that the change replaced, read from the provider just before the change, in the field names and units of the action: {"dailyBudget": 800} for a budget, {"status": "ACTIVE"} for a status. To undo the change, send the same kind again with these values. A create and a copy have none.

A Mutation belongs to one organization. An id from another organization and an id that never existed both answer 404, so a caller cannot learn which of the two it sent.

This needs mutation:write, not mutation:read. Polling is the second half of the write that started the Mutation, and the caller polling is the caller that started it. mutation:read reads the organization history through GET /mutations.

GET/mutations/{id}
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.

Path parameters
idstringrequired
Responses
200

The Mutation is running, complete, or errored.

priorValueobject

The values that the change replaced, read from the provider just before the change. It uses the field names and the units of action, for example {"dailyBudget": 800}, {"status": "ACTIVE"}, {"bidStrategy": "COST_CAP", "costCap": 4}, {"startTime": "2026-10-01T00:00:00+0200", "endTime": null} or {"name": "Spring sale"}. To undo the change, send the same kind again with these values. A bid change on a campaign also gives the amount of each ad set in adsets: undo it on each ad set. A create and a copy have none.

resultany

How the change ended. Present only when status is complete. ok of true carries what the provider gave back: a create carries the new object id, a copy carries the id of the copy and the budget that the copy carries, and every other action carries success. The budget is {"dailyBudget": 50} or {"lifetimeBudget": 500} in whole units of the account currency, "campaign" for an ad set copy that spends the budget of its campaign, or "adset" for a campaign copy whose ad sets each carry a budget. A schedule change also carries deliveryStartsAgain of true when it gave an ACTIVE ad set that had ended a new end: the ad set then delivers again. ok of false is a provider refusal, with a stable error code and a sentence.

statusstringrequired

running means poll again. complete means the change finished, and result says how it ended. errored means the Mutation itself broke down, and AdCrunch cannot say whether the change happened.

Allowed:runningcompleteerrored
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.

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.

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:write. 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.

404

No such Mutation for your organization. error is not_found.

errorstringrequired

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

Allowed:not_found
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-910.adcrunch.dev/mutations/string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "priorValue": {
    "status": "ACTIVE"
  },
  "result": {
    "ok": true,
    "result": {
      "success": true
    }
  },
  "status": "complete"
}