Organizations
Manage the organizations of the Krenalis instance.
All these endpoints require an organizations API key instead of the standard API key.
List organizations
Returns the organizations, sorted by name.
Request
-
first
intThe number of organizations to skip before starting to return results. The default value is 0.
-
limit
intThe maximum number of organizations to return. It can be any value between 1 and 1,000. If not provided, the default value is 100.
Response
-
organizations
array of objectThe list of organizations.
-
id
uuidThe organization's unique identifier.
-
name
stringThe organization's name.
-
curl -G https://example.com/v1/organizations \ -H "Authorization: Bearer org_xxxxxxx" \ -d "limit=100" {
"organizations": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corp"
}
]
}Get organization
Returns a single organization by its identifier.
Request
-
:id
uuid RequiredThe organization's identifier.
Response
-
id
uuidThe organization's unique identifier.
-
name
stringThe organization's name.
curl https://example.com/v1/organizations/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer org_xxxxxxx" {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corp"
}Create organization
Creates a new organization.
Request
-
name
string RequiredThe organization's name.
Must be a non-empty string with a maximum of 45 characters.
Response
-
id
uuidThe identifier of the created organization.
curl https://example.com/v1/organizations \ -H "Authorization: Bearer org_xxxxxxx" \ --json '{ "name": "Acme Corp" }' {
"id": "550e8400-e29b-41d4-a716-446655440000"
}Update organization
Updates the name of an organization.
Request
-
:id
uuid RequiredThe organization's identifier.
-
name
string RequiredIt can be 1 to 45 Unicode characters long.
Must be a non-empty string with a maximum of 45 characters.
Response
No response.curl -X PUT https://example.com/v1/organizations/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer org_xxxxxxx" \ --json '{ "name": "Acme Corp" }' Delete organization
Deletes an organization and all its data.
Request
-
:id
uuid RequiredThe organization's identifier.
Response
No response.curl -X DELETE https://example.com/v1/organizations/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer org_xxxxxxx"