POST
/
v1
/
accounts
/
relationships
curl --request POST \
  --url https://platform.thena.ai/v1/accounts/relationships \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-org-id: <api-key>' \
  --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": "<string>",
    "updatedAt": "<string>"
  },
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Authorizations

Authorization
string
header
required

Enter JWT bearer token

x-org-id
string
header
required

Enter organization ID

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

201
application/json
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