Skip to content

Rotate the API key

POST/account/integrations/api_key/rotate

Costs 2 rate-limit points · Rate limits

Replace the store's API key with a new one and return it. The old key stops working at once, including for the request that rotated it. The key is shown only in this response.

Every integration using the old key must be updated. Not offered to assistants. Send it first without confirm: nothing changes and the 409 confirmation_required says what would. Tell the merchant, ask, and resend with confirm: true (?confirm=true on a DELETE) only after they agree.

Also searched asrotate api keyregenerate api keynew api keyreset api keymy api key was leaked

Request body

  • confirmboolean

    Send true only after the merchant agreed. Without it the key is kept and the 409 says what would happen.

Returns

  • api_keyobject
    Show 2 child attributesHide child attributes
    • configuredboolean
      Example: true
    • keystring
      Example: if_api_key_YOUR_KEY
  • payment_processorobject
    Show 3 child attributesHide child attributes
    • connectedboolean
      Example: false
    • namestring, nullable
    • stripe_checkout_v2boolean
      Example: false
  • customer_accountsobject
    Show 1 child attributeHide child attributes
    • translationsarray of anys

Errors

401

Missing or unknown X-Auth-Token, or the shop uninstalled the app.

403

v3_required: the shop still runs the previous dashboard. paid_plan_required: API access needs a paid plan.

422

The request failed validation. Nothing was saved.

429

Rate limited: cost-weighted per key (reads cost less than writes). Wait Retry-After seconds; see X-RateLimit-* headers.

Every error has the same shape: see Errors.

POST/account/integrations/api_key/rotate
curl -X POST "https://app.invoicefalcon.com/api/v3/external/account/integrations/api_key/rotate" \
  -H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm": true
  }'
Response
{
  "api_key": {
    "configured": true,
    "key": "if_api_key_YOUR_KEY"
  },
  "payment_processor": {
    "connected": false,
    "name": null,
    "stripe_checkout_v2": false
  },
  "customer_accounts": {
    "translations": []
  }
}