> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/users/module-1/marketing.md).

# Marketing

Customer-facing subscription tooling

## Subscribe to marketing emails

> Subscribes a contact to marketing communications.\
> \
> \*\*Validation\*\*\
> \- Email required and must be unique per gateway rules\
> \- Optional profile fields (first name, last name, gender)\
> \
> \*\*Side Effects\*\*\
> \- IP address stored with the subscription record\
> \- Dispatches the request to the configured subscription gateway

```json
{"openapi":"3.1.0","info":{"title":"Users API - Public Endpoints","version":"1.0.0"},"tags":[{"name":"Marketing","description":"Customer-facing subscription tooling"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"paths":{"/email-subscription/":{"post":{"tags":["Marketing"],"operationId":"subscribeToEmails","summary":"Subscribe to marketing emails","description":"Subscribes a contact to marketing communications.\n\n**Validation**\n- Email required and must be unique per gateway rules\n- Optional profile fields (first name, last name, gender)\n\n**Side Effects**\n- IP address stored with the subscription record\n- Dispatches the request to the configured subscription gateway","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSubscriptionRequest"}}}},"responses":{"200":{"description":"Subscription request accepted"},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}}},"components":{"schemas":{"EmailSubscriptionRequest":{"type":"object","description":"Input payload for marketing subscriptions","required":["email"],"properties":{"email":{"type":"string","format":"email"},"first_name":{"anyOf":[{"type":"string","maxLength":50}]},"last_name":{"anyOf":[{"type":"string","maxLength":50}]},"gender":{"anyOf":[{"type":"string"}],"description":"Value from `omnicore.users.enums.GenderType`"}}},"ValidationErrorResponse":{"type":"object","description":"Validation error structure returned by DRF","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://apidocs.akinon.com/commerce-openapis/users/module-1/marketing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
