Acquainto
← API reference

Links

POST/v1/eflows/{id}/links/revoke

Revoke invite links in bulk

The removal side of links/batch. Revoking a 1,000-link campaign one link at a time runs into this API’s write rate limit for about seventeen minutes; this does it in one request.

Takes the same q and state filters as the listing, and revoking is irreversible — there is no verb that brings a link back. So the call is guarded: send your filter with dryRun: true to learn matchedCount, then send it again with that number as expectedCount. If the set has changed underneath you, the real call is a 409 and revokes nothing. Omitting state matches every link on the eflow, which expectedCount is what keeps from being an accident.

revokedCount can be below matchedCount without anything being wrong: an unfiltered call matches links that were already revoked. Honors Idempotency-Key, which is worth setting here — a retry after a timeout would otherwise find the filter matching zero rows and 409 for having succeeded.

Requires the links:write scope.

Example request

curl https://api.acquainto.com/v1/eflows/eflow_abc123/links/revoke \
  -H "Authorization: Bearer acq_live_xxxxxxxx" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "q": "string",
    "state": "live",
    "dryRun": true,
    "expectedCount": 1
  }'

Parameters

  • idpathstringrequired

    A eflow id, prefixed `eflow_`.

Request body

  • qstring

    Case-insensitive substring match across the link's identity and campaign fields -- the same needle the list route takes.

  • state"live" | "revoked" | "expired" | "exhausted"

    Narrow to one computed state. Omit it to match every link on the eflow; `expectedCount` is what keeps that from being an accident.

  • dryRunboolean

    Count what the filter matches and revoke nothing. How you get the `expectedCount` for the real call.

  • expectedCountinteger

    How many links you believe this filter matches. Required unless `dryRun`. A disagreement is a 409 that revokes nothing.

Responses

200Revoke invite links in bulk
  • matchedCountintegerrequired

    Links the filter matched, revoked or not.

  • revokedCountintegerrequired

    Links this call actually revoked. Zero on a dry run, and at most `matchedCount` otherwise.

  • dryRunbooleanrequired

    Echoed back, so a `revokedCount` of zero is never ambiguous between "nothing matched" and "nothing was asked for".

400The request was malformed or failed validation.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

401Missing, invalid, or revoked credential.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

403The credential lacks the scope this route requires.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

404No such resource, or it belongs to another tenant.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

409`revoke_count_mismatch`: the filter no longer matches `expectedCount` links, so **nothing was revoked**. Somebody minted or revoked links between your `dryRun` and this call. Re-run the dry run and send the new number -- do not retry with the old one. This is the only response that means the call was refused rather than failed, and on an irreversible verb it is the one you want.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

429Rate limited. Retry after the interval in `Retry-After`.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

500Something failed on our side. Safe to retry.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

Browse every operation, with full request/response schemas, in the full API reference.