PUT /profile

Profiles work like this: Every user on universecloud has a root profile. There can me multiple sub profiles that belong to this root profile. They will be created via an oauth app with a specific clientId. (Registration/Login on your own platform) A Profile holds some data about the root or sub profile with some authentication details like groups, plans or metadata

Update the root profile or a sub profile

Query parameters

  • clientId string

    clientId of the sub profile you want to update

  • accountId string

    accountId of the sub profile you want to update

application/json

Body

  • avatar string

    new url of the avatar for the profile

  • settings object

    settings for the profile. Can be updated by root profile and sub profile

    Hide settings attribute Show settings attribute object
    • * object | string | integer | boolean Additional properties
  • metadata object

    metadata for the profile. Can only be updated by root profile

    Hide metadata attribute Show metadata attribute object
    • * string Additional properties

Responses

  • 200 application/json

    Sucessfully created sub profile

    Hide response attributes Show response attributes object
    • id string

      id of the profile

    • subject string

      subject of the root profile

    • accountId string

      subject of a sub profile belonging to a root profile

    • clientId string

      if of the oauth client used for this profile

    • branch string

      context branch of the profile (empty for standard)

    • plans array[object]
      Hide plans attributes Show plans attributes object
      • planName string

        name of the plan

      • since string

        date in rfc3339 / ISO 8601 format since when the plan is active

      • until string

        date in rfc3339 / ISO 8601 format until when the plan is active

      • metadata object
        Hide metadata attribute Show metadata attribute object
        • * object | string | integer | boolean Additional properties
    • avatar string

      url of the avatar for the profile

    • email string

      root email of the profile. cannot be updated

    • settings object

      settings for the profile. Can be used to store any values. Can be updated by root profile or sub profile

      Hide settings attribute Show settings attribute object
      • * object | string | integer | boolean Additional properties
    • metadata object

      settings for the profile. Can only be updated by root profile

      Hide metadata attribute Show metadata attribute object
      • * string Additional properties
    • groups array[string]

      an array of groups the profile belongs to. Can only be updated by root profile

    • createdAt string

      date in rfc3339 / ISO 8601 format when the profile was created

    • updatedAt string

      date in rfc3339 / ISO 8601 format when the profile was updated

PUT /profile
curl \
 --request PUT 'https://api.universecloud.io/profile' \
 --header "X-Api-Key: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"avatar":"string","settings":{"themeColor":"blue"},"metadata":{"plan":"super-cool-plan"}}'
Request examples
{
  "avatar": "string",
  "settings": {
    "themeColor": "blue"
  },
  "metadata": {
    "plan": "super-cool-plan"
  }
}
Response examples (200)
{
  "id": "string",
  "subject": "string",
  "accountId": "string",
  "clientId": "string",
  "branch": "string",
  "plans": [
    {
      "planName": "pro",
      "since": "2023-06-21T12:34:56+00:00",
      "until": "2023-06-21T12:34:56+00:00",
      "metadata": {
        "seats": 5
      }
    }
  ],
  "avatar": "string",
  "email": "user@tld.com",
  "settings": {
    "themeColor": "blue"
  },
  "metadata": {
    "plan": "super-cool-plan"
  },
  "groups": [
    "admin"
  ],
  "createdAt": "2023-06-21T12:34:56+00:00",
  "updatedAt": "2023-06-21T12:34:56+00:00"
}