Skip to main content
POST
/
organizations
/
{organizationName}
/
permissions
Create organization permission
curl --request POST \
  --url https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/permissions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "userGroupId": "<string>",
  "message": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}
'
import requests

url = "https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/permissions"

payload = {
"userGroupId": "<string>",
"message": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
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({
userGroupId: '<string>',
message: '<string>',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
})
};

fetch('https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/permissions', 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://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/permissions",
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([
'userGroupId' => '<string>',
'message' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z'
]),
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://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/permissions"

payload := strings.NewReader("{\n \"userGroupId\": \"<string>\",\n \"message\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\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://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/permissions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userGroupId\": \"<string>\",\n \"message\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/permissions")

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 \"userGroupId\": \"<string>\",\n \"message\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}"

response = http.request(request)
puts response.read_body
{
  "userGroupId": "<string>",
  "message": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationName
string
required

The unique identifier of the organization Standard identifier pattern for resource names

Pattern: ^[a-zA-Z0-9_-]+$

Query Parameters

requestPermission
boolean
default:false

Indicates that the user is requesting access to the resource

Body

application/json

Represents a permission assignment for a user or group within an organization

userGroupId
string

A resource identifier that uniquely identifies either a user or a group within the system. This identifier is used throughout the API for permission management and access control.

Format:

  • For users: user:{email} or user:{userId}
  • For groups: group:{groupName}
Pattern: ^(user:[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}|group:[a-zA-Z0-9._-]+)$
permission
enum<string>

The role/permission level granted to the user or group

Available options:
admin,
modeler,
member
message
string

Optional message or note about the permission assignment

createdAt
string<date-time>

ISO 8601 timestamp indicating when the permission was created

updatedAt
string<date-time>

ISO 8601 timestamp indicating when the permission was last modified

Response

Organization permission created successfully

Represents a permission assignment for a user or group within an organization

userGroupId
string

A resource identifier that uniquely identifies either a user or a group within the system. This identifier is used throughout the API for permission management and access control.

Format:

  • For users: user:{email} or user:{userId}
  • For groups: group:{groupName}
Pattern: ^(user:[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}|group:[a-zA-Z0-9._-]+)$
permission
enum<string>

The role/permission level granted to the user or group

Available options:
admin,
modeler,
member
message
string

Optional message or note about the permission assignment

createdAt
string<date-time>

ISO 8601 timestamp indicating when the permission was created

updatedAt
string<date-time>

ISO 8601 timestamp indicating when the permission was last modified