# List and filter Intents

## GET /intents

> List and filter intents

```json
{"openapi":"3.0.3","info":{"title":"Back in Stock Intents API","version":"1.0.0"},"servers":[{"url":"https://app.stoqapp.com/api/v1/external","description":"Production server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Auth-Token"}},"schemas":{"Intent":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the intent"},"blocked_at":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the intent was blocked from sending"},"channel":{"type":"string","description":"Communication channel used for notifications (e.g., Email, SMS)"},"email":{"type":"string","description":"Customer's email address for notifications"},"notified_at":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp of the notification sent"},"optin_confirmed":{"type":"boolean","description":"Whether the customer has confirmed their GDPR opt-in for notifications"},"phone":{"type":"string","description":"Customer's phone number for SMS notifications"},"quantity":{"type":"integer","description":"Requested quantity of the product when back in stock"},"sent_notifications_count":{"type":"integer","description":"Number of notifications sent for this intent"},"source":{"type":"string"},"type":{"type":"string","description":"Type of the intent (e.g., restock, wishlist_reminder)"},"unsubscribed_at":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the customer unsubscribed from notifications"},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the intent was created"},"updated_at":{"type":"string","format":"date-time","description":"Timestamp when the intent was last updated"},"customer_id":{"type":"string","description":"Unique identifier for the customer"},"intent_trigger_id":{"type":"string","nullable":true,"description":"Identifier for the trigger that created this intent"},"product_variant_id":{"type":"string","nullable":true,"description":"Internal product variant identifier"},"shop_id":{"type":"string","description":"Unique identifier for the shop"},"shopify_inventory_item_id":{"type":"integer","nullable":true,"description":"Shopify's inventory item identifier"},"shopify_market_id":{"type":"integer","nullable":true,"description":"Shopify's market identifier for multi-market stores"},"shopify_product_id":{"type":"integer","nullable":true,"description":"Shopify's product identifier"},"shopify_variant_id":{"type":"integer","nullable":true,"description":"Shopify's variant identifier"},"customer_name":{"type":"string","nullable":true,"description":"Customer's full name"},"contact":{"type":"string","nullable":true,"description":"Customer's contact information"},"customer_unsubscribed_at":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the customer unsubscribed from all notifications"},"accepts_marketing":{"type":"boolean","nullable":true,"description":"Whether the customer has opted in to receive marketing communications"},"notifications_count":{"type":"integer","nullable":true,"description":"Total number of notifications sent for this intent"}}}}},"paths":{"/intents":{"get":{"summary":"List and filter intents","tags":["Intents"],"parameters":[{"in":"header","name":"X-Auth-Token","required":true,"schema":{"type":"string"},"description":"API key for authentication"},{"in":"query","name":"shopify_variant_id","schema":{"type":"integer"},"description":"Filter by Shopify Variant ID"},{"in":"query","name":"shopify_product_id","schema":{"type":"integer"},"description":"Filter by Shopify Product ID"},{"in":"query","name":"email","schema":{"type":"string"},"description":"Filter by customer email"},{"in":"query","name":"phone","schema":{"type":"string"},"description":"Filter by customer phone"},{"in":"query","name":"start_date","schema":{"type":"string","format":"date"},"description":"Filter by start date (YYYY-MM-DD)"},{"in":"query","name":"end_date","schema":{"type":"string","format":"date"},"description":"Filter by end date (YYYY-MM-DD)"},{"in":"query","name":"notified","schema":{"type":"boolean"},"description":"Filter by notification status (true = notified, false = not notified)"},{"in":"query","name":"page","schema":{"type":"integer"},"description":"Page number for pagination"},{"in":"query","name":"per_page","schema":{"type":"integer"},"description":"Number of items per page (maximum 500)"}],"responses":{"200":{"description":"A paginated list of intents","content":{"application/json":{"schema":{"type":"object","properties":{"intents":{"type":"array","items":{"$ref":"#/components/schemas/Intent"}},"meta":{"type":"object","properties":{"total_count":{"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"},"total_pages":{"type":"integer"}}}}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"}}}}}}
```
