Skip to content
Testnet only: a reference implementation, not a production service.Tokens and bank transfers here are simulated and have no value.

Users

2 operations under users. Examples read $API and $KEY from your shell.

GET /v1/users

Responses

200 Default Response

object

  • data array required

    Each item:

    • id string required
    • email string required
    • role string required
    • created_at string required
    • disabled_at string required (nullable)
  • has_more boolean required

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  "$API/v1/users" \
  -H "authorization: Bearer $KEY"
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/users");
Copied

PATCH /v1/users/{id}

Parameters

  • id string required in path

Request body

application/json, required

object

  • role string required one of owner, admin, operator, viewer, approver, developer

Responses

200 Default Response

object

  • id string required
  • email string required
  • role string required
  • created_at string required
  • disabled_at string required (nullable)

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  -X PATCH \
  "$API/v1/users/$ID" \
  -H "authorization: Bearer $KEY" \
  -H "content-type: application/json" \
  -d '{"role":"owner"}'
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.PATCH("/v1/users/{id}", {
  params: { path: { id: "<id>" } },
  body: {
    "role": "owner"
  },
});
Copied

Edit on GitHub