API ReferenceapiidentityPOST /v1/users/me/avatar

POST /v1/users/me/avatar

Service: identity · operationId: (none)

Request a signed S3 PUT URL for avatar upload

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "content_type": {
      "type": "string",
      "enum": [
        "image/jpeg",
        "image/png",
        "image/webp"
      ]
    },
    "content_length": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5242880
    }
  },
  "required": [
    "content_type",
    "content_length"
  ]
}

Responses

200 Signed upload URL

{
  "type": "object",
  "properties": {
    "upload_url": {
      "type": "string"
    },
    "public_url": {
      "type": "string"
    }
  },
  "required": [
    "upload_url",
    "public_url"
  ]
}

401 Not authenticated

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

500 Internal server error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://identity.platform.loop.health/v1/users/me/avatar \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'