Users#

User account management

Get current user#

GET/users/me

Returns authenticated user profile

Security#

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer YOUR_API_KEY

Code Examples#

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

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

Security#

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer YOUR_API_KEY

Request Body#

Example:

{
    "display_name": "string",
    "avatar_url": "https://example.com",
    "settings": {}
}

Code Examples#

curl -X PATCH "https://searchaf.antfly.io/api/v1/users/me" \\
    -H "Authorization: Bearer YOUR_API_KEY" \\
    -H "Content-Type: application/json" \\
    -d '{
    "display_name": "string",
    "avatar_url": "https://example.com",
    "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": {}
}

List OAuth providers#

GET/users/me/oauth-providers

List linked OAuth providers for current user

Security#

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer YOUR_API_KEY

Code Examples#

curl -X GET "https://searchaf.antfly.io/api/v1/users/me/oauth-providers" \\
    -H "Authorization: Bearer YOUR_API_KEY"

Responses#

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "user_id": "550e8400-e29b-41d4-a716-446655440000",
      "provider": "google",
      "provider_user_id": "string",
      "provider_email": "user@example.com",
      "linked_at": "2025-10-02T15:30:00Z",
      "last_used_at": "2025-10-02T15:30:00Z"
    }
  ]
}

Get pending invitations#

GET/users/me/invitations

List pending invitations for the authenticated user

Security#

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer YOUR_API_KEY

Code Examples#

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

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",
      "project_id": "550e8400-e29b-41d4-a716-446655440000",
      "project_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"
    }
  ]
}

Get user's available authentication methods#

GET/users/me/auth-methods

Returns available authentication methods including password and linked OAuth providers

Security#

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer YOUR_API_KEY

Code Examples#

curl -X GET "https://searchaf.antfly.io/api/v1/users/me/auth-methods" \\
    -H "Authorization: Bearer YOUR_API_KEY"

Responses#

{
  "has_password": true,
  "oauth_providers": [
    {
      "provider": "google",
      "linked_at": "2025-10-02T15:30:00Z",
      "last_used_at": "2025-10-02T15:30:00Z"
    }
  ]
}