# Check a journey before activating

Source: https://kirora.io/docs/api/reference/getJourneyActivationCheck

`GET /v1/journeys/{id}/activation-check`

Requires an API key with the `journeys:read` scope. [About keys and scopes](https://kirora.io/docs/api/reference/authentication)

Works with integration, agent and partner keys.

Lists everything activating now would refuse, all at once and without activating: unfinished send steps, a list, segment, form, topic or webhook a step, the trigger or an exit names that is gone or off, a conversion goal exit without a goal, and for each finished send step an unverified sender or a sending domain without the DMARC record marketing email needs, the workspace's missing postal address or a push app not ready. Each issue gives the field to fix, the error code `activateJourney` would answer with for it and, on a step, the step's id. Empty `issues` means these checks pass; activation can still refuse for the plan's active journey limit or, for a journey an agent authored or edited, a person's confirmation. An ended journey has one issue on `status`; a workspace whose sending is stopped (suspended, or its deletion pending) has one on `workspace`.

## Path parameters

- `id` (string, required, uuid) — The journey's id.

## Header parameters

- `Kirora-Workspace` (string, optional, pattern `^[A-Za-z0-9._:-]{1,128}$`) — Partner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.

## Returns

Returns `200 OK` with a `JourneyActivationCheck` in `data`. Otherwise returns an error; [Errors](https://kirora.io/docs/api/reference/errors) lists every code and which to retry.

- `issues` (JourneyActivationIssue[], required) — Empty when activating now would pass these checks.
  - `field` (string, required) — Where to fix it, as a path into the journey (`steps.2.content.from`, `trigger.segmentId`, `exitConditions.0`), or `postalAddress` for the workspace setting.
  - `code` (string, required, one of `BAD_REQUEST`, `ALREADY_EXISTS`, `CONFLICT`, `IN_USE`, `FORBIDDEN`, `SCOPE_MISSING`, `AGENT_KEY_REFUSED`, `INTERNAL_ERROR`, `NOT_FOUND`, `METHOD_NOT_ALLOWED`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `RATE_LIMITED`, `REVISION_CONFLICT`, `SERVICE_UNAVAILABLE`, `UNAUTHORIZED`, `VALIDATION_ERROR`, `API_KEY_IP_NOT_ALLOWED`, `AGENT_CONFIRMATION_REQUIRED`, `EMBED_BUILDER_UNAVAILABLE`, `EMBED_ORIGIN_NOT_ALLOWED`, `WORKSPACE_SUSPENDED`, `WORKSPACE_DELETION_PENDING`, `CONTACT_SEND_IN_PROGRESS`, `EXPORT_UNAVAILABLE`, `NOTHING_TO_EXPORT`, `EVENT_NAME_LIMIT_REACHED`, `PLAN_LIMIT_REACHED`, `SENDING_REVIEW_REQUIRED`, `PLAN_FEATURE_UNAVAILABLE`, `CAMPAIGN_AUDIENCE_CONFLICT`, `EMPTY_AUDIENCE`, `DRAFT_INCOMPLETE`, `INVALID_SCHEDULE`, `UNSUPPORTED_CHANNEL`, `POSTAL_ADDRESS_MISSING`, `CONSENT_MISSING`, `SUPPRESSED`, `TOPIC_UNSUBSCRIBED`, `SIGNUP_BLOCKED`, `INVALID_SENDER_ADDRESS`, `SENDING_DOMAIN_DMARC_MISSING`, `SENDING_DOMAIN_IDENTITY_CONFLICT`, `TEST_SEND_OUTCOME_UNKNOWN`, `TEST_SEND_ROUTE_NOT_READY`, `TEST_SEND_UNAVAILABLE`, `SENDING_DOMAIN_UNVERIFIED`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_KEY_IN_USE`, `IDEMPOTENCY_KEY_OUTCOME_UNKNOWN`, `CONTENT_NOT_RETAINED`, `RECIPIENT_EMAIL_MISSING`, `RECIPIENT_EMAIL_UNSUPPORTED`, `TEMPLATE_NOT_PUBLISHED`, `TEMPLATE_ENVELOPE_INCOMPLETE`, `PUSH_APP_NOT_READY`, `PUSH_DESTINATION_MISSING`, `FORM_CLOSED`) — The error `activateJourney` answers with for it: `DRAFT_INCOMPLETE` for a missing or broken part, or the send check's own code (`SENDING_DOMAIN_UNVERIFIED`, `SENDING_DOMAIN_DMARC_MISSING`, `POSTAL_ADDRESS_MISSING` and so on).
  - `message` (string, required) — What is wrong, in words a person can act on.
  - `stepId` (string, optional, pattern `^[a-z0-9][a-z0-9_-]{0,63}$`) — The step a `steps.N` path names, by id: the path counts steps in saved order, which need not be the order they run in.

## Example

```bash
curl https://api.kirora.io/v1/journeys/018f2a4e-6b1c-7d3e-9f40-37386ae05a6b/activation-check \
  -H "Authorization: Bearer $KIRORA_API_KEY"
```

Response `200`:

```json
{
  "data": {
    "issues": [
      {
        "field": "steps.1.content.templateSnapshot",
        "code": "DRAFT_INCOMPLETE",
        "message": "This is required.",
        "stepId": "welcome-email"
      },
      {
        "field": "steps.3.content.from",
        "code": "SENDING_DOMAIN_UNVERIFIED",
        "message": "news.juniperkitchen.com is not a verified sending domain",
        "stepId": "reminder-email"
      }
    ]
  }
}
```
