cURL
curl --request POST \
--url https://api.cradl.ai/{basePath}/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"metadata": {},
"name": "<string>",
"description": "<string>",
"url": "<string>",
"useNewScopes": true
}
'import requests
url = "https://api.cradl.ai/{basePath}/organizations"
payload = {
"metadata": {},
"name": "<string>",
"description": "<string>",
"url": "<string>",
"useNewScopes": True
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'},
body: JSON.stringify({
metadata: {},
name: '<string>',
description: '<string>',
url: '<string>',
useNewScopes: true
})
};
fetch('https://api.cradl.ai/{basePath}/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cradl.ai/{basePath}/organizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
],
'name' => '<string>',
'description' => '<string>',
'url' => '<string>',
'useNewScopes' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cradl.ai/{basePath}/organizations"
payload := strings.NewReader("{\n \"metadata\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"useNewScopes\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cradl.ai/{basePath}/organizations")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"metadata\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"useNewScopes\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cradl.ai/{basePath}/organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"metadata\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"useNewScopes\": true\n}"
response = http.request(request)
puts response.read_body{
"metadata": {},
"numberOfUsersAllowed": 1,
"monthlyNumberOfPredictionsAllowed": 1,
"organizationId": "<string>",
"numberOfModelsCreated": 1,
"numberOfTransitionsCreated": 1,
"monthlyNumberOfDocumentsAllowed": 1,
"monthlyNumberOfTransformationsCreated": 1,
"createdTime": "<string>",
"planId": "<string>",
"monthlyUsageSummary": {},
"updatedTime": "<string>",
"monthlyNumberOfGpuHoursUsed": 1,
"updatedBy": "<string>",
"monthlyNumberOfWorkflowExecutionsAllowed": 1,
"monthlyNumberOfActiveModelsUsed": 1,
"monthlyNumberOfDataBundlesCreated": 1,
"numberOfUsersCreated": 1,
"monthlyNumberOfTransitionExecutionsCreated": 1,
"numberOfSecretsCreated": 1,
"name": "<string>",
"monthlyNumberOfTransformationsAllowed": 1,
"numberOfAppClientsAllowed": 1,
"numberOfWorkflowsCreated": 1,
"monthlyNumberOfFieldPredictionsUsed": 1,
"monthlyNumberOfWorkflowExecutionsCreated": 1,
"description": "<string>",
"monthlyNumberOfDataBundlesAllowed": 1,
"monthlyNumberOfTransitionExecutionsAllowed": 1,
"numberOfSecretsAllowed": 1,
"monthlyNumberOfTrainingsCreated": 1,
"paymentMethodId": "<string>",
"numberOfAppClientsCreated": 1,
"numberOfAssetsCreated": 1,
"numberOfWorkflowsAllowed": 1,
"documentRetentionInDays": 913,
"monthlyNumberOfPredictionsCreated": 1,
"numberOfTransitionsAllowed": 1,
"monthlyNumberOfDocumentsCreated": 1,
"numberOfModelsAllowed": 1,
"createdBy": "<string>",
"monthlyNumberOfTrainingsAllowed": 1,
"numberOfAssetsAllowed": 1,
"numberOfAgentsCreated": 1,
"privileges": {},
"monthlyNumberOfAgentRunsCreated": 1,
"deploymentsAllowed": {},
"monthlyNumberOfHookRunsCreated": 1,
"numberOfHooksCreated": 1,
"numberOfDatasetsAllowed": 1,
"numberOfActionsCreated": 1,
"monthlyNumberOfActionRunsAllowed": 1,
"monthlyNumberOfValidationTasksCreated": 1,
"monthlyNumberOfPagePredictionsAllowed": 1,
"deploymentsCreated": {},
"numberOfAgentsAllowed": 1,
"monthlyNumberOfAgentRunsAllowed": 1,
"pictureUrl": "<string>",
"monthlyNumberOfActionRunsCreated": 1,
"numberOfActionsAllowed": 1,
"numberOfValidationsCreated": 1,
"monthlyNumberOfProductionWorkflowMinutesUsed": 1,
"code": "<string>",
"monthlyNumberOfUserMinutesUsed": 1,
"numberOfValidationsAllowed": 1,
"monthlyNumberOfModelDeploymentUnitsUsed": 1,
"clientId": "<string>",
"numberOfConnectionsAllowed": 1,
"numberOfHooksAllowed": 1,
"monthlyNumberOfHookRunsAllowed": 1,
"url": "<string>",
"numberOfDatasetsCreated": 1,
"monthlyNumberOfPagePredictionsUsed": 1,
"numberOfConnectionsCreated": 1,
"monthlyNumberOfValidationTasksAllowed": 1,
"useNewScopes": true
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}API Reference
Create Organization
Create Organization
POST
/
organizations
cURL
curl --request POST \
--url https://api.cradl.ai/{basePath}/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"metadata": {},
"name": "<string>",
"description": "<string>",
"url": "<string>",
"useNewScopes": true
}
'import requests
url = "https://api.cradl.ai/{basePath}/organizations"
payload = {
"metadata": {},
"name": "<string>",
"description": "<string>",
"url": "<string>",
"useNewScopes": True
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'},
body: JSON.stringify({
metadata: {},
name: '<string>',
description: '<string>',
url: '<string>',
useNewScopes: true
})
};
fetch('https://api.cradl.ai/{basePath}/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cradl.ai/{basePath}/organizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
],
'name' => '<string>',
'description' => '<string>',
'url' => '<string>',
'useNewScopes' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cradl.ai/{basePath}/organizations"
payload := strings.NewReader("{\n \"metadata\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"useNewScopes\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cradl.ai/{basePath}/organizations")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"metadata\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"useNewScopes\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cradl.ai/{basePath}/organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"metadata\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"useNewScopes\": true\n}"
response = http.request(request)
puts response.read_body{
"metadata": {},
"numberOfUsersAllowed": 1,
"monthlyNumberOfPredictionsAllowed": 1,
"organizationId": "<string>",
"numberOfModelsCreated": 1,
"numberOfTransitionsCreated": 1,
"monthlyNumberOfDocumentsAllowed": 1,
"monthlyNumberOfTransformationsCreated": 1,
"createdTime": "<string>",
"planId": "<string>",
"monthlyUsageSummary": {},
"updatedTime": "<string>",
"monthlyNumberOfGpuHoursUsed": 1,
"updatedBy": "<string>",
"monthlyNumberOfWorkflowExecutionsAllowed": 1,
"monthlyNumberOfActiveModelsUsed": 1,
"monthlyNumberOfDataBundlesCreated": 1,
"numberOfUsersCreated": 1,
"monthlyNumberOfTransitionExecutionsCreated": 1,
"numberOfSecretsCreated": 1,
"name": "<string>",
"monthlyNumberOfTransformationsAllowed": 1,
"numberOfAppClientsAllowed": 1,
"numberOfWorkflowsCreated": 1,
"monthlyNumberOfFieldPredictionsUsed": 1,
"monthlyNumberOfWorkflowExecutionsCreated": 1,
"description": "<string>",
"monthlyNumberOfDataBundlesAllowed": 1,
"monthlyNumberOfTransitionExecutionsAllowed": 1,
"numberOfSecretsAllowed": 1,
"monthlyNumberOfTrainingsCreated": 1,
"paymentMethodId": "<string>",
"numberOfAppClientsCreated": 1,
"numberOfAssetsCreated": 1,
"numberOfWorkflowsAllowed": 1,
"documentRetentionInDays": 913,
"monthlyNumberOfPredictionsCreated": 1,
"numberOfTransitionsAllowed": 1,
"monthlyNumberOfDocumentsCreated": 1,
"numberOfModelsAllowed": 1,
"createdBy": "<string>",
"monthlyNumberOfTrainingsAllowed": 1,
"numberOfAssetsAllowed": 1,
"numberOfAgentsCreated": 1,
"privileges": {},
"monthlyNumberOfAgentRunsCreated": 1,
"deploymentsAllowed": {},
"monthlyNumberOfHookRunsCreated": 1,
"numberOfHooksCreated": 1,
"numberOfDatasetsAllowed": 1,
"numberOfActionsCreated": 1,
"monthlyNumberOfActionRunsAllowed": 1,
"monthlyNumberOfValidationTasksCreated": 1,
"monthlyNumberOfPagePredictionsAllowed": 1,
"deploymentsCreated": {},
"numberOfAgentsAllowed": 1,
"monthlyNumberOfAgentRunsAllowed": 1,
"pictureUrl": "<string>",
"monthlyNumberOfActionRunsCreated": 1,
"numberOfActionsAllowed": 1,
"numberOfValidationsCreated": 1,
"monthlyNumberOfProductionWorkflowMinutesUsed": 1,
"code": "<string>",
"monthlyNumberOfUserMinutesUsed": 1,
"numberOfValidationsAllowed": 1,
"monthlyNumberOfModelDeploymentUnitsUsed": 1,
"clientId": "<string>",
"numberOfConnectionsAllowed": 1,
"numberOfHooksAllowed": 1,
"monthlyNumberOfHookRunsAllowed": 1,
"url": "<string>",
"numberOfDatasetsCreated": 1,
"monthlyNumberOfPagePredictionsUsed": 1,
"numberOfConnectionsCreated": 1,
"monthlyNumberOfValidationTasksAllowed": 1,
"useNewScopes": true
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Body
application/json
Response
200 response
Required range:
x >= 0Required range:
x >= 0Pattern:
^(cradl|las):organization:[a-z0-9-_]+$Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Pattern:
^[0-9]{4}-?[0-9]{2}-?[0-9]{2}( |T)?[0-9]{2}:?[0-9]{2}:?[0-9]{2}(.[0-9]{1,6})?(Z|[+][0-9]{2}(:|)[0-9]{2})$Pattern:
^(|(cradl|las):organization:[a-z0-9-_]+/)(cradl|las):plan:[a-z0-9-_]+(|:@[a-z0-9-_]+|:[0-9]+)$Pattern:
^[0-9]{4}-?[0-9]{2}-?[0-9]{2}( |T)?[0-9]{2}:?[0-9]{2}:?[0-9]{2}(.[0-9]{1,6})?(Z|[+][0-9]{2}(:|)[0-9]{2})$Required range:
x >= 0Maximum string length:
4096Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Maximum string length:
4096Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Maximum string length:
4096Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Pattern:
^(cradl|las):payment-method:[a-f0-9]{32}$Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
1 <= x <= 1825Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Maximum string length:
4096Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Pattern:
^http://localhost.*|^https://.*Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Maximum string length:
4096Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Pattern:
^[0-9a-z]+$Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Maximum string length:
4096Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0