POST /v1/projects/{projectId}/routes
Add a single routing rule to a project at a specified position. Defaults to the end of the list if no position is provided. The route is enabled by default. Stages a new version with the added route.
Servers
- https://api.vercel.com
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId |
String | Yes |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
teamId |
String | No |
The Team identifier to perform the request on behalf of. |
slug |
String | No |
The Team slug to perform the request on behalf of. |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
route |
Object | Yes | |
route.name |
String | Yes | |
route.description |
String | No | |
route.route |
Object | Yes | |
route.route.transforms[] |
Array | No | |
route.route.transforms[].env[] |
Array | No | |
route.route.transforms[].op |
String | No |
Valid values:
|
route.route.transforms[].target |
Object | No | |
route.route.transforms[].type |
String | No |
Valid values:
|
route.route.transforms[].args |
No | ||
route.route.missing[] |
Array | No | |
route.route.missing[].key |
String | No | |
route.route.missing[].type |
String | No |
Valid values:
|
route.route.missing[].value |
String | No | |
route.route.src |
String | Yes | |
route.route.dest |
String | No | |
route.route.status |
Integer | No | |
route.route.respectOriginCacheControl |
Boolean | No | |
route.route.caseSensitive |
Boolean | No | |
route.route.headers |
Object | No | |
route.route.has[] |
Array | No | |
route.route.has[].key |
String | No | |
route.route.has[].type |
String | No |
Valid values:
|
route.route.has[].value |
String | No | |
route.srcSyntax |
String | No |
Pattern syntax type. If not provided, inferred from pattern. Valid values:
|
route.enabled |
Boolean | No | |
position |
Object | No |
Controls where the route is inserted. Defaults to "end" if omitted. |
position.referenceId |
String | No |
Route ID to insert after/before. Required for "after"/"before". |
position.placement |
String | No |
"after"/"before" require referenceId. Valid values:
|
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.