For Developers
Assign Role to Member
POST https://ed.link/api/v2/teams/:team_id/members/:member_id/assignments
Assigns a team role (either an Edlink managed role or a custom role defined on the team) to a member. If the member already holds this role, the existing assignment is returned.
Permissions
Requires the team_role_assignments.create system permission.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
:team_id | UUID | Yes | The ID of the team. |
:member_id | UUID | Yes | The ID of the membership record. |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
team_role_id | UUID | Yes | The ID of the role to assign. |
Sample Request
const response = await axios.post(
`https://ed.link/api/v2/teams/${team_id}/members/${member_id}/assignments`,
{
team_role_id: '391593c7-f439-45ff-a2b5-ffb4cc013037'
},
{
headers: {
authorization: `Bearer ${user_session_token}`,
'content-type': 'application/json'
}
}
);
Sample Response
{
"$data": {
"id": "e0b5f126-7c39-4458-9419-f53eb49f4851",
"created_date": "2026-10-01T12:00:00.000Z",
"updated_date": "2026-10-01T12:00:00.000Z",
"membership_id": "6a9e99a8-e165-4d0d-9b7d-6062a4be682d",
"team_role_id": "391593c7-f439-45ff-a2b5-ffb4cc013037",
"targets": []
}
}
