---
title: "Create new Route"
method: POST
path: "/apps/{app}/routes"
tags: ["Routes"]
---

# Create new Route

`POST /apps/{app}/routes`

Create a new route in an app, if app doesn't exists, it creates the app

## Path parameters

- `app` string, required

## Request body

- RouteWrapper
  - `message` string
  - `error` ErrorBody
    - `message` string
    - `fields` string
  - `route` Route, required
    - `path` string — URL path that will be matched to this route
    - `image` string — Name of Docker image to use in this route. You should include the image tag, which should be a version number, to be more accurate. Can be overridden on a per route basis with route.image.
    - `headers` object — Map of http headers that will be sent with the response
    - `memory` integer — Max usable memory for this route (MiB).
    - `type` 'sync' | 'async' — Route type
    - `format` 'default' | 'http' | 'json' — Payload format sent into function.
    - `max_concurrency` integer — Maximum number of hot functions concurrency
    - `config` object — Route configuration - overrides application configuration
    - `timeout` integer — Timeout for executions of this route. Value in Seconds
    - `idle_timeout` integer — Hot functions idle timeout before termination. Value in Seconds
    - `jwt_key` string — Signing key for JWT

## Response `200`

Route created

- RouteWrapper
  - `message` string
  - `error` ErrorBody
    - `message` string
    - `fields` string
  - `route` Route, required
    - `path` string — URL path that will be matched to this route
    - `image` string — Name of Docker image to use in this route. You should include the image tag, which should be a version number, to be more accurate. Can be overridden on a per route basis with route.image.
    - `headers` object — Map of http headers that will be sent with the response
    - `memory` integer — Max usable memory for this route (MiB).
    - `type` 'sync' | 'async' — Route type
    - `format` 'default' | 'http' | 'json' — Payload format sent into function.
    - `max_concurrency` integer — Maximum number of hot functions concurrency
    - `config` object — Route configuration - overrides application configuration
    - `timeout` integer — Timeout for executions of this route. Value in Seconds
    - `idle_timeout` integer — Hot functions idle timeout before termination. Value in Seconds
    - `jwt_key` string — Signing key for JWT

## Other responses

- `400` — Invalid route due to parameters being missing or invalid.
- `409` — Route already exists.
- `default` — Unexpected error

## Changes

- **2016-12-13** `156d6440b85c` — 1 breaking, 3 info
  - removed the success response with the status `201`
  - added the non-success response with the status `409`
  - removed the non-success response with the status `500`
  - added the success response with the status `200`
- **2016-10-14** `c0f4fbb1ba30` — 1 breaking, 3 info
  - removed the success response with the status `200`
  - added the non-success response with the status `500`
  - removed the non-success response with the status `409`
  - added the success response with the status `201`

[Change history](https://skmtc.dev/iron-io/apis/ironfunctions/changes/apps/:app/routes/post.md)

---

[API](https://skmtc.dev/iron-io/apis/ironfunctions.md) · [All operations](https://skmtc.dev/iron-io/apis/ironfunctions/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/iron-io/ironfunctions/revisions/53fd9cdd70fc/schema)
