> For the complete documentation index, see [llms.txt](https://flapjax.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flapjax.gitbook.io/docs/rest-api/reference/people-events/update-push-notification-consent.md).

# Update Push Notification Consent

## Update push notification consent

> Updates a person's push notification consent preference. Identify the person by providing exactly \*\*one\*\* of \`internal\_id\` (UUID) or \`external\_id\`.\
> \
> Set \`allow\` to \`true\` to opt the person in to push notifications, or \`false\` to opt them out. This uses patch semantics internally — only the push notification consent field is changed; all other person data remains untouched.\
> \
> Returns a 400 error if you provide both identifiers or neither.<br>

```json
{"openapi":"3.0.3","info":{"title":"Listener API","version":"1.0.0"},"tags":[{"name":"update-push-notification-consent"}],"servers":[{"url":"https://{domain}/v1","variables":{"domain":{"default":"your-domain","description":"Your deployment domain"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token with the required scope for the endpoint. Pass via the `Authorization: Bearer <token>` header.\n"}},"schemas":{"ConsentUpdateRequest":{"type":"object","description":"Request body for updating a person's consent preference. Provide exactly one of `internal_id` or `external_id` to identify the person.\n","required":["allow"],"properties":{"internal_id":{"type":"string","description":"Internal UUID of the person. Provide this **or** `external_id`, not both.\n"},"external_id":{"type":"string","description":"External identifier of the person. Provide this **or** `internal_id`, not both.\n"},"allow":{"type":"boolean","description":"Set to `true` to opt in, or `false` to opt out."}}},"SuccessResponse":{"type":"object","description":"Standard success response envelope.","properties":{"status":{"type":"string","enum":["Success"]},"data":{"type":"boolean"}}},"ErrorResponse":{"type":"object","description":"Standard error response envelope.","properties":{"error":{"type":"string","description":"Machine-readable error type. Use this for programmatic error handling.\n","enum":["operation_failed","failed_binding_json","invalid_json","invalid_parameter","not_found","duplicate_entry","rate_limit_exceeded"]},"errorstack":{"type":"object","nullable":true,"description":"Detailed error stack (only present for server errors)."}}}}},"paths":{"/people/push-notification-consent":{"put":{"summary":"Update push notification consent","operationId":"updatePushNotificationConsent","tags":["update-push-notification-consent"],"description":"Updates a person's push notification consent preference. Identify the person by providing exactly **one** of `internal_id` (UUID) or `external_id`.\n\nSet `allow` to `true` to opt the person in to push notifications, or `false` to opt them out. This uses patch semantics internally — only the push notification consent field is changed; all other person data remains untouched.\n\nReturns a 400 error if you provide both identifiers or neither.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentUpdateRequest"}}}},"responses":{"200":{"description":"Consent updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid identifier or validation failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Person not found or internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
