For Developers
Create Service Account
POST https://ed.link/api/v2/teams/:team_id/service_accounts
Provisions a new service account and returns the secret API token. Note that the secret token is only displayed once upon creation.
Permissions
Requires either the tokens.create or tokens.update system permission.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
:team_id | UUID | Yes | The ID of the team. |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Human-readable label for this service account. |
Sample Request
const response = await axios.post(
`https://ed.link/api/v2/teams/${team_id}/service_accounts`,
{
name: 'Backend Sync Worker'
},
{
headers: {
authorization: `Bearer ${user_session_token}`,
'content-type': 'application/json'
}
}
);
Sample Response
{
"$data": {
"id": "8b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"name": "Backend Sync Worker",
"token": "edlink_pat_48a9201948ba09182a472918",
"created_date": "2024-06-21T12:00:00.000Z"
}
}
