Create Service Account
curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/service-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "pipeline-deploy-prod",
"description": "Terraform deployment pipeline for production"
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/service-accounts"
payload = {
"name": "pipeline-deploy-prod",
"description": "Terraform deployment pipeline for production"
}
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({
name: 'pipeline-deploy-prod',
description: 'Terraform deployment pipeline for production'
})
};
fetch('https://cloud.cdata.com/api/v1/admin/service-accounts', 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://cloud.cdata.com/api/v1/admin/service-accounts",
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([
'name' => 'pipeline-deploy-prod',
'description' => 'Terraform deployment pipeline for production'
]),
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://cloud.cdata.com/api/v1/admin/service-accounts"
payload := strings.NewReader("{\n \"name\": \"pipeline-deploy-prod\",\n \"description\": \"Terraform deployment pipeline for production\"\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://cloud.cdata.com/api/v1/admin/service-accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"pipeline-deploy-prod\",\n \"description\": \"Terraform deployment pipeline for production\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/service-accounts")
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 \"name\": \"pipeline-deploy-prod\",\n \"description\": \"Terraform deployment pipeline for production\"\n}"
response = http.request(request)
puts response.read_body{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "pipeline-deploy-prod",
"description": "Terraform deployment pipeline for production",
"status": "active",
"client_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
"external_id": null,
"created_at": "2026-06-01T08:00:00Z",
"created_by": "00000000-0000-0000-0000-000000000001"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing required field or invalid value."
}
}{
"error": {
"code": "SERVICE_ACCOUNT_ALREADY_EXISTS",
"message": "A service account with this name already exists in the organization."
}
}Service Accounts
Create Service Account
Create a service account for machine identity use (CI/CD pipelines, IaC tooling, Terraform automation). The client_id in the response is used for OAuth 2.0 client credentials authentication. This endpoint is idempotent by external_id: a second POST with the same external_id returns the existing record.
POST
/
service-accounts
Create Service Account
curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/service-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "pipeline-deploy-prod",
"description": "Terraform deployment pipeline for production"
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/service-accounts"
payload = {
"name": "pipeline-deploy-prod",
"description": "Terraform deployment pipeline for production"
}
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({
name: 'pipeline-deploy-prod',
description: 'Terraform deployment pipeline for production'
})
};
fetch('https://cloud.cdata.com/api/v1/admin/service-accounts', 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://cloud.cdata.com/api/v1/admin/service-accounts",
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([
'name' => 'pipeline-deploy-prod',
'description' => 'Terraform deployment pipeline for production'
]),
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://cloud.cdata.com/api/v1/admin/service-accounts"
payload := strings.NewReader("{\n \"name\": \"pipeline-deploy-prod\",\n \"description\": \"Terraform deployment pipeline for production\"\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://cloud.cdata.com/api/v1/admin/service-accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"pipeline-deploy-prod\",\n \"description\": \"Terraform deployment pipeline for production\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/service-accounts")
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 \"name\": \"pipeline-deploy-prod\",\n \"description\": \"Terraform deployment pipeline for production\"\n}"
response = http.request(request)
puts response.read_body{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "pipeline-deploy-prod",
"description": "Terraform deployment pipeline for production",
"status": "active",
"client_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
"external_id": null,
"created_at": "2026-06-01T08:00:00Z",
"created_by": "00000000-0000-0000-0000-000000000001"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing required field or invalid value."
}
}{
"error": {
"code": "SERVICE_ACCOUNT_ALREADY_EXISTS",
"message": "A service account with this name already exists in the organization."
}
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
Response
Created
Service account identifier.
Unique display name within the organization.
Optional free-text description of the service account.
Current lifecycle state of the service account.
Available options:
active, deactivated Auto-generated. Used for OAuth 2.0 client credentials authentication.
Idempotency key supplied by the calling system.
ISO 8601 UTC.
User ID of the creator.
Was this page helpful?