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.
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
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.