---
title: "Redeem a Cloud coding setup code"
method: POST
path: "/v1/cloud-coding/gateway/setup"
tags: ["Internal"]
---

# Redeem a Cloud coding setup code

`POST /v1/cloud-coding/gateway/setup`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/cloud-coding/gateway/setup`
- Auth: none required

## Response `200`

Redeem a Cloud coding setup code

- CloudCodingGatewaySetup
  - `taskId` string, required
  - `repository` object, required
    - `fullName` string, required
    - `cloneUrl` string, uri, required
    - `defaultBranch` string, required
  - `baseBranch` string, required
  - `author` object, required
    - `name` string, required
    - `email` string, required
    - `login` string, required
  - `token` string, required
  - `tokenExpiresAt` string, date-time, required

## Other responses

- `401`: This task has ended or expired.
- `403`: Cloud coding is not available for this task.
- `404`: The approval was not found.
- `409`: The branch or approval is not available.
- `422`: This change could not be accepted.
- `502`: GitHub could not complete the request.

## Changes

- **2026-11-29** `8a5cecbbb048`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/cloud-coding/gateway/setup/post.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/84fb0f99fb95?raw)
