Users#

User account management

Get current user#

GET/users/me

Returns authenticated user profile

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/users/me" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "email": "user@example.com",
  "display_name": "John Doe",
  "avatar_url": "https://example.com/avatar.jpg",
  "created_at": "2025-10-02T15:30:00Z",
  "updated_at": "2025-10-02T15:30:00Z",
  "last_login_at": "2025-10-02T15:30:00Z",
  "status": "active",
  "settings": {}
}

Update current user#

PATCH/users/me

Update authenticated user profile

Request Body#

{
  "display_name": "string",
  "avatar_url": "https://platform.antfly.io",
  "settings": {}
}

Code Examples#

curl -X PATCH "https://platform.antfly.io/api/v1/users/me" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"display_name": "string",
"avatar_url": "https://platform.antfly.io",
"settings": {}
}'

Responses#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "email": "user@example.com",
  "display_name": "John Doe",
  "avatar_url": "https://example.com/avatar.jpg",
  "created_at": "2025-10-02T15:30:00Z",
  "updated_at": "2025-10-02T15:30:00Z",
  "last_login_at": "2025-10-02T15:30:00Z",
  "status": "active",
  "settings": {}
}

Get pending invitations#

GET/users/me/invitations

List pending invitations for the authenticated user

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/users/me/invitations" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "data": [
    {
      "invitation_id": "550e8400-e29b-41d4-a716-446655440000",
      "token": "string",
      "email": "user@example.com",
      "organization_id": "550e8400-e29b-41d4-a716-446655440000",
      "organization_name": "string",
      "role": "string",
      "invited_by": {
        "user_id": "550e8400-e29b-41d4-a716-446655440000",
        "display_name": "string"
      },
      "invited_at": "2025-10-02T15:30:00Z",
      "expires_at": "2025-10-02T15:30:00Z"
    }
  ]
}