Skip to main content

Update Connection

PUT 

/api/storefront/instances/:id/connection

Replace the store address and/or the API key on an existing instance, then immediately re-verify.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Body:

  • store_url (required, string, max 255, must be a valid URL). Stored with any trailing slash removed.
  • api_key (optional/nullable, string, min 8, max 255). Omit it to change only the address and keep the stored key.

Supplying a key switches the instance to the pasted-key path: auth becomes api_key and the store's own connection record is dropped, because the key is no longer one the store issued. Any standing connection error is cleared.

This endpoint always returns 200 and always saves. connection_ok tells you whether the store accepted the new credentials; when it is false the credentials are still stored and message carries the store's reason, so a merchant can fix a typo without losing what they typed.

Permission: integrations.update.

Authentication: Bearer token (session or PAT).

Request​

Responses​

OK

Response Headers
    Content-Type