# Permissions

Cached consent preferences for communication channels

## Update cached user permission flags

> Stores communication permission flags for a basket/user pair.\
> \
> Throttling scope: \`user-permissions\`.

```json
{"openapi":"3.1.0","info":{"title":"Users API - Loyalty, Permissions, Segments, and Cards","version":"4.0.0"},"tags":[{"name":"Permissions","description":"Cached consent preferences for communication channels"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"paths":{"/users/permissions/":{"post":{"tags":["Permissions"],"operationId":"updateUserPermissions","summary":"Update cached user permission flags","description":"Stores communication permission flags for a basket/user pair.\n\nThrottling scope: `user-permissions`.","parameters":[{"$ref":"#/components/parameters/SessionCookieHeader"},{"$ref":"#/components/parameters/CSRFTokenHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPermissionRequest"}}}},"responses":{"200":{"description":"Permissions updated"},"400":{"description":"Validation error"}}}}},"components":{"parameters":{"SessionCookieHeader":{"name":"Cookie","in":"header","required":true,"description":"Session cookie header (e.g. `sessionid=abc123`)","schema":{"type":"string"}},"CSRFTokenHeader":{"name":"X-CSRFToken","in":"header","required":true,"description":"CSRF token header for unsafe methods (POST/PUT/PATCH/DELETE)","schema":{"type":"string"}}},"schemas":{"UserPermissionRequest":{"type":"object","required":["uid","basket"],"properties":{"uid":{"type":"string","description":"User identifier used by permission cache"},"basket":{"type":"integer","description":"Active basket identifier"},"sms_allowed":{"type":"boolean","description":"SMS communication consent"},"call_allowed":{"type":"boolean","description":"Call communication consent"},"email_allowed":{"type":"boolean","description":"Email communication consent"},"whatsapp_allowed":{"type":"boolean","description":"WhatsApp communication consent"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.akinon.com/commerce-openapis/users/module-4/permissions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
