> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.onesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Journey schema

> Retrieve the JSON Schema for creating, duplicating, or updating a Journey or step before you construct a request.

Retrieve the JSON Schema for the Journey document you plan to send.

> [!NOTE]
>
> **Beta.** The Journeys API is in beta. Endpoints and response fields can still change.

## Access to schemas

The HTTP schema endpoint is public and app-independent. It requires no authentication or App ID.

Retrieve the schema without a source Journey or available creation quota. Schema retrieval does not grant access to Journey data or writes. Other Journey endpoints still require authentication and app permissions.

## Choose an operation

Send the required `operation` query parameter:

```http HTTP theme={null}
GET /journeys/schema?operation=create
```

```bash cURL theme={null}
curl --get 'https://api.onesignal.com/journeys/schema' \
  --data-urlencode 'operation=create'
```

| Operation | `document` | What the schema describes |
| - | - | - |
| `create` | `body` | The Journey document to create |
| `duplicate` | `overrides` | Optional fields to apply to the copy |
| `update` | `patch` | The partial update to a Journey |
| `update_node` | `merged_node` | The complete node after applying a partial update, not the patch alone |

Omitting `operation` or sending an unsupported value returns `400`.

You can also send `HEAD` to the same path and query. A successful `HEAD` request returns headers without a response body.

## Use the response

Read `operation`, `document`, and `schema` from the response. The `schema` object is a self-contained JSON Schema Draft 6 document with local `$defs` references.

Validate the relevant document against `schema`, not the complete HTTP or MCP request. Routing IDs and `concurrency_key` are request metadata, not fields you must add to the schema document.

The schema describes JSON structure. Write requests also enforce permissions, resource ownership, entitlements, and Journey rules.

### Create and duplicate

Use [Create Journey](https://documentation.onesignal.com/reference/create-journey.md) for writable fields and local node references. Use [Duplicate Journey](https://documentation.onesignal.com/reference/duplicate-journey.md) for copy behavior and overrides.

### Journey updates

Use the `update` schema for the partial Journey document. Omitted top-level fields remain unchanged. Supplied nested objects and array members still need to satisfy their schema requirements.

The schema also includes server-controlled fields from the Journey representation. Acceptance by the schema does not make every field writable. See [Update Journey](https://documentation.onesignal.com/reference/update-journey.md) for applied fields, identity rules, and lifecycle restrictions.

### Step updates

Use `update_node` to validate the complete node after applying a partial update. Do not validate a sparse node patch against this schema alone.

For example, a patch that only changes `duration_seconds` does not need to repeat the existing node's `kind`. The merged node still needs a valid `kind`.

See [Update Journey node](https://documentation.onesignal.com/reference/update-journey-node.md) for merge behavior and node restrictions.

## FAQ

### Does the response include instructions for calling MCP tools?

No. The response contains only `operation`, `document`, and `schema`. For MCP argument objects, schema retrieval, and concurrency requirements, see [Manage Journeys with MCP](https://documentation.onesignal.com/docs/en/mcp-journeys.md).

### Can I use a schema to check whether a write will succeed?

Not completely. A document can satisfy the schema and still fail permission, resource, entitlement, or Journey checks on the write request.


## OpenAPI

````yaml GET /journeys/schema
openapi: 3.1.0
info:
  title: api.onesignal.com
  version: '11.6'
servers:
  - url: https://api.onesignal.com
security:
  - {}
paths:
  /journeys/schema:
    get:
      summary: Get Journey schema
      description: >-
        Retrieve the JSON Schema for a Journey authoring operation without
        authentication or app context. The response identifies the document to
        validate. Schema retrieval does not validate permissions or business
        rules for a later write.
      operationId: get-journey-schema
      parameters:
        - name: operation
          in: query
          description: The authoring operation whose schema you need.
          required: true
          schema:
            type: string
            enum:
              - create
              - duplicate
              - update
              - update_node
      responses:
        '200':
          description: The schema and its applicability.
          content:
            application/json:
              schema:
                type: object
                required:
                  - operation
                  - document
                  - schema
                properties:
                  operation:
                    type: string
                    enum:
                      - create
                      - duplicate
                      - update
                      - update_node
                    description: The requested operation.
                  document:
                    type: string
                    enum:
                      - body
                      - overrides
                      - patch
                      - merged_node
                    description: >-
                      The document that the schema describes. For update_node,
                      merged_node is the complete node after applying the patch.
                  schema:
                    type: object
                    additionalProperties: true
                    description: >-
                      A self-contained JSON Schema Draft 6 document with local
                      $defs references.
        '400':
          description: Missing or unsupported operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JourneyValidationErrorResponse'
              example:
                errors:
                  - code: invalid-payload
                    title: >-
                      operation must be create, duplicate, update, or
                      update_node
                    meta:
                      attribute: base
                      path: operation
      security: []
components:
  schemas:
    JourneyValidationErrorResponse:
      type: object
      description: >-
        Validation error response. Uses the same `code`/`title`/`meta` shape as
        every other error; the failing field and any positional detail travel in
        `meta`.
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: >-
                  Stable, kebab-case error identifier. Always `invalid-payload`
                  for validation failures.
              title:
                type: string
                description: Human-readable message. Wording may change between releases.
              meta:
                type: object
                description: >-
                  Structured context. Always includes `attribute` (the field, or
                  `base` for request-level errors); may also include `path`,
                  `node_id`, or `client_node_id`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.