Modify own user

Description

Change tags and name for the user assosiated with the API key used for the request.

Request

POST /v1/users/me
{
  tags?: {
    [key: string]: string
  },
  name?: string|null
}

Response

Successful response contains the following JSON formated body:

{
  userId: string,
  name: string,
  email: string,
  isAdmin: boolean,
  isEnterprise: boolean,
  actions: string[],
  tags: {
    [key: string]: string
  },
  organizationsQuota: {
    name: string,
    value: number
  },
  termsRevision: string,
  dateOfConsent: string,
  organizations: {
    organizationId: string,
    organizationName: string
  }[]
}

Response Status codes:

  • 200 on success

Request headers

This request must have the following headers:

  • Authorization: bearer <ApiKey>
  • Content-Type: application/json

Example

Request

curl -XPOST "https://api.cloud.nabto.com/v1/users/me" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "Content-Type: application/json" \
  -d '{ "tags": {"foo": "bar" }, "name": "friendly name"}'

Response

{
   "userId": "us-abcdefgh",
  "name": "friendly name",
  "email": "[email protected]",
  "isAdmin": true,
  "isEnterprise": true,
  "actions":[ "nabto5:write",
  ...],
  "tags": {
    "foo": "bar" 
  },
  "organizationsQuota": {
     "name": "friendly name",
    "value": 42 
  },
  "termsRevision": "<termsRevision>",
  "dateOfConsent": "<dateOfConsent>",
  "organizations": [{
     "organizationId": "or-lmnopqrs",
    "organizationName": "friendly name" 
  },
  ...],
  
}