Auth API reference

Auth API · Credentials

patch/v1/apps/{app_id}/credentials/{client_id}Auth

Update M2M client status

Path parameters

app_id*string

Id of the app.

client_id*string

Id of the client.

Request body

is_activeboolean

Set active or inactive

Response · 200 Status updated. Returns the credential in the state it landed in.

id*string

Unique identifier of the M2M client.

app_id*string

The Auth app the M2M client belongs to.

client_id*string

The M2M client id (used as `client_id` in the client-credentials grant).

name*string

Name of the M2M client.

is_active*boolean

Whether the client can obtain tokens.

last_used_at*string · date-time

When the M2M client was last used (ISO 8601), or `null` if never.

created_at*string · date-time

When the M2M client was created (ISO 8601).

scopes*array

Scopes granted to the M2M client.

Example

Request

PATCH https://api.auth.productcraft.co/v1/apps/{app_id}/credentials/{client_id}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "is_active": false
}

Response

{
  "id": "string",
  "app_id": "string",
  "client_id": "string",
  "name": "string",
  "is_active": false,
  "last_used_at": "2026-01-01T00:00:00.000Z",
  "created_at": "2026-01-01T00:00:00.000Z",
  "scopes": [
    {
      "resource": "user",
      "action": "read"
    }
  ]
}