Zum Hauptinhalt springen
POST
/
v2
/
enterprise
/
organizations
Endpunkt zum Erstellen einer Enterprise-Organisation
curl --request POST \
  --url https://api.devin.ai/v2/enterprise/organizations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "display_name": "<string>",
  "acu_limit": 123,
  "add_creator_as_member": true
}
'
import requests

url = "https://api.devin.ai/v2/enterprise/organizations"

payload = {
"display_name": "<string>",
"acu_limit": 123,
"add_creator_as_member": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({display_name: '<string>', acu_limit: 123, add_creator_as_member: true})
};

fetch('https://api.devin.ai/v2/enterprise/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.devin.ai/v2/enterprise/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([
'display_name' => '<string>',
'acu_limit' => 123,
'add_creator_as_member' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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.devin.ai/v2/enterprise/organizations"

payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"acu_limit\": 123,\n \"add_creator_as_member\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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.devin.ai/v2/enterprise/organizations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"acu_limit\": 123,\n \"add_creator_as_member\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.devin.ai/v2/enterprise/organizations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"acu_limit\": 123,\n \"add_creator_as_member\": true\n}"

response = http.request(request)
puts response.read_body
{
  "created_at": "2023-11-07T05:31:56Z",
  "org_id": "<string>",
  "org_name": "<string>",
  "max_cycle_acu_limit": 123,
  "max_session_acu_limit": 123,
  "org_admin_count": 0,
  "org_member_count": 0,
  "org_user_count": 0
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
Erfordert den persönlichen API key eines Enterprise-Administrators. Legen Sie eine neue Organisation in Ihrem Enterprise mit optionalen ACU-Grenzwerten an.

Autorisierungen

Authorization
string
header
erforderlich

Persönlicher API Key (apk_user_*) nur für Enterprise-Administratoren

Body

application/json
display_name
string
erforderlich
acu_limit
integer | null
add_creator_as_member
boolean
Standard:true

Antwort

Erfolgreiche Antwort

created_at
string<date-time> | null
erforderlich
org_id
string
erforderlich
org_name
string
erforderlich
max_cycle_acu_limit
integer | null
max_session_acu_limit
integer | null
org_admin_count
integer
Standard:0
org_member_count
integer
Standard:0
org_user_count
integer
Standard:0