# View Push Campaign

## View

> View push campaign details.

```json
{"openapi":"3.1.0","info":{"title":"Batch - REST API","version":"2.9"},"tags":[],"servers":[{"url":"https://api.batch.com/{version}","description":"production","variables":{"version":{"default":"2.11","description":"Version of the API"}}}],"security":[{"rest_key":[]}],"components":{"securitySchemes":{"rest_key":{"type":"http","scheme":"bearer","description":"## API Key Authentication\n\nAuthentication is required in order to interact with Batch's APIs.\n\nBatch implements authentication using API Keys, that we call the \"REST API Key\".\nYou can find it on your dashboard.\n\nPlease make sure that you keep this key secret. You should never use it in client apps to call APIs from there as it would\neasily be extractable.\n\n### How to authenticate\n\nIn order to authenticate your requests, add your REST API Key in the `Authorization` header and prefix it by `Bearer`. Example: `Authorization: Bearer bcd38d9rfb38ra28`.\n"}},"parameters":{"HeaderProjectKey":{"in":"header","name":"X-Batch-Project","description":"The unique project key, identifying a project on the Batch platform","schema":{"type":"string"},"required":true}},"schemas":{"PushCampaignDetails":{"type":"object","description":"Detailed configuration for a push campaign orchestration.","properties":{"id":{"type":"string","description":"Unique identifier for the push campaign."},"type":{"type":"string","description":"Type of orchestration.","enum":["campaign"]},"name":{"type":"string","description":"Name of the orchestration."},"status":{"type":"string","description":"Current status of the orchestration.","enum":["draft","running","completed","stopped"]},"source":{"type":"string","description":"Source of the orchestration creation.","enum":["dashboard","api"]},"labels":{"type":"array","description":"Labels associated with the orchestration.","items":{"type":"string"}},"created_date":{"type":"string","format":"date-time","description":"Date and time when the push campaign was created."},"updated_date":{"type":"string","format":"date-time","description":"Date and time when the push campaign was last updated."},"start_time":{"type":"string","format":"date-time","description":"Date and time when the orchestration starts."},"channels":{"type":"array","description":"Channels used by the orchestration.","items":{"type":"string","enum":["push"]}},"platforms":{"type":"array","description":"Platforms targeted by the orchestration.","items":{"type":"string","enum":["ios","android","web"]}},"ab_test":{"type":"object","description":"A/B test configuration for the push campaign.","properties":{"enabled":{"type":"boolean","description":"Whether A/B testing is enabled."},"automatic_winner_selection":{"type":"object","description":"Automatic winner selection settings for the A/B test.","properties":{"test_percentage":{"type":"integer","description":"Percentage of the audience used during the test phase."},"winner_metric":{"type":"string","description":"Metric used to determine the winning variant."},"winner_delay":{"type":"object","description":"Delay before selecting the winning variant.","properties":{"value":{"type":"integer","description":"Delay amount before winner selection."},"unit":{"type":"string","description":"Unit used for the winner selection delay."}}}}}}},"targeting":{"type":"object","description":"Targeting configuration for the push campaign.","properties":{"languages":{"type":"array","description":"Languages targeted by the orchestration.","items":{"type":"string"}},"regions":{"type":"array","description":"Regions targeted by the orchestration.","items":{"type":"string"}},"query":{"type":"object","description":"Query used to filter targeted profiles.","additionalProperties":true}}},"messages":{"type":"array","description":"Message definitions for the push campaign. Each item contains the default push content in `push_content`, optional language-specific overrides in `languages`, and, when A/B testing is enabled, an optional `version` identifying the variant. Provide one item per variant.","items":{"type":"object","properties":{"version":{"type":"string","description":"Optional identifier of the A/B test variant."},"push_content":{"$ref":"#/components/schemas/PushCampaignPushContent"},"languages":{"type":"array","description":"Optional language-specific overrides for `push_content`.","items":{"type":"object","properties":{"language":{"type":"string","description":"Language code for this localized content."},"push_content":{"$ref":"#/components/schemas/PushCampaignPushContent"}}}}}}}}},"PushCampaignPushContent":{"type":"object","description":"Details and configuration for a push message.","properties":{"title":{"type":"string","description":"Title of the message."},"body":{"type":"string","description":"Body of the message."},"media":{"$ref":"#/components/schemas/PushCampaignMedia"},"ios":{"type":"object","description":"iOS-specific push message options.","properties":{"deeplink":{"type":"string","format":"uri","description":"Deeplink opened on iOS devices."},"custom_payload":{"type":"string","description":"Custom payload sent with the iOS notification."}}},"android":{"type":"object","description":"Android-specific push message options.","properties":{"deeplink":{"type":"string","format":"uri","description":"Deeplink opened on Android devices."},"custom_payload":{"type":"string","description":"Custom payload sent with the Android notification."},"media":{"$ref":"#/components/schemas/PushCampaignMedia"},"collapse_key":{"type":"object","description":"Android collapse key configuration.","properties":{"enabled":{"type":"boolean","description":"Whether collapse key handling is enabled."},"key":{"type":"string","description":"Collapse key value."}}}}},"web":{"type":"object","description":"Web-specific push message options.","properties":{"deeplink":{"type":"string","format":"uri","description":"Deeplink opened on web devices."},"media":{"$ref":"#/components/schemas/PushCampaignMedia"}}},"mobile_landing":{"type":"array","description":"Mobile landing content attached to the push message.","items":{"type":"object","properties":{"key":{"type":"string","description":"Unique identifier of the mobile landing item."},"action":{"type":"string","description":"Action payload triggered by the mobile landing item."},"text":{"type":"string","description":"Text displayed for the mobile landing item."},"url":{"type":"string","format":"uri","description":"URL used by image mobile landing items."},"ios":{"type":"string","description":"iOS-specific override for the mobile landing item."},"android":{"type":"string","description":"Android-specific override for the mobile landing item."}}}}}},"PushCampaignMedia":{"type":"object","description":"Media assets attached to the push message.","properties":{"picture":{"type":"string","format":"uri","description":"URL of the main picture asset."},"icon":{"type":"string","format":"uri","description":"URL of the icon asset."}}},"Error":{"type":"object","required":["error_message","error_code"],"properties":{"error_message":{"description":"A human readable error message","type":"string"},"error_code":{"description":"Error code","type":"string"}}}},"responses":{"401":{"description":"The Rest API Key is not valid for this project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Batch's services are under maintenance. Please try again later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404-orchestration":{"description":"The provided orchestration id does not match any orchestration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/orchestrations/view":{"get":{"operationId":"orchestrations_view","summary":"View","description":"View push campaign details.","tags":["Orchestrations"],"parameters":[{"$ref":"#/components/parameters/HeaderProjectKey"},{"name":"orchestration_id","in":"query","description":"The id of the push campaign to fetch.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response with details about a push campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushCampaignDetails"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"description":"The provided id resolves to an orchestration that is not a push campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/404-orchestration"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}}}}
```

### Request structure

#### Route

The orchestration API exposes a GET endpoint that allows you to export message details for a specific **Push Campaign**. This includes information such as targeting query, push content, mobile landing keys.

`/orchestrations/view`

#### Headers and authentication

See [Overview → Using Project APIs](/developer/api/cep.md#request-headers-and-authentication).

#### Query parameters

See the API Description.

### Responses

#### Success

A successful `GET` request to this endpoint will return an `HTTP 200 OK` response. The body of the response will contain a JSON object with the details for the requested orchestration.

#### Response Body

The main JSON object contains the following fields:

* `id` (string): The unique identifier of the push campaign for which details are being returned.
* `messages` (array): An array of objects, where each object contains the push content. This can include:
  * Variant Detail for A/B tested orchestrations.
  * Multi-language Detail.&#x20;

```json
{
  "id": "orchestration_0664hyh918hr1gnzka9py5t62nrc0e1q",
  "type": "campaign",
  "name": "Soldes d'été",
  "status": "running",
  "source": "dashboard",
  "labels": [
    "LABEL1",
    "LABEL2"
  ],
  "created_date": "2026-03-18T09:15:00Z",
  "updated_date": "2026-04-12T16:40:00Z",
  "start_time": "2026-04-20T14:00:00Z",
  "channels": [
    "push"
  ],
  "platforms": [
    "ios",
    "android",
    "web"
  ],
  "targeting": {
    "languages": [
      "fr"
    ],
    "regions": [
      "FR"
    ],
    "query": {
      "firstname": {
        "$eq": "Jane"
      }
    }
  },
  "messages": [
    {
      "push_content": {
        "title": "The campaign title",
        "body": "The campaign body",
        "media": {
          "picture": "https://example.com/picture.png"
        },
        "ios": {
          "deeplink": "https://example.com/ios",
          "custom_payload": "{\"tag\": \"wake up push\", \"landing_screen\": \"greeting\"}"
        },
        "android": {
          "deeplink": "https://example.com/android",
          "custom_payload": "{\"tag\": \"wake up push\", \"landing_screen\": \"greeting\"}",
          "media": {
            "icon": "https://example.com/android/icon.png"
          },
          "collapse_key": {
            "enabled": true,
            "key": "default"
          }
        },
        "web": {
          "deeplink": "https://example.com/web",
          "media": {
            "icon": "https://example.com/web/icon.png"
          }
        }
      }
    }
  ]
}
```

#### Failure

If the GET data does not meet the API requirements you will receive an actionable error message. Contact us at <support@batch.com> if you need further support.

See the list of potential failures in the API Description.


---

# 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://doc.batch.com/developer/api/cep/orchestrations/view.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.
