---
title: "Create deploy key"
method: POST
path: "/deployments/{deployment_name}/create_deploy_key"
tags: ["Deploy Keys"]
---

# Create deploy key

`POST /deployments/{deployment_name}/create_deploy_key`

Create a deploy key like "dev:happy-animal-123|ey..." which can be
used with the Convex CLI to develop against or deploy code.

When access to the deployment is granted through an OAuth token this
deploy key will use the same OAuth-granted token.

When access to the deployment is granted any other way a new token will be
created which grants access only to this deployment.

## Request body

- PlatformCreateDeployKeyArgs
  - `name` string, required — Name for the deploy key.
  - `allowedActions` string[]
  - `expiresAt` integer, nullable — Timestamp in milliseconds when this deploy key will expire. Must be at least 30 minutes in the future.

## Response `200`

- PlatformCreateDeployKeyResponse
  - `deployKey` string, required — Encrypted admin key

---

[API](https://skmtc.net/convex/apis/convex-management-api.md) · [All operations](https://skmtc.net/convex/apis/convex-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/convex/convex-management-api/versions/cfe35d359fba/schema)
