For Developers
Assign Role to Member
POST https://ed.link/api/v2/teams/:team_id/members/:membership_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.
Assigning the Edlink-managed Owner role (7ebf2dc9-ab3b-448f-9b15-0b38e71f81c9) also requires the caller to already hold that role. Any other caller receives 403 with NO_PERMISSION. Edlink staff are treated as owners. There is no update method for an existing assignment.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
:team_id | UUID | Yes | The ID of the team. |
:membership_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/${membership_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", "name": "Editor" },
"targets": []
}
}
