# 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: 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-1/marketing.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.
