Create Organization Trust Using POST

Create Organization Trust Using POST

Create organization trust between two organizations. Org owner can ONLY create trust type of CUSTOM.

Access Policy

Role User Accounts Service Accounts (Client Credentials Applications)
Organization Owner ✔️ ✔️
Request
URI
POST
https://{api_host}/csp/gateway/am/api/orgs/{orgId}/trusts
COPY
Path Parameters
string
orgId
Required

Unique identifier (GUID) of the organization.


Request Body
OrganizationTrustCreateRequest of type(s) application/json
Required
"OrganizationTrustCreateRequest Object"
string
trustedOrgId
Required

Unique identifier (GUID) of the trusted organization.

integer As int64 As int64
expiresAt
Optional

The timestamp the trust expires at (measured in number of milliseconds since 1/1/1970 UTC).

object
allowedScopes
Required

Defines the properties of the allowed scopes for organization trust.

string
type
Optional

The type of the organization trust.

Possible values are : HIERARCHY, CUSTOM, PARTNER,
string
description
Optional
Constraints: minLength: 0 maxLength: 200

The description about the trust.

Authentication
This operation uses the following authentication methods.
Responses
201

Created

Returns IdDto of type(s) application/json
{
    "id": "string"
}
string
id
Optional

The unique identifier of the resource.


400

Organization trust cannot expire in the past.

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


401

The user is not authorized to use the API

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


403

The user is forbidden to use the API

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


404

Organization with this identifier is not found.

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


409

Active or pending organization trust between the organizations already exist.

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


429

The user has sent too many requests

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


500

An unexpected error has occurred while processing the request

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/csp/gateway/am/api/orgs/{orgId}/trusts