Skip to main content
POST
/
v1
/
accounts
/
relationships
Create an account relationship
curl --request POST \
  --url https://platform.thena.ai/v1/accounts/relationships \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "A123",
  "relatedAccountId": "A124",
  "relationshipType": "RELATIONSHIP_TYPE_PARENT"
}
'
{
  "id": "AR123",
  "accountId": "<string>",
  "account": "<string>",
  "relatedAccountId": "<string>",
  "relatedAccount": "<string>",
  "relationshipType": {
    "id": "ART123",
    "name": "Parent",
    "inverseRelationshipId": "ART124",
    "inverseRelationship": "Subsidiary",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Authorizations

Authorization
string
header
required

Enter the bearer token

Body

application/json
accountId
string
required

Account ID

Example:

"A123"

Related account ID

Example:

"A124"

relationshipType
string
required

The identifier of the relationship type attribute

Example:

"RELATIONSHIP_TYPE_PARENT"

Response

Operation successful

id
string
required

The identifier of the relationship

Example:

"AR123"

accountId
string
required

The identifier of the primary account of the relationship

account
string
required

The name of the primary account of the relationship

The identifier of the related account of the relationship

The name of the related account of the relationship

relationshipType
object
required

Relationship type

createdAt
string
required

The creation date of the relationship

updatedAt
string
required

Last update date of the relationship