---
title: "POST /projects/{project_id}/environments/{environment_id}/workflows/grants"
method: POST
path: "/projects/{project_id}/environments/{environment_id}/workflows/grants"
tags: ["Workflows"]
---

# POST /projects/{project_id}/environments/{environment_id}/workflows/grants

`POST /projects/{project_id}/environments/{environment_id}/workflows/grants`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/environments/{environment_id}/workflows/grants`
- Auth: HTTP bearer

## Path parameters

- `project_id` integer, required
- `environment_id` integer, required

## Request body

- CreateWorkflowGrantRequest
  - `action` 'start' | 'event', required
  - `resource` string, required
  - `source_environment_id` integer, required

## Response `200`

Grant created or already exists

- WorkflowGrantResponse
  - `action` string, required
  - `created_at` string, date-time, required
  - `id` string, uuid, required
  - `resource` string, required
  - `source_environment_id` integer, required
  - `target_environment_id` integer, required

## Other responses

- `400`: Invalid grant
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Environment not found
- `500`: Database failure

## Changes

- **2026-11-15** `188ea295ffc6`: 1 info
  - endpoint added
- **2026-11-15** `72c32d8dee65`: 1 breaking
  - api path removed without deprecation
- **2026-11-14** `101ef74660bc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/environments/:environment_id/workflows/grants/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
