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

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

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

## 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/credential`
- Auth: HTTP bearer

## Path parameters

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

## Response `201`

New credential; the token is shown only in this response. The previous credential stops working.

- IssuedWorkflowCredentialResponse: A new workflow credential. `token` is shown this once.
  - `created_at` string, date-time, required
  - `prefix` string, required
  - `token` string, required
  - `usage` string, required: How the app uses it.

## Other responses

- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Environment not found
- `500`: Internal server error

## 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/credential/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)
