---
title: "Create a project credential"
method: POST
path: "/v1/projects/{projectId}/credentials"
tags: ["projects"]
---

# Create a project credential

`POST /v1/projects/{projectId}/credentials`

Create a login or inbox credential for a project. Passwords are not returned.

## Path parameters

- `projectId` string, required

## Headers

- `Authorization` string, required

## Request body

- union
  - ProjectsCreateAProjectCredentialRequest0
    - `kind` 'login', required
    - `authMethod` 'password' | 'google' | 'github'
    - `label` string, required
    - `description` string — When to use this account: its type, enabled features/plans, and the environments it exists in. The agent reads this when choosing between credentials.
    - `username` string, required
    - `password` string, required
    - `totpSecret` string — Authenticator (TOTP/MFA) secret: the base32 setup key or otpauth:// URI from the account's MFA enrollment. The agent generates one-time codes from it during runs. Never returned; responses expose only hasTotpSecret.
  - ProjectsCreateAProjectCredentialRequest1
    - `kind` 'login', required
    - `authMethod` 'custom', required
    - `label` string, required
    - `description` string — When to use this account: its type, enabled features/plans, and the environments it exists in. The agent reads this when choosing between credentials.
    - `authInstructions` string, required
  - ProjectsCreateAProjectCredentialRequest2
    - `kind` 'inbox', required
    - `label` string, required
    - `description` string — When to use this account: its type, enabled features/plans, and the environments it exists in. The agent reads this when choosing between credentials.

## Response `201`

Credential created

- ProjectsCreateAProjectCredentialResponse201
  - `credential` CredentialSummary, required
    - `id` string, uuid, required
    - `kind` 'login' | 'inbox', required
    - `authMethod` 'password' | 'google' | 'github' | 'custom', required
    - `label` string, required
    - `description` string, nullable, required
    - `username` string, required
    - `hasAuthInstructions` boolean, required
    - `hasTotpSecret` boolean, required
    - `createdAt` string, date-time, required

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing API key
- `429` — Too Many Requests - Usage limit exceeded
- `500` — Internal Server Error
- `504` — Gateway Timeout - Test execution exceeded time limit

## Changes

- **2026-08-26** `c797842a21bd` — 4 info
  - added the new optional request property `oneOf[subschema #1: ProjectsCreateAProjectCredentialRequest0]/description`
  - added the new optional request property `oneOf[subschema #2: ProjectsCreateAProjectCredentialRequest1]/description`
  - added the new optional request property `oneOf[subschema #3: ProjectsCreateAProjectCredentialRequest2]/description`
  - added the required property `credential/description` to the response with the `201` status
- **2026-08-22** `bf198f94879a` — 7 breaking, 6 warning
  - the `oneOf[subschema #1: ProjectsCreateAProjectCredentialRequest0]/label` request property's minLength was increased from `0` to `1`
  - the `oneOf[subschema #1: ProjectsCreateAProjectCredentialRequest0]/password` request property's minLength was increased from `0` to `1`
  - the `oneOf[subschema #1: ProjectsCreateAProjectCredentialRequest0]/totpSecret` request property's minLength was increased from `0` to `1`
  - the `oneOf[subschema #1: ProjectsCreateAProjectCredentialRequest0]/username` request property's minLength was increased from `0` to `1`
  - …9 more
- **2026-08-18** `e70a96a4b9bb` — 2 info
  - added the new optional request property `oneOf[subschema #1: ProjectsCreateAProjectCredentialRequest0]/totpSecret`
  - added the required property `credential/hasTotpSecret` to the response with the `201` status

[Change history](https://skmtc.dev/tester/apis/testerarmy-api/changes/v1/projects/:projectId/credentials/post.md)

---

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