Skip to main content

core_users_service_account_create

POST 

/api/v3//core/users/service_account/

Create a new user account that is marked as a service account

Request

Bodyrequired

    namestringrequired

    Possible values: non-empty

    create_groupboolean
    Default value: false
    expiringboolean
    Default value: true
    expiresdate-time

    If not provided, valid for 360 days

Responses

Schema
    usernamestringrequired
    tokenstringrequired
    user_uidstringrequired
    user_pkintegerrequired
    group_pkstring

Authorization: http

name: authentiktype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "/api/v3/core/users/service_account/");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"name\": \"string\",\n \"create_group\": false,\n \"expiring\": true,\n \"expires\": \"2024-07-29T15:51:28.071Z\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
/api/v3
Auth
Body required
{
  "name": "string",
  "create_group": false,
  "expiring": true,
  "expires": "2024-07-29T15:51:28.071Z"
}