Skip to main content
POST
/
v2
/
app-relationships
Create App Relationship
curl --request POST \
  --url https://public.api.serval.com/v2/app-relationships \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "appInstanceId": "<string>",
  "relationshipType": "APP_RELATIONSHIP_TYPE_UNSPECIFIED",
  "targetId": "<string>",
  "targetType": "APP_RELATIONSHIP_TARGET_TYPE_UNSPECIFIED"
}
'
{
  "data": {
    "id": "<string>",
    "appInstanceId": "<string>",
    "relationshipType": "APP_RELATIONSHIP_TYPE_UNSPECIFIED",
    "targetId": "<string>",
    "targetType": "APP_RELATIONSHIP_TARGET_TYPE_UNSPECIFIED",
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
appInstanceId
string
required

The ID of the app instance.

relationshipType
enum<string>
required

The type of relationship.

Available options:
APP_RELATIONSHIP_TYPE_UNSPECIFIED,
APP_RELATIONSHIP_TYPE_OWNER
targetId
string
required

The ID of the target (user or group).

targetType
enum<string>
required

The type of the target.

Available options:
APP_RELATIONSHIP_TARGET_TYPE_UNSPECIFIED,
APP_RELATIONSHIP_TARGET_TYPE_USER,
APP_RELATIONSHIP_TARGET_TYPE_GROUP

Response

Success

data
data · object

The created app relationship.