> 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). Agents can also search and read this documentation through its [MCP server](https://apidocs.akinon.com/~gitbook/mcp).

# 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"}}},{"description":"Local development","url":"http://localhost:8000"}],"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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
