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
stringThe 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": "3nV8kQ5wA6pT",
"name": "Acme Corp"
}
]
}Get organization
Returns a single organization by its identifier.
Request
-
:id
string RequiredThe organization's identifier.
Response
-
id
stringThe organization's unique identifier.
-
name
stringThe organization's name.
curl https://example.com/v1/organizations/3nV8kQ5wA6pT \ -H "Authorization: Bearer org_xxxxxxx" {
"id": "3nV8kQ5wA6pT",
"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
stringThe identifier of the created organization.
curl https://example.com/v1/organizations \ -H "Authorization: Bearer org_xxxxxxx" \ --json '{ "name": "Acme Corp" }' {
"id": "3nV8kQ5wA6pT"
}Update organization
Updates the name of an organization.
Request
-
:id
string 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/3nV8kQ5wA6pT \ -H "Authorization: Bearer org_xxxxxxx" \ --json '{ "name": "Acme Corp" }' Delete organization
Deletes an organization and all its data.
Request
-
:id
string RequiredThe organization's identifier.
Response
No response.curl -X DELETE https://example.com/v1/organizations/3nV8kQ5wA6pT \ -H "Authorization: Bearer org_xxxxxxx"