> 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/display-campaign/campaigns.md).

# Campaigns

Operations related to Campaigns, the core activation resources for engaging with end users across various channels. Supports Ad Serving for hosting creatives, Dynamic Creative Optimization (DCO) for 1:1 personalization, campaign tracking across DSPs and publishers, goal-based conversion tracking, and attribution modeling to measure campaign effectiveness.

## GET /campaigns/{id}

> Get campaign by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Campaigns","description":"Operations related to Campaigns, the core activation resources for engaging with end users across various channels. Supports Ad Serving for hosting creatives, Dynamic Creative Optimization (DCO) for 1:1 personalization, campaign tracking across DSPs and publishers, goal-based conversion tracking, and attribution modeling to measure campaign effectiveness."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/campaigns/{id}":{"get":{"tags":["Campaigns"],"operationId":"getCampaign","parameters":[{"required":true,"in":"path","style":"simple","schema":{"type":"integer","format":"int64"},"explode":false,"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"}}}}}}}
```

## GET /campaigns

> Search campaigns

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Campaigns","description":"Operations related to Campaigns, the core activation resources for engaging with end users across various channels. Supports Ad Serving for hosting creatives, Dynamic Creative Optimization (DCO) for 1:1 personalization, campaign tracking across DSPs and publishers, goal-based conversion tracking, and attribution modeling to measure campaign effectiveness."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/campaigns":{"get":{"parameters":[{"explode":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignType"}},"name":"campaign_type","description":"Email or Display","style":"form","required":false,"in":"query"},{"explode":true,"schema":{"type":"integer","format":"int64"},"required":false,"in":"query","name":"administration_id","description":"The organisation adminstrating the organisation owning the campaign","style":"form"},{"style":"form","required":false,"explode":true,"in":"query","description":"The organisation owning the campaign","name":"organisation_id","schema":{"type":"integer","format":"int64"}},{"schema":{"type":"boolean"},"explode":true,"in":"query","name":"automated","required":false,"style":"form","description":"Campaign created within a scenario"},{"description":"Word contained in the campaign name","style":"form","in":"query","name":"keywords","explode":true,"schema":{"type":"string"},"required":false},{"required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignStatus"}},"description":"Status of the campaign","in":"query","name":"status","explode":true,"style":"form"},{"explode":true,"style":"form","schema":{"type":"boolean"},"name":"archived","required":false,"description":"Retrieve archived campaigns","in":"query"},{"in":"query","description":"Campaign in the result are labeled by all labels identified by this list","schema":{"type":"array","items":{"type":"integer","format":"int64"}},"style":"form","required":false,"name":"label_id","explode":true},{"required":false,"schema":{"type":"array","items":{"type":"string"}},"description":"Fields used to order the result","style":"form","in":"query","name":"order_by","explode":true},{"name":"first_result","explode":true,"schema":{"type":"integer","format":"int32"},"description":"Offset from which the search must be performed","style":"form","in":"query","required":false},{"style":"form","schema":{"type":"integer","format":"int32"},"explode":true,"name":"max_results","in":"query","required":false,"description":"Number of maximum items that shall be return by this search"}],"operationId":"findCampaigns","tags":["Campaigns"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CampaignResource"}},"count":{"type":"integer"},"max_results":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"},"first_result":{"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"}},"summary":"Search campaigns","description":""}}},"components":{"schemas":{"CampaignType":{"type":"string","enum":["DISPLAY","EMAIL"],"readOnly":false},"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},"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/display-campaign/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.
