Security
Scope keys for assistants, review writes and handle prompt injection.
Give assistants their own key#
Create a separate key for each assistant or teammate so you can see its activity and revoke it without touching anything else. The key’s last used time in the dashboard shows whether it is still in use.
Start read-only#
A key with only :read scopes cannot change anything, and the assistant does not even see the write tools. Add write scopes for the resources you want it to manage.
| Goal | Scopes |
|---|---|
| Reporting and questions | store:read, products:read, orders:read, customers:read |
| Catalog manager | products:write, coupons:write |
| Theme designer | store:read, themes:write |
Review before it happens#
Tools are labelled read-only or destructive so clients can ask before running them. Keep approval on for delete_* and publish_theme. Theme edits stay as drafts until publish, and every publish can be rolled back from the dashboard.
Prompt injection
Product descriptions, order notes and customer names come from people outside your business. An assistant that reads them could be steered by text written there. Use the smallest scopes that work, and review write actions on keys that can also read customer data.
Revoke#
Delete the key in Developers → API keys. Requests fail immediately with invalid_api_key.