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

## Response `200`

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

---

[API](https://skmtc.dev/convex/apis/convex-management-api.md) · [All operations](https://skmtc.dev/convex/apis/convex-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/convex/convex-management-api/revisions/5f1e1a13c167/schema)
