---
title: "Create worker relation with external Ids"
method: POST
path: "/hris/worker_relations/profile/external"
tags: ["workerRelations"]
---

# Create worker relation with external Ids

`POST /hris/worker_relations/profile/external`

## Request

- Base URL: `https://api.letsdeel.com/rest`
- URL: `https://api.letsdeel.com/rest/hris/worker_relations/profile/external`
- Auth: HTTP bearer

Creates a hierarchical worker relation between a worker and their subordinates, using external IDs to identify all parties. The request body must supply the external IDs of both the parent and child workers along with the relation type.

 **Token scopes**: `profile:write`

## Request body

- object
  - `data` HrisWorkerRelationsProfileExternalPostRequestBodyContentApplicationJsonSchemaData
    - `child_hris_profile_ids` HrisWorkerRelationsProfileExternalPostRequestBodyContentApplicationJsonSchemaDataChildHrisProfileIdsItems[], required: An array containing the secondary HrisProfiles external IDs and the relation external ID.
      - `relation_external_id` string, required: A custom ID to set to the relation.
      - `external_hris_profile_id` string, required: The external ID of the secondary HrisProfile.
    - `parent_external_hris_profile_id` string, required: Primary HrisProfile external ID
    - `hris_relationship_type_external_id` string, required: The external ID of the Worker Relation Type.

## Response `201`

Successful operation

- WorkerRelationsCreateWorkerRelationProfileByExternalIdResponse201: Empty response body

## Other responses

- `400`: Bad request - A required field is missing or invalid.
- `401`: Operation failed.
- `403`: Operation failed.
- `404`: Operation failed.
- `500`: Operation failed.

## Changes

- **2026-10-30** `24d75e281de8`: 2 warning, 4 info
  - removed the optional property `errors/items/path` from the response with the `400` status
  - removed the optional property `request` from the response with the `400` status
  - added the optional property `errors/items/field` to the response with the `400` status
  - the response property `errors` became required for the status `400`
  - …2 more

[Operation history](https://skmtc.dev/deel/apis/hris-endpoints/changes/hris/worker_relations/profile/external/post.md)

---

[API](https://skmtc.dev/deel/apis/hris-endpoints.md) - [All operations](https://skmtc.dev/deel/apis/hris-endpoints/llms.txt) - [OpenAPI document](https://skmtc.dev/deel/apis/hris-endpoints/revisions/b7b456c45a40?raw)
