---
title: "Create or replace a named connected-client credential"
method: POST
path: "/api/connected-clients"
tags: ["Clients and tokens"]
---

# Create or replace a named connected-client credential

`POST /api/connected-clients`

## Request

- Base URL: `https://keep.md`
- URL: `https://keep.md/api/connected-clients`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `keep.session_token`

Create or replace a named connected-client credential.

## Headers

- `Keep-API-Version` string

## Request body

- object
  - `name` string, required

## Response `200`

New connected-client credential. The token value is returned once.

- ApiToken
  - `id` string, required
  - `type` 'personal', required
  - `tokenType` 'personal'
  - `token` string: Returned only when a credential is created or rolled.
  - `name` string, nullable
  - `permissions` string[]
  - `scopeVersion` integer
  - `resourceScope` ResourceScope
    - `tagSlugs` string[]
    - `collectionIds` string[]
  - `tokenPrefix` string
  - `tokenSuffix` string
  - `createdAt` integer, required
  - `updatedAt` integer
  - `lastUsedAt` integer, nullable

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: The credential lacks access or the plan does not include the feature

---

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