Change settings for own user
PATCHhttps://api.aleph-alpha.com/users/me
This route currently only supports changing the out_of_credits_threshold.
Request
- application/json
Bodyrequired
out_of_credits_thresholdinteger
Threshold for out-of-credits notification. If the threshold gets crossed with a task, then we trigger an email.
Responses
- 200
OK
- application/json
- Schema
- Example (auto)
Schema
idnumberrequired
User ID
emailstringrequired
Email address of the user
rolestringrequired
Role of the user
credits_remainingnumberrequired
Remaining credits for this user
invoice_allowedbooleanrequired
Is this user post-paid?
out_of_credits_thresholdintegerrequired
Threshold for out-of-credits notification. If the threshold gets crossed with a task, then we trigger an email.
terms_of_service_versionstringrequired
Version string of the terms of service that the user has accepted
{
"id": 0,
"email": "string",
"role": "string",
"credits_remaining": 0,
"invoice_allowed": true,
"out_of_credits_threshold": 0,
"terms_of_service_version": "string"
}
Authorization: http
name: tokentype: httpscheme: bearerdescription: Can be generated in your [Aleph Alpha profile](https://app.aleph-alpha.com/profile)
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Patch, "https://api.aleph-alpha.com/users/me");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"out_of_credits_threshold\": 0\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear