---
title: "Replace project agent credential files (write-only; supports Idempotency-Key)"
method: PUT
path: "/v1/agent-credentials/{app}"
tags: ["Agent credentials"]
---

# Replace project agent credential files (write-only; supports Idempotency-Key)

`PUT /v1/agent-credentials/{app}`

## Request

- Base URL: `https://api.shardflux.dev`
- URL: `https://api.shardflux.dev/v1/agent-credentials/{app}`
- Auth: HTTP bearer

## Path parameters

- `app` union, required
  - 'claude'
  - 'codex'

## Query parameters

- `project_id` string, uuid

## Request body

- object
  - `files` object[], required
    - `path` string, required
    - `content_b64` string, required
    - `mode` '0600', required
  - `login_id` string, uuid: UUIDv7, lowercase canonical form.

## Response `200`

Default Response

- object
  - `app` union, required
    - 'claude'
    - 'codex'
  - `updated_at` string, date-time, required
  - `fingerprint` string, nullable, required
  - `files` object[], required
    - `path` string, required
  - `scope` 'account'
  - `status` union
    - 'ready'
    - 'needs_sign_in'
  - `expires_at` string, date-time, nullable
  - `access` object: Claude only, with check_access=true: a live check of the account login with Claude.
    - `verdict` union, required: What Claude answered when asked with the account login (check_access=true): usable, refused (sign in to Claude again), or unknown (nothing was learned; ask again).
      - 'usable'
      - 'refused'
      - 'unknown'
    - `checked_at` string, date-time, required

## Other responses

- `4XX`: Default Response
- `5XX`: Default Response

---

[API](https://skmtc.dev/shardflux/apis/shardflux-api.md) · [All operations](https://skmtc.dev/shardflux/apis/shardflux-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shardflux/apis/shardflux-api/revisions/ea685f7b39c4?raw)
