# User Management

Project Member and user related APIs

## GET /webapi/v2/agents

> Get Agents

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"AgentsResponse":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/AgentResponse"},"title":"Agents","type":"array"}},"required":["agents"],"title":"AgentsResponse","type":"object"},"AgentResponse":{"properties":{"id":{"title":"Id","type":"string"},"lastName":{"title":"Lastname","type":"string"},"firstName":{"title":"Firstname","type":"string"},"email":{"title":"Email","type":"string"}},"required":["id","lastName","firstName","email"],"title":"AgentResponse","type":"object"}}},"paths":{"/webapi/v2/agents":{"get":{"operationId":"django_server_project_views_rest_agent_api_get_agents","summary":"Get Agents","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"query","name":"offset","schema":{"default":0,"title":"Offset","type":"integer"},"required":false},{"in":"query","name":"limit","schema":{"default":100,"title":"Limit","type":"integer"},"required":false},{"in":"query","name":"email","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentsResponse"}}}}},"tags":["User Management"]}}}}
```

## GET /webapi/v2/agents/{agent\_id}

> Get Agent Detail

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"AgentResponse":{"properties":{"id":{"title":"Id","type":"string"},"lastName":{"title":"Lastname","type":"string"},"firstName":{"title":"Firstname","type":"string"},"email":{"title":"Email","type":"string"}},"required":["id","lastName","firstName","email"],"title":"AgentResponse","type":"object"}}},"paths":{"/webapi/v2/agents/{agent_id}":{"get":{"operationId":"django_server_project_views_rest_agent_api_get_agent_detail","summary":"Get Agent Detail","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"agent_id","schema":{"title":"Agent Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}}},"tags":["User Management"]}}}}
```

## POST /webapi/v2/users/bulk

> Perform Bulk User Actions

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"BulkUserResponse":{"properties":{"result":{"items":{"$ref":"#/components/schemas/BulkUserResultBody"},"title":"Result","type":"array"}},"title":"BulkUserResponse","type":"object"},"BulkUserResultBody":{"properties":{"ownUserId":{"description":"Unique ID of the user (e.g., employee code)","title":"Ownuserid","type":"string"},"status":{"$ref":"#/components/schemas/BulkUserResultStatus","description":"Status of the result"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message","title":"Message"}},"required":["ownUserId","status"],"title":"BulkUserResultBody","type":"object"},"BulkUserResultStatus":{"enum":["success","error"],"title":"BulkUserResultStatus","type":"string"},"BulkUserRequest":{"properties":{"action":{"$ref":"#/components/schemas/BulkUserActionType"},"users":{"items":{"$ref":"#/components/schemas/BulkUserBody"},"title":"Users","type":"array"}},"required":["action"],"title":"BulkUserRequest","type":"object"},"BulkUserActionType":{"enum":["create","update","delete"],"title":"BulkUserActionType","type":"string"},"BulkUserBody":{"properties":{"ownUserId":{"description":"Unique ID of the user (e.g., employee code)","title":"Ownuserid","type":"string"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/BulkUserData"},"type":"array"},{"type":"null"}],"description":"Key-value pairs of user data. Required for 'create' and 'update' actions.","title":"Data"}},"required":["ownUserId"],"title":"BulkUserBody","type":"object"},"BulkUserData":{"properties":{"key":{"description":"Field name","title":"Key","type":"string"},"value":{"description":"Field value","title":"Value","type":"string"}},"required":["key","value"],"title":"BulkUserData","type":"object"}}},"paths":{"/webapi/v2/users/bulk":{"post":{"operationId":"django_server_project_views_rest_bulk_user_api_perform_bulk_user_actions","summary":"Perform Bulk User Actions","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserResponse"}}}}},"tags":["User Management"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserRequest"}}},"required":true}}}}}
```

## GET /webapi/v2/user/{own\_user\_id}

> Get User

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"GetUserResponse":{"properties":{"result":{"$ref":"#/components/schemas/User","description":"Result"}},"required":["result"],"title":"GetUserResponse","type":"object"},"User":{"properties":{"userId":{"description":"Unique ID of the user","title":"Userid","type":"string"},"firstName":{"description":"First name of the user","title":"Firstname","type":"string"},"lastName":{"description":"Last name of the user","title":"Lastname","type":"string"}},"required":["userId","firstName","lastName"],"title":"User","type":"object"}}},"paths":{"/webapi/v2/user/{own_user_id}":{"get":{"operationId":"django_server_project_views_rest_user_api_get_user","summary":"Get User","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"own_user_id","schema":{"title":"Own User Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserResponse"}}}}},"tags":["User Management"]}}}}
```

## Bulk Invite Members

> Bulk invite members to project.\
> \
> This endpoint:\
> 1\. Creates agents for emails that don't exist\
> 2\. Adds agents as project members if not already\
> 3\. Creates users for works projects\
> 4\. Assigns permission groups (creates if needed)

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"BulkMemberResponse":{"description":"Response for bulk member operations.","properties":{"result":{"items":{"$ref":"#/components/schemas/BulkTaskResult"},"title":"Result","type":"array"}},"title":"BulkMemberResponse","type":"object"},"BulkTaskResult":{"description":"Result of a bulk task operation.","properties":{"emails":{"items":{"type":"string"},"title":"Emails","type":"array"},"status":{"title":"Status","type":"string"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"}},"required":["emails","status"],"title":"BulkTaskResult","type":"object"},"BulkMemberInviteRequest":{"description":"Request for bulk inviting members.","properties":{"members":{"items":{"$ref":"#/components/schemas/MemberMetadata"},"title":"Members","type":"array"}},"title":"BulkMemberInviteRequest","type":"object"},"MemberMetadata":{"description":"Metadata for inviting or managing project members.","properties":{"email":{"title":"Email","type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Groups"},"attributes":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"required":["email"],"title":"MemberMetadata","type":"object"}}},"paths":{"/webapi/v2/members/bulk/invite":{"post":{"operationId":"django_server_project_views_rest_bulk_member_api_bulk_invite_members","summary":"Bulk Invite Members","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMemberResponse"}}}}},"description":"Bulk invite members to project.\n\nThis endpoint:\n1. Creates agents for emails that don't exist\n2. Adds agents as project members if not already\n3. Creates users for works projects\n4. Assigns permission groups (creates if needed)","tags":["User Management"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMemberInviteRequest"}}},"required":true}}}}}
```

## Bulk Update Member Permission Groups

> Bulk update member permission groups.\
> \
> This endpoint updates permission groups for existing members only.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"BulkMemberResponse":{"description":"Response for bulk member operations.","properties":{"result":{"items":{"$ref":"#/components/schemas/BulkTaskResult"},"title":"Result","type":"array"}},"title":"BulkMemberResponse","type":"object"},"BulkTaskResult":{"description":"Result of a bulk task operation.","properties":{"emails":{"items":{"type":"string"},"title":"Emails","type":"array"},"status":{"title":"Status","type":"string"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"}},"required":["emails","status"],"title":"BulkTaskResult","type":"object"},"BulkMemberUpdatePermissionRequest":{"description":"Request for bulk updating member permission groups.","properties":{"members":{"items":{"$ref":"#/components/schemas/MemberMetadata"},"title":"Members","type":"array"}},"title":"BulkMemberUpdatePermissionRequest","type":"object"},"MemberMetadata":{"description":"Metadata for inviting or managing project members.","properties":{"email":{"title":"Email","type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Groups"},"attributes":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"required":["email"],"title":"MemberMetadata","type":"object"}}},"paths":{"/webapi/v2/members/bulk/update_permission_groups":{"post":{"operationId":"django_server_project_views_rest_bulk_member_api_bulk_update_member_permission_groups","summary":"Bulk Update Member Permission Groups","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMemberResponse"}}}}},"description":"Bulk update member permission groups.\n\nThis endpoint updates permission groups for existing members only.","tags":["User Management"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMemberUpdatePermissionRequest"}}},"required":true}}}}}
```

## Bulk Remove Members

> Bulk remove members from project.\
> \
> This endpoint removes existing members from the project.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"BulkMemberResponse":{"description":"Response for bulk member operations.","properties":{"result":{"items":{"$ref":"#/components/schemas/BulkTaskResult"},"title":"Result","type":"array"}},"title":"BulkMemberResponse","type":"object"},"BulkTaskResult":{"description":"Result of a bulk task operation.","properties":{"emails":{"items":{"type":"string"},"title":"Emails","type":"array"},"status":{"title":"Status","type":"string"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"}},"required":["emails","status"],"title":"BulkTaskResult","type":"object"},"BulkMemberRemoveRequest":{"description":"Request for bulk removing members.","properties":{"members":{"items":{"$ref":"#/components/schemas/MemberMetadata"},"title":"Members","type":"array"}},"title":"BulkMemberRemoveRequest","type":"object"},"MemberMetadata":{"description":"Metadata for inviting or managing project members.","properties":{"email":{"title":"Email","type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Groups"},"attributes":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"required":["email"],"title":"MemberMetadata","type":"object"}}},"paths":{"/webapi/v2/members/bulk/remove":{"post":{"operationId":"django_server_project_views_rest_bulk_member_api_bulk_remove_members","summary":"Bulk Remove Members","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMemberResponse"}}}}},"description":"Bulk remove members from project.\n\nThis endpoint removes existing members from the project.","tags":["User Management"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMemberRemoveRequest"}}},"required":true}}}}}
```

## GET /webapi/v2/permission\_groups

> Get Permission Groups

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"PermissionGroupsResponse":{"properties":{"permissionGroups":{"items":{"$ref":"#/components/schemas/PermissionGroupResponse"},"title":"Permissiongroups","type":"array"}},"required":["permissionGroups"],"title":"PermissionGroupsResponse","type":"object"},"PermissionGroupResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"isAdmin":{"title":"Isadmin","type":"boolean"},"isDefault":{"title":"Isdefault","type":"boolean"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"},"permissions":{"items":{"type":"string"},"title":"Permissions","type":"array"},"agentCount":{"title":"Agentcount","type":"integer"}},"required":["id","name","isAdmin","isDefault","order","permissions","agentCount"],"title":"PermissionGroupResponse","type":"object"}}},"paths":{"/webapi/v2/permission_groups":{"get":{"operationId":"django_server_project_views_rest_permission_group_api_get_permission_groups","summary":"Get Permission Groups","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"query","name":"search_term","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Term"},"required":false},{"in":"query","name":"limit","schema":{"default":100,"title":"Limit","type":"integer"},"required":false},{"in":"query","name":"offset","schema":{"default":0,"title":"Offset","type":"integer"},"required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionGroupsResponse"}}}}},"tags":["User Management"]}}}}
```

## GET /webapi/v2/permission\_groups/{permission\_group\_id}

> Get Permission Group

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"PermissionGroupDetailResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"isAdmin":{"title":"Isadmin","type":"boolean"},"isDefault":{"title":"Isdefault","type":"boolean"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"},"permissions":{"items":{"type":"string"},"title":"Permissions","type":"array"},"agents":{"items":{"$ref":"#/components/schemas/AgentResponse"},"title":"Agents","type":"array"}},"required":["id","name","isAdmin","isDefault","order","permissions","agents"],"title":"PermissionGroupDetailResponse","type":"object"},"AgentResponse":{"properties":{"id":{"title":"Id","type":"string"},"lastName":{"title":"Lastname","type":"string"},"firstName":{"title":"Firstname","type":"string"},"email":{"title":"Email","type":"string"}},"required":["id","lastName","firstName","email"],"title":"AgentResponse","type":"object"}}},"paths":{"/webapi/v2/permission_groups/{permission_group_id}":{"get":{"operationId":"django_server_project_views_rest_permission_group_api_get_permission_group","summary":"Get Permission Group","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"permission_group_id","schema":{"title":"Permission Group Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionGroupDetailResponse"}}}}},"tags":["User Management"]}}}}
```

## DELETE /webapi/v2/permission\_groups/{permission\_group\_id}

> Delete Permission Group

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/v2/permission_groups/{permission_group_id}":{"delete":{"operationId":"django_server_project_views_rest_permission_group_api_delete_permission_group","summary":"Delete Permission Group","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"permission_group_id","schema":{"title":"Permission Group Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK"}},"tags":["User Management"]}}}}
```

## GET /webapi/v2/permission\_groups/{permission\_group\_id}/agents

> Get Permission Group Agents

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"AgentResponse":{"properties":{"id":{"title":"Id","type":"string"},"lastName":{"title":"Lastname","type":"string"},"firstName":{"title":"Firstname","type":"string"},"email":{"title":"Email","type":"string"}},"required":["id","lastName","firstName","email"],"title":"AgentResponse","type":"object"}}},"paths":{"/webapi/v2/permission_groups/{permission_group_id}/agents":{"get":{"operationId":"django_server_project_views_rest_permission_group_api_get_permission_group_agents","summary":"Get Permission Group Agents","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"permission_group_id","schema":{"title":"Permission Group Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentResponse"},"title":"Response","type":"array"}}}}},"tags":["User Management"]}}}}
```

## PUT /webapi/v2/permission\_groups/{permission\_group\_id}/name

> Update Permission Group Name

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"PermissionGroupDetailResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"isAdmin":{"title":"Isadmin","type":"boolean"},"isDefault":{"title":"Isdefault","type":"boolean"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"},"permissions":{"items":{"type":"string"},"title":"Permissions","type":"array"},"agents":{"items":{"$ref":"#/components/schemas/AgentResponse"},"title":"Agents","type":"array"}},"required":["id","name","isAdmin","isDefault","order","permissions","agents"],"title":"PermissionGroupDetailResponse","type":"object"},"AgentResponse":{"properties":{"id":{"title":"Id","type":"string"},"lastName":{"title":"Lastname","type":"string"},"firstName":{"title":"Firstname","type":"string"},"email":{"title":"Email","type":"string"}},"required":["id","lastName","firstName","email"],"title":"AgentResponse","type":"object"},"UpdatePermissionGroupNameRequest":{"properties":{"name":{"title":"Name","type":"string"}},"required":["name"],"title":"UpdatePermissionGroupNameRequest","type":"object"}}},"paths":{"/webapi/v2/permission_groups/{permission_group_id}/name":{"put":{"operationId":"django_server_project_views_rest_permission_group_api_update_permission_group_name","summary":"Update Permission Group Name","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"permission_group_id","schema":{"title":"Permission Group Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionGroupDetailResponse"}}}}},"tags":["User Management"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePermissionGroupNameRequest"}}},"required":true}}}}}
```

## PUT /webapi/v2/permission\_groups/{permission\_group\_id}/permissions

> Update Permission Group Permissions

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"PermissionGroupDetailResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"isAdmin":{"title":"Isadmin","type":"boolean"},"isDefault":{"title":"Isdefault","type":"boolean"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"},"permissions":{"items":{"type":"string"},"title":"Permissions","type":"array"},"agents":{"items":{"$ref":"#/components/schemas/AgentResponse"},"title":"Agents","type":"array"}},"required":["id","name","isAdmin","isDefault","order","permissions","agents"],"title":"PermissionGroupDetailResponse","type":"object"},"AgentResponse":{"properties":{"id":{"title":"Id","type":"string"},"lastName":{"title":"Lastname","type":"string"},"firstName":{"title":"Firstname","type":"string"},"email":{"title":"Email","type":"string"}},"required":["id","lastName","firstName","email"],"title":"AgentResponse","type":"object"},"UpdatePermissionGroupPermissionsRequest":{"properties":{"permissions":{"items":{"$ref":"#/components/schemas/AgentPermissionEnum"},"title":"Permissions","type":"array"}},"required":["permissions"],"title":"UpdatePermissionGroupPermissionsRequest","type":"object"},"AgentPermissionEnum":{"enum":["dashboard_accessible","skill_read","skill_write","skill_popup_url_generation","llm_app_read","llm_app_create","user_page_access","user_editable","user_download","conversations_read","agent_assignable","conversation_state_write","delete_chat_message","delete_agent_chat_message","consversation_download","smalltalk_read","smalltalk_editable","document_page_access","knowledge_base_editable","knowledge_base_add_folder_write","knowledge_base_page_access","faq_editable","faq_train_write","faq_setting_read","faq_setting_write","faq_add_folder_write","feedback_management_read","clue_feedback_write","answer_feedback_write","query_history_redactable","knowledge_base_history_read","faq_history_read","query_training_read","query_training_write","faq_auto_tagging_read","faq_auto_tagging_write","doc_source_read","doc_source_write","knowledge_base_setting_read","knowledge_base_setting_write","knowledge_base_train_write","entity_extraction_read","entity_extraction_editable","entity_extraction_download","training_schedule_write","google_domain_allowlist_read","google_domain_allowlist_write","analytics_page_access","redact_keyword_write","analytics_download","project_setting_page_access","project_setting_read","project_setting_write","project_setting_general_write","project_setting_api_key_write","office_hours_editable","faq_custom_columns_write","dashboard_whitelist_write","sdk_whitelist_write","api_whitelist_write","files_whitelist_write","account_policy_write","oidc_clients_write","conversations_write","billing","integrations_read","integrations_write","dashboard_order_write","advanced_setting_read","manage_agent_read","manage_agent_write","agent_invitable","agent_action_log_download_read","approver_group_write","ai_workflow_read","ai_workflow_write","prompt_management_read","project_scope_prompt_read","project_scope_prompt_write"],"title":"AgentPermissionEnum","type":"string"}}},"paths":{"/webapi/v2/permission_groups/{permission_group_id}/permissions":{"put":{"operationId":"django_server_project_views_rest_permission_group_api_update_permission_group_permissions","summary":"Update Permission Group Permissions","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"permission_group_id","schema":{"title":"Permission Group Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionGroupDetailResponse"}}}}},"tags":["User Management"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePermissionGroupPermissionsRequest"}}},"required":true}}}}}
```

## GET /webapi/agent\_builder/single\_action\_app\_tools

> Retrieve all single action app tools for the project

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/single_action_app_tools":{"get":{"tags":["User Management"],"operationId":"getSingleActionAppTools","summary":"Retrieve all single action app tools for the project","responses":{"200":{"description":"Successfully retrieved single action app tools","content":{"application/json":{"schema":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the tool"},"name":{"type":"string","description":"The function name of the single action app. it is generated by id and prefix \"func_\""},"display_name":{"type":"string","description":"The display name of the single action app"},"description":{"type":"string","description":"Description of what the single action app does"},"single_action_inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Input field name"},"type":{"type":"string","description":"Input field type (text, paragraph, etc.)"},"description":{"type":"string","description":"Description of the input field"}}}}}}}}}}}}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## GET /webapi/agent\_builder/single\_action\_app\_tool/{tool\_name}

> Retrieve a specific single action app tool by its name

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/single_action_app_tool/{tool_name}":{"get":{"tags":["User Management"],"operationId":"getSingleActionAppToolByName","summary":"Retrieve a specific single action app tool by its name","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"name":"tool_name","in":"path","required":true,"schema":{"type":"string"},"description":"Name of the tool to retrieve"},{"name":"tool_name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved the single action app tool","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"},"tool":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the tool"},"name":{"type":"string","description":"The function name of the single action app. it is generated by id and prefix \"func_\""},"display_name":{"type":"string","description":"The display name of the single action app"},"description":{"type":"string","description":"Description of what the single action app does"},"single_action_inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Input field name"},"type":{"type":"string","description":"Input field type (text, paragraph, etc.)"},"description":{"type":"string","description":"Description of the input field"}}}}}}}}}}},"404":{"description":"Tool not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}}}}}}}
```

## GET /webapi/agent\_builder/agent\_tools

> Retrieve all agent tools for the project

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/agent_tools":{"get":{"tags":["User Management"],"operationId":"getAgentTools","summary":"Retrieve all agent tools for the project","responses":{"200":{"description":"Successfully retrieved agent tools","content":{"application/json":{"schema":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the agent"},"name":{"type":"string","description":"The function name of the agent. it is generated by id and prefix \"func_\""},"display_name":{"type":"string","description":"The display name of the agent"},"description":{"type":"string","description":"Description of what the agent does"},"project_id":{"type":"string","description":"The project ID"},"published":{"type":"boolean","description":"Whether the agent is published"},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Variable name"},"type":{"type":"string","description":"Variable type (string, integer, etc.)"},"description":{"type":"string","description":"Description of the variable"},"required":{"type":"boolean","description":"Whether the variable is required"}}}}}}}}}}}}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## GET /webapi/agent\_builder/agent\_tool/{tool\_name}

> Retrieve a specific agent tool by its name

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/agent_tool/{tool_name}":{"get":{"tags":["User Management"],"operationId":"getAgentToolByName","summary":"Retrieve a specific agent tool by its name","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"name":"tool_name","in":"path","required":true,"schema":{"type":"string"},"description":"Name of the agent tool to retrieve"},{"name":"tool_name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved the agent tool","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"},"tool":{"type":"object","description":"The agent tool data"}}}}}},"404":{"description":"Agent tool not found"}}}}}}
```

## Retrieve OAuth2 information by state

> Get OAuth2 configuration information for an AI agent using the OAuth state parameter

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/oauth2_information":{"post":{"tags":["User Management"],"operationId":"getOauth2Information","summary":"Retrieve OAuth2 information by state","description":"Get OAuth2 configuration information for an AI agent using the OAuth state parameter","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","description":"OAuth2 state parameter to identify the OAuth configuration"}},"required":["state"]}}}},"responses":{"200":{"description":"Successfully retrieved OAuth2 information","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"},"oauth2_info":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the OAuth2 information"},"hub_id":{"type":"string","description":"Hub identifier"},"configuration_name":{"type":"string","description":"Name of the OAuth2 configuration"},"authorization_url":{"type":"string","description":"OAuth2 authorization URL"},"token_url":{"type":"string","description":"OAuth2 token URL"},"client_id":{"type":"string","description":"OAuth2 client ID"},"client_secret":{"type":"string","description":"OAuth2 client secret"},"scope":{"type":"array","items":{"type":"string"},"description":"OAuth2 scopes"},"redirect_uri":{"type":"string","description":"OAuth2 redirect URI"},"place_access_token":{"type":"string","description":"Where to place access token"},"place_expires_in":{"type":"string","description":"Where to place expires_in value"},"place_refresh_token":{"type":"string","description":"Where to place refresh token"},"place_token_type":{"type":"string","description":"Where to place token type"},"headers":{"type":"object","description":"Additional headers configuration"},"additional":{"type":"object","description":"Additional configuration data"},"token_info":{"type":"object","description":"Current token information"},"token_generated":{"type":"number","description":"Token generation timestamp"},"state":{"type":"string","description":"OAuth2 state parameter"},"code_verifier":{"type":"string","description":"PKCE code verifier"}}}}}}}},"400":{"description":"Bad request - invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"404":{"description":"OAuth2 information not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Update OAuth2 token information

> Update OAuth2 token information (tokenInfo and tokenGenerated) for an existing OAuth configuration

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/oauth2_information/update":{"post":{"tags":["User Management"],"operationId":"updateOauth2Information","summary":"Update OAuth2 token information","description":"Update OAuth2 token information (tokenInfo and tokenGenerated) for an existing OAuth configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","description":"OAuth2 state parameter to identify the OAuth configuration"},"tokenInfo":{"type":"object","description":"Updated token information"},"tokenGenerated":{"type":"number","description":"Timestamp when the token was generated"}},"required":["state"]}}}},"responses":{"200":{"description":"Successfully updated OAuth2 information","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"}}}}}},"400":{"description":"Bad request - invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"404":{"description":"OAuth2 information not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Agent Management

> Used to create and delete agents from the project

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"User Management","description":"Project Member and user related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_management":{"post":{"tags":["User Management"],"operationId":"editAgents","summary":"Agent Management","description":"Used to create and delete agents from the project","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email of the agent you want to create or delete"},"deleteFlag":{"type":"boolean","description":"True if you want to delete an agent, False if you want to create"},"password":{"type":"string","description":"Required when creating a new agent. Password must be valid (contain 3 out 4 following characters - lowercase, uppercase, numeric, non-alphanumeric)"},"locale":{"type":"string","description":"The language setting of the account being created. Use a two-letter ISO 639-1 code"},"permission_group_id":{"type":"string","description":"ID of the permission group to assign to the agent"},"permission_group_name":{"type":"string","description":"Name of the permission group to assign to the agent"}}}}}},"responses":{"200":{"description":"Agent edited successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string","description":"ID of agent that was deleted/created"},"status":{"type":"string","description":"What happened (either \"deleted\" or \"created\")"}}}}}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"string","description":"If the agent you try to create already has an email registered"}}}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"string","description":"If you try to delete an agent that doesn't exist"}}}}}}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.allganize.ai/api-reference/user-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
