﻿# M2M_CLIENT_EXISTS — the tenant already holds this client id

`POST /clients?clientId=<id>` creates a client with a chosen id. Client ids are unique within a tenant, so a create of an id the tenant already holds is r…

<em>cyoda-go version <a href="https://github.com/Cyoda/cyoda-go/releases/tag/v0.9.0">0.9.0</a></em>

# errors.M2M_CLIENT_EXISTS

## NAME

M2M_CLIENT_EXISTS — the tenant already holds a client with the requested id.

## SYNOPSIS

HTTP: `409` `Conflict`. Retryable: `no`.

## DESCRIPTION

`POST /clients?clientId=<id>` creates a client with a chosen id. Client ids are unique within a tenant, so a create of an id the tenant already holds is refused and creates nothing. Of two creates of one id at the same moment, on any nodes, exactly one succeeds; the other gets this error. A provisioning script can treat it as "already there": the existing client's secret is not returned again, so keep the secret from the create that made it, or reset it (`PUT /clients/{clientId}/secret`).

## SEE ALSO

- errors
- auth.clients

## See also

- [`cyoda help errors`](/help/errors/) — Every error response from the Cyoda REST API carries a structured `errorCode` in the `properties` object. Multiple codes may share the same HTTP status. Programmatic handling keys on `errorCode`, not HTTP status.
- [`cyoda help auth clients`](/help/auth/clients/) — auth.clients — provision and manage machine-to-machine (M2M) clients that authenticate against cyoda via the `client_credentials` grant.

## Raw formats

- [`/help/errors/m2m_client_exists.json`](/help/errors/m2m_client_exists.json) — full descriptor (matches `GET /help/{topic}` envelope)
- [`/help/errors/m2m_client_exists.md`](/help/errors/m2m_client_exists.md) — body only