Users
2 operations under users. Examples read $API and $KEY from your shell.
GET /v1/users
Responses
200 Default Response
object
dataarray requiredEach item:
idstring requiredemailstring requiredrolestring requiredcreated_atstring requireddisabled_atstring required (nullable)
has_moreboolean required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/users" \
-H "authorization: Bearer $KEY"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");PATCH /v1/users/{id}
Parameters
idstring required in path
Request body
application/json, required
object
rolestring required one ofowner,admin,operator,viewer,approver,developer
Responses
200 Default Response
object
idstring requiredemailstring requiredrolestring requiredcreated_atstring requireddisabled_atstring 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"}'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"
},
});