> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/api-reference/deprecated/email-campaigns.md).

# Email Campaigns

Operations related to Email Campaigns, the activation tool to send emails to end users through email routers and providers, supporting email templates with custom rendering, frequency capping, and integration with Marketing Automation workflows.

## GET /email\_campaigns.email\_blasts

> Search email blasts

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Email Campaigns","description":"Operations related to Email Campaigns, the activation tool to send emails to end users through email routers and providers, supporting email templates with custom rendering, frequency capping, and integration with Marketing Automation workflows."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/email_campaigns.email_blasts":{"get":{"deprecated":true,"parameters":[{"explode":true,"description":"The organisation owning the campaign","schema":{"type":"integer","format":"int64"},"style":"form","required":true,"in":"query","name":"organisation_id"},{"required":false,"in":"query","style":"form","schema":{"type":"boolean"},"explode":true,"name":"automated","description":"Campaign created within a scenario"},{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignStatus"}},"explode":true,"required":false,"in":"query","description":"Status of the campaign","style":"form","name":"status"},{"style":"form","required":false,"schema":{"type":"array","items":{"type":"integer","format":"int64"}},"in":"query","explode":true,"name":"campaign_id"}],"operationId":"findEmailBlasts","summary":"Search email blasts","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailBlastResource"}},"status":{"type":"string","enum":["ok"]},"count":{"type":"integer"},"first_result":{"type":"integer"},"max_results":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","tags":["Email Campaigns"]}}},"components":{"schemas":{"CampaignStatus":{"type":"string","enum":["PENDING","ACTIVE","PAUSED"],"readOnly":false},"EmailBlastResource":{"allOf":[{"$ref":"#/components/schemas/EmailBlast"},{"type":"object","properties":{"subject_line":{"type":"string","readOnly":false},"batch_size":{"type":"integer","format":"int32","default":0,"readOnly":true},"capping_period":{"type":"string","description":"A valid ISO 8601 Period String","readOnly":false},"id":{"type":"string","readOnly":true},"reply_to":{"type":"string","readOnly":false},"from_email":{"type":"string","readOnly":false},"from_name":{"type":"string","readOnly":false},"capping":{"type":"integer","format":"int32","default":0,"readOnly":false},"number_mail_not_send":{"type":"integer","format":"int32","default":0,"readOnly":true},"blast_name":{"type":"string","readOnly":false},"min_period_between_shoots":{"type":"string","description":"A valid ISO 8601 Period String","readOnly":false},"status":{"$ref":"#/components/schemas/EmailBlastStatus"},"send_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"campaign_id":{"type":"string","readOnly":true}},"required":["batch_size","blast_name","campaign_id","capping","capping_period","from_email","from_name","id","min_period_between_shoots","number_mail_not_send","reply_to","send_date","status","subject_line"]}]},"EmailBlast":{"type":"object"},"EmailBlastStatus":{"type":"string","enum":["SCENARIO_ACTIVATED","PENDING","SCHEDULED","FINISHED","ERROR"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /email\_campaigns/{id}

> Get campaign by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Email Campaigns","description":"Operations related to Email Campaigns, the activation tool to send emails to end users through email routers and providers, supporting email templates with custom rendering, frequency capping, and integration with Marketing Automation workflows."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/email_campaigns/{id}":{"get":{"tags":["Email Campaigns"],"deprecated":true,"operationId":"getEmailCampaign","parameters":[{"style":"simple","explode":false,"required":true,"schema":{"type":"integer","format":"int64"},"in":"path","name":"id"}],"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/CampaignResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"summary":"Get campaign by id"}}},"components":{"schemas":{"CampaignResource":{"discriminator":{"propertyName":"type","mapping":{"DISPLAY":"#/components/schemas/DisplayCampaignResource","EMAIL":"#/components/schemas/EmailCampaignResource"}},"oneOf":[{"$ref":"#/components/schemas/DisplayCampaignResource"},{"$ref":"#/components/schemas/EmailCampaignResource"}],"properties":{"type":{"type":"string","enum":["DISPLAY","EMAIL"]}},"required":["type"]},"DisplayCampaignResource":{"type":"object","properties":{"time_zone":{"type":"string","readOnly":false},"automated":{"type":"boolean","default":false,"readOnly":false},"max_budget_period":{"$ref":"#/components/schemas/BudgetPeriodEnum"},"organisation_id":{"type":"string","readOnly":false},"editor_version_value":{"type":"string","readOnly":false},"model_version":{"$ref":"#/components/schemas/ModelVersion"},"total_budget":{"type":"number","format":"float","default":0,"readOnly":false},"status":{"$ref":"#/components/schemas/CampaignStatus"},"max_bid_price":{"type":"number","format":"float","default":0,"readOnly":false},"id":{"type":"string","readOnly":true},"max_budget_per_period":{"type":"number","format":"float","default":0,"readOnly":false},"total_impression_capping":{"type":"integer","format":"int32","default":0,"readOnly":false},"per_day_impression_capping":{"type":"integer","format":"int32","default":0,"readOnly":false},"currency_code":{"type":"string","readOnly":false},"start_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"subtype":{"$ref":"#/components/schemas/DisplayCampaignSubtype"},"name":{"type":"string","readOnly":false},"editor_version_id":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_group_id":{"type":"string","readOnly":false},"technical_name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"end_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_artifact_id":{"type":"string","readOnly":false}},"required":["archived","automated","creation_ts","currency_code","editor_artifact_id","editor_group_id","editor_version_id","editor_version_value","end_date","id","max_bid_price","max_budget_per_period","max_budget_period","model_version","name","organisation_id","per_day_impression_capping","start_date","status","subtype","time_zone","total_budget","total_impression_capping"]},"BudgetPeriodEnum":{"type":"string","enum":["DAY","WEEK","MONTH"],"readOnly":false},"ModelVersion":{"type":"string","enum":["V2014_06","V2017_09"],"readOnly":false},"CampaignStatus":{"type":"string","enum":["PENDING","ACTIVE","PAUSED"],"readOnly":false},"DisplayCampaignSubtype":{"type":"string","enum":["PROGRAMMATIC","AD_SERVING","TRACKING"],"readOnly":false},"EmailCampaignResource":{"type":"object","properties":{"archived":{"type":"boolean","default":false,"readOnly":false},"currency_code":{"type":"string","readOnly":false},"editor_version_id":{"type":"string","readOnly":false},"automated":{"type":"boolean","default":false,"readOnly":false},"editor_version_value":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_group_id":{"type":"string","readOnly":false},"status":{"$ref":"#/components/schemas/CampaignStatus"},"editor_artifact_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"technical_name":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false}},"required":["archived","automated","creation_ts","currency_code","editor_artifact_id","editor_group_id","editor_version_id","editor_version_value","id","name","organisation_id","status"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /email\_campaigns/{id}

> update an email campaign by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Email Campaigns","description":"Operations related to Email Campaigns, the activation tool to send emails to end users through email routers and providers, supporting email templates with custom rendering, frequency capping, and integration with Marketing Automation workflows."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/email_campaigns/{id}":{"put":{"description":"","summary":"update an email campaign by id","requestBody":{"description":"The campaign to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCampaignResource"}}},"required":true},"tags":["Email Campaigns"],"deprecated":true,"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/CampaignResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"updateEmailCampaign","parameters":[{"name":"id","required":true,"schema":{"type":"integer","format":"int64"},"explode":false,"in":"path","style":"simple"}]}}},"components":{"schemas":{"EmailCampaignResource":{"type":"object","properties":{"archived":{"type":"boolean","default":false,"readOnly":false},"currency_code":{"type":"string","readOnly":false},"editor_version_id":{"type":"string","readOnly":false},"automated":{"type":"boolean","default":false,"readOnly":false},"editor_version_value":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_group_id":{"type":"string","readOnly":false},"status":{"$ref":"#/components/schemas/CampaignStatus"},"editor_artifact_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"technical_name":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false}},"required":["archived","automated","creation_ts","currency_code","editor_artifact_id","editor_group_id","editor_version_id","editor_version_value","id","name","organisation_id","status"]},"CampaignStatus":{"type":"string","enum":["PENDING","ACTIVE","PAUSED"],"readOnly":false},"CampaignResource":{"discriminator":{"propertyName":"type","mapping":{"DISPLAY":"#/components/schemas/DisplayCampaignResource","EMAIL":"#/components/schemas/EmailCampaignResource"}},"oneOf":[{"$ref":"#/components/schemas/DisplayCampaignResource"},{"$ref":"#/components/schemas/EmailCampaignResource"}],"properties":{"type":{"type":"string","enum":["DISPLAY","EMAIL"]}},"required":["type"]},"DisplayCampaignResource":{"type":"object","properties":{"time_zone":{"type":"string","readOnly":false},"automated":{"type":"boolean","default":false,"readOnly":false},"max_budget_period":{"$ref":"#/components/schemas/BudgetPeriodEnum"},"organisation_id":{"type":"string","readOnly":false},"editor_version_value":{"type":"string","readOnly":false},"model_version":{"$ref":"#/components/schemas/ModelVersion"},"total_budget":{"type":"number","format":"float","default":0,"readOnly":false},"status":{"$ref":"#/components/schemas/CampaignStatus"},"max_bid_price":{"type":"number","format":"float","default":0,"readOnly":false},"id":{"type":"string","readOnly":true},"max_budget_per_period":{"type":"number","format":"float","default":0,"readOnly":false},"total_impression_capping":{"type":"integer","format":"int32","default":0,"readOnly":false},"per_day_impression_capping":{"type":"integer","format":"int32","default":0,"readOnly":false},"currency_code":{"type":"string","readOnly":false},"start_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"subtype":{"$ref":"#/components/schemas/DisplayCampaignSubtype"},"name":{"type":"string","readOnly":false},"editor_version_id":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_group_id":{"type":"string","readOnly":false},"technical_name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"end_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_artifact_id":{"type":"string","readOnly":false}},"required":["archived","automated","creation_ts","currency_code","editor_artifact_id","editor_group_id","editor_version_id","editor_version_value","end_date","id","max_bid_price","max_budget_per_period","max_budget_period","model_version","name","organisation_id","per_day_impression_capping","start_date","status","subtype","time_zone","total_budget","total_impression_capping"]},"BudgetPeriodEnum":{"type":"string","enum":["DAY","WEEK","MONTH"],"readOnly":false},"ModelVersion":{"type":"string","enum":["V2014_06","V2017_09"],"readOnly":false},"DisplayCampaignSubtype":{"type":"string","enum":["PROGRAMMATIC","AD_SERVING","TRACKING"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## DELETE /email\_campaigns/{id}

> remove an email campaign by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Email Campaigns","description":"Operations related to Email Campaigns, the activation tool to send emails to end users through email routers and providers, supporting email templates with custom rendering, frequency capping, and integration with Marketing Automation workflows."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/email_campaigns/{id}":{"delete":{"parameters":[{"schema":{"type":"integer","format":"int64"},"explode":false,"name":"id","in":"path","required":true,"style":"simple"}],"responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"deprecated":true,"summary":"remove an email campaign by id","description":"","tags":["Email Campaigns"],"operationId":"removeEmailCampaign"}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}}}}
```

## GET /email\_campaigns

> Search email campaigns

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Email Campaigns","description":"Operations related to Email Campaigns, the activation tool to send emails to end users through email routers and providers, supporting email templates with custom rendering, frequency capping, and integration with Marketing Automation workflows."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/email_campaigns":{"get":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"max_results":{"type":"integer"},"first_result":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CampaignResource"}},"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"deprecated":true,"parameters":[{"name":"administration_id","schema":{"type":"integer","format":"int64"},"description":"The organisation administrating the organisation owning the campaign","style":"form","required":false,"explode":true,"in":"query"},{"style":"form","description":"The organisation owning the campaign","in":"query","required":false,"name":"organisation_id","explode":true,"schema":{"type":"integer","format":"int64"}},{"explode":true,"in":"query","style":"form","schema":{"type":"boolean"},"name":"automated","required":false,"description":"Campaign created within a scenario"},{"style":"form","description":"Word contained in the campaign name","schema":{"type":"string"},"name":"keywords","in":"query","explode":true,"required":false},{"required":false,"in":"query","name":"statuses","description":"Status of the campaign","schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignStatus"}},"explode":true,"style":"form"},{"name":"archived","style":"form","in":"query","schema":{"type":"boolean"},"required":false,"explode":true,"description":"Retrieve archived campaigns"},{"explode":true,"name":"label_ids","schema":{"type":"array","items":{"type":"integer","format":"int64"}},"required":false,"style":"form","description":"Campaign in the result are labeled by all labels identified by this list","in":"query"},{"description":"Fields used to order the result","required":false,"schema":{"type":"array","items":{"type":"string"}},"explode":true,"name":"order_by","style":"form","in":"query"},{"schema":{"type":"integer","format":"int32"},"required":false,"name":"first_result","in":"query","explode":true,"description":"Offset from which the search must be performed","style":"form"},{"in":"query","name":"max_results","style":"form","description":"Number of maximum items that shall be return by this search","required":false,"schema":{"type":"integer","format":"int32"},"explode":true}],"summary":"Search email campaigns","operationId":"findEmailCampaigns","description":"","tags":["Email Campaigns"]}}},"components":{"schemas":{"CampaignResource":{"discriminator":{"propertyName":"type","mapping":{"DISPLAY":"#/components/schemas/DisplayCampaignResource","EMAIL":"#/components/schemas/EmailCampaignResource"}},"oneOf":[{"$ref":"#/components/schemas/DisplayCampaignResource"},{"$ref":"#/components/schemas/EmailCampaignResource"}],"properties":{"type":{"type":"string","enum":["DISPLAY","EMAIL"]}},"required":["type"]},"DisplayCampaignResource":{"type":"object","properties":{"time_zone":{"type":"string","readOnly":false},"automated":{"type":"boolean","default":false,"readOnly":false},"max_budget_period":{"$ref":"#/components/schemas/BudgetPeriodEnum"},"organisation_id":{"type":"string","readOnly":false},"editor_version_value":{"type":"string","readOnly":false},"model_version":{"$ref":"#/components/schemas/ModelVersion"},"total_budget":{"type":"number","format":"float","default":0,"readOnly":false},"status":{"$ref":"#/components/schemas/CampaignStatus"},"max_bid_price":{"type":"number","format":"float","default":0,"readOnly":false},"id":{"type":"string","readOnly":true},"max_budget_per_period":{"type":"number","format":"float","default":0,"readOnly":false},"total_impression_capping":{"type":"integer","format":"int32","default":0,"readOnly":false},"per_day_impression_capping":{"type":"integer","format":"int32","default":0,"readOnly":false},"currency_code":{"type":"string","readOnly":false},"start_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"subtype":{"$ref":"#/components/schemas/DisplayCampaignSubtype"},"name":{"type":"string","readOnly":false},"editor_version_id":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_group_id":{"type":"string","readOnly":false},"technical_name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"end_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_artifact_id":{"type":"string","readOnly":false}},"required":["archived","automated","creation_ts","currency_code","editor_artifact_id","editor_group_id","editor_version_id","editor_version_value","end_date","id","max_bid_price","max_budget_per_period","max_budget_period","model_version","name","organisation_id","per_day_impression_capping","start_date","status","subtype","time_zone","total_budget","total_impression_capping"]},"BudgetPeriodEnum":{"type":"string","enum":["DAY","WEEK","MONTH"],"readOnly":false},"ModelVersion":{"type":"string","enum":["V2014_06","V2017_09"],"readOnly":false},"CampaignStatus":{"type":"string","enum":["PENDING","ACTIVE","PAUSED"],"readOnly":false},"DisplayCampaignSubtype":{"type":"string","enum":["PROGRAMMATIC","AD_SERVING","TRACKING"],"readOnly":false},"EmailCampaignResource":{"type":"object","properties":{"archived":{"type":"boolean","default":false,"readOnly":false},"currency_code":{"type":"string","readOnly":false},"editor_version_id":{"type":"string","readOnly":false},"automated":{"type":"boolean","default":false,"readOnly":false},"editor_version_value":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_group_id":{"type":"string","readOnly":false},"status":{"$ref":"#/components/schemas/CampaignStatus"},"editor_artifact_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"technical_name":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false}},"required":["archived","automated","creation_ts","currency_code","editor_artifact_id","editor_group_id","editor_version_id","editor_version_value","id","name","organisation_id","status"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /email\_campaigns

> Create email campaigns

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Email Campaigns","description":"Operations related to Email Campaigns, the activation tool to send emails to end users through email routers and providers, supporting email templates with custom rendering, frequency capping, and integration with Marketing Automation workflows."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/email_campaigns":{"post":{"description":"","operationId":"createEmailCampaigns","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/CampaignResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"requestBody":{"description":"The campaign to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCampaignResource"}}},"required":true},"tags":["Email Campaigns"],"deprecated":true,"summary":"Create email campaigns"}}},"components":{"schemas":{"CampaignResource":{"discriminator":{"propertyName":"type","mapping":{"DISPLAY":"#/components/schemas/DisplayCampaignResource","EMAIL":"#/components/schemas/EmailCampaignResource"}},"oneOf":[{"$ref":"#/components/schemas/DisplayCampaignResource"},{"$ref":"#/components/schemas/EmailCampaignResource"}],"properties":{"type":{"type":"string","enum":["DISPLAY","EMAIL"]}},"required":["type"]},"DisplayCampaignResource":{"type":"object","properties":{"time_zone":{"type":"string","readOnly":false},"automated":{"type":"boolean","default":false,"readOnly":false},"max_budget_period":{"$ref":"#/components/schemas/BudgetPeriodEnum"},"organisation_id":{"type":"string","readOnly":false},"editor_version_value":{"type":"string","readOnly":false},"model_version":{"$ref":"#/components/schemas/ModelVersion"},"total_budget":{"type":"number","format":"float","default":0,"readOnly":false},"status":{"$ref":"#/components/schemas/CampaignStatus"},"max_bid_price":{"type":"number","format":"float","default":0,"readOnly":false},"id":{"type":"string","readOnly":true},"max_budget_per_period":{"type":"number","format":"float","default":0,"readOnly":false},"total_impression_capping":{"type":"integer","format":"int32","default":0,"readOnly":false},"per_day_impression_capping":{"type":"integer","format":"int32","default":0,"readOnly":false},"currency_code":{"type":"string","readOnly":false},"start_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"subtype":{"$ref":"#/components/schemas/DisplayCampaignSubtype"},"name":{"type":"string","readOnly":false},"editor_version_id":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_group_id":{"type":"string","readOnly":false},"technical_name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"end_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_artifact_id":{"type":"string","readOnly":false}},"required":["archived","automated","creation_ts","currency_code","editor_artifact_id","editor_group_id","editor_version_id","editor_version_value","end_date","id","max_bid_price","max_budget_per_period","max_budget_period","model_version","name","organisation_id","per_day_impression_capping","start_date","status","subtype","time_zone","total_budget","total_impression_capping"]},"BudgetPeriodEnum":{"type":"string","enum":["DAY","WEEK","MONTH"],"readOnly":false},"ModelVersion":{"type":"string","enum":["V2014_06","V2017_09"],"readOnly":false},"CampaignStatus":{"type":"string","enum":["PENDING","ACTIVE","PAUSED"],"readOnly":false},"DisplayCampaignSubtype":{"type":"string","enum":["PROGRAMMATIC","AD_SERVING","TRACKING"],"readOnly":false},"EmailCampaignResource":{"type":"object","properties":{"archived":{"type":"boolean","default":false,"readOnly":false},"currency_code":{"type":"string","readOnly":false},"editor_version_id":{"type":"string","readOnly":false},"automated":{"type":"boolean","default":false,"readOnly":false},"editor_version_value":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"editor_group_id":{"type":"string","readOnly":false},"status":{"$ref":"#/components/schemas/CampaignStatus"},"editor_artifact_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"technical_name":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false}},"required":["archived","automated","creation_ts","currency_code","editor_artifact_id","editor_group_id","editor_version_id","editor_version_value","id","name","organisation_id","status"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```


---

# 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://docs.mediarithmics.io/api-reference/deprecated/email-campaigns.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.
