{"openapi":"3.0.3","info":{"title":"RightBrain API","description":"\nThe RightBrain API provides programmatic access to AI-powered task execution.\n","version":"v1","x-logo":{"url":"https://rightbrain.ai/logo.png","altText":"RightBrain AI Logo"},"x-api-version":"v1","x-api-version-path":"/api/v1/","x-docs-url":"https://docs.rightbrain.ai","x-support-email":"support@rightbrain.ai"},"paths":{"/org/{org_id}/iam/members":{"get":{"tags":["Organizations"],"summary":"IAM - List Organization Members","description":"Lists all members that have been granted direct access to the organization.","operationId":"organization_iam_list_members","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:view","organization:view_members"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"type","in":"query","required":false,"schema":{"enum":["user","organization","project"],"type":"string","nullable":true,"title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_IAMMember_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Organization Iam List Members"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/iam/members/{member}":{"get":{"tags":["Organizations"],"summary":"IAM - Lookup Organization Member","description":"Retrieve a specific member that has been granted direct access to the organization.","operationId":"organization_iam_get_member","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:view","organization:view_members"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Organization Iam Get Member"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organizations"],"summary":"IAM - Update Organization Member","description":"Update the roles that a member holds on the organization.","operationId":"organization_iam_update_member_roles","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationIAMMemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"},{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse","MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","MULTIPLE_ROLES_NOT_ALLOWED":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}},"title":"Response 400 Organization Iam Update Member Roles"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Organization Iam Update Member Roles"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/iam/test":{"post":{"tags":["Organizations"],"summary":"IAM - Test Organization Permissions","description":"Test the permissions that the caller (or another subject) holds on the organization.","operationId":"organization_iam_test_permissions","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationIAMPermissionTest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMPermissionTest"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse"}},"title":"Response 400 Organization Iam Test Permissions"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Organization Iam Test Permissions"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org":{"get":{"tags":["Organizations"],"summary":"List Organizations","description":"List organizations based on the user's relationship to them.\n\nUse the `membership` parameter to filter organizations by your access level:\n- **active**: Organizations you are a member of (default)\n- **joinable**: Organizations you can request to join\n- **joinable_by_domain**: Organizations that accept members from your email domain\n- **joinable_by_invite**: Organizations you have pending invites to\n\nThis endpoint is useful for:\n- Displaying the user's current organizations\n- Showing organizations the user can join\n- Building organization switching interfaces","operationId":"listOrganizations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"membership","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OrgMembership","default":"active"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"},"description":"Pagination cursor for the next page of results"},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Page Limit"},"description":"Maximum number of organizations to return per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_Org_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organizations"],"summary":"Org Create","operationId":"createOrganization","security":[{"HTTPBearer":[]},{"HTTPBearer":["system:organizations_create"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Org"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createorganization"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}":{"post":{"tags":["Organizations"],"summary":"Org Update","operationId":"updateOrganization","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Org"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updateorganization"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Organizations"],"summary":"Org Get","operationId":"getOrganization","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Org"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getorganization"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/join":{"post":{"tags":["Organizations"],"summary":"Org Join","operationId":"joinOrganization","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:join"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Joinorganization"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/invite":{"get":{"tags":["Organizations"],"summary":"Org Invites List","operationId":"listOrganizationInvites","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:view_members"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"show","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OrgInviteShow","default":"pending"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"}},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Page Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_OrganizationInvite_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listorganizationinvites"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organizations"],"summary":"Org Invites Create","operationId":"createOrganizationInvite","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:add_member"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgInviteWithProjectRoles"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvite"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/OrganizationInviteAlreadyExistsErrorResponse"},{"$ref":"#/components/schemas/OrganizationMemberAlreadyExistsErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","ORGANIZATION_INVITE_ALREADY_EXISTS":"#/components/schemas/OrganizationInviteAlreadyExistsErrorResponse","ORGANIZATION_MEMBER_ALREADY_EXISTS":"#/components/schemas/OrganizationMemberAlreadyExistsErrorResponse"}},"title":"Response 400 Createorganizationinvite"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createorganizationinvite"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/invite/{org_invite_id}":{"delete":{"tags":["Organizations"],"summary":"Org Invites Delete","operationId":"deleteOrganizationInvite","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:remove_member"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"org_invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deleteorganizationinvite"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/domains":{"get":{"tags":["Organizations"],"summary":"Org Domains List","operationId":"listOrganizationDomains","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_OrganizationDomain_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listorganizationdomains"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organizations"],"summary":"Org Domains Post","operationId":"createOrganizationDomain","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomain"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createorganizationdomain"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/domains/{domain_id}":{"delete":{"tags":["Organizations"],"summary":"Org Domain Delete","operationId":"deleteOrganizationDomain","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomain"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deleteorganizationdomain"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/avatar":{"post":{"tags":["Organizations"],"summary":"Update Organization Avatar","description":"Update organization avatar image","operationId":"updateOrgAvatar","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_uploadOrganizationAvatar","type":"object","properties":{"file":{"type":"string","format":"binary","description":"Avatar image file (JPEG, PNG, GIF)"}},"required":["file"]},"examples":{"avatar_upload":{"summary":"Avatar Upload","value":{"file":"Binary image data"}}}}}},"responses":{"200":{"description":"Avatar updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Org"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Invalid image"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Uploadorganizationavatar","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for organization\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The organization belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to update avatar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user":{"get":{"tags":["Users"],"summary":"Get User Profile","description":"Get user profile information.\n\nReturns:\n- User ID and email\n- Name and avatar\n- Organization memberships\n- Account settings","operationId":"getCurrentUser","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Users"],"summary":"Update User Profile","description":"Update current user profile information","operationId":"updateCurrentUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/user/avatar":{"post":{"tags":["Users"],"summary":"Update User Avatar","description":"Upload and update user avatar image.\n\nAccepts image files up to 5MB in size.\nSupported formats: JPEG, PNG, GIF, WebP","operationId":"uploadUserAvatar","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_uploadUserAvatar"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/org/{org_id}/project":{"get":{"tags":["Projects"],"summary":"List Project","operationId":"listProjects","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Cursor"}},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Page Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_Project_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listprojects"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Projects"],"summary":"Create Project","operationId":"createProject","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:create_project"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createproject"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}":{"get":{"tags":["Projects"],"summary":"Get Project","operationId":"getProject","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectWithDatasources"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getproject"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Projects"],"summary":"Update Project","operationId":"updateProject","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updateproject"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete Project","description":"Soft delete a project.\n\nMarks the project as deleted without removing it from the database.\nRequires create_project permission on the owning organization.\n\nArgs:\n    org_id: The organization ID\n    project_id: The project ID to delete\n    async_db: The database session\n\nReturns:\n    The deleted project object","operationId":"deleteProject","security":[{"HTTPBearer":[]},{"HTTPBearer":["organization:create_project"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deleteproject"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/config":{"get":{"tags":["Projects"],"summary":"Get Project Config","description":"Get project configuration settings","operationId":"getProjectConfig","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectConfig-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Projects"],"summary":"Set Project Config","operationId":"updateProjectConfig","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectConfig-Input"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectConfig-Output"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updateprojectconfig"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/avatar":{"post":{"tags":["Projects"],"summary":"Update Project Avatar","description":"Update project avatar image","operationId":"updateProjectAvatar","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_uploadProjectAvatar","type":"object","properties":{"file":{"type":"string","format":"binary","description":"Avatar image file (JPEG, PNG, GIF)"}},"required":["file"]},"examples":{"avatar_upload":{"summary":"Avatar Upload","value":{"file":"Binary image data"}}}}}},"responses":{"200":{"description":"Avatar updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Invalid image"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Uploadprojectavatar","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for project\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The project belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to update avatar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/iam/members":{"get":{"tags":["Projects"],"summary":"IAM - List Project Members","description":"Lists all members that have been granted direct access to the project.","operationId":"project_iam_org_org_id_project_project_id_iam_list_members","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view","project:view_members"]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"type","in":"query","required":false,"schema":{"enum":["user","organization","project"],"type":"string","nullable":true,"title":"Type"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_IAMMember_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Project Iam Org Org Id Project Project Id Iam List Members"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/iam/members/{member}":{"get":{"tags":["Projects"],"summary":"IAM - Lookup Project Member","description":"Retrieve a specific member that has been granted direct access to the project.","operationId":"project_iam_org_org_id_project_project_id_iam_get_member","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view","project:view_members"]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Project Iam Org Org Id Project Project Id Iam Get Member"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Projects"],"summary":"IAM - Update Project Member","description":"Update the roles that a member holds on the project.","operationId":"project_iam_org_org_id_project_project_id_iam_update_member_roles","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/brain__api__api_v1__iam__ProjectIAMMemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"},{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse","MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","MULTIPLE_ROLES_NOT_ALLOWED":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}},"title":"Response 400 Project Iam Org Org Id Project Project Id Iam Update Member Roles"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Project Iam Org Org Id Project Project Id Iam Update Member Roles"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/iam/test":{"post":{"tags":["Projects"],"summary":"IAM - Test Project Permissions","description":"Test the permissions that the caller (or another subject) holds on the project.","operationId":"project_iam_org_org_id_project_project_id_iam_test_permissions","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/brain__api__api_v1__iam__ProjectIAMPermissionTest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMPermissionTest"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse"}},"title":"Response 400 Project Iam Org Org Id Project Project Id Iam Test Permissions"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Project Iam Org Org Id Project Project Id Iam Test Permissions"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/collection":{"get":{"tags":["Collections","Collection"],"summary":"List Collections","description":"List all collections in a project with optional filtering.\n\nCollections group related documents for use in RAG-enabled tasks and chats.\nResults are paginated and can be filtered by title.\n\n**Use Cases**:\n- Browse available knowledge bases\n- Find collections for specific topics\n- Manage document organization\n- Set up RAG contexts for tasks","operationId":"listCollections","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"title","in":"query","required":false,"description":"Filter collections by title (partial match)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Pagination cursor returned from a previous request. Use this to fetch the next page of results.","schema":{"type":"string","format":"uuid"},"example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},{"name":"page_limit","in":"query","required":false,"description":"Number of results per page","schema":{"type":"integer","default":100,"minimum":1,"maximum":1000}}],"responses":{"200":{"description":"Successfully retrieved collections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet"},"example":{"results":[{"id":"kb-001","name":"Company Knowledge Base","description":"Internal documentation and policies","created_at":"2024-01-01T00:00:00Z","updated_at":"2024-01-16T12:00:00Z","document_count":42,"total_chunks":1337},{"id":"kb-002","name":"Product Documentation","description":"Technical documentation and user guides","created_at":"2024-01-05T00:00:00Z","updated_at":"2024-01-20T12:00:00Z","document_count":28,"total_chunks":856}],"pagination":{"has_next":true,"next_cursor":"0190a234-8dc6-6d08-aea9-928fcecad8f2","page_limit":25}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listprojectcollections"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true},"post":{"tags":["Collections","Collection"],"summary":"Create Collection","description":"Create a new collection for organizing document embeddings.\n\nCollections serve as knowledge bases for RAG-enabled features:\n- Group related documents together\n- Enable contextual AI responses\n- Support multiple embedding instances\n- Organize information by topic or use case\n\nYou can add documents to the collection after creation.","operationId":"createCollection","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_collection","document_embedding_instance:query"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCreate"},"examples":{"basic":{"summary":"Basic Collection","value":{"title":"Product Documentation","document_embedding_instance_ids":[]}},"with_documents":{"summary":"Collection with Documents","value":{"title":"Technical Knowledge Base","description":"All technical documentation and guides","document_embedding_instance_ids":["550e8400-e29b-41d4-a716-446655440000","550e8400-e29b-41d4-a716-446655440001"]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createprojectcollection"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/collection/{collection_id}":{"get":{"tags":["Collections","Collection"],"summary":"Get Collection Details","description":"Retrieve detailed information about a specific collection.\n\nReturns complete collection metadata including:\n- Title and description\n- Document count and sources\n- Associated embedding instances\n- Creation and update timestamps\n- Summary information","operationId":"getCollection","security":[{"HTTPBearer":[]},{"HTTPBearer":["collection:view"]}],"parameters":[{"name":"collection_id","in":"path","required":true,"description":"The UUID of the collection","schema":{"type":"string","format":"uuid"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getprojectcollection"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true},"post":{"tags":["Collections","Collection"],"summary":"Edit Collection","description":"Update collection properties and document associations.\n\nAllows modification of:\n- Title and description\n- Associated embedding instances\n- Document membership\n\nChanges take effect immediately for all users of the collection.","operationId":"editCollection","security":[{"HTTPBearer":[]},{"HTTPBearer":["collection:edit","document_embedding_instance:query"]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionUpdate"},"examples":{"update_title":{"summary":"Update Title","value":{"title":"Updated Knowledge Base"}},"full_update":{"summary":"Full Update","value":{"title":"Complete Technical Docs","description":"All technical documentation including API, SDKs, and guides","embedding_instance_ids":["550e8400-e29b-41d4-a716-446655440000"]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updateprojectcollection"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/collection/{collection_id}/stats":{"get":{"tags":["Collections","Collection"],"summary":"Get Collection Statistics","description":"Retrieve statistics about a collection's contents and usage.\n\nProvides insights into:\n- Document distribution by source type\n- Total number of documents\n- Number of associated chats\n- Storage and embedding metrics\n\nUseful for understanding collection composition and usage patterns.","operationId":"getCollectionStats","security":[{"HTTPBearer":[]},{"HTTPBearer":["collection:view"]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","title":"Collection Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Collection statistics","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Getprojectcollectionstats"},"examples":{"stats":{"summary":"Collection Statistics","value":{"documents_by_source":[{"source":"FILE_UPLOAD","count":45},{"source":"WEB_SCRAPE","count":12},{"source":"GDRIVE","count":8}],"number_of_chats":23}}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getprojectcollectionstats"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/collection/{collection_id}/query":{"post":{"tags":["Collections","Collection"],"summary":"Query Collection","description":"Search for relevant content within a collection using semantic search.\n\nPerforms vector similarity search across all documents in the collection to find\nthe most relevant content for your query. Returns ranked results with:\n- Matching document chunks\n- Relevance scores\n- Source document metadata\n- Context snippets\n\n**Use Cases**:\n- Find specific information\n- Test RAG retrieval quality\n- Build custom search interfaces\n- Debug context retrieval","operationId":"queryCollection","security":[{"HTTPBearer":[]},{"HTTPBearer":["collection:query"]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionQuery"},"examples":{"simple":{"summary":"Simple Query","value":{"query":"How to configure OAuth authentication?"}},"with_limit":{"summary":"Query with Limit","value":{"query":"API rate limits and quotas","limit":20}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{},"title":"Response Queryprojectcollection"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Queryprojectcollection"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/collection/{collection_id}/update_summary":{"post":{"tags":["Collections","Collection"],"summary":"Update Collection Summary","description":"Generate and update the AI-generated summary for a collection.\n\nTriggers an asynchronous job to:\n- Analyze all documents in the collection\n- Generate a comprehensive summary\n- Update the collection's summary field\n\nThe summary helps users understand the collection's content at a glance.","operationId":"updateCollectionSummary","security":[{"HTTPBearer":[]},{"HTTPBearer":["collection:edit"]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncJobResult"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updateprojectcollectionsummary"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"202":{"description":"Summary generation job started","content":{"application/json":{"examples":{"job_started":{"summary":"Job Started","value":{"job_id":"job_123456","status":"pending","message":"Summary generation started"}}}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/collection/{collection_id}/add":{"post":{"tags":["Collections","Collection"],"summary":"Add Documents to Collection","description":"Add embedding instances (documents) to an existing collection.\n\nExpands the collection's knowledge base by including additional documents.\nThe documents must already exist as embedding instances in the system.","operationId":"addToCollection","security":[{"HTTPBearer":[]},{"HTTPBearer":["collection:edit","document_embedding_instance:query"]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEmbeddingUpdate"},"examples":{"add_documents":{"summary":"Add Documents","value":{"embedding_instance_ids":["550e8400-e29b-41d4-a716-446655440000","550e8400-e29b-41d4-a716-446655440001"]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Addtoprojectcollection"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/collection/{collection_id}/remove":{"post":{"tags":["Collections","Collection"],"summary":"Remove Documents from Collection","description":"Remove embedding instances (documents) from a collection.\n\nReduces the collection's scope by excluding specific documents.\nDocuments are not deleted, only their association with the collection is removed.","operationId":"removeFromCollection","security":[{"HTTPBearer":[]},{"HTTPBearer":["collection:edit"]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEmbeddingUpdate"},"examples":{"remove_documents":{"summary":"Remove Documents","value":{"embedding_instance_ids":["550e8400-e29b-41d4-a716-446655440000","550e8400-e29b-41d4-a716-446655440001"]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Removefromprojectcollection"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/collection/{collection_id}/iam/members":{"get":{"tags":["Collections"],"summary":"IAM - List Collection Members","description":"Lists all members that have been granted direct access to the collection.","operationId":"collection_iam_org_org_id_project_project_id_collection_collection_id_iam_list_members","security":[{"HTTPBearer":[]},{"HTTPBearer":["collection:view","collection:view_members"]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"type","in":"query","required":false,"schema":{"enum":["user","organization","project"],"type":"string","nullable":true,"title":"Type"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_IAMMember_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Collection Iam Org Org Id Project Project Id Collection Collection Id Iam List Members"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/collection/{collection_id}/iam/members/{member}":{"get":{"tags":["Collections"],"summary":"IAM - Lookup Collection Member","description":"Retrieve a specific member that has been granted direct access to the collection.","operationId":"collection_iam_org_org_id_project_project_id_collection_collection_id_iam_get_member","security":[{"HTTPBearer":[]},{"HTTPBearer":["collection:view","collection:view_members"]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Collection Iam Org Org Id Project Project Id Collection Collection Id Iam Get Member"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true},"post":{"tags":["Collections"],"summary":"IAM - Update Collection Member","description":"Update the roles that a member holds on the collection.","operationId":"collection_iam_org_org_id_project_project_id_collection_collection_id_iam_update_member_roles","security":[{"HTTPBearer":[]},{"HTTPBearer":["collection:view"]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionIAMMemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"},{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse","MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","MULTIPLE_ROLES_NOT_ALLOWED":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}},"title":"Response 400 Collection Iam Org Org Id Project Project Id Collection Collection Id Iam Update Member Roles"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Collection Iam Org Org Id Project Project Id Collection Collection Id Iam Update Member Roles"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/collection/{collection_id}/iam/test":{"post":{"tags":["Collections"],"summary":"IAM - Test Collection Permissions","description":"Test the permissions that the caller (or another subject) holds on the collection.","operationId":"collection_iam_org_org_id_project_project_id_collection_collection_id_iam_test_permissions","security":[{"HTTPBearer":[]},{"HTTPBearer":["collection:view"]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionIAMPermissionTest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMPermissionTest"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse"}},"title":"Response 400 Collection Iam Org Org Id Project Project Id Collection Collection Id Iam Test Permissions"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Collection Iam Org Org Id Project Project Id Collection Collection Id Iam Test Permissions"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/document":{"post":{"tags":["Documents","Document"],"summary":"Create Documents","description":"Upload and process documents for use in collections and RAG.\n\nSupports multiple file formats:\n- PDF documents\n- Text files (txt, md, rst)\n- Office documents (docx, xlsx, pptx)\n- Code files\n- Images (for OCR processing)\n\nDocuments are processed asynchronously:\n1. Files are uploaded and validated\n2. Content is extracted and chunked\n3. Embeddings are generated\n4. Documents become available for collections\n\nReturns a job ID to track processing status.","operationId":"createDocuments","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_document"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_createProjectDocuments"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Createprojectdocuments"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createprojectdocuments"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"202":{"description":"Documents accepted for processing","content":{"application/json":{"examples":{"processing":{"summary":"Processing Started","value":{"group_id":"grp_123456","task_count":3,"tasks":[{"task_id":"task_001","state":"PENDING","info":{"filename":"guide.pdf"}}]}}}}}}},"x-fern-ignore":true},"get":{"tags":["Documents","Document"],"summary":"List Documents","description":"List all documents in a project with optional filtering.\n\nFilter options:\n- By connection/datasource\n- By title (partial match)\n- By collection membership\n- By source type\n- By processing strategy\n\nResults are paginated and include document metadata.","operationId":"listDocuments","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:list_documents"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"connection_id","in":"query","required":false,"description":"Filter by datasource connection","schema":{"type":"string","format":"uuid"}},{"name":"title","in":"query","required":false,"description":"Filter by title (partial match)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Pagination cursor","schema":{"type":"string","format":"uuid"}},{"name":"collection_id","in":"query","required":false,"description":"Filter by collection membership","schema":{"type":"string","format":"uuid"}},{"name":"page_limit","in":"query","required":false,"description":"Results per page","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"source","in":"query","required":false,"schema":{"$ref":"#/components/schemas/DocumentSource","nullable":true,"title":"Source"}},{"name":"strategy","in":"query","required":false,"description":"Filter by processing strategy","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_ChatDocument_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listprojectdocuments"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/document/upload":{"post":{"tags":["Documents"],"summary":"Document Upload","operationId":"uploadProjectDocuments","deprecated":true,"security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_document"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_uploadProjectDocuments"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatDocument"},"title":"Response Uploadprojectdocuments"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Uploadprojectdocuments"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/document/create/status/{group_id}":{"get":{"tags":["Documents","Document"],"summary":"Check Document Processing Status","description":"Check the status of document processing tasks.\n\nMonitor the progress of:\n- File upload and validation\n- Content extraction\n- Embedding generation\n- Error handling\n\nUse the group_id returned from document creation to track all related tasks.","operationId":"getDocumentStatus","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_document"]}],"parameters":[{"name":"group_id","in":"path","required":true,"description":"The group ID from document creation","schema":{"type":"string"},"example":"grp_123456"},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Getprojectdocumentstatus"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getprojectdocumentstatus"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/document/{document_id}/query":{"post":{"tags":["Documents","Document"],"summary":"Query Document Content","description":"Search within a specific document using semantic search.\n\nPerforms vector similarity search on the document's embedded chunks to find\nrelevant content. Useful for:\n- Finding specific information in large documents\n- Testing embedding quality\n- Building document Q&A features\n- Extracting key passages\n\nReturns ranked chunks with relevance scores.","operationId":"queryDocument","security":[{"HTTPBearer":[]},{"HTTPBearer":["document:query"]}],"parameters":[{"name":"document_id","in":"path","required":true,"description":"The UUID of the document","schema":{"type":"string","format":"uuid"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"query","in":"query","required":true,"description":"Search query","schema":{"type":"string"},"example":"What are the main conclusions?"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatDocumentQueryResult"},"title":"Response Queryprojectdocument"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Queryprojectdocument"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/document/{document_id}":{"get":{"tags":["Documents","Document"],"summary":"Get Document Details","description":"Retrieve detailed information about a specific document.\n\nReturns:\n- Document metadata (title, source, size)\n- Processing information\n- Embedding statistics\n- Associated collections\n- Creation and update timestamps\n\nDoes not include the actual document content.","operationId":"getDocument","security":[{"HTTPBearer":[]},{"HTTPBearer":["document:view"]}],"parameters":[{"name":"document_id","in":"path","required":true,"description":"The UUID of the document","schema":{"type":"string","format":"uuid"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatDocument"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getprojectdocument"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true},"post":{"tags":["Documents","Document"],"summary":"Update Document","description":"Update document metadata such as title or description.\n\nAllows modification of:\n- Document title\n- Description\n- Custom metadata\n\nDoes not re-process the document content or embeddings.","operationId":"updateDocument","security":[{"HTTPBearer":[]},{"HTTPBearer":["document:edit"]}],"parameters":[{"name":"document_id","in":"path","required":true,"description":"The UUID of the document","schema":{"type":"string","format":"uuid"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatDocumentUpdate"},"examples":{"update_title":{"summary":"Update Title","value":{"title":"Q4 2024 Financial Report"}},"full_update":{"summary":"Full Update","value":{"title":"API Documentation v2.0","description":"Complete API reference with examples"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatDocument"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updateprojectdocument"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true},"delete":{"tags":["Documents","Document"],"summary":"Delete Document","description":"Delete a document and all associated data.\n\nThis action:\n- Removes the document from all collections\n- Deletes all embeddings and chunks\n- Removes the document metadata\n- Cannot be undone\n\nThe document will no longer be available for RAG or queries.","operationId":"deleteDocument","security":[{"HTTPBearer":[]},{"HTTPBearer":["document:edit"]}],"parameters":[{"name":"document_id","in":"path","required":true,"description":"The UUID of the document to delete","schema":{"type":"string","format":"uuid"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deleteprojectdocument"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"204":{"description":"Document deleted successfully"},"404":{"description":"Document not found"}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/document/{document_id}/embeddings":{"get":{"tags":["Documents"],"summary":"Document Embedding Query","operationId":"listDocumentEmbeddings","security":[{"HTTPBearer":[]},{"HTTPBearer":["document:view"]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"}},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Page Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_ChatDocumentEmbeddingRecord_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listdocumentembeddings"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/document/{document_id}/embedding/{embedding_id}":{"get":{"tags":["Documents"],"summary":"Document Embedding Get","description":"Fetch an individual embedding record by its ID. Useful for examining the source submitted to an LLM","operationId":"getDocumentEmbedding","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"embedding_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Embedding Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatDocumentEmbeddingRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/document/{document_id}/iam/members":{"get":{"tags":["Documents"],"summary":"IAM - List Document Members","description":"Lists all members that have been granted direct access to the document.","operationId":"document_iam_org_org_id_project_project_id_document_document_id_iam_list_members","security":[{"HTTPBearer":[]},{"HTTPBearer":["document:view","document:view_members"]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"type","in":"query","required":false,"schema":{"enum":["user","organization","project"],"type":"string","nullable":true,"title":"Type"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_IAMMember_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Document Iam Org Org Id Project Project Id Document Document Id Iam List Members"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/document/{document_id}/iam/members/{member}":{"get":{"tags":["Documents"],"summary":"IAM - Lookup Document Member","description":"Retrieve a specific member that has been granted direct access to the document.","operationId":"document_iam_org_org_id_project_project_id_document_document_id_iam_get_member","security":[{"HTTPBearer":[]},{"HTTPBearer":["document:view","document:view_members"]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Document Iam Org Org Id Project Project Id Document Document Id Iam Get Member"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true},"post":{"tags":["Documents"],"summary":"IAM - Update Document Member","description":"Update the roles that a member holds on the document.","operationId":"document_iam_org_org_id_project_project_id_document_document_id_iam_update_member_roles","security":[{"HTTPBearer":[]},{"HTTPBearer":["document:view"]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentIAMMemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"},{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse","MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","MULTIPLE_ROLES_NOT_ALLOWED":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}},"title":"Response 400 Document Iam Org Org Id Project Project Id Document Document Id Iam Update Member Roles"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Document Iam Org Org Id Project Project Id Document Document Id Iam Update Member Roles"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/document/{document_id}/iam/test":{"post":{"tags":["Documents"],"summary":"IAM - Test Document Permissions","description":"Test the permissions that the caller (or another subject) holds on the document.","operationId":"document_iam_org_org_id_project_project_id_document_document_id_iam_test_permissions","security":[{"HTTPBearer":[]},{"HTTPBearer":["document:view"]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentIAMPermissionTest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMPermissionTest"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse"}},"title":"Response 400 Document Iam Org Org Id Project Project Id Document Document Id Iam Test Permissions"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Document Iam Org Org Id Project Project Id Document Document Id Iam Test Permissions"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/mcp_server":{"get":{"tags":["MCP Servers"],"summary":"List MCP Servers","description":"List all MCP servers configured for the project.\n\nReturns a paginated list of MCP servers with their:\n- Configuration details\n- Available tools\n- Connection status\n- Last sync time\n\nUse pagination parameters to navigate through large result sets.","operationId":"listMcpServers","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"cursor","in":"query","required":false,"description":"Pagination cursor returned from a previous request. Use this to fetch the next page of results.","schema":{"type":"string","format":"uuid"},"example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},{"name":"page_limit","in":"query","required":false,"description":"Number of results per page","schema":{"type":"integer","default":100,"minimum":1,"maximum":1000}}],"responses":{"200":{"description":"Successfully retrieved MCP servers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_McpServer_"},"examples":{"multiple_servers":{"summary":"Multiple MCP Servers","value":{"results":[{"id":"mcp-001","name":"GitHub Integration","description":"MCP server for GitHub repository access","command":"/usr/local/bin/github-mcp","args":["--repo","owner/repo"],"env":{"GITHUB_TOKEN":"***"},"created_at":"2024-01-01T00:00:00Z","updated_at":"2024-01-16T12:00:00Z"},{"id":"mcp-002","name":"Filesystem Access","description":"MCP server for local filesystem operations","command":"/usr/local/bin/fs-mcp","args":["--root","/workspace"],"env":{},"created_at":"2024-01-05T00:00:00Z","updated_at":"2024-01-05T00:00:00Z"}],"pagination":{"has_next":true,"next_cursor":"0190a234-8dc6-6d08-aea9-928fcecad8f2","page_limit":25}}}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid pagination\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listmcpservers","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for MCP servers\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The MCP servers belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve MCP servers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["MCP Servers","MCP Server"],"summary":"Create MCP Server","description":"Configure a new MCP server for the project.\n\nMCP servers extend AI capabilities by providing access to external tools.\nCommon server types include:\n- Database servers (PostgreSQL, MySQL, SQLite)\n- API integrations (GitHub, Slack, etc.)\n- File system access\n- Custom tool servers\n\nThe server will be validated and synchronized to discover available tools.","operationId":"createMcpServer","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_mcp_server"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerCreate"},"examples":{"database":{"summary":"Database Server","value":{"name":"Production Database","server_type":"postgresql","uri":"postgresql://localhost:5432/mydb","env":{"PGUSER":"dbuser","PGPASSWORD":"{{secrets.db_password}}"}}},"github":{"summary":"GitHub Integration","value":{"name":"GitHub API","server_type":"github","uri":"https://api.github.com","env":{"GITHUB_TOKEN":"{{secrets.github_token}}"}}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid configuration\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createmcpserver","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for MCP servers\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The MCP servers belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"MCP server created and synchronized"},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to create MCP server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/mcp_server/{mcp_server_id}":{"get":{"tags":["MCP Servers"],"summary":"Get MCP Server","description":"Retrieve detailed information about a specific MCP server.\n\nReturns:\n- Server configuration\n- Available tools and their schemas\n- Connection status\n- Recent execution history\n- Error logs if any","operationId":"getMcpServer","security":[{"HTTPBearer":[]},{"HTTPBearer":["mcp_server:view"]}],"parameters":[{"name":"mcp_server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mcp Server Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"MCP server details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"},"example":{"id":"mcp-001","name":"GitHub Integration","description":"MCP server for GitHub repository access","command":"/usr/local/bin/github-mcp","args":["--repo","owner/repo"],"env":{"GITHUB_TOKEN":"***"},"created_at":"2024-01-01T00:00:00Z","updated_at":"2024-01-16T12:00:00Z"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getmcpserver","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for MCP server\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The MCP server belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"MCP server not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve MCP server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["MCP Servers"],"summary":"Update MCP Server","description":"Update MCP server configuration.\n\nModifiable fields:\n- Name and description\n- Environment variables\n- Connection parameters\n- Tool availability\n\nNote: Updating server configuration may trigger re-synchronization.","operationId":"updateMcpServer","security":[{"HTTPBearer":[]},{"HTTPBearer":["mcp_server:edit"]}],"parameters":[{"name":"mcp_server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mcp Server Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerUpdate"},"examples":{"update_env":{"summary":"Update Environment Variables","value":{"env":{"GITHUB_TOKEN":"{{secrets.new_github_token}}","DEBUG":"true"}}}}}}},"responses":{"200":{"description":"MCP server updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"},"example":{"id":"mcp-001","name":"GitHub Integration","description":"MCP server for GitHub repository access","command":"/usr/local/bin/github-mcp","args":["--repo","owner/repo"],"env":{"GITHUB_TOKEN":"***"},"created_at":"2024-01-01T00:00:00Z","updated_at":"2024-01-16T12:00:00Z"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid configuration\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updatemcpserver","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for MCP server\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The MCP server belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"MCP server not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to update MCP server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["MCP Servers"],"summary":"Delete MCP Server","description":"Remove an MCP server from the project.\n\nThis will:\n- Stop any active connections\n- Remove server configuration\n- Delete execution history\n- Revoke access credentials\n\nThis action cannot be undone.","operationId":"deleteMcpServer","security":[{"HTTPBearer":[]},{"HTTPBearer":["mcp_server:edit"]}],"parameters":[{"name":"mcp_server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mcp Server Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deletemcpserver","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for MCP server\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The MCP server belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"204":{"description":"MCP server deleted"},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"MCP server not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to delete MCP server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/mcp_server/{mcp_server_id}/sync":{"post":{"tags":["MCP Servers"],"summary":"Mark MCP Server Synced","description":"Mark an MCP server as synchronized after successful tool discovery.\n\nThis internal endpoint updates the sync status and timestamp.","operationId":"markMcpServerSynced","security":[{"HTTPBearer":[]},{"HTTPBearer":["mcp_server:edit"]}],"parameters":[{"name":"mcp_server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mcp Server Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Server marked as synced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Syncmcpserver","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for MCP server\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The MCP server belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"MCP server not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to update sync status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/mcp_server/{mcp_server_id}/mcp_run":{"get":{"tags":["MCP Runs","MCP Run"],"summary":"List MCP Run History","description":"Retrieve execution history for an MCP server.\n\nLists all tool invocations made through the specified MCP server, including:\n- Tool name and parameters\n- Execution timestamp\n- Response data\n- Error information\n- Duration and performance metrics\n- Associated task or agent\n\nUseful for:\n- Debugging tool interactions\n- Monitoring usage patterns\n- Auditing external system access\n- Performance optimization","operationId":"listMcpRuns","security":[{"HTTPBearer":[]},{"HTTPBearer":["mcp_server:view"]}],"parameters":[{"name":"mcp_server_id","in":"path","required":true,"description":"The UUID of the MCP server","schema":{"type":"string","format":"uuid"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"nullable":true,"default":100,"title":"Page Limit"},"description":"The maximum number of items to return per page. Defaults to `100` if not specified."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"},"description":"A cursor for pagination. Use the `next_cursor` value from the previous response to get the next page of results."},{"name":"method","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"nullable":true,"title":"Method"},"description":"Filter by MCP methods (can specify multiple)"},{"name":"sse_event","in":"query","required":false,"schema":{"type":"boolean","nullable":true,"title":"Sse Event"},"description":"Filter by server-sent event flag"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_McpRun_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listmcpruns"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["MCP Runs","MCP Run"],"summary":"Record MCP Run","description":"Record a new MCP tool execution.\n\nThis endpoint is typically called automatically when tools are invoked,\nbut can be used manually for:\n- Custom tool integrations\n- Testing and debugging\n- Simulating tool calls\n- Recording manual operations\n\nThe run record captures the complete interaction for audit and analysis.","operationId":"createMcpRun","security":[{"HTTPBearer":[]},{"HTTPBearer":["mcp_server:edit"]}],"parameters":[{"name":"mcp_server_id","in":"path","required":true,"description":"The UUID of the MCP server","schema":{"type":"string","format":"uuid"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRunCreate"},"examples":{"successful_run":{"summary":"Successful Database Query","value":{"method":"query_database","parameters":{"query":"SELECT * FROM users LIMIT 10","database":"production"},"result":{"rows":10,"data":["..."],"execution_time":0.045},"status":"success","duration_ms":52}},"failed_run":{"summary":"Failed API Call","value":{"method":"github_create_issue","parameters":{"repo":"myorg/myrepo","title":"Bug report","body":"Description..."},"error":{"type":"AuthenticationError","message":"Invalid token"},"status":"error","duration_ms":156}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRun"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid request\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createmcprun","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for MCP server\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The MCP server belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"MCP run created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRun"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"MCP server not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to execute MCP tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/mcp_server/{mcp_server_id}/mcp_run/{mcp_run_id}":{"get":{"tags":["MCP Runs","MCP Run"],"summary":"Get MCP Run Details","description":"Retrieve detailed information about a specific MCP tool execution.\n\nReturns complete execution details including:\n- Full request parameters\n- Complete response data\n- Error traces if failed\n- Performance metrics\n- Context information (task, user, etc.)\n\nUseful for debugging specific tool interactions or analyzing complex responses.","operationId":"getMcpRun","security":[{"HTTPBearer":[]},{"HTTPBearer":["mcp_server:view"]}],"parameters":[{"name":"mcp_server_id","in":"path","required":true,"description":"The UUID of the MCP server","schema":{"type":"string","format":"uuid"}},{"name":"mcp_run_id","in":"path","required":true,"description":"The UUID of the MCP run","schema":{"type":"string","format":"uuid"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"MCP run details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRun"},"examples":{"detailed_run":{"summary":"Detailed Run Information","value":{"id":"550e8400-e29b-41d4-a716-446655440000","mcp_server_id":"550e8400-e29b-41d4-a716-446655440001","method":"query_database","parameters":{"query":"SELECT COUNT(*) as total, status FROM orders WHERE created_at > '2024-01-01' GROUP BY status","database":"analytics"},"result":{"rows":[{"total":1523,"status":"completed"},{"total":234,"status":"pending"},{"total":45,"status":"cancelled"}],"execution_time":0.123,"rows_scanned":15234},"status":"success","duration_ms":145,"created_at":"2024-01-20T15:30:00Z","task_run_id":"550e8400-e29b-41d4-a716-446655440002","user_id":"550e8400-e29b-41d4-a716-446655440003"}}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid UUID format\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getmcprun","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for MCP run\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The MCP run belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"MCP run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve MCP run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/internal/llm_model":{"get":{"tags":["Internal"],"summary":"List All LLM Models (Internal)","description":"List all LLM models including internal metadata.\n\nThis internal endpoint shows:\n- All model configurations\n- Cost information\n- Usage statistics  \n- Retirement status\n- Internal parameters\n\nRequires internal.admin scope for access.","operationId":"listInternalLlmModels","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LLMModel"},"type":"array","title":"Response Listinternalllmmodels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":["internal.admin"]}],"x-fern-ignore":true},"post":{"tags":["Internal"],"summary":"Add New LLM Model","description":"Add a new LLM model to the platform.\n\nRequired information:\n- Provider and vendor details\n- Model name and alias\n- Capabilities (vision, context window)\n- Initial cost configuration\n- Parameter schemas\n\nThe model becomes available immediately after addition.","operationId":"createInternalLlmModel","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelInternalView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":["internal.admin"]}],"x-fern-ignore":true}},"/internal/llm_model/{llm_model_id}":{"post":{"tags":["Internal"],"summary":"Update LLM Model Configuration","description":"Update an LLM model's configuration and parameters.\n\nAllows modification of:\n- Model availability\n- Parameter constraints\n- Cost settings\n- Retirement status\n- Internal configuration\n\nChanges affect all users immediately. Use with caution.","operationId":"updateInternalLlmModel","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"llm_model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Llm Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelInternalUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelInternalView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/llm_model/{llm_model_id}/cost":{"get":{"tags":["Internal"],"summary":"Get LLM Model Cost History","description":"Retrieve all cost records for an LLM model.\n\nShows:\n- Current pricing\n- Historical price changes\n- Effective dates\n- Cost breakdown (input/output tokens)\n\nUsed for billing calculations and cost tracking.","operationId":"getInternalLlmModelCosts","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"llm_model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Llm Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelInternalView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true},"post":{"tags":["Internal"],"summary":"Update LLM Model Costs","description":"Add a new cost record for an LLM model.\n\nCost updates:\n- Take effect at specified time\n- Don't affect historical billing\n- Apply to new usage only\n- Support gradual price changes\n\nAlways add new records rather than modifying existing ones.","operationId":"updateInternalLlmModelCost","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"llm_model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Llm Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelCostCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelInternalView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/llm_model/{llm_model_id}/comment":{"post":{"tags":["Internal"],"summary":"Add LLM Model Comment","description":"Adds a comment to the given LLM Model for administrative notes and observations.","operationId":"addInternalLlmModelComment","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"llm_model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Llm Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelCommentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelComment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/llm_model/{llm_model_id}/comment/{comment_id}":{"post":{"tags":["Internal"],"summary":"Update LLM Model Comment","description":"Updates a comment for the given LLM Model.","operationId":"updateInternalLlmModelComment","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"llm_model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Llm Model Id"}},{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Comment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelCommentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelComment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/model/exclude/by-id":{"post":{"tags":["Internal"],"summary":"Exclude specific model from organization","description":"[Internal Admin] Exclude a specific model by ID at the organization level. This exclusion will apply to all projects in the organization.","operationId":"excludeModelByIdFromOrg","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeModelByIdRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Excludemodelbyidfromorg"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/model/exclude/by-provider":{"post":{"tags":["Internal"],"summary":"Exclude all models from a provider","description":"[Internal Admin] Exclude all models from a specific provider (e.g., 'OpenAI') at the organization level.","operationId":"excludeModelByProviderFromOrg","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeModelByProviderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Excludemodelbyproviderfromorg"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/model/exclude/by-vendor":{"post":{"tags":["Internal"],"summary":"Exclude all models from a vendor","description":"[Internal Admin] Exclude all models from a specific vendor (e.g., 'groq') at the organization level.","operationId":"excludeModelByVendorFromOrg","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeModelByVendorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Excludemodelbyvendorfromorg"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/model/exclude/{rule_type}/{value}":{"delete":{"tags":["Internal"],"summary":"Remove an exclusion rule from organization","description":"[Internal Admin] Remove a model exclusion rule. Value should be model UUID, provider name, or vendor name depending on rule_type.","operationId":"removeModelExclusionFromOrg","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"rule_type","in":"path","required":true,"schema":{"enum":["model_id","provider","vendor"],"type":"string","title":"Rule Type"}},{"name":"value","in":"path","required":true,"schema":{"type":"string","title":"Value"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Removemodelexclusionfromorg"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/model/exclusions":{"get":{"tags":["Internal"],"summary":"List organization model exclusions","description":"[Internal Admin] Get all model exclusion rules for an organization with impact analysis showing which models are affected.","operationId":"listModelExclusionsForOrg","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModelExclusionRuleResponse"},"title":"Response Listmodelexclusionsfororg"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/project/{project_id}/model/exclude/by-id":{"post":{"tags":["Internal"],"summary":"Exclude specific model from project","description":"[Internal Admin] Exclude a specific model by ID at the project level. This is in addition to any organization-level exclusions.","operationId":"excludeModelByIdFromProject","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeModelByIdRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Excludemodelbyidfromproject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/project/{project_id}/model/exclude/by-provider":{"post":{"tags":["Internal"],"summary":"Exclude all models from a provider for project","description":"[Internal Admin] Exclude all models from a specific provider at the project level.","operationId":"excludeModelByProviderFromProject","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeModelByProviderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Excludemodelbyproviderfromproject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/project/{project_id}/model/exclude/by-vendor":{"post":{"tags":["Internal"],"summary":"Exclude all models from a vendor for project","description":"[Internal Admin] Exclude all models from a specific vendor at the project level.","operationId":"excludeModelByVendorFromProject","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeModelByVendorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Excludemodelbyvendorfromproject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/project/{project_id}/model/exclude/{rule_type}/{value}":{"delete":{"tags":["Internal"],"summary":"Remove an exclusion rule from project","description":"[Internal Admin] Remove a model exclusion rule from the project. Does not affect organization-level exclusions.","operationId":"removeModelExclusionFromProject","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"rule_type","in":"path","required":true,"schema":{"enum":["model_id","provider","vendor"],"type":"string","title":"Rule Type"}},{"name":"value","in":"path","required":true,"schema":{"type":"string","title":"Value"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Removemodelexclusionfromproject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/project/{project_id}/model/exclusions":{"get":{"tags":["Internal"],"summary":"List project model exclusions","description":"[Internal Admin] Get all model exclusion rules for a project (project-level only, not including org-level).","operationId":"listModelExclusionsForProject","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModelExclusionRuleResponse"},"title":"Response Listmodelexclusionsforproject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/project/{project_id}/model/exclusions/effective":{"get":{"tags":["Internal"],"summary":"Get effective model exclusions for project","description":"[Internal Admin] Get complete view of all effective exclusions (organization + project) with full impact analysis.","operationId":"getEffectiveModelExclusions","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EffectiveModelExclusionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/webhook/hydra/token_hook":{"post":{"tags":["Internal"],"summary":"Hydra Token Hook","description":"Internal webhook for Hydra OAuth2 server token introspection.\n\nThis endpoint is called by Hydra during token validation to:\n- Enrich token metadata\n- Add user claims\n- Validate token permissions\n- Apply custom token logic\n\n**Security**: Only accessible by Hydra infrastructure.","operationId":"handleHydraTokenHook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HydraWebhookTokenHook"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Handlehydratokenhook"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/project/{project_id}/register_oauth_client":{"post":{"tags":["Internal"],"summary":"Register Oauth Client","operationId":"registerInternalOAuthClient","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientCreateResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Registerinternaloauthclient"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/webhook/kratos/signup_check":{"post":{"tags":["Internal"],"summary":"Kratos Signup Validation Hook","description":"Webhook called by Kratos during user signup to validate registration.\n\nPerforms checks like:\n- Email domain restrictions\n- Invitation validation\n- Custom signup rules\n- Quota enforcement\n\nReturns validation result to allow or block signup.","operationId":"handleKratosSignupCheck","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KratosWebhook"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KratosWebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/webhook/kratos/signup_commit":{"post":{"tags":["Internal"],"summary":"Kratos Signup Commit Hook","description":"Webhook called by Kratos after successful user signup.\n\nPerforms post-signup tasks:\n- Create user record in application database\n- Set up default permissions\n- Initialize user resources\n- Send welcome notifications\n- Create default OAuth clients\n\nThis ensures the user is fully provisioned in RightBrain.","operationId":"handleKratosSignupCommit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KratosWebhook"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KratosWebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/extend_trial":{"post":{"tags":["Internal"],"summary":"Extend Org Trial","description":"Extend the trial period for an organization.\n\nThis endpoint allows extending the trial_ends_at date for an organization\nby a specified number of days.","operationId":"extendOrgTrial","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendTrialRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendTrialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/update-expired-trials":{"post":{"tags":["Internal"],"summary":"Update Expired Trials","description":"Update organizations with trials that have been expired for more than the specified grace period.\n\nThis endpoint finds all organizations where:\n- plan is 'trial'\n- plan_status is 'active'\n- trial_ends_at is more than grace_period_days in the past\n\nAnd updates them to:\n- plan_status = 'cancelled'","operationId":"updateExpiredTrials","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExpiredTrialsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExpiredTrialsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":["internal.admin"]}],"x-fern-ignore":true}},"/internal/org/{org_id}/purge_cache":{"post":{"tags":["Internal"],"summary":"Purge Org Cache","description":"Purge the cache for a specific organization.\n\nThis endpoint removes the organization from the Redis cache,\nforcing fresh data to be loaded on the next request.","operationId":"purgeOrgCache","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeOrgCacheResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/cache/timing/rebuild/{task_id}":{"post":{"tags":["Internal"],"summary":"Rebuild Timing Cache for Task","description":"Rebuild Redis timing cache from PostgreSQL for a specific task. This is useful for recovering from cache issues or populating cache for the first time.","operationId":"rebuildTaskTimingCache","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"lookback_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Lookback Days"},"description":"Number of days of historical data to rebuild (1-365)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/cache/timing/clear/{task_id}":{"delete":{"tags":["Internal"],"summary":"Clear Timing Cache for Task","description":"Clear all Redis timing cache keys for a specific task. Use this to reset cache if data becomes inconsistent.","operationId":"clearTaskTimingCache","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/invite/{invite_id}/resend":{"post":{"tags":["Internal"],"summary":"Resend Org Invite","description":"Resend organization invite email.\n\nThis endpoint resends the invitation email for a pending organization invite.\nEmail is sent synchronously to ensure immediate feedback on success/failure.","operationId":"resendOrgInvite","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendOrgInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/invites":{"get":{"tags":["Internal"],"summary":"List Org Invites","description":"List organization invites with email links.","operationId":"listOrgInvitesInternal","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"filter","in":"query","required":false,"schema":{"$ref":"#/components/schemas/InviteFilter","default":"pending"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationInviteWithLink"},"title":"Response Listorginvitesinternal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/mcp_run":{"post":{"tags":["Internal"],"summary":"Create MCP Run (Internal)","description":"Record MCP tool execution from internal services.\n\nThis endpoint allows background services and system processes to record\nMCP tool calls without user context. Used for:\n- Scheduled tasks\n- System maintenance operations\n- Automated workflows\n- Service-to-service integrations\n\nThe run is associated with the service account rather than a specific user.","operationId":"createInternalMcpRun","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRunInternalCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRun"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/mcp_run/batch":{"post":{"tags":["Internal"],"summary":"Batch Create MCP Runs (Internal)","description":"Record multiple MCP tool executions in a single request.\n\nOptimized for high-volume recording from internal services:\n- Bulk import of historical data\n- Mass processing operations\n- Parallel tool executions\n- Performance monitoring\n\nReduces API overhead for services that execute many tools.\n\n**Limits**:\n- Maximum 1000 runs per batch\n- All runs must be for the same project\n- Atomic operation (all succeed or all fail)","operationId":"createInternalMcpRunsBatch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRunInternalBatchCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/McpRun"},"type":"array","title":"Response Createinternalmcprunsbatch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/reports/org/subscriptions":{"get":{"tags":["Internal"],"summary":"Organization Subscription Report","description":"Generate report of organization subscriptions and statuses.\n\nProvides insights into:\n- Active vs inactive subscriptions\n- Subscription distribution\n- Revenue metrics\n- Churn indicators\n\nFilter by subscription status to analyze specific segments.","operationId":"getInternalOrgSubscriptionReport","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["active","none"],"type":"string","nullable":true,"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Getinternalorgsubscriptionreport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/reports/org/signups/{granularity}":{"get":{"tags":["Internal"],"summary":"Organization Growth Report","description":"Generate trend report of organizations registered in the system.\n\nTracks organization growth over time with configurable granularity:\n- **Hourly**: For recent activity monitoring\n- **Daily**: For week-over-week trends\n- **Weekly**: For monthly patterns\n- **Monthly**: For long-term growth\n\nUseful for:\n- Growth rate analysis\n- Capacity planning\n- Marketing effectiveness\n- Seasonal patterns","operationId":"getInternalOrgSignupsReport","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"granularity","in":"path","required":true,"schema":{"enum":["hourly","daily","weekly","monthly"],"type":"string","title":"Granularity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreationTrendReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/org/{org_id}/consumption":{"get":{"tags":["Internal"],"summary":"Organization Consumption Details","description":"Get detailed resource consumption for a specific organization.\n\nComprehensive view includes:\n- API usage statistics\n- Token consumption by model\n- Storage utilization\n- Active users and projects\n- Task execution metrics\n- Cost breakdown\n- Usage trends\n\nEssential for:\n- Customer success monitoring\n- Usage-based billing\n- Capacity planning\n- Performance optimization\n- Cost analysis","operationId":"getInternalOrgConsumption","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Getinternalorgconsumption"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/internal/reports/org/{org_id}/users":{"get":{"tags":["Internal"],"summary":"Organization Users Report","description":"Generate detailed report of users in an organization with their tasks.\n\nProvides comprehensive insights into:\n- User profile information (email, name, bio, avatar)\n  - Note: Email is only shown if user is subscribed to newsletter; otherwise shows \"not subscribed to newsletter\"\n- User roles within the organization (owner, editor, viewer, direct_member)\n- Tasks created by each user\n- Task revision counts\n- Task run counts\n- User onboarding status\n\n**Query Parameters:**\n- `has_tasks_only`: Filter to show only users who have created tasks\n\n**Response Structure:**\nThe response includes:\n- Organization metadata (ID, name, user count)\n- List of all users with their full details\n- For each user:\n  - Profile information\n  - Organization roles\n  - List of tasks with revision and run counts\n\nUseful for:\n- User activity analysis\n- Task ownership tracking\n- Organization membership auditing\n- Usage pattern analysis\n- Support and debugging","operationId":"getInternalOrgUsersReport","security":[{"HTTPBearer":["internal.admin"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"has_tasks_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Has Tasks Only"},"description":"If true, only return users who have created tasks"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUsersReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/scrape":{"post":{"tags":["Scrape"],"summary":"Enable Web Scrape","operationId":"enableWebScrape","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/scrape/start":{"post":{"tags":["Scrape"],"summary":"Initialise Web Scrape","operationId":"startWebScrape","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteScrapeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasourceSyncRun"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/scrape/run/{sync_run_id}":{"get":{"tags":["Scrape"],"summary":"Check Scraping Status","description":"Check the status of a web scraping job.\n\nReturns information about:\n- Overall job progress\n- Pages successfully scraped\n- Pages failed with errors\n- Discovered URLs\n- Processing statistics\n\nUse this to monitor long-running scraping operations.","operationId":"checkScrapeStatus","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"sync_run_id","in":"path","required":true,"schema":{"type":"string","title":"Sync Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasourceSyncRun"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/scrape/runs":{"get":{"tags":["Scrape"],"summary":"List Scraping History","description":"List all web scraping jobs for the project.\n\nShows historical scraping operations including:\n- Job status and timing\n- URLs scraped\n- Documents created\n- Error summaries\n\nUseful for tracking scraping activity and managing content sources.","operationId":"listScrapeRuns","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Cursor"}},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Page Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_DatasourceSyncRun_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/compose":{"post":{"tags":["Compose","Compose"],"summary":"Initialize Compose Session","description":"Initialize a new compose session for AI-assisted document creation.\n\nSets up the context for generating structured content including:\n- Document type and format preferences\n- Target audience and tone\n- Initial outline or structure\n- Any reference materials or context\n\nThis endpoint prepares the AI to assist with content generation tailored to your needs.","operationId":"initializeCompose","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_compose"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeInit"},"examples":{"blog_post":{"summary":"Blog Post","value":{"document_type":"blog_post","topic":"Introduction to Machine Learning","target_audience":"developers","tone":"informative","length":"medium"}},"technical_doc":{"summary":"Technical Documentation","value":{"document_type":"technical_documentation","topic":"API Integration Guide","target_audience":"senior developers","tone":"formal","include_code_examples":true,"sections":["Overview","Authentication","Endpoints","Examples"]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Initializeprojectcompose"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Initializeprojectcompose"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"description":"The UUID of the organization","schema":{"type":"string","format":"uuid"}},{"name":"project_id","in":"path","required":true,"description":"The UUID of the project","schema":{"type":"string","format":"uuid"}}],"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/compose/generate":{"post":{"tags":["Compose","Compose"],"summary":"Generate Content","description":"Generate content based on the initialized compose session and provided instructions.\n\nThe AI will create content that:\n- Follows the established context and parameters\n- Maintains consistent tone and style\n- Includes relevant examples and details\n- Structures information logically\n\nYou can iteratively refine the generated content through subsequent calls.","operationId":"generateContent","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_compose"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_generateProjectContent"},"examples":{"generate_section":{"summary":"Generate Section","value":{"instruction":"Write an introduction that explains the basics of neural networks","section":"introduction","include_examples":true}},"generate_outline":{"summary":"Generate Outline","value":{"instruction":"Create a detailed outline for the entire document","format":"hierarchical"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generateprojectcontent"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Generateprojectcontent"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"description":"The UUID of the organization","schema":{"type":"string","format":"uuid"}},{"name":"project_id","in":"path","required":true,"description":"The UUID of the project","schema":{"type":"string","format":"uuid"}}],"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/compose/update_section":{"post":{"tags":["Compose","Compose"],"summary":"Update Document Section","description":"Update or refine a specific section of the generated content.\n\nAllows targeted improvements to:\n- Expand on specific points\n- Adjust tone or complexity\n- Add or remove examples\n- Restructure paragraphs\n- Fix inconsistencies\n\nThe AI maintains context awareness to ensure updates align with the overall document.","operationId":"updateSection","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_compose"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_updateProjectSection"},"examples":{"expand_section":{"summary":"Expand Section","value":{"section_id":"introduction","instruction":"Add more detail about the historical context and key pioneers","existing_content":"Neural networks are computational models..."}},"simplify_content":{"summary":"Simplify Content","value":{"section_id":"technical_details","instruction":"Simplify the technical jargon for a broader audience","existing_content":"The backpropagation algorithm utilizes..."}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Updateprojectsection"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updateprojectsection"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"description":"The UUID of the organization","schema":{"type":"string","format":"uuid"}},{"name":"project_id","in":"path","required":true,"description":"The UUID of the project","schema":{"type":"string","format":"uuid"}}],"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/compose/section_talking_points":{"post":{"tags":["Compose","Compose"],"summary":"Generate Section Talking Points","description":"Generate key talking points for a specific section of the document.\n\nCreates structured bullet points that:\n- Highlight main ideas\n- Provide supporting details\n- Suggest examples or case studies\n- Identify potential questions to address\n\nUseful for presentations, summaries, or planning detailed content.","operationId":"generateTalkingPoints","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_compose"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_generateProjectTalkingPoints"},"examples":{"main_points":{"summary":"Main Talking Points","value":{"section":"benefits","context":{"document_type":"proposal","audience":"executives"},"existing_content":"Our solution provides..."}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generateprojecttalkingpoints"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Generateprojecttalkingpoints"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"description":"The UUID of the organization","schema":{"type":"string","format":"uuid"}},{"name":"project_id","in":"path","required":true,"description":"The UUID of the project","schema":{"type":"string","format":"uuid"}}],"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/compose/topic":{"post":{"tags":["Compose","Compose"],"summary":"Suggest Related Topics","description":"Generate suggestions for related topics or content expansions.\n\nProvides intelligent recommendations for:\n- Related subjects to explore\n- Complementary sections to add\n- Cross-references to include\n- Follow-up documents to create\n\nHelps ensure comprehensive coverage of the subject matter.","operationId":"suggestTopics","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_compose"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeTopicPoint"},"examples":{"related_topics":{"summary":"Related Topics","value":{"current_topic":"Machine Learning Basics","document_context":"introductory guide","completed_sections":["introduction","fundamentals"]}}}}}},"responses":{"200":{"description":"Topic suggestions","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Suggestprojecttopics"},"examples":{"suggestions":{"summary":"Topic Suggestions","value":{"related_topics":[{"topic":"Deep Learning Fundamentals","relevance":"Natural progression from ML basics","suggested_sections":["Neural Networks","CNNs","RNNs"]},{"topic":"Practical ML Applications","relevance":"Show real-world usage","suggested_sections":["Computer Vision","NLP","Recommendation Systems"]}],"cross_references":["Link to data preprocessing guide","Reference to model evaluation metrics"]}}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Suggestprojecttopics"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"description":"The UUID of the organization","schema":{"type":"string","format":"uuid"}},{"name":"project_id","in":"path","required":true,"description":"The UUID of the project","schema":{"type":"string","format":"uuid"}}],"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/{entity_type}/tag":{"post":{"tags":["Tags"],"summary":"Create Tag","description":"Create a new tag for organizing resources.\n\nTags can be applied to:\n- Tasks and task revisions\n- Collections\n- Documents\n- Other resources\n\nTags support hierarchical organization using prefixes.","operationId":"createTag","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"entity_type","in":"path","required":true,"schema":{"enum":["task","task_revision","task_share"],"type":"string","title":"Entity Type","example":"task"},"description":"The type of entity this tag applies to (`task` or `task_revision`)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagCreate"},"examples":{"environment_tag":{"summary":"Environment Tag","value":{"name":"production","color":"#00FF00","description":"Production environment resources"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid tag\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createtag","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for tags\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The tags belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"201":{"description":"Tag created","content":{"application/json":{"example":{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","name":"production","created":"2024-01-16T13:33:25.247662","modified":"2024-01-16T13:33:25.247662","project_id":"0190a234-9876-5432-10ab-cdef01234567","entity_type":"task","is_project_tag":true,"children":[]}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"409":{"description":"Conflict - Tag name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to create tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Tags"],"summary":"List Tags","description":"List all tags in the project","operationId":"listTags","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"entity_type","in":"path","required":true,"schema":{"enum":["task","task_revision","task_share"],"type":"string","title":"Entity Type","example":"task"},"description":"The type of entity this tag applies to (`task` or `task_revision`)."},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"nullable":true,"default":100,"title":"Page Limit"},"description":"The maximum number of items to return per page. Defaults to `100` if not specified."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"},"description":"A cursor for pagination. Use the `next_cursor` value from the previous response to get the next page of results."}],"responses":{"200":{"description":"Tags retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_Tag_"},"examples":{"environment_tags":{"summary":"Environment Tags","value":{"results":[{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","name":"production","created":"2024-01-16T13:33:25.247662","modified":"2024-01-16T13:33:25.247662","project_id":"0190a234-9876-5432-10ab-cdef01234567","entity_type":"task","is_project_tag":true,"children":[]},{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","name":"staging","created":"2024-01-16T14:00:00","modified":"2024-01-16T14:00:00","project_id":"0190a234-9876-5432-10ab-cdef01234567","entity_type":"task","is_project_tag":true,"children":[]},{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f3","name":"experimental","created":"2024-01-16T15:00:00","modified":"2024-01-16T15:00:00","project_id":"0190a234-9876-5432-10ab-cdef01234567","entity_type":"task","is_project_tag":true,"children":[{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f4","name":"v2-features","created":"2024-01-16T15:30:00","modified":"2024-01-16T15:30:00","parent_id":"0190a234-8dc6-6d08-aea9-928fcecad8f3","project_id":"0190a234-9876-5432-10ab-cdef01234567","entity_type":"task","is_project_tag":true,"children":[]}]}],"pagination":{"has_next":true,"next_cursor":"0190a234-8dc6-6d08-aea9-928fcecad8f2","page_limit":25}}}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid pagination\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listtags","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for tags\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The tags belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to list tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/{entity_type}/tag/{tag_id}":{"post":{"tags":["Tags"],"summary":"Update Tag","description":"Update tag properties","operationId":"updateTag","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"entity_type","in":"path","required":true,"schema":{"enum":["task","task_revision","task_share"],"type":"string","title":"Entity Type","example":"task"},"description":"The type of entity this tag applies to (`task` or `task_revision`)."},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tag Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The unique identifier (UUID) of the tag to operate on."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagUpdate"},"examples":{"update_name":{"summary":"Update Tag Name","value":{"name":"production-v2"}}}}}},"responses":{"200":{"description":"Tag updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid tag\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updatetag","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for tag\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The tag belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Tag not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to update tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Tags"],"summary":"Get Tag","description":"Get tag details","operationId":"getTag","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"entity_type","in":"path","required":true,"schema":{"enum":["task","task_revision","task_share"],"type":"string","title":"Entity Type","example":"task"},"description":"The type of entity this tag applies to (`task` or `task_revision`)."},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tag Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The unique identifier (UUID) of the tag to operate on."}],"responses":{"200":{"description":"Tag details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"},"example":{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","name":"production","created":"2024-01-16T13:33:25.247662","modified":"2024-01-16T13:33:25.247662","project_id":"0190a234-9876-5432-10ab-cdef01234567","entity_type":"task","is_project_tag":true,"children":[]}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettag","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for tag\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The tag belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Tag not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/{entity_type}/tag/{tag_id}/add":{"post":{"tags":["Tags"],"summary":"Add Tag to Entities","description":"Add a tag to multiple entities at once","operationId":"addTagToEntities","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"entity_type","in":"path","required":true,"schema":{"enum":["task","task_revision","task_share"],"type":"string","title":"Entity Type","example":"task"},"description":"The type of entity this tag applies to (`task` or `task_revision`)."},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tag Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The unique identifier (UUID) of the tag to operate on."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagEntityAdd"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid entity IDs\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Addtagtoentities","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for entities or tag\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The entities or tag belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"204":{"description":"Tag added to entities"},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Tag or entities not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to add tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/{entity_type}/tag/{tag_id}/remove":{"post":{"tags":["Tags"],"summary":"Remove Tag from Entities","description":"Remove a tag from multiple entities at once","operationId":"removeTagFromEntities","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"entity_type","in":"path","required":true,"schema":{"enum":["task","task_revision","task_share"],"type":"string","title":"Entity Type","example":"task"},"description":"The type of entity this tag applies to (`task` or `task_revision`)."},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tag Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The unique identifier (UUID) of the tag to operate on."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagEntityRemove"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid entity IDs\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Removetagfromentities","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for entities or tag\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The entities or tag belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"204":{"description":"Tag removed from entities"},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Tag or entities not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to remove tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/tags/{tag_id}":{"delete":{"tags":["Tags"],"summary":"Delete Tag","description":"Delete a tag and remove it from all resources","operationId":"deleteTag","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tag Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The unique identifier (UUID) of the tag to operate on."}],"responses":{"204":{"description":"Tag deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deletetag","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for tag\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The tag belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Tag not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to delete tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/reporting-groups":{"post":{"tags":["Reporting Groups"],"summary":"Create Reporting Group","description":"Create a new reporting group within a project.\n\nReporting groups help organize and segment task usage for analytics and billing purposes. \nEach project can have multiple reporting groups based on the organization's plan:\n- Trial/Pro plans: Up to 10 reporting groups\n- Teams plan: Up to 20 reporting groups\n- Enterprise plan: Up to 50 reporting groups\n\nThe reporting group name must be unique within the project.","operationId":"createReportingGroup","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportingGroupCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportingGroup"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createreportinggroup"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Reporting Groups"],"summary":"List Reporting Groups","description":"List all reporting groups within a project.\n\nReturns a paginated list of reporting groups ordered by creation date (newest first).\nUse the cursor and page_limit parameters to navigate through large result sets.","operationId":"listReportingGroups","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Cursor"},"description":"Pagination cursor for the next page of results."},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Page Limit"},"description":"Maximum number of reporting groups to return per page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_ReportingGroup_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listreportinggroups"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/reporting-groups/{reporting_group_id}":{"get":{"tags":["Reporting Groups"],"summary":"Get Reporting Group","description":"Retrieve details of a specific reporting group.\n\nReturns the complete reporting group information including metadata and usage statistics.","operationId":"getReportingGroup","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"reporting_group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reporting Group Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportingGroup"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getreportinggroup"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Reporting Groups"],"summary":"Update Reporting Group","description":"Update an existing reporting group's properties.\n\nAllows updating the name, description, and metadata of a reporting group.\nThe name must remain unique within the project.","operationId":"updateReportingGroup","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"reporting_group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reporting Group Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportingGroupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportingGroup"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updatereportinggroup"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Reporting Groups"],"summary":"Delete Reporting Group","description":"Delete a reporting group from the project.\n\nThis operation permanently removes the reporting group. Any tasks associated with \nthis reporting group will no longer be segmented by this grouping. Historical \nanalytics data may be retained but will no longer be associated with this group.","operationId":"deleteReportingGroup","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"reporting_group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reporting Group Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deletereportinggroup"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task":{"post":{"tags":["Tasks"],"summary":"Create a New Task","description":"Create a new Task with specified prompts, model configuration, and output format.\n\nTasks are the core building blocks that define how the LLM processes inputs and generates structured outputs. Each Task includes:\n- System and user prompts that guide the LLM's behavior\n- Input parameters that can be dynamically provided when running the Task\n- Output format specification that ensures consistent, structured responses\n- Output modality supporting multiple formats:\n  - `json`: Structured JSON responses (default)\n  - `image`: AI-generated images (requires image-capable model)\n  - `audio`: Voice/audio responses\n  - `pdf`: Formatted PDF documents\n  - `text`: Plain text output\n  - `csv`: Structured CSV data tables\n- Optional fallback model for improved reliability when primary model fails\n- Optional task run visibility controls for managing access to task execution history\n- Optional image processing capabilities\n- Optional RAG (Retrieval Augmented Generation) for domain-specific knowledge\n\n**LLM Configuration (`llm_config`):**\nModel-specific configuration options. Common parameters include:\n- `temperature` (0.0-2.0): Controls randomness. Lower = more focused, higher = more creative\n- `top_p` (0.0-1.0): Nucleus sampling. Use either temperature OR top_p, not both\n- `max_tokens`: Maximum tokens in the response\n- `quality` (for image models): \"standard\" or \"hd\"\n- `size` (for image models): e.g., \"1024x1024\", \"1792x1024\"\n\n**Output Format (`output_format`):**\nDefine the structure of task outputs. Two syntaxes are supported:\n\n*Shorthand syntax* (simple fields):\n```json\n{\"field_name\": \"str\", \"count\": \"int\", \"items\": \"array\"}\n```\n\n*Object syntax* (with descriptions and constraints):\n```json\n{\n  \"field_name\": {\n    \"type\": \"str\",\n    \"description\": \"What this field contains\",\n    \"options\": [\"option1\", \"option2\"]\n  }\n}\n```\n\nSupported types: `str`/`string`, `int`/`integer`, `number`, `bool`/`boolean`, `array`, `object`\n\n**Task Run Visibility:**\n- `owner_only` (default): Only task owners can view all task runs\n- `editors_and_owners`: Task editors and owners can view all task runs\n- `all_viewers`: All users with view permission can see all task runs\n\n**File Input Mode (`file_input_mode`):**\nSpecifies what file types are accepted for visual LLM processing:\n- `none` (default): No file input accepted\n- `image`: Image file required (PNG, JPEG, WebP, GIF)\n- `pdf`: PDF document required (requires PDF vision model)\n- `image_or_pdf`: Either image or PDF accepted\n- `any`: Any visually processable file accepted\n\n**Note:** The `image_required` field is deprecated. Use `file_input_mode='image'` instead.\n\n**PDF Vision Model Compatibility:**\n- Gemini 1.5/2.x/3.x models: Up to 50MB, 1000 pages\n- Claude 3.x/4.x models: Up to 30MB, 100 pages visual\n- GPT-4o models: Up to 20MB\n- GPT-3.5 / Groq: No PDF vision support\n\n**Common Use Cases:**\n\n*Structured Data Extraction:*\nCreate tasks with JSON output to extract structured data from unstructured text (e.g., invoice parsing, contact extraction).\n\n*Image Generation:*\nSet `output_modality: \"image\"` with DALL-E or similar models to generate images from text prompts.\n\n*Document Analysis with Vision:*\nSet `file_input_mode` to accept images, PDFs, or both for visual analysis by the LLM. Use PDF-capable models (Gemini, Claude, GPT-4o) for direct PDF processing without text extraction.\n\n*Knowledge Base Q&A (RAG):*\nConfigure `rag` with collection IDs to ground responses in your organization's documents and knowledge.\n\n*Automated Reports:*\nUse `output_modality: \"pdf\"` to generate formatted reports that can be downloaded or emailed.\n\nThe Task will be created with an initial revision that becomes automatically active.","operationId":"createTask","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_task"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"},"examples":{"basic":{"summary":"Basic text task","value":{"name":"Text Summarizer","description":"Summarizes long text into key points","system_prompt":"You are a helpful assistant that creates concise summaries.","user_prompt":"Please summarize the following text: {{text}}","input_params":[{"name":"text","description":"Text to summarize"}],"output_format":[{"name":"summary","description":"Brief summary of the text"},{"name":"key_points","description":"List of key points","type":"array"}],"output_format_type":"json","llm_model":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","enabled":true,"exposed_to_agents":false,"public":false,"output_modality":"json","annotation":"Initial version for text summarization","input_processors":[]}},"output_modalities":{"summary":"Non-JSON output modalities (image/audio/pdf/text/csv)","description":"Change output_modality to: image, audio, pdf, text, or csv","value":{"name":"Logo Generator","description":"Generates logos based on description","system_prompt":"You are an AI that generates logo descriptions for image generation.","user_prompt":"Create a logo for: {{company_description}}","llm_model":"c3847a5f-8b2e-4f8a-b1c9-d238e4a5f3b2","llm_config":{"quality":"standard","size":"1024x1024"},"output_modality":"image","enabled":true}},"with_rag":{"summary":"Task with RAG enabled","value":{"name":"Knowledge Q&A","description":"Answers questions using knowledge base","system_prompt":"You are a helpful assistant. Use the provided context to answer questions.","user_prompt":"Context: {{context}}\n\nQuestion: {{question}}","input_params":[{"name":"question","description":"User's question"}],"output_format":[{"name":"answer","description":"Answer to the question"},{"name":"confidence","description":"Confidence score","type":"number"}],"output_format_type":"json","llm_model":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","rag":{"collection_id":"01908843-1234-5678-9abc-def012345678","topK":5,"filters":{"category":"technical"}},"enabled":true,"exposed_to_agents":true,"output_modality":"json"}},"image_processing":{"summary":"Task with image support","value":{"name":"Image Analyzer","description":"Analyzes and describes images","system_prompt":"You are an image analysis expert.","user_prompt":"Analyze this image and describe: {{description_type}}","input_params":[{"name":"description_type","description":"What to focus on"}],"output_format":[{"name":"description","description":"Image description"},{"name":"objects","description":"Detected objects","type":"array"}],"output_format_type":"json","llm_model":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","image_required":true,"optimise_images":true,"enabled":true}},"with_input_processors":{"summary":"Task with input processors","value":{"name":"URL Content Analyzer","description":"Analyzes content from URLs","system_prompt":"You are a content analyzer.","user_prompt":"Analyze this content: {{url}}","llm_model":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","input_processors":[{"param_name":"url","input_processor":"url_fetcher","config":{"timeout":30}}],"output_format":{"summary":"str","sentiment":{"type":"str","options":["positive","negative","neutral"]}},"enabled":true,"exposed_to_agents":true,"annotation":"Testing URL content analysis with input processors"}},"advanced_reliability":{"summary":"Fallback model + visibility settings","description":"Combines fallback model for reliability with visibility controls","value":{"name":"Reliable Team Task","description":"Task with fallback model and collaborative visibility","system_prompt":"You are a helpful assistant.","user_prompt":"Process: {{input}}","input_params":[{"name":"input","description":"Input to process"}],"output_format":[{"name":"result","description":"Processed result"}],"output_format_type":"json","llm_model":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","fallback_llm_model_id":"af2a9bbf-5f36-4b12-bd3f-92c57be96dec","fallback_llm_config":{"temperature":0.5},"enabled":true,"task_run_visibility":"editors_and_owners","public":false}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid task configuration\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createprojecttask","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for tasks\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The tasks belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Task created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","name":"Text Summarizer","description":"Summarizes long text","system_prompt":"You are a helpful assistant that creates concise summaries.","user_prompt":"Please summarize the following text: {{text}}","input_params":[{"name":"text","description":"Text to summarize"}],"output_format":[{"name":"summary","description":"Brief summary of the text","type":"string"},{"name":"key_points","description":"List of key points","type":"array"}],"output_format_type":"json","llm_model":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","task_revision_id":"0190a234-8dc7-1234-aea9-928fcecad8f2","created_at":"2024-01-16T13:33:25.247662Z","updated_at":"2024-01-16T14:22:11.123456Z","organization_id":"0190a234-5678-9abc-def0-123456789abc","project_id":"0190a234-9876-5432-10ab-cdef01234567","mcp_servers":[],"metadata":{},"vision_enabled":false,"active":true}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"500":{"description":"Internal Server Error - Failed to create task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Tasks"],"summary":"List Tasks","description":"List all Tasks in the project with pagination support.\n\nReturns a paginated list of Tasks with their basic information:\n- Task ID and metadata\n- Active revision status\n- Latest modification time\n- Tags\n\nUse the page_limit and cursor parameters to navigate through the results.","operationId":"listTasks","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"name","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Name"},"description":"Filter tasks by name (case-insensitive partial match)."},{"name":"tag_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Tag Id"},"description":"Filter tasks by tag ID."},{"name":"include_tests","in":"query","required":false,"schema":{"type":"boolean","nullable":true,"default":false,"title":"Include Tests"},"description":"Include test revisions"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Cursor"},"description":"Pagination cursor for the next page of results."},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Page Limit"},"description":"Maximum number of tasks to return per page."}],"responses":{"200":{"description":"Successfully retrieved paginated tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTaskResultSet"},"example":{"results":[{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","name":"Text Summarizer","description":"Summarizes long text","system_prompt":"You are a helpful assistant that creates concise summaries.","user_prompt":"Please summarize the following text: {{text}}","input_params":[{"name":"text","description":"Text to summarize"}],"output_format":[{"name":"summary","description":"Brief summary of the text","type":"string"},{"name":"key_points","description":"List of key points","type":"array"}],"output_format_type":"json","llm_model":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","task_revision_id":"0190a234-8dc7-1234-aea9-928fcecad8f2","created_at":"2024-01-16T13:33:25.247662Z","updated_at":"2024-01-16T14:22:11.123456Z","organization_id":"0190a234-5678-9abc-def0-123456789abc","project_id":"0190a234-9876-5432-10ab-cdef01234567","mcp_servers":[],"metadata":{},"vision_enabled":false,"active":true},{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","name":"Customer Support Analyzer","description":"Analyzes customer messages and provides structured responses","enabled":true,"public":false,"exposed_to_agents":false,"output_modality":"json","system_prompt":"You are a helpful customer support assistant.","user_prompt":"Analyze this customer message: {{message}}\nProvide sentiment and suggested response.","input_params":[{"name":"message","description":"Customer message to analyze"}],"output_format":[{"name":"sentiment","description":"Customer sentiment","type":"string"},{"name":"category","description":"Issue category","type":"string"},{"name":"suggested_response","description":"Suggested response to customer","type":"string"}],"output_format_type":"json","llm_model":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","task_revision_id":"0190a234-8dc7-5678-aea9-928fcecad8f3","created_at":"2024-01-10T08:00:00Z","updated_at":"2024-01-15T14:30:00Z","organization_id":"0190a234-5678-9abc-def0-123456789abc","project_id":"0190a234-9876-5432-10ab-cdef01234567","mcp_servers":[],"metadata":{"department":"support","version":"1.2"},"vision_enabled":false,"image_required":false,"active":true}],"pagination":{"has_next":true,"next_cursor":"0190a234-8dc6-6d08-aea9-928fcecad8f2","page_limit":25}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid pagination parameters\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listprojecttasks","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for tasks\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The tasks belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"500":{"description":"Internal Server Error - Failed to list tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}":{"post":{"tags":["Tasks"],"summary":"Update a Task","description":"Update an existing Task with new configuration or create a new revision.\n\nWhen updating a Task, you can:\n1. Modify basic Task properties (name, description, enabled status, task_run_visibility)\n2. Create a new revision with updated prompts, models, and configuration (including fallback models)\n3. Manage active revisions and their traffic weights for A/B testing\n4. Update tags for the Task or specific revisions\n\nTask Run Visibility Control:\n- Update `task_run_visibility` to control who can view all task runs\n- Options: `owner_only`, `editors_and_owners`, `all_viewers`\n\nFallback Model Support:\n- Configure `fallback_llm_model_id` and `fallback_llm_config` for automatic failover\n- Improves reliability when primary model encounters errors or rate limits\n\nNote: Creating a new revision does not automatically make it active. Use the active_revisions field to control which revisions receive traffic.","operationId":"updateTask","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdate"},"examples":{"basic_update":{"summary":"Update task metadata","value":{"name":"Updated Task Name","description":"Updated description"}},"new_revision":{"summary":"Create new revision","value":{"name":"My Task v2","system_prompt":"You are an updated assistant.","user_prompt":"Updated prompt: {{input}}","output_format":{"response":{"type":"str","description":"Updated response"}},"llm_model_id":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","annotation":"Version 2 with improved prompts","test":false}},"update_visibility":{"summary":"Update task visibility","value":{"public":true,"exposed_to_agents":true,"enabled":true}},"test_revision":{"summary":"Create test revision","value":{"system_prompt":"Test prompt","user_prompt":"Test: {{input}}","llm_model_id":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","test":true,"annotation":"Testing new approach","optimise_images":false}},"with_fallback":{"summary":"Update with fallback model","value":{"system_prompt":"You are a reliable assistant.","user_prompt":"Process: {{input}}","llm_model_id":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","fallback_llm_model_id":"af2a9bbf-5f36-4b12-bd3f-92c57be96dec","annotation":"Added fallback for reliability"}}}}}},"responses":{"200":{"description":"Task updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"headers":{"X-New-Revision-ID":{"description":"ID of newly created revision (if task_revision was provided)","schema":{"type":"string","format":"uuid"}},"X-New-Revision-created":{"description":"Whether a new revision was created","schema":{"type":"string","enum":["true","false"]}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid task configuration\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updateprojecttask","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for tasks\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The tasks belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task or referenced resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to update task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Tasks"],"summary":"Get Task Details","description":"Retrieve detailed information about a specific Task.\n\nReturns the complete Task configuration including:\n- Basic properties (name, description, enabled status)\n- All revisions with their prompts and configurations\n- Currently active revisions and their traffic weights\n- Associated tags and metadata","operationId":"getTask","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"revision_tag_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Revision Tag Id"},"description":"Filter task_revisions by tag ID."},{"name":"include_tests","in":"query","required":false,"schema":{"type":"boolean","nullable":true,"default":false,"title":"Include Tests"},"description":"Include test revisions"}],"responses":{"200":{"description":"Task details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","name":"Customer Support Analyzer","description":"Analyzes customer messages and provides structured responses","enabled":true,"public":false,"exposed_to_agents":false,"output_modality":"json","system_prompt":"You are a helpful customer support assistant.","user_prompt":"Analyze this customer message: {{message}}\nProvide sentiment and suggested response.","input_params":[{"name":"message","description":"Customer message to analyze"}],"output_format":[{"name":"sentiment","description":"Customer sentiment","type":"string"},{"name":"category","description":"Issue category","type":"string"},{"name":"suggested_response","description":"Suggested response to customer","type":"string"}],"output_format_type":"json","llm_model":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","task_revision_id":"0190a234-8dc7-5678-aea9-928fcecad8f3","created_at":"2024-01-10T08:00:00Z","updated_at":"2024-01-15T14:30:00Z","organization_id":"0190a234-5678-9abc-def0-123456789abc","project_id":"0190a234-9876-5432-10ab-cdef01234567","mcp_servers":[],"metadata":{"department":"support","version":"1.2"},"vision_enabled":false,"image_required":false,"active":true}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid task ID format\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getprojecttask","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Tasks","Tasks"],"summary":"Delete Task","description":"Delete a task and all its associated data.\n\nThis operation will permanently remove:\n- The task configuration\n- All task runs and their outputs\n- Associated documents and files\n- Task history and analytics\n\nThe deletion is irreversible. Ensure you have exported any important data before deletion.\n\n**Note**: You must have edit permission on the task to delete it.","operationId":"deleteTask","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deleteprojecttask","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"204":{"description":"Task deleted successfully"},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/token_report":{"get":{"tags":["Tasks"],"summary":"Fetch Token Report","description":"Retrieve detailed token usage statistics for a specific task.\n\nThis endpoint provides comprehensive token consumption data, including:\n- Total tokens used across all task runs\n- Token usage breakdown by time period\n- Average tokens per request\n- Usage patterns and trends\n\nParameters:\n- start_date: Filter data from this date onward (supports both absolute dates and relative times)\n- end_date: Filter data up to this date (supports both absolute dates and relative times)\n\nDate Format Options:\n1. Absolute dates: 'YYYY-MM-DD' (e.g., '2024-01-15')\n2. Relative times:\n   - 'now', 'today', 'yesterday'\n   - 'X hours/days/weeks ago' (e.g., '24 hours ago', '7 days ago')\n   - 'last week', 'last month'\n\nCommon Use Cases:\n1. Monitoring token consumption trends\n2. Cost analysis and budgeting\n3. Usage pattern analysis\n4. Resource allocation planning","operationId":"getTaskTokenReport","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"start_date","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Start Date"},"description":"Start date for the report (e.g., '2023-06-01', '24 hours ago', 'yesterday')."},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"End Date"},"description":"End date for the report (e.g., '2023-06-30', 'now', 'today')."},{"name":"show_reporting_group","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Show Reporting Group"},"description":"If true, include reporting group in the report."}],"responses":{"200":{"description":"Successfully retrieved token usage report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRunTokenReport"},"example":{"task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","date_range":{"start":"2024-01-01T00:00:00Z","end":"2024-01-31T23:59:59Z"},"total_input_tokens":10000,"total_output_tokens":5000,"total_tokens":15000,"total_task_runs":100,"task_revisions":[{"task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","total_input_tokens":6000,"total_output_tokens":3000,"total_tokens":9000,"total_task_runs":60},{"task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f3","total_input_tokens":4000,"total_output_tokens":2000,"total_tokens":6000,"total_task_runs":40}]}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid date format or range\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettasktokenreport","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for token usage data\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The token usage data belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve token usage data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/usage_report":{"get":{"tags":["Tasks"],"summary":"Fetch Usage Report","description":"Retrieve usage statistics for task executions.\n\nThis endpoint provides detailed usage data about task runs, including:\n- Number of executions over time\n- Success and failure rates\n- Usage patterns by time period\n- Aggregated metrics by day or week\n\nUse this data to:\n1. Monitor task usage patterns\n2. Track execution success rates\n3. Analyze usage trends\n4. Plan capacity and scaling","operationId":"getTaskUsageReport","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"aggregation","in":"query","required":false,"schema":{"enum":["day","week"],"type":"string","default":"day","title":"Aggregation"},"description":"The aggregation level for the report. Can be either 'day' or 'week'."},{"name":"errors_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Errors Only"},"description":"If true, only include invocations with errors in the report."}],"responses":{"200":{"description":"Usage report retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRunUsageReport"},"example":{"task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","aggregation":"day","errors_only":false,"report_data":[{"date":"2024-01-15","total_runs":24,"successful_runs":22,"failed_runs":2,"error_rate":0.083,"unique_users":5},{"date":"2024-01-16","total_runs":31,"successful_runs":30,"failed_runs":1,"error_rate":0.032,"unique_users":7},{"date":"2024-01-17","total_runs":28,"successful_runs":28,"failed_runs":0,"error_rate":0.0,"unique_users":6}],"summary":{"total_runs":83,"total_successful":80,"total_failed":3,"average_error_rate":0.036,"period_start":"2024-01-15","period_end":"2024-01-17"}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid aggregation parameter\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettaskusagereport","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task usage data\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task usage data belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to process usage data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/timing_report":{"get":{"tags":["Tasks"],"summary":"Fetch Timing Report","description":"Retrieve timing metrics for task executions.\n\nThis endpoint provides detailed timing data about task runs, including:\n- Average response times\n- Processing durations\n- LLM call latencies\n- Aggregated metrics by hour or day\n\nUse this data to:\n1. Monitor task performance\n2. Identify performance bottlenecks\n3. Track timing trends over time\n4. Optimize task configurations","operationId":"getTaskTimingReport","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"start_date","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Start Date"},"description":"Start date for the report (e.g., '2023-06-01', '24 hours ago', 'yesterday')."},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"End Date"},"description":"End date for the report (e.g., '2023-06-30', 'now', 'today')."},{"name":"aggregation","in":"query","required":false,"schema":{"enum":["hour","day"],"type":"string","default":"hour","title":"Aggregation"},"description":"The aggregation level for the report. Can be either 'hour' or 'day'"}],"responses":{"200":{"description":"Timing report retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRunTimingReport"},"example":{"task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","start_date":"2024-01-01","end_date":"2024-01-31","aggregation":"day","total_runs":156,"successful_runs":148,"failed_runs":8,"average_duration_ms":2340,"min_duration_ms":980,"max_duration_ms":8500,"percentile_95_duration_ms":4200,"data_points":[{"timestamp":"2024-01-15T00:00:00Z","run_count":12,"average_duration_ms":2150,"successful_count":11,"failed_count":1},{"timestamp":"2024-01-16T00:00:00Z","run_count":15,"average_duration_ms":2380,"successful_count":15,"failed_count":0}]}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid date format or range\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettasktimingreport","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task timing data\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task timing data belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to process timing data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/credit_report":{"get":{"tags":["Tasks"],"summary":"Fetch Credit Report","description":"Retrieve detailed credit usage statistics for a specific task.","operationId":"getTaskCreditReport","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"start_date","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Start Date"},"description":"Start date for the report (e.g., '2023-06-01', '24 hours ago', 'yesterday')."},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"End Date"},"description":"End date for the report (e.g., '2023-06-30', 'now', 'today')."},{"name":"show_reporting_group","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Show Reporting Group"},"description":"If true, include reporting group in the report."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRunCreditReport"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettaskcreditreport"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/run":{"post":{"tags":["Tasks"],"summary":"Run Task","description":"Run a task with the specified inputs and receive structured output.\n\nThis endpoint executes the task using its active revision(s) and returns the results. Key features:\n1. Automatic revision selection based on traffic weights\n2. Structured output matching the task's output modality:\n   - `json`: Structured JSON responses\n   - `image`: Generated image files (PNG, JPEG)\n   - `audio`: Generated audio files\n   - `pdf`: Formatted PDF documents\n   - `text`: Plain text responses\n   - `csv`: CSV data files\n3. Execution metadata (tokens, timing, credits charged)\n4. Support for file uploads when required\n5. Automatic fallback to backup model on primary model failures\n6. Optional manual fallback model triggering\n7. Reporting group tracking for analytics and billing\n\n**Request Body:**\n\n⚠️ **IMPORTANT**: The request body must use the `task_input` field (not `input_params`):\n\n```json\n{\n  \"task_input\": {\n    \"variable_name\": \"value to substitute in user_prompt\"\n  }\n}\n```\n\nThe keys in `task_input` should match the `{{variable}}` placeholders defined in your task's `user_prompt`. For example, if your prompt contains `{{text}}` and `{{language}}`, your request should be:\n\n```json\n{\n  \"task_input\": {\n    \"text\": \"Hello world\",\n    \"language\": \"Spanish\"\n  }\n}\n```\n\n**Required:**\n- `task_input` object with parameters matching the task's prompt variables\n- Image file if task has `image_required=true`\n\n**Optional Query Parameters:**\n- `revision_id` or `revision_tag` for testing or comparison\n- `reporting_group` name for segmented analytics\n- `use_fallback_model` flag to manually trigger fallback\n\nThe response includes:\n- Structured output matching the task's output_format\n- Execution metadata (tokens used, timing, credits charged)\n- Fallback model usage information if applicable\n- Input data for audit purposes\n- References to any processed files\n\n**Common Use Cases:**\n\n*A/B Testing Revisions:*\nCompare different prompt versions by explicitly specifying `revision_id` or `revision_tag` for each request, then analyze results.\n\n*Gradual Rollouts:*\nConfigure traffic weights on revisions to gradually shift traffic from an old prompt to a new one while monitoring performance.\n\n*Fallback Model Strategy:*\nUse `use_fallback_model=true` to manually switch to the backup model during known primary model outages or rate limits.\n\n*Analytics Segmentation:*\nPass `reporting_group` to track metrics by customer, feature, or experiment cohort for billing and performance analysis.","operationId":"runTask","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:run_task"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"revision_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Revision Id","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"description":"Optional Task Revision ID to use for execution. If not provided, an active revision will be selected based on traffic weights."},{"name":"revision_tag","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Revision Tag","example":"production"},"description":"Optional Task Revision Tag to use for execution. If not provided, an active revision will be selected based on traffic weights."},{"name":"reporting_group","in":"query","required":false,"schema":{"type":"string","maxLength":64,"nullable":true,"title":"Reporting Group"},"description":"Optional reporting group name to associate with this task run"},{"name":"use_fallback_model","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Use Fallback Model"},"description":"If true, immediately use the fallback model instead of the primary model. Requires the task to have a fallback model configured."}],"responses":{"200":{"description":"Task executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRun"}}},"headers":{"X-Task-Run-ID":{"description":"Unique identifier for this task execution","schema":{"type":"string","format":"uuid"}},"X-Task-Revision-ID":{"description":"ID of the task revision used for execution","schema":{"type":"string","format":"uuid"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid task input format\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Runprojecttask","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid task input parameters\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task or revision not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to execute task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["task_input"],"properties":{"task_input":{"type":"object","description":"Key-value pairs mapping variable names to their values. Keys must match the variable placeholders in your task's user_prompt.","additionalProperties":true},"task_files":{"type":"array","description":"Optional base64-encoded files to include with the task run","items":{"type":"object","properties":{"filename":{"type":"string"},"content":{"type":"string","format":"byte"}}}},"task_reference":{"type":"string","maxLength":64,"description":"Optional reference ID for tracking this task run"}}},"examples":{"basic":{"summary":"Simple text input","description":"Run a task with a single text variable","value":{"task_input":{"text":"The quick brown fox jumps over the lazy dog."}}},"multiple_inputs":{"summary":"Multiple input variables","description":"Run a task with multiple variables matching prompt placeholders","value":{"task_input":{"customer_message":"I can't login to my account","customer_name":"Jane Doe","priority":"high"}}},"with_context":{"summary":"With context_id for tracking","description":"Include context_id to group related task runs","value":{"task_input":{"question":"What is the refund policy?"},"context_id":"conversation-12345"}}}}}}},"get":{"tags":["Tasks"],"summary":"List Task Runs","description":"Retrieve a paginated list of task runs for a specific task.\n\nTask runs provide an audit trail of all task executions, including:\n- Input parameters used\n- Execution status and timing\n- Resource usage metrics (tokens, credits)\n- Output results\n- Error information for failed runs\n- Fallback model usage information\n\nThis endpoint supports:\n- Pagination using cursor-based navigation\n- Filtering by task revision\n- Sorting by creation time (newest first)\n\nCommon use cases:\n1. Monitoring task execution history\n2. Auditing task usage and performance\n3. Debugging task behavior across multiple runs\n4. Analyzing task output patterns\n5. Tracking fallback model usage and reliability","operationId":"getTaskRuns","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"nullable":true,"default":100,"title":"Page Limit"},"description":"The maximum number of items to return per page. Defaults to `100` if not specified."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"},"description":"A cursor for pagination. Use the `next_cursor` value from the previous response to get the next page of results."},{"name":"status","in":"query","required":false,"schema":{"enum":["success","error"],"type":"string","nullable":true,"title":"Status"},"description":"Filter by task run status"},{"name":"task_revision_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Task Revision Id","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"description":"Filter task runs by revision ID"}],"responses":{"200":{"description":"Successfully retrieved task runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_TaskRun_"},"example":{"results":[{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f3","created":"2024-01-16T13:33:25.247662","response":{"result":"Sample output"},"run_data":{"submitted":{"text":"Sample text"},"files":[]},"input_tokens":100,"output_tokens":50,"total_tokens":150,"llm_call_timing":1.0,"charged_credits":"0.75","is_error":false,"llm_retries":0,"used_fallback_model":false}],"pagination":{"has_next":true,"next_cursor":"0190a234-8dc6-6d08-aea9-928fcecad8f2","page_limit":25}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid parameters\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listtaskruns","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task runs\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task runs belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request parameters\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task or revision not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve task runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/iam/members":{"get":{"tags":["Tasks"],"summary":"IAM - List Task Members","description":"Lists all members that have been granted direct access to the task.","operationId":"task_iam_org_org_id_project_project_id_task_task_id_iam_list_members","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:view","task:view_members"]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"type","in":"query","required":false,"schema":{"enum":["user","organization","project"],"type":"string","nullable":true,"title":"Type"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_IAMMember_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Task Iam Org Org Id Project Project Id Task Task Id Iam List Members"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/iam/members/{member}":{"get":{"tags":["Tasks"],"summary":"IAM - Lookup Task Member","description":"Retrieve a specific member that has been granted direct access to the task.","operationId":"task_iam_org_org_id_project_project_id_task_task_id_iam_get_member","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:view","task:view_members"]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Task Iam Org Org Id Project Project Id Task Task Id Iam Get Member"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Tasks"],"summary":"IAM - Update Task Member","description":"Update the roles that a member holds on the task.","operationId":"task_iam_org_org_id_project_project_id_task_task_id_iam_update_member_roles","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:view"]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIAMMemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"},{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse","MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","MULTIPLE_ROLES_NOT_ALLOWED":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}},"title":"Response 400 Task Iam Org Org Id Project Project Id Task Task Id Iam Update Member Roles"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Task Iam Org Org Id Project Project Id Task Task Id Iam Update Member Roles"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/iam/test":{"post":{"tags":["Tasks"],"summary":"IAM - Test Task Permissions","description":"Test the permissions that the caller (or another subject) holds on the task.","operationId":"task_iam_org_org_id_project_project_id_task_task_id_iam_test_permissions","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:view"]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIAMPermissionTest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMPermissionTest"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse"}},"title":"Response 400 Task Iam Org Org Id Project Project Id Task Task Id Iam Test Permissions"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Task Iam Org Org Id Project Project Id Task Task Id Iam Test Permissions"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task-agent":{"get":{"tags":["Task Agents"],"summary":"List Task Agents","description":"List all Task Agents configured for the project.\n\nReturns a paginated list of Task Agents with their:\n- Configuration details\n- Available skills (Tasks)\n- LLM model settings\n- Execution mode","operationId":"listTaskAgents","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Cursor"},"description":"Pagination cursor"},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Page Limit"},"description":"Max results per page"}],"responses":{"200":{"description":"Successfully retrieved Task Agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_TaskAgentRead_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid pagination\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listtaskagents","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for Task Agents\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The Task Agents belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve Task Agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Task Agents"],"summary":"Create Task Agent","description":"Create a new Task Agent for the project.\n\nTask Agents orchestrate multiple Tasks as skills using LLM-powered reasoning.\n\nConfigure:\n- System instruction (prompt)\n- LLM model for reasoning\n- Initial skills (Tasks to add)\n- Execution mode (agentic/sequential)","operationId":"createTaskAgent","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_task_agent"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAgentCreate"}}}},"responses":{"201":{"description":"Task Agent created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAgentRead"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid configuration\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createtaskagent","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for Task Agents\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The Task Agents belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to create Task Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task-agent/{task_agent_id}":{"get":{"tags":["Task Agents"],"summary":"Get Task Agent","description":"Retrieve detailed information about a specific Task Agent.\n\nReturns:\n- Agent configuration\n- Available skills (Tasks)\n- LLM model details\n- Execution statistics","operationId":"getTaskAgent","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_agent:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Agent Id"},"description":"The specific Task Agent to reference.","example":"01909843-3596-da54-4756-28af46917e74"}],"responses":{"200":{"description":"Task Agent details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAgentRead"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettaskagent","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for Task Agent\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The Task Agent belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve Task Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Task Agents"],"summary":"Update Task Agent","description":"Update Task Agent configuration.\n\nModifiable fields:\n- Name and description\n- System instruction\n- LLM model\n- Execution mode\n- Skills (full replacement)\n\nTo update skills, pass a `skills` array. This performs a full replacement:\n- Omit the field to leave skills unchanged\n- Pass an empty array to remove all skills\n- Pass a new array to replace all skills (array order = execution order)","operationId":"updateTaskAgent","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_agent:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Agent Id"},"description":"The specific Task Agent to reference.","example":"01909843-3596-da54-4756-28af46917e74"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAgentUpdate"}}}},"responses":{"200":{"description":"Task Agent updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAgentRead"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid configuration\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updatetaskagent","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for Task Agent\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The Task Agent belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to update Task Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Task Agents"],"summary":"Delete Task Agent","description":"Remove a Task Agent from the project.\n\nThis will:\n- Remove agent configuration\n- Delete associated skills\n- Preserve run history for auditing\n\nThis action cannot be undone.","operationId":"deleteTaskAgent","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_agent:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Agent Id"},"description":"The specific Task Agent to reference.","example":"01909843-3596-da54-4756-28af46917e74"}],"responses":{"204":{"description":"Task Agent deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deletetaskagent","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for Task Agent\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The Task Agent belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to delete Task Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task-agent/{task_agent_id}/run":{"post":{"tags":["Task Agents"],"summary":"Run Task Agent","description":"Execute the Task Agent with a user message.\n\nThe agent will:\n1. Process the message using the configured LLM\n2. Reason about which skills to invoke\n3. Execute relevant Tasks as needed\n4. Return a streaming response\n\nResponses are streamed using Server-Sent Events (SSE).","operationId":"runTaskAgent","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_agent:run"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Agent Id"},"description":"The specific Task Agent to reference.","example":"01909843-3596-da54-4756-28af46917e74"}],"responses":{"200":{"description":"Streaming response","content":{"application/json":{"schema":{}},"text/event-stream":{}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid request\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Runtaskagent","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for Task Agent\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The Task Agent belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to run Task Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Task Agents"],"summary":"List Task Agent Runs","description":"List execution runs for a Task Agent.\n\nReturns run history with:\n- Input message\n- Token usage\n- Status and duration\n- Skills invoked","operationId":"listTaskAgentRuns","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_agent:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Agent Id"},"description":"The specific Task Agent to reference.","example":"01909843-3596-da54-4756-28af46917e74"},{"name":"session_id","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Session Id"},"description":"Filter by session ID"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Run history","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskAgentRunRead"},"title":"Response Listtaskagentruns"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listtaskagentruns","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for Task Agent\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The Task Agent belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to list runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task-agent/{task_agent_id}/session":{"get":{"tags":["Task Agents"],"summary":"List Task Agent Sessions","description":"List conversation sessions for a Task Agent.\n\nSessions group related runs together for multi-turn conversations.","operationId":"listTaskAgentSessions","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_agent:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Agent Id"},"description":"The specific Task Agent to reference.","example":"01909843-3596-da54-4756-28af46917e74"}],"responses":{"200":{"description":"Session list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskAgentSessionSummary"},"title":"Response Listtaskagentsessions"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listtaskagentsessions","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for Task Agent\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The Task Agent belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to list sessions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task-agent/{task_agent_id}/session/{session_id}":{"get":{"tags":["Task Agents"],"summary":"Get Session Detail","description":"Get detailed information about a specific session.\n\nReturns session summary (run count, tokens) plus individual runs.","operationId":"getTaskAgentSessionDetail","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_agent:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Agent Id"},"description":"The specific Task Agent to reference.","example":"01909843-3596-da54-4756-28af46917e74"},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The session ID (UUID format, server-generated)."}],"responses":{"200":{"description":"Session detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAgentSessionDetail"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettaskagentsessiondetail","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for Task Agent\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The Task Agent belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve session detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Task Agents"],"summary":"Delete Session","description":"Delete a conversation session and all its runs.\n\nRemoves:\n- ADK session data (encrypted conversation history)\n- All TaskAgentRun records for the session\n\nCannot delete a session with active runs.","operationId":"deleteTaskAgentSession","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_agent:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Agent Id"},"description":"The specific Task Agent to reference.","example":"01909843-3596-da54-4756-28af46917e74"},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The session ID (UUID format, server-generated)."}],"responses":{"204":{"description":"Session deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deletetaskagentsession","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for Task Agent\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The Task Agent belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Session has active runs"},"500":{"description":"Internal Server Error - Failed to delete session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task-agent/{task_agent_id}/run/{run_id}/events":{"get":{"tags":["Task Agents"],"summary":"Get Run Events","description":"Get conversation events for a specific TaskAgentRun.\n\nReturns the full conversation history from the ADK session including:\n- User messages\n- Agent responses\n- Tool calls and results\n- Error messages (if any)\n\nEvents are returned in chronological order.","operationId":"getTaskAgentRunEvents","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_agent:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Agent Id"},"description":"The specific Task Agent to reference.","example":"01909843-3596-da54-4756-28af46917e74"},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"},"description":"The specific Run to reference.","example":"01909843-3596-da54-4756-28af46917e74"},{"name":"include_history","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include History"},"description":"Include full session history, not just this run's events"}],"responses":{"200":{"description":"Run events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAgentRunEventsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettaskagentrunevents","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for Task Agent\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The Task Agent belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve run events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task_forwarder_type":{"get":{"tags":["Task Forwarders"],"summary":"List Task Forwarder Types","description":"List all available task forwarder types with their configuration schemas.\n\n**Note**: This endpoint returns a plain array of forwarder types, not a paginated response. All available types are returned in a single request.\n\nReturns metadata for each forwarder type to help frontends build dynamic configuration UIs:\n- **webhook**: HTTP POST to external endpoints with optional HMAC signing\n- **email**: Send task results via email with customizable templates\n\nEach type includes:\n- JSON Schema for required configuration fields\n- JSON Schema for sensitive configuration (if applicable)\n- Field descriptions and validation rules\n\nUse this endpoint to dynamically render appropriate form fields based on the selected forwarder type.","operationId":"listTaskForwarderTypes","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Available forwarder types with configuration schemas","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskForwarderTypeInfo"},"title":"Response Listtaskforwardertypes"},"example":[{"type":"webhook","name":"Webhook","description":"Forward task results via HTTP POST to a webhook URL","config_schema":{"type":"object","properties":{"destination_url":{"type":"string","description":"The URL where Task Run result will be forwarded"}},"required":["destination_url"]},"config_sensitive_schema":{"type":"object","properties":{"signing_key":{"type":"string","description":"A secret key used to sign the forwarded data"}}}},{"type":"email","name":"Email","description":"Send task results via email with customizable templates","config_schema":{"type":"object","properties":{"recipient_emails":{"type":"array","items":{"type":"string","format":"email"},"description":"List of email addresses"},"subject_template":{"type":"string","description":"Email subject with {variable} placeholders"},"body_template":{"type":"string","description":"Email body with {variable} placeholders"}},"required":["recipient_emails","subject_template","body_template"]}}]}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listtaskforwardertypes","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for project\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The project belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"500":{"description":"Internal Server Error - Failed to list forwarder types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task_forwarder":{"post":{"tags":["Task Forwarders"],"summary":"Create Task Forwarder","description":"Create a new task forwarder to automatically route task outputs.\n\nTask forwarders enable:\n- Webhook notifications when tasks complete\n- Email notifications with customizable templates\n- Custom integrations with external systems\n\nConfiguration varies by forwarder type:\n- **webhook**: HTTP POST to external endpoints with optional HMAC signing\n- **email**: Send task results via email with customizable subject and body templates\n\nUse `GET /task_forwarder_type` to retrieve the complete configuration schema for each type.","operationId":"createTaskForwarder","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_task_forwarder"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WebhookForwarderCreate"},{"$ref":"#/components/schemas/EmailForwarderCreate"}],"title":"Task Forwarder"},"examples":{"webhook":{"summary":"Webhook Forwarder","value":{"name":"Customer API Webhook","forwarder_type":"webhook","config":{"destination_url":"https://api.example.com/webhook"},"config_sensitive":{"signing_key":"your-hmac-signing-key"}}},"email":{"summary":"Email Forwarder","value":{"name":"Task Results Email","forwarder_type":"email","config":{"recipient_emails":["team@example.com"],"subject_template":"Task completed: {task_name}","body_template":"Results: {output}"}}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WebhookForwarderInDB"},{"$ref":"#/components/schemas/EmailForwarderInDB"}],"title":"Response Createtaskforwarder"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid configuration\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createtaskforwarder","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task forwarders\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task forwarders belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid configuration\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Task forwarder created","content":{"application/json":{"example":{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","name":"Webhook Forwarder","created":"2024-01-15T10:00:00","modified":"2024-01-15T10:00:00","project_id":"0190a234-9876-5432-10ab-cdef01234567","type":"webhook","config":{"url":"https://api.example.com/webhook","method":"POST","headers":{"Authorization":"Bearer ***"}},"enabled":true}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to create forwarder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Task Forwarders"],"summary":"List Task Forwarders","operationId":"listTaskForwarders","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_task"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Page Limit"},"description":"The maximum number of items to return per page. Defaults to `100` if not specified."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"},"description":"A cursor for pagination. Use the `next_cursor` value from the previous response to get the next page of results."}],"responses":{"200":{"description":"Task forwarders retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_Annotated_Union_Annotated_WebhookForwarderInDB__Tag___Annotated_EmailForwarderInDB__Tag____Discriminator__"},"examples":{"mixed_forwarders":{"summary":"Mixed Forwarder Types","value":{"results":[{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","name":"Slack Notification","created":"2024-01-16T13:33:25.247662","modified":"2024-01-16T13:33:25.247662","project_id":"0190a234-9876-5432-10ab-cdef01234567","type":"slack","config":{"channel":"#notifications"},"config_sensitive":{"webhook_url":"https://hooks.slack.com/..."}},{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","name":"Webhook Forwarder","created":"2024-01-15T10:00:00","modified":"2024-01-15T10:00:00","project_id":"0190a234-9876-5432-10ab-cdef01234567","type":"webhook","config":{"url":"https://api.example.com/webhook","method":"POST","headers":{"Authorization":"Bearer ***"}},"enabled":true}],"pagination":{"has_next":true,"next_cursor":"0190a234-8dc6-6d08-aea9-928fcecad8f2","page_limit":25}}}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid pagination\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listtaskforwarders","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task forwarders\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task forwarders belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to list forwarders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task_forwarder/{task_forwarder_id}":{"post":{"tags":["Task Forwarders"],"summary":"Update Task Forwarder","operationId":"updateTaskForwarder","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_forwarder:edit"]}],"parameters":[{"name":"task_forwarder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Forwarder Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WebhookForwarderUpdate"},{"$ref":"#/components/schemas/EmailForwarderUpdate"}],"title":"Task Forwarder"},"examples":{"update_config":{"summary":"Update Configuration","value":{"config":{"url":"https://new-api.example.com/webhook","retry_count":3},"enabled":true}}}}}},"responses":{"200":{"description":"Task forwarder updated","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WebhookForwarderInDB"},{"$ref":"#/components/schemas/EmailForwarderInDB"}],"title":"Response Updatetaskforwarder"},"example":{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","name":"Webhook Forwarder","created":"2024-01-15T10:00:00","modified":"2024-01-15T10:00:00","project_id":"0190a234-9876-5432-10ab-cdef01234567","type":"webhook","config":{"url":"https://api.example.com/webhook","method":"POST","headers":{"Authorization":"Bearer ***"}},"enabled":true}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid configuration\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updatetaskforwarder","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task forwarder\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task forwarder belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid configuration\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task forwarder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to update forwarder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Task Forwarders"],"summary":"Get Task Forwarder","operationId":"getTaskForwarder","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_forwarder:view"]}],"parameters":[{"name":"task_forwarder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Forwarder Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Task forwarder details","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WebhookForwarderInDB"},{"$ref":"#/components/schemas/EmailForwarderInDB"}],"title":"Response Gettaskforwarder"},"example":{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","name":"Slack Notification","created":"2024-01-16T13:33:25.247662","modified":"2024-01-16T13:33:25.247662","project_id":"0190a234-9876-5432-10ab-cdef01234567","type":"slack","config":{"channel":"#notifications"},"config_sensitive":{"webhook_url":"https://hooks.slack.com/..."}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettaskforwarder","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task forwarder\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task forwarder belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task forwarder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve forwarder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task_forwarder/{task_forwarder_id}/iam/members":{"get":{"tags":["Task Forwarders"],"summary":"IAM - List Task Forwarder Members","description":"Lists all members that have been granted direct access to the task_forwarder.","operationId":"task_forwarder_iam_org_org_id_project_project_id_task_forwarder_task_forwarder_id_iam_list_members","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_forwarder:view","task_forwarder:view_members"]}],"parameters":[{"name":"task_forwarder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Forwarder Id"}},{"name":"type","in":"query","required":false,"schema":{"enum":["user","organization","project"],"type":"string","nullable":true,"title":"Type"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_IAMMember_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Task Forwarder Iam Org Org Id Project Project Id Task Forwarder Task Forwarder Id Iam List Members"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_forwarder/{task_forwarder_id}/iam/members/{member}":{"get":{"tags":["Task Forwarders"],"summary":"IAM - Lookup Task Forwarder Member","description":"Retrieve a specific member that has been granted direct access to the task_forwarder.","operationId":"task_forwarder_iam_org_org_id_project_project_id_task_forwarder_task_forwarder_id_iam_get_member","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_forwarder:view","task_forwarder:view_members"]}],"parameters":[{"name":"task_forwarder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Forwarder Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Task Forwarder Iam Org Org Id Project Project Id Task Forwarder Task Forwarder Id Iam Get Member"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Task Forwarders"],"summary":"IAM - Update Task Forwarder Member","description":"Update the roles that a member holds on the task_forwarder.","operationId":"task_forwarder_iam_org_org_id_project_project_id_task_forwarder_task_forwarder_id_iam_update_member_roles","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_forwarder:view"]}],"parameters":[{"name":"task_forwarder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Forwarder Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task_ForwarderIAMMemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"},{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse","MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","MULTIPLE_ROLES_NOT_ALLOWED":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}},"title":"Response 400 Task Forwarder Iam Org Org Id Project Project Id Task Forwarder Task Forwarder Id Iam Update Member Roles"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Task Forwarder Iam Org Org Id Project Project Id Task Forwarder Task Forwarder Id Iam Update Member Roles"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_forwarder/{task_forwarder_id}/iam/test":{"post":{"tags":["Task Forwarders"],"summary":"IAM - Test Task Forwarder Permissions","description":"Test the permissions that the caller (or another subject) holds on the task_forwarder.","operationId":"task_forwarder_iam_org_org_id_project_project_id_task_forwarder_task_forwarder_id_iam_test_permissions","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_forwarder:view"]}],"parameters":[{"name":"task_forwarder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Forwarder Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task_ForwarderIAMPermissionTest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMPermissionTest"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse"}},"title":"Response 400 Task Forwarder Iam Org Org Id Project Project Id Task Forwarder Task Forwarder Id Iam Test Permissions"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Task Forwarder Iam Org Org Id Project Project Id Task Forwarder Task Forwarder Id Iam Test Permissions"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_mcp_server/authorize":{"get":{"tags":["Task MCP Servers"],"summary":"Authorize Task Mcp Server","operationId":"authorizeMcpServer","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_task_mcp_server"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"server_url","in":"query","required":true,"schema":{"type":"string","title":"Server Url"}},{"name":"redirect_to","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Redirect To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Authorizemcpserver"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_mcp_server/callback":{"get":{"tags":["Task MCP Servers"],"summary":"Callback Task Mcp Server","operationId":"callbackMcpServer","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_mcp_server/discover":{"post":{"tags":["Task MCP Servers"],"summary":"Discover Task Mcp Server Tools","operationId":"discoverMcpServerTools","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_task_mcp_server"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerDiscoveryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerDiscoveryResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Discovermcpservertools"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_mcp_server":{"post":{"tags":["Task MCP Servers"],"summary":"Create Task Mcp Server","operationId":"createTaskMcpServer","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_task_mcp_server"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMcpServerCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMcpServer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createtaskmcpserver"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Task MCP Servers"],"summary":"List Task Mcp Servers","operationId":"listTaskMcpServers","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Page Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_TaskMcpServer_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listtaskmcpservers"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_mcp_server/{task_mcp_server_id}":{"get":{"tags":["Task MCP Servers"],"summary":"Get Task Mcp Server","operationId":"getTaskMcpServer","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_mcp_server:view"]}],"parameters":[{"name":"task_mcp_server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Mcp Server Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMcpServer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettaskmcpserver"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Task MCP Servers"],"summary":"Update Task Mcp Server","operationId":"updateTaskMcpServer","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_mcp_server:edit"]}],"parameters":[{"name":"task_mcp_server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Mcp Server Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMcpServerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMcpServer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updatetaskmcpserver"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Task MCP Servers"],"summary":"Delete Task Mcp Server","operationId":"deleteTaskMcpServer","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_mcp_server:edit"]}],"parameters":[{"name":"task_mcp_server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Mcp Server Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deletetaskmcpserver"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_mcp_server/{task_mcp_server_id}/refresh":{"post":{"tags":["Task MCP Servers"],"summary":"Refresh Task Mcp Server","operationId":"refreshTaskMcpServer","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_mcp_server:edit"]}],"parameters":[{"name":"task_mcp_server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Mcp Server Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMcpServer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Refreshtaskmcpserver"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_mcp_server/{task_mcp_server_id}/reauthorize":{"post":{"tags":["Task MCP Servers"],"summary":"Reauthorize Task Mcp Server","operationId":"reauthorizeTaskMcpServer","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_mcp_server:edit"]}],"parameters":[{"name":"task_mcp_server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Mcp Server Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"redirect_to","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Redirect To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Reauthorizetaskmcpserver"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_mcp_tool":{"post":{"tags":["Task MCP Tools"],"summary":"Create Task Mcp Tool","operationId":"createTaskMcpTool","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_mcp_server:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMcpToolCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMcpTool"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createtaskmcptool"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Task MCP Tools"],"summary":"List Task Mcp Tools","operationId":"listTaskMcpTools","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Page Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_TaskMcpTool_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listtaskmcptools"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_mcp_tool/{task_mcp_tool_id}":{"get":{"tags":["Task MCP Tools"],"summary":"Get Task Mcp Tool","operationId":"getTaskMcpTool","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_mcp_tool:view"]}],"parameters":[{"name":"task_mcp_tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Mcp Tool Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMcpTool"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettaskmcptool"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Task MCP Tools"],"summary":"Update Task Mcp Tool","operationId":"updateTaskMcpTool","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_mcp_tool:edit"]}],"parameters":[{"name":"task_mcp_tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Mcp Tool Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMcpToolUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMcpTool"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updatetaskmcptool"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Task MCP Tools"],"summary":"Delete Task Mcp Tool","operationId":"deleteTaskMcpTool","security":[{"HTTPBearer":[]},{"HTTPBearer":["task_mcp_tool:edit"]}],"parameters":[{"name":"task_mcp_tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Mcp Tool Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deletetaskmcptool"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/run/{task_run_id}/file/{file_name}":{"get":{"tags":["Tasks"],"summary":"Fetch a user submitted file (image or audio) for a given Task Run","description":"Fetch an individual Task Run file.\n\nThis endpoint retrieves files associated with a task run, such as:\n- Input images or audio files submitted for processing\n- Output images, audio, PDFs, or CSV files generated by the task\n\nThe file is served with appropriate content type headers for inline viewing\nor download based on the `inline` parameter.","operationId":"getTaskRunFile","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"task_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Run Id","example":"129c78d7-2e1f-4a77-adf3-68d69b0a3c71"},"description":"The specific Task Run to reference."},{"name":"file_name","in":"path","required":true,"schema":{"type":"string","title":"File Name","example":"93e38bb3-d94e-4a3e-8c80-9b8a1c1d7686.png"},"description":"The file name to fetch (image or audio)."},{"name":"inline","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Inline"},"description":"If true, serve file inline instead of as attachment"}],"responses":{"200":{"description":"File content returned successfully","content":{"application/json":{"schema":{}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"image/*":{"schema":{"type":"string","format":"binary"}},"audio/*":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"text/csv":{"schema":{"type":"string","format":"binary"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettaskrunfile"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"404":{"description":"Task run or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/run/{task_run_id}":{"get":{"tags":["Tasks"],"summary":"Fetch a Task Run","description":"Retrieve detailed information about a specific task run.\n\nTask runs provide a complete record of task executions, including:\n- Input parameters and configuration used\n- Execution status and timing information\n- Resource usage metrics (e.g., tokens consumed, credits charged)\n- Structured output and processing metadata\n- Error information if the run failed\n- Fallback model information if the primary model failed\n\n**Response Fields:**\n\n*Timing Metrics:*\n- `input_processor_timing`: Time in seconds spent running input processors (e.g., `0.00015282`)\n- `llm_call_timing`: Time in seconds for the LLM API call (e.g., `1.346`)\n\n*Resource Usage:*\n- `charged_credits`: Credits charged for this execution as a string (e.g., `\"1.00\"`)\n- `input_tokens`: Number of input tokens processed\n- `output_tokens`: Number of output tokens generated\n- `total_tokens`: Combined token count\n\n*Retry & Fallback Information:*\n- `llm_retries`: Number of retry attempts made before success or failure\n- `used_fallback_model`: Boolean indicating if fallback model was used\n- `primary_failure_reason`: Reason why the primary model failed (if applicable)\n- `fallback_llm_model_id`: ID of the fallback model used (if applicable)\n\n*Input Data:*\n- `run_data.submitted`: The original input parameters as submitted\n\nThis endpoint is useful for:\n- Monitoring task execution progress\n- Debugging failed runs and understanding failover behavior\n- Auditing task usage and performance\n- Retrieving task results\n- Analyzing reliability and fallback model usage\n\nErrors:\n- Returns 400 if the task run ID is not a valid UUID format\n- Returns 422 if the request body fails validation\n- Returns 404 if the task run is not found\n- Returns 403 if the user lacks permission to access the task run","operationId":"getTaskRun","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"task_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Run Id","example":"129c78d7-2e1f-4a77-adf3-68d69b0a3c71"},"description":"The specific Task Run to reference."}],"responses":{"200":{"description":"Successfully retrieved task run information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRun"},"examples":{"successful_run":{"summary":"Successful task run","value":{"id":"0190b234-1111-2222-3333-444444444444","task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f3","created":"2024-01-16T13:33:25.247662","response":{"sentiment":"positive","confidence":0.92},"run_data":{"submitted":{"text":"Analyze this text for sentiment"},"files":[]},"input_tokens":125,"output_tokens":25,"total_tokens":150,"llm_call_timing":1.2,"charged_credits":"0.85","is_error":false,"llm_retries":0,"used_fallback_model":false}},"with_fallback_model":{"summary":"Task run that used fallback model","value":{"id":"0190b234-9999-8888-7777-666666666666","task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f3","created":"2024-01-16T14:00:00.000000","response":{"result":"Successfully processed with fallback model"},"run_data":{"submitted":{"text":"Complex text requiring fallback"},"files":[]},"input_tokens":200,"output_tokens":75,"total_tokens":275,"llm_call_timing":2.3,"charged_credits":"1.15","is_error":false,"llm_retries":1,"used_fallback_model":true,"primary_failure_reason":"Primary model timeout","fallback_llm_model_id":"af2a9bbf-5f36-4b12-bd3f-92c57be96dec"}}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid UUID format\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Gettaskrun","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task run\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task run belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid request body\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve task run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task_run":{"get":{"tags":["Tasks"],"summary":"List Project Task Runs","description":"List all task runs across a project.\n\nReturns a paginated list of task runs for all tasks in the project.\nRuns belonging to soft-deleted tasks are excluded. Visibility is applied\nper task: users only see runs they would see on each task run list\n(owner_only / editors_and_owners / all_viewers). A page may contain\nfewer than page_limit results when visibility filters apply.\n\n**Filtering:** task_id, task_revision_id, status (success/error).","operationId":"listProjectTaskRuns","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Page Limit"},"description":"The maximum number of items to return per page. Defaults to `100` if not specified."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"},"description":"A cursor for pagination. Use the `next_cursor` value from the previous response to get the next page of results."},{"name":"task_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Task Id"},"description":"Filter to a specific task"},{"name":"task_revision_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Task Revision Id"},"description":"Filter to a specific task revision"},{"name":"status","in":"query","required":false,"schema":{"enum":["success","error"],"type":"string","nullable":true,"title":"Status"},"description":"Filter by status (success or error)"}],"responses":{"200":{"description":"Paginated list of task runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_TaskRun_"},"example":{"results":[{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f3","created":"2024-01-16T13:33:25.247662","response":{"result":"Sample output"},"run_data":{"submitted":{"text":"Sample text"},"files":[]},"input_tokens":100,"output_tokens":50,"total_tokens":150,"llm_call_timing":1.0,"charged_credits":"0.75","is_error":false,"llm_retries":0,"used_fallback_model":false}],"pagination":{"has_next":true,"next_cursor":"0190a234-8dc6-6d08-aea9-928fcecad8f2","page_limit":25}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listprojecttaskruns","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for project\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The project belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/trigger/webhook":{"post":{"tags":["Webhook Triggers"],"summary":"Create webhook trigger","description":"Create a new webhook trigger for the specified task.","operationId":"createWebhookTrigger","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTriggerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTriggerWithSecret"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createwebhooktrigger"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/trigger":{"get":{"tags":["Webhook Triggers"],"summary":"List triggers","description":"List all triggers for the specified task.","operationId":"listTriggers","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TriggerListItem"},"title":"Response Listtriggers"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listtriggers"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/trigger/webhook/{trigger_id}":{"get":{"tags":["Webhook Triggers"],"summary":"Get webhook trigger","description":"Get details of a specific webhook trigger.","operationId":"getWebhookTrigger","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTriggerResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getwebhooktrigger"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Webhook Triggers"],"summary":"Update webhook trigger","description":"Update a webhook trigger's configuration.","operationId":"updateWebhookTrigger","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTriggerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTriggerResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updatewebhooktrigger"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhook Triggers"],"summary":"Delete webhook trigger","description":"Delete a webhook trigger (soft delete).","operationId":"deleteWebhookTrigger","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deletewebhooktrigger"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/trigger/webhook/{trigger_id}/regenerate-endpoint":{"post":{"tags":["Webhook Triggers"],"summary":"Regenerate endpoint","description":"Regenerate the webhook endpoint ID. Old endpoint immediately stops working.","operationId":"regenerateWebhookEndpoint","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTriggerResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Regeneratewebhookendpoint"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/trigger/webhook/{trigger_id}/rotate-secret":{"post":{"tags":["Webhook Triggers"],"summary":"Rotate secret","description":"Rotate the webhook authentication secret. Returns the new secret (only time it's visible).","operationId":"rotateWebhookSecret","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTriggerWithSecret"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Rotatewebhooksecret"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/trigger/webhook/{trigger_id}/events":{"get":{"tags":["Webhook Triggers"],"summary":"List trigger events","description":"List execution history for a webhook trigger.","operationId":"listWebhookTriggerEvents","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookTriggerEventResponse"},"title":"Response Listwebhooktriggerevents"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listwebhooktriggerevents"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/task_share":{"get":{"tags":["Tasks"],"summary":"List Project Task Shares","description":"List all task shares across a project.\n\nReturns a paginated list of all task shares for tasks within the project.\nShares for soft-deleted tasks are excluded.\n\n**Filtering options:**\n- `active`: Filter by active status (true/false/omit for all)\n- `task_id`: Filter to shares for a specific task\n- `task_name`: Filter by task name (case-insensitive partial match)\n\n**Use cases:**\n- Audit all public shares in a project\n- Find active shares for a specific task\n- Review all shares created by the team","operationId":"listProjectTaskShares","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"active","in":"query","required":false,"schema":{"type":"boolean","nullable":true,"title":"Active"},"description":"Filter by active status"},{"name":"task_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Task Id"},"description":"Filter by specific task ID"},{"name":"task_name","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Task Name"},"description":"Filter by task name (partial, case-insensitive)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"},"description":"A cursor for pagination. Use the `next_cursor` value from the previous response to get the next page of results."},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Page Limit"},"description":"The maximum number of items to return per page. Defaults to `100` if not specified."}],"responses":{"200":{"description":"Paginated list of task shares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_TaskShare_"},"example":{"pagination":{"next_cursor":"01936abc-1234-5678-9abc-def012345678","has_next":true,"page_limit":100},"results":[{"id":"019a58ec-43b5-a1e5-60a8-c9653e6badbe","task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","task_revision_id":"019929cf-f316-196f-3bf9-118b22da0c3c","user_id":"0190c234-1111-2222-3333-444444444444","task_name":"Awesome synonymiser","short_id":"tsiJP","share_url":"https://app.rightbrain.ai/s/tsiJP","title":"Awesome synonymiser","description":"When you've lost that thesaurus","views_count":15,"active":true,"created":"2025-11-06T11:27:50.140234Z","modified":"2025-11-06T11:27:50.140234Z"}]}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listprojecttaskshares","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for project\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The project belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/share":{"get":{"tags":["Tasks"],"summary":"List Task Shares","description":"List all share links for a task.\n\n**Note**: This endpoint returns a plain array of task shares, not a paginated response. All shares for the task are returned in a single request.\n\nReturns all active and inactive shares created for the specified task,\nordered by creation date (most recent first).\n\nEach share includes:\n- Share URL and short ID\n- Title and description\n- View count and active status\n- Expiration date (if set)\n- Creation and modification timestamps\n\nUse this endpoint to manage existing shares, check analytics, or deactivate old shares.","operationId":"listTaskShares","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."}],"responses":{"200":{"description":"List of task shares","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskShare"},"title":"Response Listtaskshares"},"example":[{"id":"019a58ec-43b5-a1e5-60a8-c9653e6badbe","task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","task_revision_id":"019929cf-f316-196f-3bf9-118b22da0c3c","user_id":"0190c234-1111-2222-3333-444444444444","short_id":"tsiJP","share_url":"https://stag.leftbrain.me/s/tsiJP","title":"Awesome synonymiser","description":"When you've lost that thesaurus","views_count":15,"active":true,"created":"2025-11-06T11:27:50.140234Z","modified":"2025-11-06T11:27:50.140234Z"}]}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid task project mismatch\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listtaskshares","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Tasks"],"summary":"Create Task Share","description":"Create a shareable link for a task.\n    \nShare links allow external users to:\n- View task details without authentication\n- Run tasks with pre-configured inputs  \n- Access task results\n\nConfigure share settings:\n- Expiration time (in hours)\n- Usage limits (maximum number of uses)\n- Custom short link identifier (optional)\n- Allowed inputs\n- Output visibility\n\nShare links are perfect for demos, external testing, and public task access.","operationId":"createTaskShare","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskShareCreate"},"examples":{"time_limited":{"summary":"Time-limited Share","value":{"expires_in_hours":24,"allow_inputs":true}},"use_limited":{"summary":"Use-limited Share","value":{"max_uses":100,"allow_inputs":false}},"custom_link":{"summary":"Custom Short Link","value":{"custom_short_link":"my-custom-task","expires_in_hours":168,"allow_inputs":true}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskShare"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid share settings\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createtaskshare","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"201":{"description":"Share link created","content":{"application/json":{"example":{"share_id":"shr_1234567890abcdef","share_url":"https://rightbrain.ai/share/shr_1234567890abcdef","task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","expires_at":"2024-01-31T23:59:59Z","max_uses":100,"uses_count":0,"created_at":"2024-01-30T12:00:00Z"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to create share link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/task/{task_id}/share/{share_id}":{"delete":{"tags":["Tasks"],"summary":"Revoke Task Share","description":"Revoke a task share by deactivating it.\n\nThis endpoint sets the share's active status to false, preventing further cloning.\nThe share link will no longer work for cloning, but the record is preserved for analytics.\n\nRevoking a share:\n- Sets active = false\n- Prevents cloning through the share link\n- Preserves share record and view count\n- Cannot be undone (create a new share instead)\n\nRequires edit permission on the task.","operationId":"revokeTaskShare","security":[{"HTTPBearer":[]},{"HTTPBearer":["task:edit"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id","example":"01909843-3596-da54-4756-28af46917e74"},"description":"The specific Task to reference."},{"name":"share_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Share Id"},"description":"The ID of the task share to revoke"}],"responses":{"200":{"description":"Share successfully revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskShare"},"example":{"id":"019a58ec-43b5-a1e5-60a8-c9653e6badbe","task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","active":false,"views_count":15}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid share task mismatch\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Revoketaskshare","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for task\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The task belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task share not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/public/task_share/{short_id}":{"get":{"tags":["Tasks"],"summary":"Get Task Share","description":"Access a task via share link.\n\nReturns task details based on share permissions.\nMay require additional authentication for sensitive tasks.","operationId":"getPublicTaskShare","parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}},{"name":"accept","in":"header","required":false,"schema":{"type":"string","nullable":true,"title":"Accept"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/task/clone/{short_id}":{"post":{"tags":["Tasks"],"summary":"Clone Shared Task","description":"Clone a shared task into a specified project.\n\nThis endpoint allows authenticated users to clone a shared task into their own project.\nThe cloned task will:\n- Copy all task settings (name, description, configuration)\n- Copy only the shared revision (not all revisions)\n- Automatically resolve name conflicts by appending (2), (3), etc.\n- Set cloned_from_task_revision_id to maintain a link to the original\n- Be set as active with 100% weight\n\nRequires create_task permission on the target project.","operationId":"cloneSharedTask","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_task"]}],"parameters":[{"name":"short_id","in":"path","required":true,"description":"The unique share link identifier","schema":{"type":"string"},"example":"tsiJP"},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid inactive or expired share\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Clonesharedtask","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for project\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The project belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"201":{"description":"Task successfully cloned","content":{"application/json":{"example":{"id":"019a58ec-43b5-a1e5-60a8-c9653e6badbe","name":"Awesome synonymiser","description":"When you've lost that thesaurus","cloned_from_task_revision_id":"019929cf-f316-196f-3bf9-118b22da0c3c"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Task share not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to clone task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/public/task_share/{short_id}/file/{file_name}":{"get":{"tags":["Tasks"],"summary":"Download file from shared task run","description":"Download a file (image or document) from a task run example associated with a public task share","operationId":"getPublicTaskShareFile","parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}},{"name":"file_name","in":"path","required":true,"schema":{"type":"string","title":"File Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/org/{org_id}/project/{project_id}/model":{"get":{"tags":["Listings"],"summary":"List Available LLM Models","description":"Retrieve a list of all available Large Language Models (LLMs) that can be used in Tasks.\n\n**Note**: This endpoint returns a plain array of models, not a paginated response. All available models are returned in a single request.\n\nBy default, only active models are returned. Use the `include_retired=true` query parameter to include retired models.\n\nOptionally filter by vision (input) using one or more `vision` query parameters (e.g. `?vision=image&vision=pdf`). The model must support all listed: `image` (image input), `pdf` (PDF vision input). Use `output=image` to restrict to models that can generate images (supports_image_output).\n\nEach model entry includes standard fields like:\n\n- Unique identifier (`id`)\n- Provider information (`provider`)\n- Vendor information (`vendor`)\n- Model reference name (`name`)\n- Human-readable alias (`alias`)\n- Detailed description (`description`)\n- Vision support status (`supports_vision`) - Whether the model can process images\n- Image output support (`supports_image_output`) - Whether the model can generate images\n- Maximum context window (`max_context_window`)\n- Disabled parameters (`disabled_params`)\n- When the model was retired (`retired`)\n- The model that replaces it (`replaced_by`)\n\nModels may have different capabilities, performance characteristics, and cost structures.\nChoose models based on your specific needs.","operationId":"getAllModels","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"include_retired","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Retired"},"description":"Include models that have been retired."},{"name":"vision","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/VisionFilter"},"nullable":true,"title":"Vision"},"description":"Filter by vision (input) capability. Repeat for multiple: image (supports_vision), pdf (supports_pdf_vision). Model must support all listed."},{"name":"output","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFilter","nullable":true,"title":"Output"},"description":"Filter by output capability, e.g. image for models that can generate images (supports_image_output)."}],"responses":{"200":{"description":"Successfully retrieved list of available LLM models","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LLMModel"},"title":"Response Listavailablemodels"},"examples":{"success_including_retired":{"summary":"Available LLM Models (including a retired one)","value":[{"id":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","provider":"OpenAI","vendor":"openai","name":"gpt-4-turbo","alias":"GPT-4 Turbo","description":"Latest GPT-4 Turbo model with vision capabilities. 128K context window with training cut off of Dec 2023.","supports_vision":true,"supports_image_output":false,"max_context_window":128000,"disabled_params":[]},{"id":"af2a9bbf-5f36-4b12-bd3f-92c57be96dec","provider":"OpenAI","vendor":"openai","name":"gpt-3.5-turbo","alias":"GPT-3.5 Turbo","description":"Fast, efficient model suitable for simple tasks. 16K context window.","supports_vision":false,"supports_image_output":false,"max_context_window":16385,"disabled_params":["temperature"]},{"id":"0a15c94b-1f5c-43a0-95f7-8c258e100e27","provider":"Anthropic","vendor":"anthropic","name":"claude-3-opus","alias":"Claude 3 Opus","description":"Most capable Claude 3 model. 200K context window.","supports_vision":true,"supports_image_output":false,"max_context_window":200000,"disabled_params":[]},{"id":"c3847a5f-8b2e-4f8a-b1c9-d238e4a5f3b2","provider":"OpenAI","vendor":"openai","name":"dall-e-3","alias":"DALL-E 3","description":"OpenAI's most capable image generation model. Creates highly detailed and accurate images from text descriptions.","supports_vision":false,"supports_image_output":true,"max_context_window":4000,"disabled_params":["temperature","top_p"]},{"id":"36584583-a3d3-463d-a071-c8e88b039eb4","provider":"OpenAI","vendor":"openai","name":"code-davinci-002","alias":"Codex","description":"DEPRECATED. OpenAI Codex model optimized for code completion.","supports_vision":false,"supports_image_output":false,"max_context_window":8000,"disabled_params":[],"retired":"2023-03-23","replaced_by":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41"}]}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid UUID format\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listavailablemodels","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for models\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The models belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid path parameters\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/model/{model_id_or_name}":{"get":{"tags":["Listings"],"summary":"Get Model Details","description":"Retrieve detailed information about a specific LLM model by its ID or name.\n\nThis endpoint accepts either a UUID or the model name (e.g., \"gpt-4-turbo\" or \"claude-3-opus\").\n\nReturns complete model information including:\n- Provider and vendor details\n- Model capabilities (vision support, context window)\n- Retirement status and replacement information\n- Disabled parameters\n\nUse this endpoint to:\n- Verify model capabilities before using in a task\n- Check if a model has been retired\n- Look up model details by name for easier integration\n- Get detailed model specifications\n- Find replacement models for retired ones","operationId":"getModel","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"model_id_or_name","in":"path","required":true,"description":"The UUID or name of the LLM model to retrieve (e.g., 'ec217e75-72ea-4281-a1b8-cb7bd0ef9f41' or 'gpt-4-turbo').","schema":{"type":"string"},"examples":{"by_id":{"summary":"Get model by UUID","value":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41"},"by_name":{"summary":"Get model by name","value":"gpt-4-turbo"}}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successfully retrieved model details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModel"},"example":{"id":"ec217e75-72ea-4281-a1b8-cb7bd0ef9f41","provider":"OpenAI","vendor":"openai","name":"gpt-4-turbo","alias":"GPT-4 Turbo","description":"Latest GPT-4 Turbo model with vision capabilities. 128K context window with training cut off of Dec 2023.","supports_vision":true,"max_context_window":128000,"disabled_params":[]}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid model ID format\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getmodel"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"404":{"description":"Model not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/guardrail":{"get":{"tags":["Listings"],"summary":"List Available Guardrails","description":"Retrieve a list of all available guardrails for content validation.\n\n**Note**: This endpoint returns a plain array of guardrails, not a paginated response. All available guardrails are returned in a single request.\n\nGuardrails help ensure AI outputs are:\n- Safe and appropriate\n- Factually accurate\n- Compliant with policies\n- Free from harmful content\n- Properly formatted\n\nEach guardrail specializes in different validation aspects like:\n- Toxicity detection\n- PII (Personal Information) detection\n- Factual accuracy checking\n- Format validation\n- Custom business rules\n\nUse these guardrails in tasks to automatically validate outputs.","operationId":"listAvailableGuardrails","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatGuardrail"},"title":"Response Listavailableguardrails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/input_processor":{"get":{"tags":["Input Processors"],"summary":"List Input Processors","description":"Returns a list of all available input processors that can be used to transform task inputs.\n\n**Note**: This endpoint returns a plain array of processors, not a paginated response. All available processors are returned in a single request.\n\nInput processors are utility functions that can modify or enhance the input data before it is processed by the task.\nEach processor supports optional configuration parameters to customize its behavior.\n\nAvailable processors:\n- **url_fetcher**: Fetches HTML content from URLs\n- **perplexity_search**: Searches the web for real-time information\n- **document_content_extractor**: Extracts text from uploaded documents","operationId":"getInputProcessors","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successfully retrieved list of available input processors with their configuration options","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InputProcessor"},"title":"Response Listinputprocessors"},"examples":{"success":{"summary":"Available Input Processors","value":[{"name":"url_fetcher","id":"url_fetcher","description":"Fetches the HTML content for the provided site and replaces the URL with the fetched content. Config: { fallback_text?: string }"},{"name":"perplexity_search","id":"perplexity_search","description":"Searches Perplexity for the provided query and returns ranked web results with snippets, dates, and metadata. Config: { max_results?: number (default: 5), query_context?: string, fallback_text?: string }"},{"name":"document_content_extractor","id":"document_content_extractor","description":"Extracts the content from a document and replaces the variable with the extracted content. Config: { filename: string (required), strategy?: 'fast' | 'hi_res' | 'ocr_only' | 'auto' (default: 'fast') }"}]}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid UUID format\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listinputprocessors","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for input processors\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The input processors belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid path parameters\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve input processors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/oauth_client/{oauth_client_id}":{"get":{"tags":["OAuth Clients"],"summary":"Get OAuth Client Details","description":"Retrieve detailed information about a specific OAuth client.\n\nReturns:\n- Client configuration\n- Allowed grant types and scopes\n- Redirect URIs\n- Usage statistics\n- Last access time\n\nNote: Client secret is never returned in responses.","operationId":"getOAuthClient","security":[{"HTTPBearer":[]},{"HTTPBearer":["oauth_client:view"]}],"parameters":[{"name":"oauth_client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Oauth Client Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"OAuth client details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClient"},"example":{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","name":"Production API Client","description":"OAuth client for production API access","client_id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","redirect_uris":["https://api.example.com/oauth/callback"],"grant_types":["client_credentials","refresh_token"],"created":"2024-01-16T13:33:25.247662","modified":"2024-01-16T13:33:25.247662"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Getoauthclient","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for OAuth client\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The OAuth client belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"OAuth client not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to retrieve OAuth client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["OAuth Clients"],"summary":"Update OAuth Client","description":"Update OAuth client configuration.\n\nModifiable fields:\n- Name and description\n- Redirect URIs\n- Allowed scopes\n- Trusted status\n\nNote: Grant types cannot be changed after creation.","operationId":"updateOAuthClient","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_oauth_client"]}],"parameters":[{"name":"oauth_client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Oauth Client Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientUpdate"},"examples":{"add_redirect":{"summary":"Add Redirect URI","value":{"redirect_uris":["https://app.example.com/callback","https://staging.example.com/callback"]}}}}}},"responses":{"200":{"description":"OAuth client updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClient"},"example":{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","name":"Production API Client","description":"OAuth client for production API access","client_id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","redirect_uris":["https://api.example.com/oauth/callback"],"grant_types":["client_credentials","refresh_token"],"created":"2024-01-16T13:33:25.247662","modified":"2024-01-16T13:33:25.247662"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid client configuration\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Updateoauthclient","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for OAuth client\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The OAuth client belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid configuration\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"OAuth client not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to update OAuth client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["OAuth Clients"],"summary":"Delete OAuth Client","description":"Delete an OAuth client and revoke all access.\n\nThis will:\n- Revoke all active tokens\n- Remove client configuration\n- Delete access logs\n\nThis action cannot be undone.","operationId":"deleteOAuthClient","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_oauth_client"]}],"parameters":[{"name":"oauth_client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Oauth Client Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Deleteoauthclient","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for OAuth client\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The OAuth client belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"204":{"description":"OAuth client deleted"},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"OAuth client not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to delete OAuth client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/oauth_client":{"get":{"tags":["OAuth Clients"],"summary":"List OAuth Clients","description":"List all OAuth clients for the organization.\n\nReturns clients with:\n- Basic configuration\n- Grant types and scopes\n- Creation and last used dates\n- Active/inactive status\n\nClients are returned in descending order by creation date.","operationId":"listOAuthClients","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."},{"name":"page_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"nullable":true,"default":100,"title":"Page Limit"},"description":"The maximum number of items to return per page. Defaults to `100` if not specified."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","nullable":true,"title":"Cursor"},"description":"A cursor for pagination. Use the `next_cursor` value from the previous response to get the next page of results."}],"responses":{"200":{"description":"OAuth clients retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_OAuthClient_"},"examples":{"multiple_clients":{"summary":"Multiple OAuth Clients","value":{"results":[{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","name":"Production API Client","description":"OAuth client for production API access","client_id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","redirect_uris":["https://api.example.com/oauth/callback"],"grant_types":["client_credentials","refresh_token"],"created":"2024-01-16T13:33:25.247662","modified":"2024-01-16T13:33:25.247662"},{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f3","name":"Mobile App","description":"OAuth client for mobile application","client_id":"mob_1234567890abcdef","redirect_uris":["com.example.app://oauth/callback","https://app.example.com/oauth/callback"],"grant_types":["authorization_code","refresh_token"],"created":"2024-01-10T09:00:00","modified":"2024-01-15T14:30:00"},{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f4","name":"CLI Tool","description":"OAuth client for command-line tool","client_id":"cli_abcdef1234567890","redirect_uris":["http://localhost:8080/callback"],"grant_types":["authorization_code","refresh_token"],"created":"2024-01-05T11:00:00","modified":"2024-01-05T11:00:00"}],"pagination":{"has_next":false,"page_limit":25}}}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid pagination\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listoauthclients","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for OAuth clients\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The OAuth clients belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to list OAuth clients","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["OAuth Clients"],"summary":"Create OAuth Client","description":"Create a new OAuth client for API access.\n\nOAuth clients enable:\n- Third-party application integration\n- Service-to-service authentication\n- Mobile app authentication\n- CLI tool access\n\n**Choosing the Right Grant Type:**\n\n| Use Case | Grant Type | PKCE | Notes |\n|----------|------------|------|-------|\n| Web app with backend | `authorization_code` | Optional | Most secure for user-facing apps |\n| Mobile/Desktop app | `authorization_code` | Required | Public client, no secret storage |\n| Server-to-server | `client_credentials` | No | For automated services, no user context |\n| Single-page app | `authorization_code` | Required | Use PKCE instead of implicit |\n| Long-lived sessions | Add `refresh_token` | - | Combine with primary grant type |\n\n**Grant Type Details:**\n- **authorization_code**: User authorizes app via browser, app exchanges code for tokens\n- **client_credentials**: Service authenticates directly with client_id/secret (no user)\n- **refresh_token**: Exchange refresh token for new access token (add to other grants)\n- **implicit**: *Deprecated* - Use authorization_code + PKCE instead\n\n**PKCE Support**:\n- Enable PKCE for public clients (mobile apps, SPAs)\n- Supports S256 (SHA-256) and plain challenge methods\n- Required for clients without client secrets\n\nThe client secret is returned only once - store it securely!","operationId":"createOAuthClient","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_oauth_client"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientCreate"},"examples":{"web_app":{"summary":"Web Application","value":{"name":"Customer Portal","grant_types":["authorization_code","refresh_token"],"redirect_uris":["https://app.example.com/callback","https://app.example.com/silent-refresh"],"scope":"read:tasks write:tasks","trusted":false}},"service":{"summary":"Service Account","value":{"name":"Analytics Service","grant_types":["client_credentials"],"scope":"read:tasks read:runs","trusted":true}},"mobile_app_pkce":{"summary":"Mobile App with PKCE","value":{"name":"Mobile App","grant_types":["authorization_code","refresh_token"],"redirect_uris":["com.example.app://oauth/callback"],"pkce_required":true,"pkce_challenge_method":"S256","token_endpoint_auth_method":"none"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClient"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid client configuration\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createoauthclient","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for OAuth clients\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The OAuth clients belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Unprocessable Entity - Invalid configuration\n\n**Common causes:**\n- Request is well-formed but violates business rules\n- Invalid combination of fields (e.g., mutually exclusive options)\n- Referenced resource doesn't exist or is in wrong state\n- Field value is valid type but out of acceptable range\n\n**Resolution:** Check the error message for specific validation failures and adjust your request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"OAuth client created","content":{"application/json":{"example":{"id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","name":"Production API Client","description":"OAuth client for production API access","client_id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","redirect_uris":["https://api.example.com/oauth/callback"],"grant_types":["client_credentials","refresh_token"],"created":"2024-01-16T13:33:25.247662","modified":"2024-01-16T13:33:25.247662"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"409":{"description":"Conflict - Client name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to create OAuth client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/oauth_client/{oauth_client_id}/client_secret":{"post":{"tags":["OAuth Clients"],"summary":"Regenerate Client Secret","description":"Generate a new client secret for an OAuth client.\n\nThis will:\n- Invalidate the current secret immediately\n- Generate a new secure secret\n- Return the new secret (only once!)\n\nActive tokens remain valid but cannot be refreshed with old secret.","operationId":"regenerateOAuthClientSecret","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:create_oauth_client"]}],"parameters":[{"name":"oauth_client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Oauth Client Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientUpdate"},"examples":{"regenerate":{"summary":"Regenerate Secret Request","value":{},"description":"Empty object required to confirm regeneration"}}}}},"responses":{"200":{"description":"New secret generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientRegenerateSecretResponse"},"example":{"client_secret":"new_secret_shown_only_once"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Regenerateoauthclientsecret","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - Insufficient permissions for OAuth client\n\n**Common causes:**\n- Your role lacks the required permission for this action\n- The OAuth client belongs to a different organization or project\n- The action requires admin or owner privileges\n\n**Resolution:** Contact your organization admin to request appropriate access."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Unauthorized - Authentication failed\n\n**Common causes:**\n- Missing `Authorization` header\n- Expired access token\n- Invalid or malformed token\n- Using API key in wrong format\n\n**Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"unauthorized","message":"Invalid or expired authentication token"},"request_id":"req_ghi789","timestamp":"2024-01-16T12:00:00Z"}}}},"404":{"description":"OAuth client not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to regenerate secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/oauth_client/{oauth_client_id}/iam/members":{"get":{"tags":["OAuth Clients"],"summary":"IAM - List Project Members","description":"Lists all members that have been granted direct access to the project.","operationId":"project_iam_org_org_id_project_project_id_oauth_client_oauth_client_id_iam_list_members","security":[{"HTTPBearer":[]},{"HTTPBearer":["oauth_client:view","project:view_members"]}],"parameters":[{"name":"oauth_client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Oauth Client Id"}},{"name":"type","in":"query","required":false,"schema":{"enum":["user","organization","project"],"type":"string","nullable":true,"title":"Type"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultSet_IAMMember_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Project Iam Org Org Id Project Project Id Oauth Client Oauth Client Id Iam List Members"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/oauth_client/{oauth_client_id}/iam/members/{member}":{"get":{"tags":["OAuth Clients"],"summary":"IAM - Lookup Project Member","description":"Retrieve a specific member that has been granted direct access to the project.","operationId":"project_iam_org_org_id_project_project_id_oauth_client_oauth_client_id_iam_get_member","security":[{"HTTPBearer":[]},{"HTTPBearer":["oauth_client:view","project:view_members"]}],"parameters":[{"name":"oauth_client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Oauth Client Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Project Iam Org Org Id Project Project Id Oauth Client Oauth Client Id Iam Get Member"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["OAuth Clients"],"summary":"IAM - Update Project Member","description":"Update the roles that a member holds on the project.","operationId":"project_iam_org_org_id_project_project_id_oauth_client_oauth_client_id_iam_update_member_roles","security":[{"HTTPBearer":[]},{"HTTPBearer":["oauth_client:view"]}],"parameters":[{"name":"oauth_client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Oauth Client Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/brain__api__api_v1__iam__ProjectIAMMemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMMember"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"},{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse","MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","MULTIPLE_ROLES_NOT_ALLOWED":"#/components/schemas/MultipleRolesNotAllowedErrorResponse"}},"title":"Response 400 Project Iam Org Org Id Project Project Id Oauth Client Oauth Client Id Iam Update Member Roles"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Project Iam Org Org Id Project Project Id Oauth Client Oauth Client Id Iam Update Member Roles"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/oauth_client/{oauth_client_id}/iam/test":{"post":{"tags":["OAuth Clients"],"summary":"IAM - Test Project Permissions","description":"Test the permissions that the caller (or another subject) holds on the project.","operationId":"project_iam_org_org_id_project_project_id_oauth_client_oauth_client_id_iam_test_permissions","security":[{"HTTPBearer":[]},{"HTTPBearer":["oauth_client:view"]}],"parameters":[{"name":"oauth_client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Oauth Client Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The org id"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The project id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/brain__api__api_v1__iam__ProjectIAMPermissionTest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAMPermissionTest"}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"},{"$ref":"#/components/schemas/InvalidMemberErrorResponse"},{"$ref":"#/components/schemas/InvalidSubjectTypeErrorResponse"},{"$ref":"#/components/schemas/InvalidRoleErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MALFORMED_RESOURCE_IDENTIFIER":"#/components/schemas/MalformedResourceIdentifierErrorResponse","INVALID_MEMBER":"#/components/schemas/InvalidMemberErrorResponse","INVALID_SUBJECT_TYPE":"#/components/schemas/InvalidSubjectTypeErrorResponse","INVALID_ROLE":"#/components/schemas/InvalidRoleErrorResponse"}},"title":"Response 400 Project Iam Org Org Id Project Project Id Oauth Client Oauth Client Id Iam Test Permissions"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidMemberErrorResponse"}}},"description":"Not Found"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Project Iam Org Org Id Project Project Id Oauth Client Oauth Client Id Iam Test Permissions"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/{org_id}/project/{project_id}/api_key":{"post":{"tags":["API Keys","API Keys"],"summary":"Create API Key","description":"Create a new API key for authenticating API requests.\n\nAPI keys provide a simpler alternative to OAuth for programmatic access. Each key:\n- Is tied to the creating user and inherits their permissions\n- Can be used to authenticate requests to any project endpoint\n- Has a descriptive name for easy management\n- Can be revoked at any time\n\nThe API key is only shown once at creation time and cannot be retrieved later.\n\n**Security Notes**:\n- Store API keys securely (use environment variables, not hardcode)\n- Rotate keys regularly\n- Each key inherits the user's project permissions\n- Revoke compromised keys immediately","operationId":"createApiKey","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"},"examples":{"basic":{"summary":"Basic API Key","value":{"name":"Production API Key"}},"detailed":{"summary":"Detailed API Key","value":{"name":"CI/CD Pipeline Key","description":"Used by GitHub Actions for automated deployments"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid request\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Createprojectapikey"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"201":{"description":"API key created successfully","content":{"application/json":{"example":{"id":"550e8400-e29b-41d4-a716-446655440000","name":"Production API Key","key":"rb_live_1234567890abcdef","created_at":"2024-01-15T10:30:00Z","user_id":"0190c234-1111-2222-3333-444444444444","project_id":"0190a234-9876-5432-10ab-cdef01234567"}}}}}},"get":{"tags":["API Keys","API Keys"],"summary":"List API Keys","description":"List all active API keys for the current user in the specified project.\n\n**Note**: This endpoint returns a plain array of API keys, not a paginated response. All API keys for the user are returned in a single request.\n\nReturns all non-revoked API keys created by the authenticated user for the project.\nKeys are returned in descending order by creation date.\n\n**Response Fields:**\n- `id`: Unique identifier for the API key\n- `name`: Human-readable name for the key\n- `key`: The API key value (masked after creation for security)\n- `oauth_client_id`: The OAuth client this API key is associated with, if any\n- `last_used`: Timestamp of when the key was last used for authentication\n- `created_at`: When the key was created\n\n**Note**: The actual key values are not included in the response for security reasons.","operationId":"listApiKeys","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"List of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"},"title":"Response Listprojectapikeys"},"examples":{"multiple_keys":{"summary":"Multiple API Keys","value":[{"id":"550e8400-e29b-41d4-a716-446655440000","name":"Production API Key","created_at":"2024-01-15T10:30:00Z","last_used_at":"2024-01-20T15:45:00Z","user_id":"0190c234-1111-2222-3333-444444444444","project_id":"0190a234-9876-5432-10ab-cdef01234567"},{"id":"550e8400-e29b-41d4-a716-446655440003","name":"Development Key","created_at":"2024-01-10T08:00:00Z","user_id":"0190c234-1111-2222-3333-444444444444","project_id":"0190a234-9876-5432-10ab-cdef01234567"}]}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"bad_request","message":"Invalid request parameters","details":{"field":"page_limit","reason":"Must be between 1 and 100"}},"request_id":"req_abc123","timestamp":"2024-01-16T12:00:00Z"}}},"description":"Bad Request - Invalid request\n\n**Common causes:**\n- Invalid UUID format in path or query parameters\n- Missing required fields in the request body\n- Invalid enum value provided\n- Type mismatch (e.g., string instead of number)\n\n**Resolution:** Check the request body and parameters match the schema."},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Listprojectapikeys"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/org/{org_id}/project/{project_id}/api_key/{api_key_id}/revoke":{"post":{"tags":["API Keys","API Keys"],"summary":"Revoke API Key","description":"Revoke an existing API key to prevent further use.\n\nOnce revoked:\n- The key immediately becomes invalid for authentication\n- All requests using the key will receive 401 Unauthorized\n- The action cannot be undone\n- The key will no longer appear in listings\n\nOnly the user who created the key can revoke it.","operationId":"revokeApiKey","security":[{"HTTPBearer":[]},{"HTTPBearer":["project:view"]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"description":"The UUID of the API key to revoke","schema":{"type":"string","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id","example":"123e4567-e89b-12d3-a456-426614174000"},"description":"The unique identifier of the organization."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id","example":"123e4567-e89b-12d3-a456-426614174001"},"description":"The unique identifier of the project."}],"responses":{"200":{"description":"API key revoked successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revokeprojectapikey"},"examples":{"success":{"summary":"Revoked Successfully","value":{"success":true}}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MissingAuthenticationErrorResponse"},{"$ref":"#/components/schemas/PermissionCheckFailedErrorResponse"}],"discriminator":{"propertyName":"reason","mapping":{"MISSING_AUTHENTICATION":"#/components/schemas/MissingAuthenticationErrorResponse","PERMISSION_CHECK_FAILED":"#/components/schemas/PermissionCheckFailedErrorResponse"}},"title":"Response 403 Revokeprojectapikey"}}},"description":"Forbidden"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/public/{project_key}/llms/task/{task_id}":{"get":{"tags":["Agent Pack"],"summary":"Get Task for LLM/Agent Consumption","description":"Retrieve a task's information in a format optimized for LLMs and agents to consume.\n\nThis endpoint provides task details in a plaintext format that includes:\n- Task name and description\n- Input parameters with their types and descriptions\n- Output format specification\n- Example usage and integration instructions\n- OAuth/API authentication details\n- Links to full documentation\n\nThe response is designed to be easily parsed by LLMs and can be used to:\n- Understand how to integrate with RightBrain tasks\n- Generate code for task execution\n- Learn about required inputs and expected outputs\n- Access authentication endpoints\n\n**Authentication**: This endpoint requires a valid project routing key (no user authentication needed).\n\n**Use Cases**:\n- LLM agents discovering available tasks\n- Automated documentation generation\n- Task discovery and integration\n- Agent-based task execution","operationId":"getTaskForLlm","parameters":[{"name":"project_key","in":"path","required":true,"schema":{"type":"string","title":"Project Key"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-fern-ignore":true}},"/whoami":{"get":{"tags":["System"],"summary":"Get Current User","description":"Get current authenticated user information including token details.\n\nReturns the authenticated user's basic information (ID, email, name).\nIf authenticated via OAuth client credentials, also includes the client's\norganization and project context.","operationId":"whoami","responses":{"200":{"description":"Current user information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhoAmIResponse"},"examples":{"user_session":{"summary":"User authenticated via session","value":{"id":"01234567-89ab-cdef-0123-456789abcdef","email":"user@example.com","name":"Jane Doe"}},"oauth_client":{"summary":"OAuth client authentication","value":{"id":"01234567-89ab-cdef-0123-456789abcdef","email":"service@example.com","name":"Service Account","client":{"org_id":"018936f0-03ea-e8be-a1a1-00000012b0a1","project_id":"019936f0-03ea-e8be-a1a1-00000012c0b2"}}}}}}},"401":{"description":"Not authenticated","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/-/health":{"get":{"summary":"<Lambda>","operationId":"_lambda____health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/-/ready":{"get":{"summary":"Endpoint","operationId":"endpoint___ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Account":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"credits":{"type":"integer","title":"Credits","default":0},"modified":{"type":"string","nullable":true,"title":"Modified"},"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["org_id","id"],"title":"Account"},"ApiKey":{"properties":{"name":{"type":"string","title":"Name"},"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"oauth_client_id":{"type":"string","format":"uuid","title":"Oauth Client Id"},"created":{"type":"string","format":"date-time","title":"Created"},"last_used":{"type":"string","format":"date-time","nullable":true,"title":"Last Used"},"revoked":{"type":"boolean","title":"Revoked"}},"type":"object","required":["name","id","key","oauth_client_id","created","revoked"],"title":"ApiKey","description":"Schema for returning an API Key to the client."},"ApiKeyCreate":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"ApiKeyCreate","description":"Schema for creating an API Key."},"AsyncJobResult":{"properties":{"status":{"type":"string","title":"Status"},"task_id":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Task Id"}},"type":"object","required":["status","task_id"],"title":"AsyncJobResult"},"Body_createProjectDocuments":{"properties":{"data":{"type":"string","title":"Data"},"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","default":[]}},"type":"object","required":["data"],"title":"Body_createProjectDocuments"},"Body_generateProjectContent":{"properties":{"compose":{"$ref":"#/components/schemas/ComposeGenerate"},"context":{"$ref":"#/components/schemas/ComposeInit"}},"type":"object","required":["compose","context"],"title":"Body_generateProjectContent"},"Body_generateProjectTalkingPoints":{"properties":{"context":{"$ref":"#/components/schemas/ComposeInit"},"existing_content":{"$ref":"#/components/schemas/ComposeContent"},"update_instruction":{"$ref":"#/components/schemas/ComposeSectionTalkingPoint"}},"type":"object","required":["context","existing_content","update_instruction"],"title":"Body_generateProjectTalkingPoints"},"Body_updateProjectSection":{"properties":{"context":{"$ref":"#/components/schemas/ComposeInit"},"existing_content":{"$ref":"#/components/schemas/ComposeContent"},"update_instruction":{"$ref":"#/components/schemas/ComposeSectionUpdate"}},"type":"object","required":["context","existing_content","update_instruction"],"title":"Body_updateProjectSection"},"Body_uploadOrganizationAvatar":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_uploadOrganizationAvatar"},"Body_uploadProjectAvatar":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_uploadProjectAvatar"},"Body_uploadProjectDocuments":{"properties":{"data":{"type":"string","title":"Data"},"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","default":[]}},"type":"object","required":["data"],"title":"Body_uploadProjectDocuments"},"Body_uploadUserAvatar":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_uploadUserAvatar"},"ChatDocument":{"properties":{"title":{"type":"string","title":"Title"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"description":{"type":"string","nullable":true,"title":"Description"},"source":{"$ref":"#/components/schemas/DocumentSource","nullable":true},"strategy":{"type":"string","title":"Strategy"},"source_meta":{"additionalProperties":true,"type":"object","nullable":true,"title":"Source Meta"},"connection_id":{"type":"string","format":"uuid","nullable":true,"title":"Connection Id"},"id":{"type":"string","format":"uuid","title":"Id"},"chunks":{"type":"integer","title":"Chunks"},"original_mime":{"type":"string","title":"Original Mime"},"embedding_instances":{"items":{"$ref":"#/components/schemas/ChatDocumentEmbeddingInstance"},"type":"array","nullable":true,"title":"Embedding Instances"}},"type":"object","required":["title","project_id","strategy","id","chunks","original_mime","embedding_instances"],"title":"ChatDocument"},"ChatDocumentEmbeddingInstance":{"properties":{"config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Config","default":{}},"id":{"type":"string","format":"uuid","title":"Id"},"chat_document_id":{"type":"string","format":"uuid","title":"Chat Document Id"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","chat_document_id","is_active"],"title":"ChatDocumentEmbeddingInstance"},"ChatDocumentEmbeddingRecord":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"document":{"type":"string","title":"Document"}},"type":"object","required":["id","document"],"title":"ChatDocumentEmbeddingRecord"},"ChatDocumentQueryResult":{"properties":{"chat_document_id":{"type":"string","format":"uuid","title":"Chat Document Id"},"text":{"type":"string","title":"Text"},"score":{"type":"number","title":"Score"}},"type":"object","required":["chat_document_id","text","score"],"title":"ChatDocumentQueryResult"},"ChatDocumentUpdate":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","nullable":true,"title":"Description"}},"type":"object","required":["title"],"title":"ChatDocumentUpdate"},"ChatGuardrail":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string","enum":["prompt_policy","pii_policy"]}],"title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"type":{"type":"string","enum":["input","output"],"title":"Type"}},"type":"object","required":["id","name","description","type"],"title":"ChatGuardrail"},"Collection":{"properties":{"title":{"type":"string","title":"Title"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"id":{"type":"string","format":"uuid","title":"Id"},"summary":{"type":"string","nullable":true,"title":"Summary"},"created":{"type":"string","title":"Created"},"modified":{"type":"string","title":"Modified"},"embedding_instances":{"items":{"$ref":"#/components/schemas/ChatDocumentEmbeddingInstance"},"type":"array","title":"Embedding Instances","default":[]}},"type":"object","required":["title","project_id","id","created","modified"],"title":"Collection"},"CollectionCreate":{"properties":{"title":{"type":"string","title":"Title"},"document_embedding_instance_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Document Embedding Instance Ids","default":[]}},"type":"object","required":["title"],"title":"CollectionCreate","description":"'Meta schema to enable passing non-standard\nproperties on POST for create"},"CollectionEmbeddingUpdate":{"properties":{"embedding_instance_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Embedding Instance Ids"}},"type":"object","required":["embedding_instance_ids"],"title":"CollectionEmbeddingUpdate"},"CollectionIAMMemberRoleUpdate":{"properties":{"add":{"items":{"type":"string","enum":["editor","owner","viewer"]},"type":"array","title":"Add","description":"A list of collection roles to grant to the member.\n\nRoles in this list are applied to the member AFTER any removals specified in `remove`.\n\nThis may be combined with `remove_all` to replace the member's entire role list."},"remove":{"items":{"type":"string","enum":["editor","owner","viewer"]},"type":"array","title":"Remove","description":"A list of collection roles to revoke from the member."},"remove_all":{"type":"boolean","nullable":true,"title":"Remove All","description":"Removes all existing roles from the member. This may be combined with `add` to replace all existing roles that the member holds.","default":false}},"type":"object","title":"CollectionIAMMemberRoleUpdate"},"CollectionIAMPermissionTest":{"properties":{"permissions":{"items":{"type":"string","enum":["add_document","add_editor","add_member","add_owner","create_chat","edit","list_chats","query","remove_document","remove_editor","remove_member","remove_owner","view","view_members"]},"type":"array","title":"Permissions","description":"A list of permissions to test on the collection."},"member":{"type":"string","nullable":true,"title":"Member"}},"type":"object","required":["permissions"],"title":"CollectionIAMPermissionTest"},"CollectionQuery":{"properties":{"query":{"type":"string","title":"Query"},"limit":{"type":"integer","title":"Limit","default":10}},"type":"object","required":["query"],"title":"CollectionQuery","description":"Schema for querying collection content"},"CollectionUpdate":{"properties":{"title":{"type":"string","title":"Title"}},"type":"object","required":["title"],"title":"CollectionUpdate"},"ComposeContent":{"properties":{"existing_content":{"type":"string","title":"Existing Content"}},"type":"object","required":["existing_content"],"title":"ComposeContent"},"ComposeGenerate":{"properties":{"structure":{"items":{"$ref":"#/components/schemas/InitialComposeSection"},"type":"array","title":"Structure"}},"type":"object","required":["structure"],"title":"ComposeGenerate"},"ComposeInit":{"properties":{"title":{"type":"string","title":"Title"},"topic":{"type":"string","nullable":true,"title":"Topic"},"purpose":{"type":"string","nullable":true,"title":"Purpose"},"audience":{"type":"string","nullable":true,"title":"Audience"},"num_sections":{"type":"integer","nullable":true,"title":"Num Sections"},"word_count":{"type":"integer","nullable":true,"title":"Word Count"},"voice":{"type":"string","nullable":true,"title":"Voice"},"domain":{"type":"string","nullable":true,"title":"Domain"},"tone":{"type":"string","nullable":true,"title":"Tone"},"favourable_words":{"type":"string","nullable":true,"title":"Favourable Words"},"deny_words":{"type":"string","nullable":true,"title":"Deny Words"},"keywords":{"type":"string","nullable":true,"title":"Keywords"},"cta":{"type":"string","nullable":true,"title":"Cta"},"content":{"type":"string","nullable":true,"title":"Content"},"language":{"type":"string","enum":["english_british","english_american","french","chinese","spanish","korean","italian","german"],"title":"Language","default":"english_british"}},"type":"object","required":["title"],"title":"ComposeInit"},"ComposeSectionTalkingPoint":{"properties":{"section_heading":{"type":"string","title":"Section Heading"}},"type":"object","required":["section_heading"],"title":"ComposeSectionTalkingPoint"},"ComposeSectionUpdate":{"properties":{"position":{"type":"integer","title":"Position"},"section_title":{"type":"string","title":"Section Title"},"instructions":{"items":{"type":"string"},"type":"array","title":"Instructions"},"text":{"type":"string","nullable":true,"title":"Text"}},"type":"object","required":["position","section_title","instructions"],"title":"ComposeSectionUpdate"},"ComposeTopicPoint":{"properties":{"category":{"type":"string","title":"Category","default":"blog"},"title":{"type":"string","title":"Title"}},"type":"object","required":["title"],"title":"ComposeTopicPoint"},"ConversationalGuardrails":{"properties":{"input":{"items":{"$ref":"#/components/schemas/InputConversationalGuardrailDefinition"},"type":"array","title":"Input","description":"List of valid Input Conversational Guardrails to enable","default":[]},"output":{"items":{"$ref":"#/components/schemas/OutputConversationalGuardrailDefinition"},"type":"array","title":"Output","description":"List of valid Output Conversational Guardrails to enable","default":[],"example":"[\"prompt_policy\"]"}},"type":"object","title":"ConversationalGuardrails"},"CreationTrendReport":{"properties":{"granularity":{"type":"string","enum":["hourly","daily","weekly","monthly"],"title":"Granularity"},"start_time":{"type":"string","title":"Start Time"},"end_time":{"type":"string","title":"End Time"},"data":{"items":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"string"}]},"type":"object"},"type":"array","title":"Data"}},"type":"object","required":["granularity","start_time","end_time","data"],"title":"CreationTrendReport","description":"Represents a trend report for organization creation."},"Datasource":{"properties":{"name":{"type":"string","title":"Name"},"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["name","id"],"title":"Datasource"},"DatasourceConnection":{"properties":{"private":{"type":"boolean","nullable":true,"title":"Private"},"project_id":{"type":"string","format":"uuid","nullable":true,"title":"Project Id"},"datasource_id":{"type":"string","format":"uuid","nullable":true,"title":"Datasource Id"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}},"token":{"type":"string","title":"Token","default":""},"created_by":{"type":"string","format":"uuid","nullable":true,"title":"Created By"},"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"DatasourceConnection"},"DatasourceConnectionPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"private":{"type":"boolean","title":"Private"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"datasource_id":{"type":"string","format":"uuid","title":"Datasource Id"},"created":{"type":"string","title":"Created"},"modified":{"type":"string","title":"Modified"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}},"datasource":{"$ref":"#/components/schemas/Datasource"}},"type":"object","required":["id","name","private","project_id","datasource_id","created","modified","datasource"],"title":"DatasourceConnectionPublic"},"DatasourceSyncRun":{"properties":{"task_id":{"type":"string","nullable":true,"title":"Task Id"},"status":{"type":"string","enum":["pending","started","success","failure","retry","progress"],"title":"Status","default":"pending"},"run_output":{"additionalProperties":true,"type":"object","nullable":true,"title":"Run Output","default":{}},"id":{"type":"string","format":"uuid","title":"Id"},"created":{"type":"string","title":"Created"},"modified":{"type":"string","title":"Modified"},"datasource_connection":{"$ref":"#/components/schemas/DatasourceConnection","nullable":true}},"type":"object","required":["id","created","modified"],"title":"DatasourceSyncRun"},"DocumentIAMMemberRoleUpdate":{"properties":{"add":{"items":{"type":"string","enum":["editor","owner","viewer"]},"type":"array","title":"Add","description":"A list of document roles to grant to the member.\n\nRoles in this list are applied to the member AFTER any removals specified in `remove`.\n\nThis may be combined with `remove_all` to replace the member's entire role list."},"remove":{"items":{"type":"string","enum":["editor","owner","viewer"]},"type":"array","title":"Remove","description":"A list of document roles to revoke from the member."},"remove_all":{"type":"boolean","nullable":true,"title":"Remove All","description":"Removes all existing roles from the member. This may be combined with `add` to replace all existing roles that the member holds.","default":false}},"type":"object","title":"DocumentIAMMemberRoleUpdate"},"DocumentIAMPermissionTest":{"properties":{"permissions":{"items":{"type":"string","enum":["add_editor","add_member","add_owner","edit","query","remove_editor","remove_member","remove_owner","view","view_members"]},"type":"array","title":"Permissions","description":"A list of permissions to test on the document."},"member":{"type":"string","nullable":true,"title":"Member"}},"type":"object","required":["permissions"],"title":"DocumentIAMPermissionTest"},"DocumentSource":{"type":"string","enum":["upload","gdrive","onedrive","web_scrape","notion","confluence","box","dropbox","sharepoint"],"title":"DocumentSource","description":"Source types for documents in the system."},"EffectiveModelExclusionsResponse":{"properties":{"organization_rules":{"items":{"$ref":"#/components/schemas/ModelExclusionRuleResponse"},"type":"array","title":"Organization Rules","description":"Exclusion rules set at organization level"},"project_rules":{"items":{"$ref":"#/components/schemas/ModelExclusionRuleResponse"},"type":"array","title":"Project Rules","description":"Exclusion rules set at project level"},"total_excluded_models":{"type":"integer","title":"Total Excluded Models","description":"Total number of models excluded by all rules (org + project)"},"available_model_count":{"type":"integer","title":"Available Model Count","description":"Number of models still available after all exclusions"}},"type":"object","required":["total_excluded_models","available_model_count"],"title":"EffectiveModelExclusionsResponse","description":"Response showing all exclusions with their sources.\n\nShows organization-level and project-level rules separately,\nplus computed impact on available models."},"EmailForwarderCreate":{"properties":{"name":{"type":"string","title":"Name","description":"A descriptive name for the Task Forwarder."},"description":{"type":"string","nullable":true,"title":"Description","description":"Additional details about the Task Forwarder's purpose or configuration."},"forwarder_type":{"type":"string","title":"Forwarder Type","description":"Type of forwarder: email for email delivery","default":"email"},"config":{"$ref":"#/components/schemas/TaskForwarderEmailConfig","description":"Email configuration with recipient addresses and templates"},"config_sensitive":{"additionalProperties":true,"type":"object","nullable":true,"title":"Config Sensitive","description":"Reserved for future sensitive email configuration"}},"type":"object","required":["name","config"],"title":"EmailForwarderCreate"},"EmailForwarderInDB":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the Task Forwarder."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"The Project that the Task Forwarder belongs to."},"created":{"type":"string","title":"Created","description":"When the Task Forwarder was created."},"modified":{"type":"string","title":"Modified","description":"When the Task Forwarder was last updated."},"name":{"type":"string","title":"Name","description":"A descriptive name for the Task Forwarder."},"description":{"type":"string","nullable":true,"title":"Description","description":"Additional details about the Task Forwarder's purpose or configuration."},"forwarder_type":{"type":"string","title":"Forwarder Type","description":"Type of forwarder: email for email delivery","default":"email"},"config":{"$ref":"#/components/schemas/TaskForwarderEmailConfig","description":"Email configuration with recipient addresses and templates"},"config_sensitive":{"additionalProperties":true,"type":"object","nullable":true,"title":"Config Sensitive","description":"Reserved for future sensitive email configuration"}},"type":"object","required":["id","project_id","created","modified","name","config"],"title":"EmailForwarderInDB"},"EmailForwarderUpdate":{"properties":{"name":{"type":"string","nullable":true,"title":"Name","description":"A descriptive name for the Task Forwarder."},"description":{"type":"string","nullable":true,"title":"Description","description":"Additional details about the Task Forwarder's purpose or configuration."},"forwarder_type":{"type":"string","title":"Forwarder Type","description":"Type of forwarder: email","default":"email"},"config":{"$ref":"#/components/schemas/TaskForwarderEmailConfig","nullable":true,"description":"Email configuration with recipient addresses and templates"},"config_sensitive":{"additionalProperties":true,"type":"object","nullable":true,"title":"Config Sensitive","description":"Reserved for future sensitive email configuration"}},"type":"object","title":"EmailForwarderUpdate"},"EmptyErrorDetails":{"properties":{},"type":"object","title":"EmptyErrorDetails"},"ExcludeModelByIdRequest":{"properties":{"model_id":{"type":"string","format":"uuid","title":"Model Id","description":"UUID of model to exclude"},"reason":{"type":"string","maxLength":500,"nullable":true,"title":"Reason","description":"Reason for exclusion"}},"type":"object","required":["model_id"],"title":"ExcludeModelByIdRequest","description":"Request to exclude a specific model by ID"},"ExcludeModelByProviderRequest":{"properties":{"provider":{"type":"string","maxLength":100,"minLength":1,"title":"Provider","description":"Provider name (e.g., 'OpenAI', 'Anthropic', 'Meta')"},"reason":{"type":"string","maxLength":500,"nullable":true,"title":"Reason","description":"Reason for exclusion"}},"type":"object","required":["provider"],"title":"ExcludeModelByProviderRequest","description":"Request to exclude all models from a provider"},"ExcludeModelByVendorRequest":{"properties":{"vendor":{"type":"string","maxLength":100,"minLength":1,"title":"Vendor","description":"Vendor name (e.g., 'openai', 'anthropic', 'google', 'groq')"},"reason":{"type":"string","maxLength":500,"nullable":true,"title":"Reason","description":"Reason for exclusion"}},"type":"object","required":["vendor"],"title":"ExcludeModelByVendorRequest","description":"Request to exclude all models from a vendor"},"ExtendTrialRequest":{"properties":{"duration_days":{"type":"integer","maximum":365.0,"exclusiveMinimum":true,"title":"Duration Days","description":"Number of days to extend the trial by","minimum":0.0}},"type":"object","required":["duration_days"],"title":"ExtendTrialRequest","description":"Request schema for extending organization trial period."},"ExtendTrialResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the trial extension was successful"},"trial_ends_at":{"type":"string","format":"date-time","nullable":true,"title":"Trial Ends At","description":"New trial end date (UTC)"},"message":{"type":"string","title":"Message","description":"Human-readable status message"}},"type":"object","required":["success","message"],"title":"ExtendTrialResponse","description":"Response schema for trial extension."},"FileInputMode":{"type":"string","enum":["none","image","pdf","image_or_pdf","any"],"title":"FileInputMode","description":"Defines what file types a task accepts for visual processing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HydraWebhookTokenHook":{"properties":{"session":{"$ref":"#/components/schemas/HydraWebhookTokenHookSession"}},"type":"object","required":["session"],"title":"HydraWebhookTokenHook"},"HydraWebhookTokenHookSession":{"properties":{"client_id":{"type":"string","title":"Client Id"},"id_token":{"$ref":"#/components/schemas/HydraWebhookTokenHookSessionIDTokenClaims"}},"type":"object","required":["client_id","id_token"],"title":"HydraWebhookTokenHookSession"},"HydraWebhookTokenHookSessionIDTokenClaims":{"properties":{"id_token_claims":{"additionalProperties":true,"type":"object","title":"Id Token Claims"}},"type":"object","required":["id_token_claims"],"title":"HydraWebhookTokenHookSessionIDTokenClaims"},"IAMMember":{"properties":{"member":{"type":"string","title":"Member","description":"The member identifier string, the format of which is '<subject_type>:<subject_id>'"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","description":"A list of roles that the member holds on an entity.\n\nSome entities, such as Organizations, may contain members that exist without any roles.","default":[]},"name":{"type":"string","nullable":true,"title":"Name","description":"The name of the member."},"avatar_url":{"type":"string","nullable":true,"title":"Avatar Url","description":"If avatar of the member, if it is supported by their subject type."},"total_subjects":{"type":"integer","title":"Total Subjects","description":"The total number of subjects that the member represents, which may be a value other than `1` if the member is not a User.","default":1}},"type":"object","required":["member"],"title":"IAMMember"},"IAMObjectErrorDetails":{"properties":{"type":{"type":"string","title":"Type"},"id":{"type":"string","nullable":true,"title":"Id"}},"type":"object","required":["type"],"title":"IAMObjectErrorDetails"},"IAMPermissionTest":{"properties":{"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"member":{"type":"string","nullable":true,"title":"Member"}},"type":"object","required":["permissions"],"title":"IAMPermissionTest"},"InitialComposeSection":{"properties":{"position":{"type":"integer","title":"Position"},"title":{"type":"string","title":"Title"},"ideas":{"items":{"type":"string"},"type":"array","nullable":true,"title":"Ideas"}},"type":"object","required":["position","title"],"title":"InitialComposeSection"},"InputConversationalGuardrailDefinition":{"properties":{"name":{"type":"string","enum":["prompt_policy","pii_policy"],"title":"Name"}},"type":"object","required":["name"],"title":"InputConversationalGuardrailDefinition"},"InputProcessor":{"properties":{"name":{"type":"string","title":"Input Processor Name","description":"The unique identifier/name of the input processor. Used to reference this processor in API calls.","example":"url_fetcher"},"description":{"type":"string","title":"Input Processor Description","description":"A human-readable description of what the input processor does.","example":"Fetches the HTML content for the provided site and replaces the URL with the fetched content."},"config_schema":{"additionalProperties":true,"type":"object","nullable":true,"title":"Configuration Schema","description":"JSON Schema describing the available configuration options for this processor. Null if the processor does not have a configuration schema.","example":{"additionalProperties":false,"properties":{"max_results":{"default":5,"description":"Number of search results to return","maximum":100,"minimum":1,"type":"integer"}},"type":"object"}}},"type":"object","required":["name","description"],"title":"InputProcessor","description":"Schema representing an input processor that can transform task inputs.","example":{"description":"Fetches the HTML content for the provided site and replaces the URL with the fetched content.","name":"url_fetcher"}},"InvalidMemberErrorDetails":{"properties":{"resource":{"$ref":"#/components/schemas/IAMObjectErrorDetails","nullable":true},"subject":{"$ref":"#/components/schemas/IAMObjectErrorDetails","nullable":true}},"type":"object","title":"InvalidMemberErrorDetails"},"InvalidMemberErrorResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human readable representation of the error"},"reason":{"type":"string","enum":["INVALID_MEMBER"],"title":"Reason","description":"The machine-readable error reason."},"invalidMemberError":{"$ref":"#/components/schemas/InvalidMemberErrorDetails","description":"Metadata detailing more information about the error."}},"type":"object","required":["message","reason","invalidMemberError"],"title":"InvalidMemberErrorResponse"},"InvalidRoleErrorDetails":{"properties":{"resource":{"$ref":"#/components/schemas/IAMObjectErrorDetails","nullable":true},"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"InvalidRoleErrorDetails"},"InvalidRoleErrorResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human readable representation of the error"},"reason":{"type":"string","enum":["INVALID_ROLE"],"title":"Reason","description":"The machine-readable error reason."},"invalidRoleError":{"$ref":"#/components/schemas/InvalidRoleErrorDetails","description":"Metadata detailing more information about the error."}},"type":"object","required":["message","reason","invalidRoleError"],"title":"InvalidRoleErrorResponse"},"InvalidSubjectTypeErrorDetails":{"properties":{"subject":{"$ref":"#/components/schemas/IAMObjectErrorDetails","nullable":true}},"type":"object","title":"InvalidSubjectTypeErrorDetails"},"InvalidSubjectTypeErrorResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human readable representation of the error"},"reason":{"type":"string","enum":["INVALID_SUBJECT_TYPE"],"title":"Reason","description":"The machine-readable error reason."},"invalidSubjectTypeError":{"$ref":"#/components/schemas/InvalidSubjectTypeErrorDetails","description":"Metadata detailing more information about the error."}},"type":"object","required":["message","reason","invalidSubjectTypeError"],"title":"InvalidSubjectTypeErrorResponse"},"InviteFilter":{"type":"string","enum":["all","pending","accepted"],"title":"InviteFilter"},"KratosIdentity":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"traits":{"$ref":"#/components/schemas/KratosIdentityTraits","nullable":true}},"additionalProperties":true,"type":"object","required":["id","traits"],"title":"KratosIdentity"},"KratosIdentityTraits":{"properties":{"email":{"type":"string","format":"email","nullable":true,"title":"Email"},"name":{"type":"string","nullable":true,"title":"Name"},"avatar_url":{"type":"string","nullable":true,"title":"Avatar Url"},"project_id":{"type":"string","format":"uuid","nullable":true,"title":"Project Id"},"org_id":{"type":"string","format":"uuid","nullable":true,"title":"Org Id"},"sso_email_verified":{"type":"boolean","nullable":true,"title":"Sso Email Verified"}},"additionalProperties":true,"type":"object","title":"KratosIdentityTraits"},"KratosWebhook":{"properties":{"identity_id":{"type":"string","format":"uuid","title":"Identity Id"},"email":{"type":"string","format":"email","nullable":true,"title":"Email"},"bio":{"type":"string","nullable":true,"title":"Bio"},"flow_id":{"type":"string","format":"uuid","nullable":true,"title":"Flow Id"},"flow_type":{"type":"string","nullable":true,"title":"Flow Type"},"identity":{"$ref":"#/components/schemas/KratosIdentity","nullable":true},"ctx":{"additionalProperties":true,"type":"object","nullable":true,"title":"Ctx"}},"type":"object","required":["identity_id"],"title":"KratosWebhook"},"KratosWebhookDetailedMessage":{"properties":{"id":{"type":"integer","title":"Id"},"text":{"type":"string","title":"Text"},"type":{"type":"string","enum":["info","error","success","validation"],"title":"Type"},"context":{"nullable":true,"title":"Context"}},"type":"object","required":["id","text","type"],"title":"KratosWebhookDetailedMessage","description":"Sourced from detailedMessage in:\nhttps://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go"},"KratosWebhookErrorMessage":{"properties":{"instance_ptr":{"type":"string","title":"Instance Ptr"},"messages":{"items":{"$ref":"#/components/schemas/KratosWebhookDetailedMessage"},"type":"array","title":"Messages","default":[]}},"type":"object","required":["instance_ptr"],"title":"KratosWebhookErrorMessage","description":"Sourced from errorMessage in:\nhttps://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go"},"KratosWebhookResponse":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/KratosWebhookErrorMessage"},"type":"array","nullable":true,"title":"Messages"},"identity":{"anyOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/KratosIdentity"}],"title":"Identity","nullable":true}},"type":"object","title":"KratosWebhookResponse","description":"Sourced from rawHookResponse in:\nhttps://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go"},"LLMModel":{"properties":{"provider":{"type":"string","title":"Provider","description":"The company that produces the LLM (e.g., OpenAI, Anthropic, Meta).","example":"OpenAI"},"vendor":{"type":"string","title":"Vendor","description":"The service provider or platform hosting the model (e.g., OpenAI, Azure, Groq).","example":"openai"},"name":{"type":"string","title":"Name","description":"The model's reference name used for API calls.","example":"gpt-4-turbo-preview"},"alias":{"type":"string","title":"Alias","description":"Human-readable name for the model.","example":"GPT-4 Turbo"},"description":{"type":"string","title":"Description","description":"Detailed description of the model's capabilities, context window, and knowledge cutoff.","example":"Latest GPT-4 model with 128k context window and knowledge cutoff of December 2023."},"supports_vision":{"type":"boolean","title":"Supports Vision","description":"Whether the model can process and analyze images.","example":true},"supports_image_output":{"type":"boolean","title":"Supports Image Output","description":"Whether the model can generate images as output.","default":false,"example":false},"supports_pdf_vision":{"type":"boolean","title":"Supports Pdf Vision","description":"Whether the model can process PDFs as visual input.","default":false,"example":true},"pdf_vision_config":{"$ref":"#/components/schemas/PDFVisionConfig","nullable":true,"description":"Configuration limits for PDF vision processing."},"max_context_window":{"type":"integer","minimum":0.0,"title":"Max Context Window","description":"Maximum number of tokens the model can process in a single request.","example":128000},"model_params":{"additionalProperties":true,"type":"object","nullable":true,"title":"Model Params","description":"JSON Schema defining allowed model parameters for this model. Each parameter name maps to a JSON Schema specification defining its type, constraints, and validation rules.","example":{"max_tokens":{"description":"Maximum number of tokens to generate","maximum":4096,"minimum":1,"type":"integer"},"temperature":{"description":"Controls randomness in outputs","maximum":2.0,"minimum":0.0,"type":"number"}}},"created":{"type":"string","nullable":true,"title":"Created"},"modified":{"type":"string","nullable":true,"title":"Modified"},"id":{"type":"string","format":"uuid","title":"Id"},"replaced_by":{"type":"string","format":"uuid","nullable":true,"title":"Replaced By"},"retired":{"type":"string","nullable":true,"title":"Retired"},"llm_model_comments":{"items":{"$ref":"#/components/schemas/LLMModelComment"},"type":"array","title":"Llm Model Comments","default":[]}},"type":"object","required":["provider","vendor","name","alias","description","supports_vision","max_context_window","id"],"title":"LLMModel","example":{"alias":"GPT-4 Turbo","created":"2024-01-16T13:33:25.247662","description":"Latest GPT-4 model with 128k context window and knowledge cutoff of December 2023.","id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","max_context_window":128000,"model_params":{"temperature":{"description":"Controls randomness in outputs","maximum":2.0,"minimum":0.0,"type":"number"}},"modified":"2024-01-16T13:33:25.247662","name":"gpt-4-turbo-preview","provider":"OpenAI","replaced_by":"0190a234-8dc6-6d08-aea9-928fcecad8f2","retired":"2024-01-16T13:33:25.247662","supports_image_output":false,"supports_vision":true,"vendor":"openai"}},"LLMModelComment":{"properties":{"title":{"type":"string","maxLength":255,"title":"Title","description":"Brief title for the comment.","example":"Performance Issue"},"description":{"type":"string","title":"Description","description":"Detailed description of the comment or observation.","example":"Model exhibits inconsistent response quality with complex reasoning tasks."},"active":{"type":"boolean","title":"Active","description":"Whether this comment is currently active/relevant.","default":true,"example":true},"created":{"type":"string","nullable":true,"title":"Created","description":"When this comment was created."},"modified":{"type":"string","nullable":true,"title":"Modified","description":"When this comment was last modified."},"id":{"type":"string","format":"uuid","title":"Id"},"llm_model_id":{"type":"string","format":"uuid","title":"Llm Model Id"}},"type":"object","required":["title","description","id","llm_model_id"],"title":"LLMModelComment","example":{"active":true,"created":"2024-01-16T13:33:25.247662","description":"Model exhibits inconsistent response quality with complex reasoning tasks.","id":"0190a234-8dc6-6d08-aea9-928fcecad8f5","llm_model_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","modified":"2024-01-16T13:33:25.247662","title":"Performance Issue"}},"LLMModelCommentCreate":{"properties":{"title":{"type":"string","maxLength":255,"title":"Title","description":"Brief title for the comment.","example":"Performance Issue"},"description":{"type":"string","title":"Description","description":"Detailed description of the comment or observation.","example":"Model exhibits inconsistent response quality with complex reasoning tasks."},"active":{"type":"boolean","title":"Active","description":"Whether this comment is currently active/relevant.","default":true,"example":true},"created":{"type":"string","format":"date-time","nullable":true,"title":"Created","description":"When this comment was created."},"modified":{"type":"string","format":"date-time","nullable":true,"title":"Modified","description":"When this comment was last modified."}},"type":"object","required":["title","description"],"title":"LLMModelCommentCreate","example":{"active":true,"created":"2024-01-16T13:33:25.247662","description":"Model exhibits inconsistent response quality with complex reasoning tasks.","id":"0190a234-8dc6-6d08-aea9-928fcecad8f5","llm_model_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","modified":"2024-01-16T13:33:25.247662","title":"Performance Issue"}},"LLMModelCommentUpdate":{"properties":{"title":{"type":"string","maxLength":255,"nullable":true,"title":"Title"},"description":{"type":"string","nullable":true,"title":"Description"},"active":{"type":"boolean","nullable":true,"title":"Active"}},"type":"object","title":"LLMModelCommentUpdate"},"LLMModelCost":{"properties":{"input_token_cost":{"type":"number","title":"Input Token Cost","description":"Cost per input token in USD (e.g., $0.0000025 per token).","example":2.5e-06},"output_token_cost":{"type":"number","title":"Output Token Cost","description":"Cost per output token in USD (e.g., $0.000010 per token).","example":1e-05},"live_from":{"type":"string","title":"Live From","description":"When these costs become effective.","example":"2024-01-16T13:33:25.247662"},"created":{"type":"string","nullable":true,"title":"Created","description":"When this cost record was created."},"modified":{"type":"string","nullable":true,"title":"Modified","description":"When this cost record was last modified."},"id":{"type":"string","format":"uuid","title":"Id"},"llm_model_id":{"type":"string","format":"uuid","title":"Llm Model Id"}},"type":"object","required":["input_token_cost","output_token_cost","live_from","id","llm_model_id"],"title":"LLMModelCost","example":{"created":"2024-01-16T13:33:25.247662","id":"0190a234-8dc6-6d08-aea9-928fcecad8f4","input_token_cost":2.5e-06,"live_from":"2024-01-16T13:33:25.247662","llm_model_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","modified":"2024-01-16T13:33:25.247662","output_token_cost":1e-05}},"LLMModelCostCreate":{"properties":{"input_token_cost":{"type":"number","title":"Input Token Cost","description":"Cost per input token in USD (e.g., $0.0000025 per token).","example":2.5e-06},"output_token_cost":{"type":"number","title":"Output Token Cost","description":"Cost per output token in USD (e.g., $0.000010 per token).","example":1e-05},"live_from":{"type":"string","format":"date-time","title":"Live From","description":"When these costs become effective.","example":"2024-01-16T13:33:25.247662"},"created":{"type":"string","format":"date-time","nullable":true,"title":"Created","description":"When this cost record was created."},"modified":{"type":"string","format":"date-time","nullable":true,"title":"Modified","description":"When this cost record was last modified."}},"type":"object","required":["input_token_cost","output_token_cost","live_from"],"title":"LLMModelCostCreate","example":{"created":"2024-01-16T13:33:25.247662","id":"0190a234-8dc6-6d08-aea9-928fcecad8f4","input_token_cost":2.5e-06,"live_from":"2024-01-16T13:33:25.247662","llm_model_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","modified":"2024-01-16T13:33:25.247662","output_token_cost":1e-05}},"LLMModelCreate":{"properties":{"provider":{"type":"string","title":"Provider","description":"The company that produces the LLM (e.g., OpenAI, Anthropic, Meta).","example":"OpenAI"},"vendor":{"type":"string","title":"Vendor","description":"The service provider or platform hosting the model (e.g., OpenAI, Azure, Groq).","example":"openai"},"name":{"type":"string","title":"Name","description":"The model's reference name used for API calls.","example":"gpt-4-turbo-preview"},"alias":{"type":"string","title":"Alias","description":"Human-readable name for the model.","example":"GPT-4 Turbo"},"description":{"type":"string","title":"Description","description":"Detailed description of the model's capabilities, context window, and knowledge cutoff.","example":"Latest GPT-4 model with 128k context window and knowledge cutoff of December 2023."},"supports_vision":{"type":"boolean","title":"Supports Vision","description":"Whether the model can process and analyze images.","example":true},"supports_image_output":{"type":"boolean","title":"Supports Image Output","description":"Whether the model can generate images as output.","default":false,"example":false},"supports_pdf_vision":{"type":"boolean","title":"Supports Pdf Vision","description":"Whether the model can process PDFs as visual input.","default":false,"example":true},"pdf_vision_config":{"$ref":"#/components/schemas/PDFVisionConfig","nullable":true,"description":"Configuration limits for PDF vision processing."},"max_context_window":{"type":"integer","minimum":0.0,"title":"Max Context Window","description":"Maximum number of tokens the model can process in a single request.","example":128000},"model_params":{"additionalProperties":true,"type":"object","nullable":true,"title":"Model Params","description":"JSON Schema defining allowed model parameters for this model. Each parameter name maps to a JSON Schema specification defining its type, constraints, and validation rules.","example":{"max_tokens":{"description":"Maximum number of tokens to generate","maximum":4096,"minimum":1,"type":"integer"},"temperature":{"description":"Controls randomness in outputs","maximum":2.0,"minimum":0.0,"type":"number"}}},"created":{"type":"string","format":"date-time","nullable":true,"title":"Created"},"modified":{"type":"string","format":"date-time","nullable":true,"title":"Modified"}},"type":"object","required":["provider","vendor","name","alias","description","supports_vision","max_context_window"],"title":"LLMModelCreate","example":{"alias":"GPT-4 Turbo","created":"2024-01-16T13:33:25.247662","description":"Latest GPT-4 model with 128k context window and knowledge cutoff of December 2023.","id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","max_context_window":128000,"model_params":{"temperature":{"description":"Controls randomness in outputs","maximum":2.0,"minimum":0.0,"type":"number"}},"modified":"2024-01-16T13:33:25.247662","name":"gpt-4-turbo-preview","provider":"OpenAI","replaced_by":"0190a234-8dc6-6d08-aea9-928fcecad8f2","retired":"2024-01-16T13:33:25.247662","supports_image_output":false,"supports_vision":true,"vendor":"openai"}},"LLMModelInternalUpdate":{"properties":{"provider":{"type":"string","nullable":true,"title":"Provider"},"vendor":{"type":"string","nullable":true,"title":"Vendor"},"name":{"type":"string","nullable":true,"title":"Name"},"alias":{"type":"string","nullable":true,"title":"Alias"},"supports_vision":{"type":"boolean","nullable":true,"title":"Supports Vision"},"supports_image_output":{"type":"boolean","nullable":true,"title":"Supports Image Output"},"supports_pdf_vision":{"type":"boolean","nullable":true,"title":"Supports Pdf Vision"},"pdf_vision_config":{"$ref":"#/components/schemas/PDFVisionConfig","nullable":true},"max_context_window":{"type":"integer","nullable":true,"title":"Max Context Window"},"model_params":{"additionalProperties":true,"type":"object","nullable":true,"title":"Model Params"},"description":{"type":"string","nullable":true,"title":"Description"},"retired":{"type":"boolean","nullable":true,"title":"Retired"},"replace_with":{"type":"string","format":"uuid","nullable":true,"title":"Replace With"},"trigger_new_revisions_globally":{"type":"boolean","nullable":true,"title":"Trigger New Revisions Globally","description":"When true and retiring with a replacement model, creates new task revisions for all active tasks using the retired model. This should only be used in emergency scenarios (security/ToS issues).","default":false}},"type":"object","title":"LLMModelInternalUpdate"},"LLMModelInternalView":{"properties":{"provider":{"type":"string","title":"Provider","description":"The company that produces the LLM (e.g., OpenAI, Anthropic, Meta).","example":"OpenAI"},"vendor":{"type":"string","title":"Vendor","description":"The service provider or platform hosting the model (e.g., OpenAI, Azure, Groq).","example":"openai"},"name":{"type":"string","title":"Name","description":"The model's reference name used for API calls.","example":"gpt-4-turbo-preview"},"alias":{"type":"string","title":"Alias","description":"Human-readable name for the model.","example":"GPT-4 Turbo"},"description":{"type":"string","title":"Description","description":"Detailed description of the model's capabilities, context window, and knowledge cutoff.","example":"Latest GPT-4 model with 128k context window and knowledge cutoff of December 2023."},"supports_vision":{"type":"boolean","title":"Supports Vision","description":"Whether the model can process and analyze images.","example":true},"supports_image_output":{"type":"boolean","title":"Supports Image Output","description":"Whether the model can generate images as output.","default":false,"example":false},"supports_pdf_vision":{"type":"boolean","title":"Supports Pdf Vision","description":"Whether the model can process PDFs as visual input.","default":false,"example":true},"pdf_vision_config":{"$ref":"#/components/schemas/PDFVisionConfig","nullable":true,"description":"Configuration limits for PDF vision processing."},"max_context_window":{"type":"integer","minimum":0.0,"title":"Max Context Window","description":"Maximum number of tokens the model can process in a single request.","example":128000},"model_params":{"additionalProperties":true,"type":"object","nullable":true,"title":"Model Params","description":"JSON Schema defining allowed model parameters for this model. Each parameter name maps to a JSON Schema specification defining its type, constraints, and validation rules.","example":{"max_tokens":{"description":"Maximum number of tokens to generate","maximum":4096,"minimum":1,"type":"integer"},"temperature":{"description":"Controls randomness in outputs","maximum":2.0,"minimum":0.0,"type":"number"}}},"created":{"type":"string","nullable":true,"title":"Created"},"modified":{"type":"string","nullable":true,"title":"Modified"},"id":{"type":"string","format":"uuid","title":"Id"},"replaced_by":{"type":"string","format":"uuid","nullable":true,"title":"Replaced By"},"llm_model_costs":{"items":{"$ref":"#/components/schemas/LLMModelCost"},"type":"array","title":"Llm Model Costs"},"retired":{"type":"string","nullable":true,"title":"Retired"}},"type":"object","required":["provider","vendor","name","alias","description","supports_vision","max_context_window","id","llm_model_costs"],"title":"LLMModelInternalView","example":{"alias":"GPT-4 Turbo","created":"2024-01-16T13:33:25.247662","description":"Latest GPT-4 model with 128k context window and knowledge cutoff of December 2023.","id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","max_context_window":128000,"model_params":{"temperature":{"description":"Controls randomness in outputs","maximum":2.0,"minimum":0.0,"type":"number"}},"modified":"2024-01-16T13:33:25.247662","name":"gpt-4-turbo-preview","provider":"OpenAI","replaced_by":"0190a234-8dc6-6d08-aea9-928fcecad8f2","retired":"2024-01-16T13:33:25.247662","supports_image_output":false,"supports_vision":true,"vendor":"openai"}},"MalformedResourceIdentifierErrorDetails":{"properties":{"field":{"type":"string","title":"Field"},"value":{"title":"Value"},"expected_format":{"type":"string","title":"Expected Format"}},"type":"object","required":["field","value","expected_format"],"title":"MalformedResourceIdentifierErrorDetails"},"MalformedResourceIdentifierErrorResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human readable representation of the error"},"reason":{"type":"string","enum":["MALFORMED_RESOURCE_IDENTIFIER"],"title":"Reason","description":"The machine-readable error reason."},"malformedResourceIdentifierError":{"$ref":"#/components/schemas/MalformedResourceIdentifierErrorDetails","description":"Metadata detailing more information about the error."}},"type":"object","required":["message","reason","malformedResourceIdentifierError"],"title":"MalformedResourceIdentifierErrorResponse"},"McpDiscoveredTool":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","nullable":true,"title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","nullable":true,"title":"Input Schema"}},"type":"object","required":["name"],"title":"McpDiscoveredTool"},"McpRun":{"properties":{"method":{"type":"string","maxLength":64,"minLength":1,"title":"Method","description":"MCP method name"},"request_id":{"type":"string","maxLength":255,"nullable":true,"title":"Request Id","description":"JSON-RPC request ID"},"protocol_version":{"type":"string","maxLength":32,"nullable":true,"title":"Protocol Version","description":"MCP protocol version"},"request":{"additionalProperties":true,"type":"object","title":"Request","description":"Request data"},"response":{"additionalProperties":true,"type":"object","title":"Response","description":"Response data"},"duration_ms":{"type":"integer","minimum":0.0,"nullable":true,"title":"Duration Ms","description":"Duration in milliseconds"},"sse_event":{"type":"boolean","title":"Sse Event","description":"Whether this is a server-sent event","default":false},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique identifier for the MCP run"},"mcp_server_id":{"type":"string","format":"uuid","title":"Mcp Server Id","description":"MCP server ID"},"created":{"type":"string","title":"Created","description":"Timestamp when the MCP run was created"},"modified":{"type":"string","title":"Modified","description":"Timestamp when the MCP run was last modified"}},"type":"object","required":["method","request","response","id","mcp_server_id","created","modified"],"title":"McpRun","description":"Complete MCP Run schema for API responses."},"McpRunCreate":{"properties":{"method":{"type":"string","maxLength":64,"minLength":1,"title":"Method","description":"MCP method name"},"request_id":{"type":"string","maxLength":255,"nullable":true,"title":"Request Id","description":"JSON-RPC request ID"},"protocol_version":{"type":"string","maxLength":32,"nullable":true,"title":"Protocol Version","description":"MCP protocol version"},"request":{"additionalProperties":true,"type":"object","title":"Request","description":"Request data"},"response":{"additionalProperties":true,"type":"object","title":"Response","description":"Response data"},"duration_ms":{"type":"integer","minimum":0.0,"nullable":true,"title":"Duration Ms","description":"Duration in milliseconds"},"sse_event":{"type":"boolean","title":"Sse Event","description":"Whether this is a server-sent event","default":false},"mcp_server_id":{"type":"string","format":"uuid","title":"Mcp Server Id","description":"MCP server ID"}},"type":"object","required":["method","request","response","mcp_server_id"],"title":"McpRunCreate","description":"Attributes to create an instance of McpRun."},"McpRunInternalBatchCreate":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/McpRunInternalCreate"},"type":"array","title":"Runs","description":"List of MCP runs to create"}},"type":"object","required":["runs"],"title":"McpRunInternalBatchCreate","description":"Schema for batch creating MCP runs from internal services with optional created timestamps."},"McpRunInternalCreate":{"properties":{"method":{"type":"string","maxLength":64,"minLength":1,"title":"Method","description":"MCP method name"},"request_id":{"type":"string","maxLength":255,"nullable":true,"title":"Request Id","description":"JSON-RPC request ID"},"protocol_version":{"type":"string","maxLength":32,"nullable":true,"title":"Protocol Version","description":"MCP protocol version"},"request":{"additionalProperties":true,"type":"object","title":"Request","description":"Request data"},"response":{"additionalProperties":true,"type":"object","title":"Response","description":"Response data"},"duration_ms":{"type":"integer","minimum":0.0,"nullable":true,"title":"Duration Ms","description":"Duration in milliseconds"},"sse_event":{"type":"boolean","title":"Sse Event","description":"Whether this is a server-sent event","default":false},"mcp_server_id":{"type":"string","format":"uuid","title":"Mcp Server Id","description":"MCP server ID"},"created":{"type":"string","format":"date-time","nullable":true,"title":"Created","description":"Timestamp when the MCP run was created"}},"type":"object","required":["method","request","response","mcp_server_id"],"title":"McpRunInternalCreate","description":"Attributes to create an instance of McpRun from internal services with optional created timestamp."},"McpServer":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"MCP server name"},"description":{"type":"string","nullable":true,"title":"Description","description":"Description of the MCP server"},"url":{"type":"string","maxLength":255,"minLength":1,"title":"Url","description":"Root URL of the MCP server"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique identifier for the MCP server"},"short_id":{"type":"string","maxLength":8,"title":"Short Id","description":"Short identifier for the MCP server"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project ID this MCP server belongs to"},"syncd":{"type":"boolean","title":"Syncd","description":"Whether the server has been sync'd to external proxy"},"created":{"type":"string","title":"Created","description":"Timestamp when the MCP server was created"},"modified":{"type":"string","title":"Modified","description":"Timestamp when the MCP server was last modified"}},"type":"object","required":["name","url","id","short_id","project_id","syncd","created","modified"],"title":"McpServer","description":"Complete MCP Server schema for API responses."},"McpServerCreate":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"MCP server name"},"description":{"type":"string","nullable":true,"title":"Description","description":"Description of the MCP server"},"url":{"type":"string","maxLength":255,"minLength":1,"title":"Url","description":"Root URL of the MCP server"}},"type":"object","required":["name","url"],"title":"McpServerCreate","description":"Attributes a user can submit to create an instance of McpServer."},"McpServerDiscoveryRequest":{"properties":{"server_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Server Url"},"auth_session_id":{"type":"string","nullable":true,"title":"Auth Session Id"}},"type":"object","required":["server_url"],"title":"McpServerDiscoveryRequest"},"McpServerDiscoveryResponse":{"properties":{"server_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Server Url"},"canonical_resource":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Canonical Resource"},"tools":{"items":{"$ref":"#/components/schemas/McpDiscoveredTool"},"type":"array","title":"Tools"}},"type":"object","required":["server_url","canonical_resource","tools"],"title":"McpServerDiscoveryResponse"},"McpServerUpdate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"nullable":true,"title":"Name","description":"MCP server name"},"description":{"type":"string","nullable":true,"title":"Description","description":"Description of the MCP server"},"url":{"type":"string","maxLength":255,"minLength":1,"nullable":true,"title":"Url","description":"Root URL of the MCP server"}},"type":"object","title":"McpServerUpdate","description":"Attributes a user can update."},"MissingAuthenticationErrorResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human readable representation of the error"},"reason":{"type":"string","enum":["MISSING_AUTHENTICATION"],"title":"Reason","description":"The machine-readable error reason."},"missingAuthenticationError":{"$ref":"#/components/schemas/EmptyErrorDetails","description":"Metadata detailing more information about the error."}},"type":"object","required":["message","reason","missingAuthenticationError"],"title":"MissingAuthenticationErrorResponse"},"ModelConfiguration":{"properties":{"exclusion_rules":{"items":{"$ref":"#/components/schemas/ModelExclusionRule"},"type":"array","title":"Exclusion Rules","description":"Rules defining which models are excluded"},"default_model_id":{"type":"string","format":"uuid","nullable":true,"title":"Default Model Id","description":"Default model to use (future functionality)"},"model_preferences":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Model Preferences","description":"Per-model configuration preferences (future functionality)"}},"type":"object","title":"ModelConfiguration","description":"Model management configuration for organizations and projects.\n\nStores exclusion rules and future configuration options like\ndefault models and per-model preferences."},"ModelExclusionRule":{"properties":{"rule_type":{"type":"string","enum":["model_id","provider","vendor"],"title":"Rule Type","description":"Type of exclusion rule"},"model_id":{"type":"string","format":"uuid","nullable":true,"title":"Model Id","description":"Specific model ID to exclude"},"provider":{"type":"string","nullable":true,"title":"Provider","description":"Provider name to exclude all models from"},"vendor":{"type":"string","nullable":true,"title":"Vendor","description":"Vendor name to exclude all models from"},"excluded_at":{"type":"string","format":"date-time","title":"Excluded At","description":"When this exclusion was created"},"excluded_by_user_id":{"type":"string","format":"uuid","nullable":true,"title":"Excluded By User Id","description":"User who created this exclusion"},"reason":{"type":"string","maxLength":500,"nullable":true,"title":"Reason","description":"Reason for exclusion"}},"type":"object","required":["rule_type","excluded_at"],"title":"ModelExclusionRule","description":"A rule defining which models to exclude.\n\nRules can exclude by:\n- model_id: Specific model\n- provider: All models from a provider (e.g., \"OpenAI\", \"Anthropic\")\n- vendor: All models from a vendor (e.g., \"openai\", \"google\", \"groq\")"},"ModelExclusionRuleResponse":{"properties":{"rule_type":{"type":"string","enum":["model_id","provider","vendor"],"title":"Rule Type"},"model_id":{"type":"string","format":"uuid","nullable":true,"title":"Model Id"},"provider":{"type":"string","nullable":true,"title":"Provider"},"vendor":{"type":"string","nullable":true,"title":"Vendor"},"excluded_at":{"type":"string","format":"date-time","title":"Excluded At"},"excluded_by_user_id":{"type":"string","format":"uuid","nullable":true,"title":"Excluded By User Id"},"reason":{"type":"string","nullable":true,"title":"Reason"},"affected_model_count":{"type":"integer","title":"Affected Model Count","description":"Number of models currently affected by this rule"},"affected_models":{"items":{"type":"string"},"type":"array","title":"Affected Models","description":"Names (aliases) of affected models (limited to first 10)"}},"type":"object","required":["rule_type","excluded_at","affected_model_count"],"title":"ModelExclusionRuleResponse","description":"Response showing an exclusion rule with computed impact.\n\nIncludes which models are currently affected by this rule."},"MultipleRolesNotAllowedErrorDetails":{"properties":{"resource":{"$ref":"#/components/schemas/IAMObjectErrorDetails","nullable":true},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"}},"type":"object","required":["roles"],"title":"MultipleRolesNotAllowedErrorDetails"},"MultipleRolesNotAllowedErrorResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human readable representation of the error"},"reason":{"type":"string","enum":["MULTIPLE_ROLES_NOT_ALLOWED"],"title":"Reason","description":"The machine-readable error reason."},"multipleRolesNotAllowedError":{"$ref":"#/components/schemas/MultipleRolesNotAllowedErrorDetails","description":"Metadata detailing more information about the error."}},"type":"object","required":["message","reason","multipleRolesNotAllowedError"],"title":"MultipleRolesNotAllowedErrorResponse"},"OAuthClient":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique identifier for the OAuth client.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"name":{"type":"string","title":"Name","description":"Human-readable name for the OAuth client.","example":"Production API Client"},"description":{"type":"string","nullable":true,"title":"Description","description":"Optional description explaining the client's purpose and usage.","example":"OAuth client for production API access"},"redirect_uris":{"items":{"type":"string"},"type":"array","nullable":true,"title":"Redirect Uris","description":"List of authorized redirect URIs for OAuth flows requiring user interaction.\nRequired for authorization code and implicit flows.\nMust be exact matches when used.\nMust use HTTPS in production (except for localhost).","example":["https://app.example.com/oauth/callback"]},"grant_types":{"items":{"$ref":"#/components/schemas/OAuthClientGrantType"},"type":"array","nullable":true,"title":"Grant Types","description":"OAuth 2.0 grant types enabled for this client.\n- client_credentials: For server-to-server API access\n- authorization_code: For web and mobile apps\n- refresh_token: For maintaining long-term access\n- implicit: Legacy flow, not recommended for new applications","example":["client_credentials","refresh_token"]},"client_id":{"type":"string","format":"uuid","title":"Client Id","description":"Unique identifier used to identify the client with the authorization server.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f2"},"client_secret":{"type":"string","nullable":true,"title":"Client Secret","description":"Secret key used to authenticate the client.\nOnly shown once upon creation.\nMust be stored securely.\nRequired for confidential clients (e.g., server applications).","example":"client_secret_shown_only_once"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"ID of the project this OAuth client belongs to.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f3"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","none"],"title":"Token Endpoint Auth Method","description":"Authentication method enabled for the client:\n- client_secret_basic: Client ID and secret sent in HTTP headers\n- client_secret_post: Client ID and secret sent in request body\n- none: No client authentication (required for public clients using PKCE)","default":"client_secret_basic","example":"client_secret_basic"},"pkce_required":{"type":"boolean","title":"Pkce Required","description":"Whether PKCE (Proof Key for Code Exchange) is required for this client.\nWhen enabled, authorization code flows must include code_challenge and code_verifier.\nRecommended for public clients (mobile apps, SPAs) and enhances security for all clients.","default":false,"example":true},"pkce_challenge_method":{"$ref":"#/components/schemas/OAuthClientPKCEChallengeMethod","nullable":true,"description":"PKCE code challenge method when PKCE is enabled.\n- S256: SHA256 hash of code verifier (recommended and secure)\n- plain: Plain text code verifier (not recommended, only for testing)","default":"S256","example":"S256"},"created":{"type":"string","title":"Created","description":"Timestamp when the OAuth client was created.","example":"2024-01-15T09:30:00Z"},"modified":{"type":"string","title":"Modified","description":"Timestamp when the OAuth client was last modified.","example":"2024-01-15T09:30:00Z"},"deleted":{"type":"string","nullable":true,"title":"Deleted","description":"Timestamp when the OAuth client was deleted, if applicable.","example":"2024-01-15T09:30:00Z"}},"type":"object","required":["id","name","client_id","project_id","created","modified"],"title":"OAuthClient"},"OAuthClientAccessTokenType":{"type":"string","enum":["opaque","jwt"],"title":"OAuthClientAccessTokenType","description":"Type of access token issued to the client."},"OAuthClientCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"nullable":true,"title":"Name","description":"Name for the new OAuth client. Must be between 1 and 255 characters. Optional for predefined profiles.","example":"Production API Client"},"profile":{"$ref":"#/components/schemas/OAuthClientProfile","description":"Client profile type that determines behavior and capabilities.\nUsually USER_DEFINED for custom clients.","default":"user_defined","example":"user_defined"},"redirect_uris":{"items":{"type":"string"},"type":"array","nullable":true,"title":"Redirect Uris","description":"List of authorized callback URLs for OAuth flows.\nRequired if using authorization_code or implicit grant types.","example":["https://app.example.com/oauth/callback"]},"scopes":{"type":"string","maxLength":255,"minLength":0,"title":"Scopes","description":"Space-separated list of requested OAuth scopes.\nDefault is empty string for minimal access.","default":"","example":"read write"},"access_token_type":{"$ref":"#/components/schemas/OAuthClientAccessTokenType","description":"Type of access token to issue:\n- opaque: Non-transparent token requiring validation\n- jwt: Self-contained JSON Web Token","default":"opaque","example":"opaque"},"grant_types":{"items":{"$ref":"#/components/schemas/OAuthClientGrantType"},"type":"array","nullable":true,"title":"Grant Types","description":"List of OAuth grant types to enable.\nChoose based on your application type and security requirements.","example":["client_credentials","refresh_token"]},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","none"],"title":"Token Endpoint Auth Method","description":"Authentication method enabled for the client:\n- client_secret_basic: Client ID and secret sent in HTTP headers\n- client_secret_post: Client ID and secret sent in request body\n- none: No client authentication (required for public clients using PKCE)","default":"client_secret_basic","example":"client_secret_basic"},"pkce_required":{"type":"boolean","title":"Pkce Required","description":"Whether to require PKCE (Proof Key for Code Exchange) for authorization code flows.\nPKCE adds security by requiring a code_challenge and code_verifier.\nIMPORTANT: Only applicable when 'authorization_code' is included in grant_types.\nHighly recommended for public clients (mobile apps, SPAs) and beneficial for all clients.","default":false,"example":true},"pkce_challenge_method":{"$ref":"#/components/schemas/OAuthClientPKCEChallengeMethod","description":"PKCE code challenge method when PKCE is enabled.\n- S256: SHA256 hash of code verifier (recommended and secure)\n- plain: Plain text code verifier (not recommended, only for testing)","default":"S256","example":"S256"}},"type":"object","title":"OAuthClientCreate"},"OAuthClientCreateResponse":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the created OAuth client.","example":"Production API Client"},"description":{"type":"string","nullable":true,"title":"Description","description":"Description of the client's purpose.","default":"","example":"OAuth client for production API access"},"redirect_uris":{"items":{"type":"string"},"type":"array","title":"Redirect Uris","description":"Configured redirect URIs for OAuth flows.","example":["https://app.example.com/oauth/callback"]},"client_id":{"type":"string","format":"uuid","title":"Client Id","description":"Generated client identifier.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"client_secret":{"type":"string","nullable":true,"title":"Client Secret","description":"Generated client secret.\nIMPORTANT: This is the only time the secret will be shown.\nStore it securely.","example":"client_secret_shown_only_once"},"scopes":{"type":"string","title":"Scopes","description":"Granted OAuth scopes.","default":"","example":"offline_access"},"grant_types":{"items":{"$ref":"#/components/schemas/OAuthClientGrantType"},"type":"array","nullable":true,"title":"Grant Types","description":"Enabled OAuth grant types.","example":["client_credentials","refresh_token"]}},"type":"object","required":["name","redirect_uris","client_id"],"title":"OAuthClientCreateResponse"},"OAuthClientGrantType":{"type":"string","enum":["client_credentials","refresh_token","implicit","authorization_code"],"title":"OAuthClientGrantType","description":"OAuth 2.0 grant types supported by the client."},"OAuthClientPKCEChallengeMethod":{"type":"string","enum":["S256","plain"],"title":"OAuthClientPKCEChallengeMethod","description":"PKCE code challenge methods supported."},"OAuthClientProfile":{"type":"string","enum":["rightbrain_docs","rightbrain_tasks","user_defined","zendesk","user_api_keys","dynamic"],"title":"OAuthClientProfile","description":"Profile type that determines the OAuth client's behavior and capabilities."},"OAuthClientRegenerateSecretResponse":{"properties":{"client_secret":{"type":"string","nullable":true,"title":"Client Secret","description":"Generated client secret.\nIMPORTANT: This is the only time the secret will be shown.\nStore it securely.","example":"client_secret_shown_only_once"}},"type":"object","title":"OAuthClientRegenerateSecretResponse"},"OAuthClientUpdate":{"properties":{"redirect_uris":{"items":{"type":"string"},"type":"array","minItems":1,"nullable":true,"title":"Redirect Uris","description":"Updated list of authorized redirect URIs.\nAll existing URIs will be replaced with this list.","example":["https://app.example.com/oauth/callback","https://backup.example.com/callback"]},"grant_types":{"items":{"$ref":"#/components/schemas/OAuthClientGrantType"},"type":"array","nullable":true,"title":"Grant Types","description":"Updated list of enabled grant types.\nAll existing grant types will be replaced with this list.","example":["authorization_code","refresh_token"]},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","none"],"nullable":true,"title":"Token Endpoint Auth Method","description":"Updated authentication method for the token endpoint.","example":"client_secret_basic"},"pkce_required":{"type":"boolean","nullable":true,"title":"Pkce Required","description":"Whether to require PKCE for authorization code flows.\nIMPORTANT: Only applicable when 'authorization_code' is included in grant_types.\nSetting to True enhances security, especially for public clients.","example":true},"pkce_challenge_method":{"$ref":"#/components/schemas/OAuthClientPKCEChallengeMethod","nullable":true,"description":"PKCE code challenge method.\nOnly applies when PKCE is required.","example":"S256"}},"type":"object","title":"OAuthClientUpdate"},"Org":{"properties":{"name":{"type":"string","title":"Name"},"contact_email":{"type":"string","format":"email","title":"Contact Email"},"avatar_url":{"type":"string","nullable":true,"title":"Avatar Url"},"public_metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Public Metadata","default":{}},"low_credit_alerts":{"type":"boolean","title":"Low Credit Alerts","default":false},"usage_based_pricing_enabled":{"type":"boolean","title":"Usage Based Pricing Enabled","default":false},"plan":{"$ref":"#/components/schemas/StripePlan","default":"trial"},"plan_status":{"$ref":"#/components/schemas/PlanStatus","default":"active"},"plan_interval":{"$ref":"#/components/schemas/PlanInterval","nullable":true},"pending_plan":{"$ref":"#/components/schemas/StripePlan","nullable":true},"pending_plan_interval":{"$ref":"#/components/schemas/PlanInterval","nullable":true},"pending_plan_date":{"type":"string","format":"date-time","nullable":true,"title":"Pending Plan Date"},"trial_ends_at":{"type":"string","format":"date-time","nullable":true,"title":"Trial Ends At"},"grace_period_ends_at":{"type":"string","format":"date-time","nullable":true,"title":"Grace Period Ends At"},"auto_topup_config":{"additionalProperties":true,"type":"object","title":"Auto Topup Config","default":{}},"id":{"type":"string","format":"uuid","title":"Id"},"account":{"$ref":"#/components/schemas/Account","nullable":true}},"type":"object","required":["name","contact_email","id"],"title":"Org"},"OrgCreate":{"properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9\\-_ ]+$","title":"Name","description":"Organization name"},"contact_email":{"type":"string","format":"email","title":"Contact Email"}},"type":"object","required":["name","contact_email"],"title":"OrgCreate"},"OrgInviteShow":{"type":"string","enum":["all","pending","accepted"],"title":"OrgInviteShow"},"OrgInviteWithProjectRoles":{"properties":{"email_address":{"type":"string","format":"email","title":"Email Address"},"roles":{"items":{"type":"string"},"type":"array","nullable":true,"title":"Roles"},"project_roles":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","nullable":true,"title":"Project Roles"}},"type":"object","required":["email_address"],"title":"OrgInviteWithProjectRoles","example":{"email_address":"user@example.com","project_roles":{"01234567-89ab-cdef-0123-456789abcdef":["task_creator"],"fedcba98-7654-3210-fedc-ba9876543210":["task_viewer"]}}},"OrgMembership":{"type":"string","enum":["active","joinable","joinable_by_domain","joinable_by_invite"],"title":"OrgMembership"},"OrgUpdate":{"properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9\\-_ ]+$","nullable":true,"title":"Name","description":"Organization name"},"contact_email":{"type":"string","format":"email","nullable":true,"title":"Contact Email"},"low_credit_alerts":{"type":"boolean","nullable":true,"title":"Low Credit Alerts"},"usage_based_pricing_enabled":{"type":"boolean","nullable":true,"title":"Usage Based Pricing Enabled"}},"type":"object","title":"OrgUpdate"},"OrgUserInfo":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","nullable":true,"title":"Name"},"bio":{"type":"string","nullable":true,"title":"Bio"},"avatar_url":{"type":"string","nullable":true,"title":"Avatar Url"},"is_onboarding":{"type":"boolean","title":"Is Onboarding"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"task_count":{"type":"integer","title":"Task Count"},"tasks":{"items":{"$ref":"#/components/schemas/OrgUserTaskInfo"},"type":"array","title":"Tasks"}},"type":"object","required":["user_id","email","name","bio","avatar_url","is_onboarding","created_at","roles","task_count","tasks"],"title":"OrgUserInfo","description":"Information about a user in an organization."},"OrgUserTaskInfo":{"properties":{"task_id":{"type":"string","title":"Task Id"},"task_name":{"type":"string","title":"Task Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"revision_count":{"type":"integer","title":"Revision Count"},"run_count":{"type":"integer","title":"Run Count"},"success_run_count":{"type":"integer","title":"Success Run Count"},"error_run_count":{"type":"integer","title":"Error Run Count"}},"type":"object","required":["task_id","task_name","created_at","revision_count","run_count","success_run_count","error_run_count"],"title":"OrgUserTaskInfo","description":"Information about a task created by a user."},"OrgUsersReport":{"properties":{"org_id":{"type":"string","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"},"user_count":{"type":"integer","title":"User Count"},"users":{"items":{"$ref":"#/components/schemas/OrgUserInfo"},"type":"array","title":"Users"}},"type":"object","required":["org_id","org_name","user_count","users"],"title":"OrgUsersReport","description":"Report of users in an organization with their tasks."},"OrganizationDomain":{"properties":{"domain":{"type":"string","title":"Domain"},"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["unverified","verified"],"title":"Status"}},"type":"object","required":["domain","id","status"],"title":"OrganizationDomain"},"OrganizationDomainCreate":{"properties":{"domain":{"type":"string","title":"Domain"}},"type":"object","required":["domain"],"title":"OrganizationDomainCreate"},"OrganizationIAMMemberRoleUpdate":{"properties":{"add":{"items":{"type":"string","enum":["editor","owner","viewer"]},"type":"array","title":"Add","description":"A list of organization roles to grant to the member.\n\nRoles in this list are applied to the member AFTER any removals specified in `remove`.\n\nThis may be combined with `remove_all` to replace the member's entire role list."},"remove":{"items":{"type":"string","enum":["editor","owner","viewer"]},"type":"array","title":"Remove","description":"A list of organization roles to revoke from the member."},"remove_all":{"type":"boolean","nullable":true,"title":"Remove All","description":"Removes all existing roles from the member. This may be combined with `add` to replace all existing roles that the member holds.","default":false}},"type":"object","title":"OrganizationIAMMemberRoleUpdate"},"OrganizationIAMPermissionTest":{"properties":{"permissions":{"items":{"type":"string","enum":["add_editor","add_member","add_owner","create_project","edit","remove_editor","remove_member","remove_owner","view","view_members"]},"type":"array","title":"Permissions","description":"A list of permissions to test on the organization."},"member":{"type":"string","nullable":true,"title":"Member"}},"type":"object","required":["permissions"],"title":"OrganizationIAMPermissionTest"},"OrganizationInvite":{"properties":{"email_address":{"type":"string","format":"email","title":"Email Address"},"roles":{"items":{"type":"string"},"type":"array","nullable":true,"title":"Roles"},"project_roles":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","nullable":true,"title":"Project Roles"},"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["email_address","id"],"title":"OrganizationInvite","example":{"email_address":"user@example.com","project_roles":{"01234567-89ab-cdef-0123-456789abcdef":["task_creator"],"fedcba98-7654-3210-fedc-ba9876543210":["task_viewer"]}}},"OrganizationInviteAlreadyExistsErrorDetails":{"properties":{"organization_id":{"type":"string","title":"Organization Id"},"email_address":{"type":"string","title":"Email Address"}},"type":"object","required":["organization_id","email_address"],"title":"OrganizationInviteAlreadyExistsErrorDetails"},"OrganizationInviteAlreadyExistsErrorResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human readable representation of the error"},"reason":{"type":"string","enum":["ORGANIZATION_INVITE_ALREADY_EXISTS"],"title":"Reason","description":"The machine-readable error reason."},"organizationInviteAlreadyExistsError":{"$ref":"#/components/schemas/OrganizationInviteAlreadyExistsErrorDetails","description":"Metadata detailing more information about the error."}},"type":"object","required":["message","reason","organizationInviteAlreadyExistsError"],"title":"OrganizationInviteAlreadyExistsErrorResponse"},"OrganizationInviteWithLink":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"email_address":{"type":"string","title":"Email Address"},"roles":{"items":{"type":"string"},"type":"array","nullable":true,"title":"Roles"},"project_roles":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","nullable":true,"title":"Project Roles"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"accepted_at":{"type":"string","format":"date-time","nullable":true,"title":"Accepted At"},"invite_link":{"type":"string","title":"Invite Link","description":"The invitation link sent in the email"}},"type":"object","required":["id","organization_id","email_address","created_at","invite_link"],"title":"OrganizationInviteWithLink","description":"Organization invite with email invite link."},"OrganizationMemberAlreadyExistsErrorDetails":{"properties":{"organization_id":{"type":"string","title":"Organization Id"},"member_id":{"type":"string","title":"Member Id"}},"type":"object","required":["organization_id","member_id"],"title":"OrganizationMemberAlreadyExistsErrorDetails"},"OrganizationMemberAlreadyExistsErrorResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human readable representation of the error"},"reason":{"type":"string","enum":["ORGANIZATION_MEMBER_ALREADY_EXISTS"],"title":"Reason","description":"The machine-readable error reason."},"organizationMemberAlreadyExistsError":{"$ref":"#/components/schemas/OrganizationMemberAlreadyExistsErrorDetails","description":"Metadata detailing more information about the error."}},"type":"object","required":["message","reason","organizationMemberAlreadyExistsError"],"title":"OrganizationMemberAlreadyExistsErrorResponse"},"OutputConversationalGuardrailDefinition":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"OutputConversationalGuardrailDefinition"},"OutputFilter":{"type":"string","enum":["image"],"title":"OutputFilter","description":"Output capability filter for model listing."},"OutputModality":{"type":"string","enum":["json","image","audio","pdf","text","csv"],"title":"OutputModality","description":"Output modality types for tasks."},"PDFVisionConfig":{"properties":{"max_file_size_mb":{"type":"integer","title":"Max File Size Mb","description":"Maximum PDF file size in megabytes","default":50},"max_pages":{"type":"integer","nullable":true,"title":"Max Pages","description":"Maximum number of pages (None = unlimited)"},"max_visual_pages":{"type":"integer","nullable":true,"title":"Max Visual Pages","description":"Maximum pages processed visually. Used by Claude which only visually processes first 100 pages."}},"type":"object","title":"PDFVisionConfig","description":"Configuration for PDF vision capabilities."},"PaginatedResultSet_Annotated_Union_Annotated_WebhookForwarderInDB__Tag___Annotated_EmailForwarderInDB__Tag____Discriminator__":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"oneOf":[{"$ref":"#/components/schemas/WebhookForwarderInDB"},{"$ref":"#/components/schemas/EmailForwarderInDB"}]},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[Annotated[Union[Annotated[WebhookForwarderInDB, Tag], Annotated[EmailForwarderInDB, Tag]], Discriminator]]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_ChatDocumentEmbeddingRecord_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/ChatDocumentEmbeddingRecord"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[ChatDocumentEmbeddingRecord]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_ChatDocument_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/ChatDocument"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[ChatDocument]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_Collection_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/Collection"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[Collection]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_DatasourceSyncRun_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/DatasourceSyncRun"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[DatasourceSyncRun]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_IAMMember_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/IAMMember"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[IAMMember]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_McpRun_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/McpRun"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[McpRun]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_McpServer_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/McpServer"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[McpServer]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_OAuthClient_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/OAuthClient"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[OAuthClient]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_Org_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/Org"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[Org]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_OrganizationDomain_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/OrganizationDomain"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[OrganizationDomain]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_OrganizationInvite_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/OrganizationInvite"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[OrganizationInvite]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_Project_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/Project"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[Project]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_ReportingGroup_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/ReportingGroup"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[ReportingGroup]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_Tag_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[Tag]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_TaskAgentRead_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/TaskAgentRead"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[TaskAgentRead]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_TaskMcpServer_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/TaskMcpServer"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[TaskMcpServer]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_TaskMcpTool_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/TaskMcpTool"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[TaskMcpTool]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_TaskRun_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/TaskRun"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[TaskRun]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_TaskShare_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/TaskShare"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[TaskShare]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginatedResultSet_Task_":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationDetails","nullable":true,"description":"Contains pagination information for the result set."},"results":{"items":{"$ref":"#/components/schemas/Task"},"type":"array","title":"Results","description":"The list of items returned for the current page."}},"type":"object","required":["results"],"title":"PaginatedResultSet[Task]","example":{"pagination":{"has_next":true,"next_cursor":"019097c5-5560-05b5-4a48-5197a269683b","page_limit":100}}},"PaginationDetails":{"properties":{"next_cursor":{"type":"string","nullable":true,"title":"Next Cursor","description":"A token used to retrieve the next page of results. If `null`, there are no more results."},"has_next":{"type":"boolean","nullable":true,"title":"Has Next","description":"Indicates whether there are more results available in the next page.","default":false},"page_limit":{"type":"integer","nullable":true,"title":"Page Limit","description":"The maximum number of items returned per page.","default":0}},"type":"object","title":"PaginationDetails"},"PermissionCheckFailedErrorDetails":{"properties":{"subject":{"$ref":"#/components/schemas/IAMObjectErrorDetails","nullable":true},"resource":{"$ref":"#/components/schemas/IAMObjectErrorDetails","nullable":true},"permission":{"type":"string","title":"Permission"}},"type":"object","required":["permission"],"title":"PermissionCheckFailedErrorDetails"},"PermissionCheckFailedErrorResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human readable representation of the error"},"reason":{"type":"string","enum":["PERMISSION_CHECK_FAILED"],"title":"Reason","description":"The machine-readable error reason."},"permissionCheckFailedError":{"$ref":"#/components/schemas/PermissionCheckFailedErrorDetails","description":"Metadata detailing more information about the error."}},"type":"object","required":["message","reason","permissionCheckFailedError"],"title":"PermissionCheckFailedErrorResponse"},"PlanInterval":{"type":"string","enum":["monthly","yearly"],"title":"PlanInterval"},"PlanStatus":{"type":"string","enum":["active","grace","cancelling","cancelled"],"title":"PlanStatus"},"Project":{"properties":{"name":{"type":"string","title":"Name"},"avatar_url":{"type":"string","nullable":true,"title":"Avatar Url"},"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"tasks_oauth_client_id":{"type":"string","format":"uuid","nullable":true,"title":"Tasks Oauth Client Id"},"public_routing_key":{"type":"string","nullable":true,"title":"Public Routing Key"},"agent_access_key":{"type":"string","nullable":true,"title":"Agent Access Key"},"deleted":{"type":"string","format":"date-time","nullable":true,"title":"Deleted"}},"type":"object","required":["name","id","org_id"],"title":"Project"},"ProjectConfig-Input":{"properties":{"llm":{"type":"string","title":"Llm","default":"gpt-3.5-turbo"},"temperature":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Temperature","default":0.5},"knn":{"type":"integer","exclusiveMinimum":true,"title":"Knn","default":4,"minimum":0.0},"chat_system_commands":{"items":{"type":"string"},"type":"array","nullable":true,"title":"Chat System Commands"},"chat_guardrails":{"$ref":"#/components/schemas/ConversationalGuardrails","nullable":true},"query_expansion":{"type":"boolean","title":"Query Expansion","description":"Enable query expansion. Uses an LLM to generate multiple rephrasing of the original query for better broad spectrum vector retrieval","default":false},"models_config":{"$ref":"#/components/schemas/ModelConfiguration","description":"Model management configuration"}},"type":"object","title":"ProjectConfig"},"ProjectConfig-Output":{"properties":{"llm":{"type":"string","title":"Llm","default":"gpt-3.5-turbo"},"temperature":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Temperature","default":0.5},"knn":{"type":"integer","exclusiveMinimum":true,"title":"Knn","default":4,"minimum":0.0},"chat_system_commands":{"items":{"type":"string"},"type":"array","nullable":true,"title":"Chat System Commands"},"chat_guardrails":{"$ref":"#/components/schemas/ConversationalGuardrails","nullable":true},"query_expansion":{"type":"boolean","title":"Query Expansion","description":"Enable query expansion. Uses an LLM to generate multiple rephrasing of the original query for better broad spectrum vector retrieval","default":false},"models_config":{"$ref":"#/components/schemas/ModelConfiguration","description":"Model management configuration"}},"type":"object","title":"ProjectConfig"},"ProjectCreate":{"properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9\\-_ ]+$","title":"Name","description":"Project name"}},"type":"object","required":["name"],"title":"ProjectCreate"},"ProjectUpdate":{"properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9\\-_ ]+$","nullable":true,"title":"Name","description":"Project name"}},"type":"object","title":"ProjectUpdate"},"ProjectWithDatasources":{"properties":{"name":{"type":"string","title":"Name"},"avatar_url":{"type":"string","nullable":true,"title":"Avatar Url"},"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"tasks_oauth_client_id":{"type":"string","format":"uuid","nullable":true,"title":"Tasks Oauth Client Id"},"public_routing_key":{"type":"string","nullable":true,"title":"Public Routing Key"},"agent_access_key":{"type":"string","nullable":true,"title":"Agent Access Key"},"deleted":{"type":"string","format":"date-time","nullable":true,"title":"Deleted"},"datasource_connections":{"items":{"$ref":"#/components/schemas/DatasourceConnectionPublic"},"type":"array","title":"Datasource Connections","default":[]}},"type":"object","required":["name","id","org_id"],"title":"ProjectWithDatasources"},"PurgeOrgCacheResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the cache purge was successful"},"message":{"type":"string","title":"Message","description":"Human-readable status message"}},"type":"object","required":["success","message"],"title":"PurgeOrgCacheResponse","description":"Response schema for purging organization cache."},"ReportingGroup":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"Name of the reporting group"},"description":{"type":"string","maxLength":500,"nullable":true,"title":"Description","description":"Optional description"},"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"created":{"type":"string","title":"Created"},"modified":{"type":"string","title":"Modified"}},"type":"object","required":["name","id","project_id","created","modified"],"title":"ReportingGroup","description":"Schema for reporting group responses."},"ReportingGroupCreate":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"Name of the reporting group"},"description":{"type":"string","maxLength":500,"nullable":true,"title":"Description","description":"Optional description"}},"type":"object","required":["name"],"title":"ReportingGroupCreate","description":"Schema for creating a new reporting group."},"ReportingGroupUpdate":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"nullable":true,"title":"Name","description":"Name of the reporting group"},"description":{"type":"string","maxLength":500,"nullable":true,"title":"Description","description":"Optional description"}},"type":"object","title":"ReportingGroupUpdate","description":"Schema for updating an existing reporting group."},"ResendOrgInviteResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the invite was resent successfully"},"email_address":{"type":"string","title":"Email Address","description":"Email address the invite was sent to"},"message":{"type":"string","title":"Message","description":"Human-readable status message"}},"type":"object","required":["success","email_address","message"],"title":"ResendOrgInviteResponse","description":"Response schema for resending organization invite."},"SiteScrapeRequest":{"properties":{"urls":{"items":{"type":"string","minLength":1,"format":"uri"},"type":"array","title":"Urls"},"max_crawl_depth":{"type":"integer","maximum":7.0,"title":"Max Crawl Depth","default":3}},"type":"object","required":["urls"],"title":"SiteScrapeRequest"},"StripePlan":{"type":"string","enum":["trial","pro","teams","enterprise"],"title":"StripePlan"},"Tag":{"properties":{"name":{"type":"string","title":"Name","description":"Alphanumeric name for the tag (max 15 characters). Used to organize and filter Tasks and Task Revisions.","example":"production"},"parent_id":{"type":"string","format":"uuid","nullable":true,"title":"Parent Id","description":"Optional UUID of a parent tag. Used to create hierarchical tag structures (e.g., staging under production).","example":"01909843-3596-da54-4756-28af46917e74"},"entity_type":{"type":"string","enum":["task","task_revision","task_share"],"title":"Entity Type","description":"The type of entity this tag applies to (task, task_revision, or task_share)","example":"task"},"id":{"type":"string","format":"uuid","title":"Id","description":"Unique identifier for the tag."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project this tag belongs to."},"created_at":{"type":"string","title":"Created At","description":"ISO 8601 timestamp when the tag was created."},"children":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array","title":"Children","description":"List of child tags if this tag is used as a parent in a hierarchical structure.","default":[]},"is_project_tag":{"type":"boolean","title":"Is Project Tag","description":"When true, indicates this is a project-level tag that can be used across multiple entity types."},"tagged_entities":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Tagged Entities","description":"List of entity IDs this tag is associated with.","default":[]}},"type":"object","required":["name","entity_type","id","project_id","created_at","is_project_tag"],"title":"Tag","example":{"children":[],"created_at":"2024-01-29T12:34:56.789Z","id":"123e4567-e89b-12d3-a456-426614174000","is_project_tag":true,"name":"production","parent_id":"01909843-3596-da54-4756-28af46917e74","project_id":"123e4567-e89b-12d3-a456-426614174001"}},"TagCreate":{"properties":{"name":{"type":"string","title":"Name","description":"Alphanumeric name for the tag (max 15 characters). Used to organize and filter Tasks and Task Revisions.","example":"production"},"parent_id":{"type":"string","format":"uuid","nullable":true,"title":"Parent Id","description":"Optional UUID of a parent tag. Used to create hierarchical tag structures (e.g., staging under production).","example":"01909843-3596-da54-4756-28af46917e74"}},"type":"object","required":["name"],"title":"TagCreate","example":{"name":"staging","parent_id":"01909843-3596-da54-4756-28af46917e74"}},"TagEntityAdd":{"properties":{"entities":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Entities","description":"List of entity IDs to apply this Tag to","example":"01909843-3596-da54-4756-28af46917e74"}},"type":"object","required":["entities"],"title":"TagEntityAdd"},"TagEntityRemove":{"properties":{"entities":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Entities","description":"List of entity IDs to apply this Tag to","example":"01909843-3596-da54-4756-28af46917e74"}},"type":"object","required":["entities"],"title":"TagEntityRemove"},"TagOutputFormat-Input":{"properties":{"type":{"type":"string","enum":["str","string","boolean","bool","int","integer","list","object","number"],"title":"Type","description":"The desired output type from the LLM."},"description":{"type":"string","nullable":true,"title":"Description","description":"A description of the desired content."},"nested_structure":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/TagOutputFormat-Input"},{"type":"string","enum":["str","string","boolean","bool","int","integer","list","object","number"]}]},"type":"object","nullable":true,"title":"Nested Structure","description":"For lists optionally define the list structure."},"options":{"items":{"type":"string"},"type":"array","uniqueItems":true,"nullable":true,"title":"Options","description":"Options to constrain the response to a specific set of values."},"item_type":{"type":"string","enum":["str","string","boolean","bool","int","integer","list","object","number"],"nullable":true,"title":"Item Type","description":"For lists, the type of items within the list."}},"type":"object","required":["type"],"title":"TagOutputFormat"},"TagOutputFormat-Output":{"additionalProperties":true,"type":"object"},"TagUpdate":{"properties":{"name":{"type":"string","description":"Alphanumeric name for the tag (max 15 characters). Used to organize and filter Tasks and Task Revisions.","nullable":true,"title":"Name","example":"production"},"parent_id":{"type":"string","format":"uuid","nullable":true,"title":"Parent Id","description":"Optional UUID of a parent tag. Used to create hierarchical tag structures (e.g., staging under production).","example":"01909843-3596-da54-4756-28af46917e74"}},"type":"object","title":"TagUpdate","example":{"name":"beta"}},"Task":{"properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9\\- ]+$","title":"Name","description":"A name or reference for the Task."},"description":{"type":"string","nullable":true,"title":"Description","description":"A longer description of the Task for internal reference."},"enabled":{"type":"boolean","title":"Enabled","description":"When `true` the Task is active and callable. `false` denotes the Task is not yet operational."},"public":{"type":"boolean","title":"Public","description":"When `true` the Task is public and can be accessed by any User.","default":false},"exposed_to_agents":{"type":"boolean","title":"Exposed To Agents","description":"When `true` the Task is accessible to agents through the unauthenticated agent endpoint.","default":false},"output_modality":{"$ref":"#/components/schemas/OutputModality","description":"Specifies the output modality of the task. Can be 'json', 'image', 'audio', 'pdf', 'text', or 'csv'. Defaults to 'json'.","default":"json"},"task_run_visibility":{"type":"string","enum":["owner_only","editors_and_owners","all_viewers"],"title":"Task Run Visibility","description":"Controls who can view all task runs. 'owner_only' - only task owners see all runs (default), 'editors_and_owners' - task editors and owners see all runs, 'all_viewers' - all users with view permission see all runs.","default":"owner_only"},"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the Task."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"The Project that the Task belongs to."},"created":{"type":"string","title":"Created","description":"When the Task was created."},"modified":{"type":"string","nullable":true,"title":"Modified","description":"When the Task was last updated."},"deleted":{"type":"string","nullable":true,"title":"Deleted","description":"Timestamp when the task was deleted, if applicable."},"revisions":{"items":{"$ref":"#/components/schemas/TaskRevision"},"type":"array","title":"Revisions","description":"Each update to a Task results in a new Revision being created. Task Revisions are a powerful concept that can be used to assist with A/B testing, comparing responses from different LLM's, etc.","default":[]},"access_token":{"type":"string","nullable":true,"title":"Access Token","description":"Task specific Bearer token that can be used to authenticated when executing this Task."},"active_revisions":{"items":{"$ref":"#/components/schemas/TaskActiveRevision"},"type":"array","title":"Active Revisions","description":"The revision currently active for this Task."},"cloned_from_task_revision_id":{"type":"string","format":"uuid","nullable":true,"title":"Cloned From Task Revision Id","description":"The unique identifier of the task revision this task was cloned from, if applicable.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array","title":"Tags","default":[]}},"type":"object","required":["name","enabled","id","project_id","created","access_token","active_revisions"],"title":"Task","example":{"access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjY1NmVkZWJkLTcyOWItNDhjNS1hYjk3LTFiYjgzNDM3ZGY5MyIsInR5cCI6IkpXVCJ1","active_revisions":[{"task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","weight":1.0}],"created":"2024-06-13T14:01:03.021673","description":"A task to pre-triage user onboarding before IDV.","enabled":true,"exposed_to_agents":false,"id":"019011e6-e530-3aca-6cf7-2973387c255d","modified":"2024-06-13T14:01:03.021673","name":"Fintech Pre-Triage","project_id":"019010a2-8327-2607-11d7-41bb0a8936d4","public":false,"revisions":[{"active":true,"annotation":"Production v2 - Added image matching capability","created":"2024-06-13T14:01:03.021673","id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","image_required":true,"input_processors":[{"config":{"extract_text":true,"include_title":true,"max_length":5000},"input_processor":"url_fetcher","param_name":"description"}],"llm_config":{"temperature":0.7},"llm_model":{"alias":"GPT-4 Turbo","created":"2024-01-16T13:33:25.247662","description":"Latest GPT-4 model with 128k context window and knowledge cutoff of December 2023.","id":"019011e6-e530-3aca-6cf7-2973387c255d","modified":"2024-01-16T13:33:25.247662","name":"gpt-4-turbo-preview","provider":"OpenAI","supports_vision":true,"vendor":"openai"},"llm_model_id":"019011e6-e530-3aca-6cf7-2973387c255d","modified":"2024-06-13T14:01:03.021673","optimise_images":true,"output_format":{"compliance":"bool","hint":{"type":"str"},"match":{"description":"True if the provided description is a close match","type":"bool"},"rationale":"str"},"rag":{"collection_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","rag_param":"context"},"system_prompt":"You are an expert software program specifically designed for the fintech industry that will be used for pre-triage tasks to ensure the best possible client UX and efficient 3rd party platform interoperability.","tags":[],"task_forwarder_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","test":false,"user_prompt":"Your task is to validate the uploaded image and determine whether it will be suitable for authentication and onboarding checks. If the image of the person is clear and typical of a passport style photo then set the compliance field to true. Provide rationale for your decision in the rationale field. If the compliance result is false, then provide a helpful hint for the customer who has submitted the photo informing them why it is unacceptable and some steps to remedy it, place this into the hint field. Determine whether the following description matches the provided image: {description}"}]}},"TaskActiveRevision":{"properties":{"task_revision_id":{"type":"string","format":"uuid","title":"Task Revision Id","description":"The unique identifier of the Task Revision to activate. Each Task can have multiple revisions, but only active ones will be used for execution.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"weight":{"type":"number","maximum":1.0,"minimum":0.0,"nullable":true,"title":"Weight","description":"The traffic weight for this revision (between 0 and 1). When multiple revisions are active, weights determine the proportion of traffic each receives. Must sum to 1.0 across all active revisions.","default":1.0,"example":0.5}},"type":"object","required":["task_revision_id"],"title":"TaskActiveRevision","example":{"task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","weight":1.0}},"TaskAgentCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name","description":"Name of the TaskAgent.","example":"Research Assistant"},"description":{"type":"string","nullable":true,"title":"Description","description":"Description of the TaskAgent.","example":"An agent that can summarize and translate documents."},"instruction":{"type":"string","title":"Instruction","description":"System prompt / instruction for the agent.","example":"You are a helpful assistant that can summarize and translate text."},"mode":{"$ref":"#/components/schemas/TaskAgentMode","description":"Execution mode for the agent.","default":"agentic","example":"agentic"},"llm_model_id":{"type":"string","format":"uuid","title":"Llm Model Id","description":"ID of the LLM model to use.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"skills":{"items":{"$ref":"#/components/schemas/TaskAgentSkillInput"},"type":"array","title":"Skills","description":"Skills to add. Order in array determines execution order (index 0 = order 0).","default":[],"example":[{"task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f2"}]},"memory_strategy":{"type":"string","enum":["sliding_window","compaction"],"nullable":true,"title":"Memory Strategy","description":"Memory management strategy. None = unlimited history."},"memory_config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Memory Config","description":"Strategy-specific configuration. Required when memory_strategy is set."},"max_turns":{"type":"integer","maximum":500.0,"minimum":1.0,"nullable":true,"title":"Max Turns","description":"Max conversation turns per session. None = unlimited."}},"type":"object","required":["name","instruction","llm_model_id"],"title":"TaskAgentCreate","description":"Schema for creating a TaskAgent."},"TaskAgentEvent":{"properties":{"id":{"type":"string","title":"Id","description":"Event ID from ADK session."},"author":{"type":"string","title":"Author","description":"Event author: 'user' or agent name.","example":"user"},"content":{"type":"string","nullable":true,"title":"Content","description":"Text content of the event (extracted from parts)."},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"When the event occurred."},"event_type":{"type":"string","title":"Event Type","description":"Type of event.","example":"user_message"},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCallInfo"},"type":"array","nullable":true,"title":"Tool Calls","description":"Tool calls made in this event. Multiple if parallel calls."},"tool_results":{"items":{"$ref":"#/components/schemas/ToolResultInfo"},"type":"array","nullable":true,"title":"Tool Results","description":"Tool results in this event. Multiple if parallel results."},"error_message":{"type":"string","nullable":true,"title":"Error Message","description":"Error message if event_type is error."}},"type":"object","required":["id","author","timestamp","event_type"],"title":"TaskAgentEvent","description":"Event from a TaskAgent conversation (from ADK session).\n\nNote: ADK may store multiple parallel tool calls or results in a single event.\nUse tool_calls/tool_results lists to access all of them."},"TaskAgentFileMetadata":{"properties":{"original_filename":{"type":"string","title":"Original Filename","description":"The original filename as submitted by the user","example":"contract.pdf"},"stored_filename":{"type":"string","title":"Stored Filename","description":"The generated filename used for storage","example":"b4a66744-6e99-4ad4-8aff-4d953bb0b9cf.pdf"},"content_type":{"type":"string","title":"Content Type","description":"MIME type of the file","example":"application/pdf"},"download_url":{"type":"string","nullable":true,"title":"Download Url","description":"Relative URL to download the file (generated dynamically, not stored in database)","example":"/org/abc123.../project/def456.../task/ghi789.../run/jkl012.../file/b4a66744-6e99-4ad4-8aff-4d953bb0b9cf.pdf"},"size_bytes":{"type":"integer","nullable":true,"title":"Size Bytes","description":"File size in bytes (if available)","example":1024576},"source":{"type":"string","enum":["input","generated"],"title":"Source","description":"Source of the file: 'input' for uploaded files, 'generated' for skill outputs","default":"input"},"source_task_name":{"type":"string","nullable":true,"title":"Source Task Name","description":"Name of the skill/task that generated this file (only for generated files)","example":"quote-image-generator"},"source_task_run_id":{"type":"string","nullable":true,"title":"Source Task Run Id","description":"TaskRun ID that generated this file (only for generated files)","example":"019beb35-3976-e7da-4595-56338335cd5a"}},"type":"object","required":["original_filename","stored_filename","content_type"],"title":"TaskAgentFileMetadata","description":"Extended file metadata for TaskAgent runs with provenance tracking.\n\nInherits from TaskRunFileMetadata and adds fields to track whether\na file was uploaded with the request or generated by a skill.","example":{"content_type":"application/pdf","download_url":"/org/abc/project/def/task/ghi/run/jkl/file/b4a66744-6e99-4ad4-8aff-4d953bb0b9cf.pdf","original_filename":"my-document.pdf","size_bytes":1024576,"stored_filename":"b4a66744-6e99-4ad4-8aff-4d953bb0b9cf.pdf"}},"TaskAgentMode":{"type":"string","enum":["agentic","sequential"],"title":"TaskAgentMode","description":"Execution mode for TaskAgent."},"TaskAgentRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","nullable":true,"title":"Description"},"instruction":{"type":"string","title":"Instruction"},"mode":{"$ref":"#/components/schemas/TaskAgentMode"},"llm_model_id":{"type":"string","format":"uuid","nullable":true,"title":"Llm Model Id"},"llm_model":{"$ref":"#/components/schemas/LLMModel","nullable":true},"skills":{"items":{"$ref":"#/components/schemas/TaskAgentSkillRead"},"type":"array","title":"Skills","default":[]},"memory_strategy":{"type":"string","nullable":true,"title":"Memory Strategy"},"memory_config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Memory Config"},"max_turns":{"type":"integer","nullable":true,"title":"Max Turns"},"is_deleted":{"type":"boolean","title":"Is Deleted"},"created":{"type":"string","title":"Created"},"modified":{"type":"string","title":"Modified"}},"type":"object","required":["id","name","description","instruction","mode","llm_model_id","llm_model","is_deleted","created","modified"],"title":"TaskAgentRead","description":"Schema for reading a TaskAgent."},"TaskAgentRunEventsResponse":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"ID of the TaskAgentRun."},"session_id":{"type":"string","title":"Session Id","description":"ADK session ID."},"events":{"items":{"$ref":"#/components/schemas/TaskAgentEvent"},"type":"array","title":"Events","description":"Conversation events from the session.","default":[]}},"type":"object","required":["run_id","session_id"],"title":"TaskAgentRunEventsResponse","description":"Response containing events for a TaskAgentRun."},"TaskAgentRunRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"task_agent_id":{"type":"string","format":"uuid","title":"Task Agent Id"},"session_id":{"type":"string","title":"Session Id","description":"ADK session ID (string format)."},"user_id":{"type":"string","format":"uuid","nullable":true,"title":"User Id"},"invocation_id":{"type":"string","nullable":true,"title":"Invocation Id"},"is_continuation":{"type":"boolean","title":"Is Continuation","default":false},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"},"charged_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","nullable":true,"title":"Charged Credits"},"created":{"type":"string","title":"Created"},"completed":{"type":"string","nullable":true,"title":"Completed"},"duration_ms":{"type":"integer","nullable":true,"title":"Duration Ms"},"status":{"$ref":"#/components/schemas/TaskAgentRunStatus"},"is_error":{"type":"boolean","title":"Is Error"},"skills_invoked":{"items":{"additionalProperties":true,"type":"object"},"type":"array","nullable":true,"title":"Skills Invoked"},"files":{"items":{"$ref":"#/components/schemas/TaskAgentFileMetadata"},"type":"array","title":"Files","description":"Files associated with this agent run (both uploaded and generated by skills)","default":[]}},"type":"object","required":["id","task_agent_id","session_id","user_id","input_tokens","output_tokens","total_tokens","charged_credits","created","completed","duration_ms","status","is_error","skills_invoked"],"title":"TaskAgentRunRead","description":"Schema for reading a TaskAgentRun."},"TaskAgentRunStatus":{"type":"string","enum":["running","completed","failed"],"title":"TaskAgentRunStatus","description":"Status of a TaskAgent run."},"TaskAgentSessionDetail":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"ADK session ID (string format).","example":"abc123"},"task_agent_id":{"type":"string","format":"uuid","title":"Task Agent Id"},"run_count":{"type":"integer","title":"Run Count","description":"Number of runs in this session."},"first_run":{"type":"string","title":"First Run"},"last_run":{"type":"string","title":"Last Run"},"total_tokens":{"type":"integer","title":"Total Tokens"},"runs":{"items":{"$ref":"#/components/schemas/TaskAgentRunRead"},"type":"array","title":"Runs","description":"Runs in this session.","default":[]}},"type":"object","required":["session_id","task_agent_id","run_count","first_run","last_run","total_tokens"],"title":"TaskAgentSessionDetail","description":"Detailed session info including individual runs."},"TaskAgentSessionSummary":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"ADK session ID (string format).","example":"abc123"},"task_agent_id":{"type":"string","format":"uuid","title":"Task Agent Id"},"run_count":{"type":"integer","title":"Run Count","description":"Number of runs in this session."},"first_run":{"type":"string","title":"First Run"},"last_run":{"type":"string","title":"Last Run"},"total_tokens":{"type":"integer","title":"Total Tokens"}},"type":"object","required":["session_id","task_agent_id","run_count","first_run","last_run","total_tokens"],"title":"TaskAgentSessionSummary","description":"Summary of a session, derived from TaskAgentRun records + ADK session."},"TaskAgentSkillInput":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"ID of the Task to add as a skill.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f2"},"is_output_formatter":{"type":"boolean","title":"Is Output Formatter","description":"Mark this skill as the output formatter. Only one skill per agent can be marked.","default":false}},"type":"object","required":["task_id"],"title":"TaskAgentSkillInput","description":"Input schema for a skill when creating/updating a TaskAgent."},"TaskAgentSkillRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"task_id":{"type":"string","format":"uuid","title":"Task Id"},"task_name":{"type":"string","title":"Task Name","description":"Name of the Task linked as a skill.","example":"Summarize"},"order":{"type":"integer","title":"Order","description":"Order for sequential execution.","example":0},"enabled":{"type":"boolean","title":"Enabled","description":"Whether this skill is enabled.","example":true},"is_output_formatter":{"type":"boolean","title":"Is Output Formatter","description":"Whether this skill is the output formatter.","default":false}},"type":"object","required":["id","task_id","task_name","order","enabled"],"title":"TaskAgentSkillRead","description":"Schema for reading a TaskAgent skill."},"TaskAgentUpdate":{"properties":{"name":{"type":"string","maxLength":255,"nullable":true,"title":"Name"},"description":{"type":"string","nullable":true,"title":"Description"},"instruction":{"type":"string","nullable":true,"title":"Instruction"},"mode":{"$ref":"#/components/schemas/TaskAgentMode","nullable":true},"llm_model_id":{"type":"string","format":"uuid","nullable":true,"title":"Llm Model Id"},"skills":{"items":{"$ref":"#/components/schemas/TaskAgentSkillInput"},"type":"array","nullable":true,"title":"Skills","description":"Full replacement of skills. Omit field to leave skills unchanged. Pass empty list to remove all skills."},"memory_strategy":{"type":"string","enum":["sliding_window","compaction"],"nullable":true,"title":"Memory Strategy"},"memory_config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Memory Config"},"max_turns":{"type":"integer","maximum":500.0,"minimum":1.0,"nullable":true,"title":"Max Turns"}},"type":"object","title":"TaskAgentUpdate","description":"Schema for updating a TaskAgent."},"TaskCreate":{"properties":{"system_prompt":{"type":"string","title":"System Prompt","description":"The system prompt that is used to set the LLM context."},"user_prompt":{"type":"string","title":"User Prompt","description":"The description of the Task. It is not required to mention the outputs in the prompt, but it can help the model to understand the context better. Any input strings should be referenced with the dynamic `{...}` syntax, this informs the model to look for those values in the input data."},"llm_model_id":{"type":"string","format":"uuid","title":"Llm Model Id","description":"The LLM model to use for the Task."},"llm_config":{"additionalProperties":true,"type":"object","title":"Llm Config","description":"Specific configuration parameters for the LLM model."},"output_format":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/TagOutputFormat-Input"},{"type":"string","enum":["str","string","boolean","bool","int","integer","list","object","number"]}]},"type":"object","nullable":true,"title":"Output Format","description":"This gives control over the structure of how the Task responds. Supports shorthand notation or an object with `type` can be specified for each attribute. In most instances, the LLM will be able to generate the desired output into the relevant property, but an optional `description` can be passed to provide it with additional context."},"task_forwarder_id":{"type":"string","format":"uuid","nullable":true,"title":"Task Forwarder Id","description":"The unique identifier for a valid Task Forwarder. It is used to forward the Task output to another system or service."},"rag":{"$ref":"#/components/schemas/TaskRAG","nullable":true,"description":"**Note: This is a Paid Tier feature.** Provide additional domain specific input to the LLM so that it is able to reference user specific information when executing the Task. Examples of this could be a product catalogue, terms and conditions or a user manual."},"image_required":{"type":"boolean","title":"Image Required","description":"DEPRECATED: Use file_input_mode='image' instead. When true, equivalent to file_input_mode='image'.","default":false,"deprecated":true},"file_input_mode":{"$ref":"#/components/schemas/FileInputMode","description":"Specifies what file types are accepted for visual LLM processing. Values: 'none' (default), 'image', 'pdf', 'image_or_pdf', 'any'.","default":"none"},"optimise_images":{"type":"boolean","title":"Optimise Images","description":"When `true` (default) images will be automatically optimised before processing. Set to `false` to disable lossy image optimisation.","default":true},"test":{"type":"boolean","title":"Test","description":"True if revision is a test revision. Test revisions cannot be live and are used for rapid Task testing/iteration.","default":false},"input_processors":{"items":{"$ref":"#/components/schemas/TaskInputProcessor"},"type":"array","title":"Input Processors","default":[]},"annotation":{"type":"string","maxLength":255,"nullable":true,"title":"Annotation","description":"Optional note or comment about this revision. Useful for tracking changes, experiments, or the purpose of test revisions.","example":"Testing higher temperature"},"fallback_llm_model_id":{"type":"string","format":"uuid","nullable":true,"title":"Fallback Llm Model Id","description":"The LLM model to use as fallback if the primary model fails."},"fallback_llm_config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Fallback Llm Config","description":"Specific configuration parameters for the fallback LLM model."},"name":{"type":"string","maxLength":63,"pattern":"^[a-zA-Z0-9\\- ]+$","title":"Name","description":"A name or reference for the Task."},"description":{"type":"string","nullable":true,"title":"Description","description":"A longer description of the Task for internal reference."},"enabled":{"type":"boolean","title":"Enabled","description":"When `true` the Task is active and callable. `false` denotes the Task is not yet operational."},"public":{"type":"boolean","title":"Public","description":"When `true` the Task is public and can be accessed by any User.","default":false},"exposed_to_agents":{"type":"boolean","title":"Exposed To Agents","description":"When `true` the Task is accessible to agents through the unauthenticated agent endpoint.","default":false},"output_modality":{"$ref":"#/components/schemas/OutputModality","description":"Specifies the output modality of the task. Can be 'json', 'image', 'audio', 'pdf', 'text', or 'csv'. Defaults to 'json'.","default":"json"},"task_run_visibility":{"type":"string","enum":["owner_only","editors_and_owners","all_viewers"],"title":"Task Run Visibility","description":"Controls who can view all task runs. 'owner_only' - only task owners see all runs (default), 'editors_and_owners' - task editors and owners see all runs, 'all_viewers' - all users with view permission see all runs.","default":"owner_only"}},"type":"object","required":["system_prompt","user_prompt","llm_model_id","name","enabled"],"title":"TaskCreate","example":{"annotation":"Production v2 - Added image matching capability","description":"A task to pre-triage user onboarding before IDV.","enabled":true,"image_required":true,"input_processors":[{"config":{"extract_text":true,"include_title":true,"max_length":5000},"input_processor":"url_scraper","param_name":"description"}],"llm_config":{"temperature":0.7},"llm_model_id":"019011e6-e530-3aca-6cf7-2973387c255d","name":"Fintech Pre-Triage","optimise_images":true,"output_format":{"compliance":"bool","hint":{"type":"str"},"match":{"description":"True if the provided description is a close match","type":"bool"},"rationale":"str"},"rag":{"collection_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","rag_param":"context"},"system_prompt":"You are an expert software program specifically designed for the fintech industry that will be used for pre-triage tasks to ensure the best possible client UX and efficient 3rd party platform interoperability.","task_forwarder_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","test":false,"user_prompt":"Your task is to validate the uploaded image and determine whether it will be suitable for authentication and onboarding checks. If the image of the person is clear and typical of a passport style photo then set the compliance field to true. Provide rationale for your decision in the rationale field. If the compliance result is false, then provide a helpful hint for the customer who has submitted the photo informing them why it is unacceptable and some steps to remedy it, place this into the hint field. Determine whether the following description matches the provided image: {description}"}},"TaskForwarderConfig":{"properties":{"destination_url":{"type":"string","title":"Destination Url","description":"The URL where Task Run result will be forwarded. Must be a valid HTTPS URL."}},"type":"object","required":["destination_url"],"title":"TaskForwarderConfig"},"TaskForwarderEmailConfig":{"properties":{"recipient_emails":{"items":{"type":"string","format":"email"},"type":"array","minItems":1,"title":"Recipient Emails","description":"List of email addresses to send task results to."},"subject_template":{"type":"string","title":"Subject Template","description":"Email subject template with {variable} placeholders for task data."},"body_template":{"type":"string","title":"Body Template","description":"Email body template with {variable} placeholders for task data."},"cc_emails":{"items":{"type":"string","format":"email"},"type":"array","nullable":true,"title":"Cc Emails","description":"Optional list of CC email addresses."},"bcc_emails":{"items":{"type":"string","format":"email"},"type":"array","nullable":true,"title":"Bcc Emails","description":"Optional list of BCC email addresses."}},"type":"object","required":["recipient_emails","subject_template","body_template"],"title":"TaskForwarderEmailConfig"},"TaskForwarderSensitiveConfig":{"properties":{"signing_key":{"type":"string","title":"Signing Key","description":"A secret key used to sign the forwarded data for verification purposes."}},"type":"object","required":["signing_key"],"title":"TaskForwarderSensitiveConfig"},"TaskForwarderTypeInfo":{"properties":{"type":{"type":"string","title":"Type","description":"The forwarder type identifier (e.g., 'webhook', 'email')"},"name":{"type":"string","title":"Name","description":"Human-readable name for the forwarder type"},"description":{"type":"string","title":"Description","description":"Description of what this forwarder type does"},"config_schema":{"additionalProperties":true,"type":"object","title":"Config Schema","description":"JSON Schema for the forwarder's configuration"},"config_sensitive_schema":{"additionalProperties":true,"type":"object","nullable":true,"title":"Config Sensitive Schema","description":"JSON Schema for the forwarder's sensitive configuration (if any). Will be encrypted within the application."}},"type":"object","required":["type","name","description","config_schema"],"title":"TaskForwarderTypeInfo"},"TaskIAMMemberRoleUpdate":{"properties":{"add":{"items":{"type":"string","enum":["editor","owner","viewer"]},"type":"array","title":"Add","description":"A list of task roles to grant to the member.\n\nRoles in this list are applied to the member AFTER any removals specified in `remove`.\n\nThis may be combined with `remove_all` to replace the member's entire role list."},"remove":{"items":{"type":"string","enum":["editor","owner","viewer"]},"type":"array","title":"Remove","description":"A list of task roles to revoke from the member."},"remove_all":{"type":"boolean","nullable":true,"title":"Remove All","description":"Removes all existing roles from the member. This may be combined with `add` to replace all existing roles that the member holds.","default":false}},"type":"object","title":"TaskIAMMemberRoleUpdate"},"TaskIAMPermissionTest":{"properties":{"permissions":{"items":{"type":"string","enum":["add_editor","add_member","add_owner","edit","remove_editor","remove_member","remove_owner","run_task","view","view_members"]},"type":"array","title":"Permissions","description":"A list of permissions to test on the task."},"member":{"type":"string","nullable":true,"title":"Member"}},"type":"object","required":["permissions"],"title":"TaskIAMPermissionTest"},"TaskInputProcessor":{"properties":{"param_name":{"type":"string","title":"Param Name"},"input_processor":{"type":"string","title":"Input Processor"},"config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Config"}},"type":"object","required":["param_name","input_processor"],"title":"TaskInputProcessor"},"TaskMcpServer":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"type":"string","nullable":true,"title":"Description"},"server_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Server Url"},"enabled":{"type":"boolean","title":"Enabled","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"canonical_resource":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Canonical Resource"},"transport":{"type":"string","enum":["streamable_http","sse"],"title":"Transport"},"auth_state":{"type":"string","enum":["connected","expired","reauth_required","none"],"title":"Auth State"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"created":{"type":"string","title":"Created"},"modified":{"type":"string","title":"Modified"}},"type":"object","required":["name","server_url","id","canonical_resource","transport","auth_state","project_id","created","modified"],"title":"TaskMcpServer"},"TaskMcpServerCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"type":"string","nullable":true,"title":"Description"},"server_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Server Url"},"enabled":{"type":"boolean","title":"Enabled","default":true},"auth_session_id":{"type":"string","nullable":true,"title":"Auth Session Id"}},"type":"object","required":["name","server_url"],"title":"TaskMcpServerCreate"},"TaskMcpServerUpdate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"nullable":true,"title":"Name"},"description":{"type":"string","nullable":true,"title":"Description"},"enabled":{"type":"boolean","nullable":true,"title":"Enabled"}},"type":"object","title":"TaskMcpServerUpdate"},"TaskMcpTool":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"task_mcp_server_id":{"type":"string","format":"uuid","title":"Task Mcp Server Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","nullable":true,"title":"Description"},"tool_name":{"type":"string","title":"Tool Name"},"tool_description":{"type":"string","nullable":true,"title":"Tool Description"},"tool_input_schema":{"additionalProperties":true,"type":"object","nullable":true,"title":"Tool Input Schema"},"enabled":{"type":"boolean","title":"Enabled"},"created":{"type":"string","title":"Created"},"modified":{"type":"string","title":"Modified"}},"type":"object","required":["id","task_mcp_server_id","name","tool_name","enabled","created","modified"],"title":"TaskMcpTool"},"TaskMcpToolCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"type":"string","nullable":true,"title":"Description"},"tool_name":{"type":"string","maxLength":255,"minLength":1,"title":"Tool Name"},"enabled":{"type":"boolean","title":"Enabled","default":true},"task_mcp_server_id":{"type":"string","format":"uuid","title":"Task Mcp Server Id"}},"type":"object","required":["name","tool_name","task_mcp_server_id"],"title":"TaskMcpToolCreate"},"TaskMcpToolUpdate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"nullable":true,"title":"Name"},"description":{"type":"string","nullable":true,"title":"Description"},"enabled":{"type":"boolean","nullable":true,"title":"Enabled"}},"type":"object","title":"TaskMcpToolUpdate"},"TaskRAG":{"properties":{"collection_id":{"type":"string","format":"uuid","title":"Collection Id"},"rag_param":{"type":"string","title":"Rag Param"}},"type":"object","required":["collection_id","rag_param"],"title":"TaskRAG"},"TaskRevision":{"properties":{"system_prompt":{"type":"string","title":"System Prompt","description":"The system prompt that is used to set the LLM context."},"user_prompt":{"type":"string","title":"User Prompt","description":"The description of the Task. It is not required to mention the outputs in the prompt, but it can help the model to understand the context better. Any input strings should be referenced with the dynamic `{...}` syntax, this informs the model to look for those values in the input data."},"llm_model_id":{"type":"string","format":"uuid","title":"Llm Model Id","description":"The LLM model to use for the Task."},"llm_config":{"additionalProperties":true,"type":"object","title":"Llm Config","description":"Specific configuration parameters for the LLM model."},"output_format":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/TagOutputFormat-Output"},{"type":"string","enum":["str","string","boolean","bool","int","integer","list","object","number"]}]},"type":"object","nullable":true,"title":"Output Format","description":"This gives control over the structure of how the Task responds. Supports shorthand notation or an object with `type` can be specified for each attribute. In most instances, the LLM will be able to generate the desired output into the relevant property, but an optional `description` can be passed to provide it with additional context."},"task_forwarder_id":{"type":"string","format":"uuid","nullable":true,"title":"Task Forwarder Id","description":"The unique identifier for a valid Task Forwarder. It is used to forward the Task output to another system or service."},"rag":{"$ref":"#/components/schemas/TaskRAG","nullable":true,"description":"**Note: This is a Paid Tier feature.** Provide additional domain specific input to the LLM so that it is able to reference user specific information when executing the Task. Examples of this could be a product catalogue, terms and conditions or a user manual."},"image_required":{"type":"boolean","title":"Image Required","description":"DEPRECATED: Use file_input_mode='image' instead. When true, equivalent to file_input_mode='image'.","default":false,"deprecated":true},"file_input_mode":{"$ref":"#/components/schemas/FileInputMode","description":"Specifies what file types are accepted for visual LLM processing. Values: 'none' (default), 'image', 'pdf', 'image_or_pdf', 'any'.","default":"none"},"optimise_images":{"type":"boolean","title":"Optimise Images","description":"When `true` (default) images will be automatically optimised before processing. Set to `false` to disable lossy image optimisation.","default":true},"test":{"type":"boolean","title":"Test","description":"True if revision is a test revision. Test revisions cannot be live and are used for rapid Task testing/iteration.","default":false},"input_processors":{"items":{"$ref":"#/components/schemas/TaskInputProcessor"},"type":"array","title":"Input Processors","default":[]},"annotation":{"type":"string","maxLength":255,"nullable":true,"title":"Annotation","description":"Optional note or comment about this revision. Useful for tracking changes, experiments, or the purpose of test revisions.","example":"Testing higher temperature"},"fallback_llm_model_id":{"type":"string","format":"uuid","nullable":true,"title":"Fallback Llm Model Id","description":"The LLM model to use as fallback if the primary model fails."},"fallback_llm_config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Fallback Llm Config","description":"Specific configuration parameters for the fallback LLM model."},"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the Revision."},"created":{"type":"string","title":"Created","description":"When the Task was created."},"modified":{"type":"string","nullable":true,"title":"Modified","description":"When the Task was last updated."},"active":{"type":"boolean","title":"Active","description":"When `true` the Revision is the currently active version and will be activated when the Task Run is executed.","default":false},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array","title":"Tags","default":[]},"llm_model":{"$ref":"#/components/schemas/LLMModel"},"fallback_llm_model":{"$ref":"#/components/schemas/LLMModel","nullable":true},"input_params":{"items":{"type":"string"},"type":"array","title":"Input Params","description":"A list of all the dynamic input parameters that are detected from the user prompt.","readOnly":true}},"type":"object","required":["system_prompt","user_prompt","llm_model_id","id","created","modified","llm_model","input_params"],"title":"TaskRevision","example":{"annotation":"Production v2 - Added image matching capability","description":"A task to pre-triage user onboarding before IDV.","enabled":true,"image_required":true,"input_processors":[{"config":{"extract_text":true,"include_title":true,"max_length":5000},"input_processor":"url_scraper","param_name":"description"}],"llm_config":{"temperature":0.7},"llm_model_id":"019011e6-e530-3aca-6cf7-2973387c255d","name":"Fintech Pre-Triage","optimise_images":true,"output_format":{"compliance":"bool","hint":{"type":"str"},"match":{"description":"True if the provided description is a close match","type":"bool"},"rationale":"str"},"rag":{"collection_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","rag_param":"context"},"system_prompt":"You are an expert software program specifically designed for the fintech industry that will be used for pre-triage tasks to ensure the best possible client UX and efficient 3rd party platform interoperability.","task_forwarder_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","test":false,"user_prompt":"Your task is to validate the uploaded image and determine whether it will be suitable for authentication and onboarding checks. If the image of the person is clear and typical of a passport style photo then set the compliance field to true. Provide rationale for your decision in the rationale field. If the compliance result is false, then provide a helpful hint for the customer who has submitted the photo informing them why it is unacceptable and some steps to remedy it, place this into the hint field. Determine whether the following description matches the provided image: {description}"}},"TaskRun":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"The unique identifier of the Task associated with this run."},"task_revision_id":{"type":"string","format":"uuid","title":"Task Revision Id","description":"The unique identifier of the Task Revision associated with this run."},"response":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}],"title":"Response","description":"The structured response from the Task execution."},"run_data":{"properties":{"submitted":{"type":"object","description":"The input parameters provided when executing the Task."}},"additionalProperties":true,"type":"object","required":["submitted"],"title":"Run Data","description":"Additional data about the Task execution, including submitted inputs.","example":{"submitted":{"description":"brown hair, blue sweater","image":"profile_photo.jpg"}}},"files":{"items":{"$ref":"#/components/schemas/TaskRunFileMetadata"},"type":"array","title":"Files","description":"List of file metadata objects with enriched information including download URLs.","default":[],"example":[{"content_type":"application/pdf","download_url":"/org/.../project/.../task/.../run/.../file/b4a66744...pdf","original_filename":"contract.pdf","size_bytes":1024576,"stored_filename":"b4a66744-6e99-4ad4-8aff-4d953bb0b9cf.pdf"}]},"is_error":{"type":"boolean","title":"Is Error","default":false},"llm_retries":{"type":"integer","title":"Llm Retries","description":"Number of retry attempts made during LLM execution.","default":0,"example":0},"used_fallback_model":{"type":"boolean","title":"Used Fallback Model","description":"Whether the fallback model was used","default":false},"primary_failure_reason":{"type":"string","nullable":true,"title":"Primary Failure Reason","description":"Reason the primary model failed"},"fallback_llm_model_id":{"type":"string","format":"uuid","nullable":true,"title":"Fallback Llm Model Id","description":"Fallback model that was used"},"user_id":{"type":"string","format":"uuid","nullable":true,"title":"User Id","description":"The unique identifier of the User who executed the task.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"reporting_group_id":{"type":"string","format":"uuid","nullable":true,"title":"Reporting Group Id","description":"The ID of the reporting group to associate with this task run"},"reference":{"type":"string","maxLength":64,"nullable":true,"title":"Reference","description":"An optional reference identifier for this task run"},"context_id":{"type":"string","maxLength":64,"nullable":true,"title":"Context Id","description":"An optional context ID for grouping related task runs"},"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the Task Run."},"created":{"type":"string","title":"Created","description":"The timestamp when the Task Run was created."},"input_tokens":{"type":"integer","title":"Input Tokens","description":"The number of tokens submit as input to the model."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"The number of tokens generated and output by the model."},"total_tokens":{"type":"integer","title":"Total Tokens","description":"The total token usage for the TaskRun."},"input_processor_timing":{"type":"number","nullable":true,"title":"Input Processor Timing","description":"The execution time for the TaskRun in seconds."},"llm_call_timing":{"type":"number","nullable":true,"title":"Llm Call Timing","description":"The execution time for the TaskRun in seconds."},"charged_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","nullable":true,"title":"Charged Credits","description":"The total credits charged for the TaskRun."},"reporting_group":{"$ref":"#/components/schemas/ReportingGroup","nullable":true,"description":"The reporting group associated with this task run"}},"type":"object","required":["task_id","task_revision_id","response","run_data","id","created","input_tokens","output_tokens","total_tokens","input_processor_timing","llm_call_timing","charged_credits"],"title":"TaskRun","example":{"charged_credits":"2.82","created":"2024-07-11T14:31:21.989219","files":[{"content_type":"image/jpeg","download_url":"/org/018936f0.../project/01910ec3.../task/019011e6.../run/0190a234.../file/a1b2c3d4-5e6f-7890-abcd-ef1234567890.jpg","original_filename":"profile_photo.jpg","size_bytes":524288,"stored_filename":"a1b2c3d4-5e6f-7890-abcd-ef1234567890.jpg"}],"id":"0190a234-cb74-6342-dec6-4be8f73f0c9f","input_processor_timing":0.35,"input_tokens":295,"llm_call_timing":2.45,"output_tokens":58,"response":{"compliance":false,"hint":"The image is not suitable for authentication and onboarding checks. Please ensure the photo is a clear, passport-style image with a plain background, good lighting, and no accessories like sunglasses.","match":false,"rationale":"The image does not meet the requirements for a passport-style photo. The person is wearing sunglasses, and the background is not plain."},"run_data":{"submitted":{"description":"brown hair, blue sweater","image":"profile_photo.jpg"}},"task_id":"019011e6-e530-3aca-6cf7-2973387c255d","task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","total_tokens":353}},"TaskRunCreditReport":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"The unique identifier of the Task.","example":"019011e6-e530-3aca-6cf7-2973387c255d"},"task_revisions":{"items":{"$ref":"#/components/schemas/TaskRunRevisionCreditReport"},"type":"array","title":"Task Revisions","description":"Timing data broken down by task revision, showing performance metrics for each active revision."},"total_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Credits","description":"Total credits charged for the Task.","example":"100.00"},"total_task_runs":{"type":"integer","title":"Total Task Runs","description":"Total number of task runs for each time interval.","example":12},"date_range":{"additionalProperties":{"type":"string","nullable":true},"type":"object","title":"Date Range","description":"The time range for the report, with start and end timestamps.","example":{"end":"2024-03-15T15:00:00+00:00","start":"2024-03-14T15:00:00+00:00"}}},"type":"object","required":["task_id","task_revisions","total_credits","total_task_runs","date_range"],"title":"TaskRunCreditReport"},"TaskRunFileMetadata":{"properties":{"original_filename":{"type":"string","title":"Original Filename","description":"The original filename as submitted by the user","example":"contract.pdf"},"stored_filename":{"type":"string","title":"Stored Filename","description":"The generated filename used for storage","example":"b4a66744-6e99-4ad4-8aff-4d953bb0b9cf.pdf"},"content_type":{"type":"string","title":"Content Type","description":"MIME type of the file","example":"application/pdf"},"download_url":{"type":"string","nullable":true,"title":"Download Url","description":"Relative URL to download the file (generated dynamically, not stored in database)","example":"/org/abc123.../project/def456.../task/ghi789.../run/jkl012.../file/b4a66744-6e99-4ad4-8aff-4d953bb0b9cf.pdf"},"size_bytes":{"type":"integer","nullable":true,"title":"Size Bytes","description":"File size in bytes (if available)","example":1024576}},"type":"object","required":["original_filename","stored_filename","content_type"],"title":"TaskRunFileMetadata","description":"Metadata for files submitted/generated during task execution.","example":{"content_type":"application/pdf","download_url":"/org/abc/project/def/task/ghi/run/jkl/file/b4a66744-6e99-4ad4-8aff-4d953bb0b9cf.pdf","original_filename":"my-document.pdf","size_bytes":1024576,"stored_filename":"b4a66744-6e99-4ad4-8aff-4d953bb0b9cf.pdf"}},"TaskRunRevisionCreditReport":{"properties":{"task_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Task Revision Id","description":"The unique identifier of the Task Revision, or 'test' for test revisions.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"reporting_group":{"type":"string","nullable":true,"title":"Reporting Group","description":"The name of the reporting group, or 'ungrouped' if no reporting group is assigned. Only present when grouping by reporting groups.","example":"batch_processing"},"total_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Credits","description":"Total credits charged for the Task Revision.","example":"100.00"},"total_task_runs":{"type":"integer","title":"Total Task Runs","description":"Total number of task runs for this revision."}},"type":"object","required":["task_revision_id","total_credits","total_task_runs"],"title":"TaskRunRevisionCreditReport","example":{"reporting_group":"batch_processing","task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","total_credits":"100.00","total_task_runs":12}},"TaskRunRevisionTimingReport":{"properties":{"task_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Task Revision Id","description":"The unique identifier of the Task Revision, or 'test' for test revisions.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"data":{"additionalProperties":true,"type":"object","title":"Data","description":"Timing data for each time interval, containing average LLM call timing and total task runs.","example":{"2024-03-14T15:00:00":{"avg_llm_call_timing":2.45,"total_task_runs":150}}}},"type":"object","required":["task_revision_id","data"],"title":"TaskRunRevisionTimingReport","example":{"aggregation":"hour","date_range":{"end":"2024-03-15T15:00:00+00:00","start":"2024-03-14T15:00:00+00:00"},"task_id":"019011e6-e530-3aca-6cf7-2973387c255d","task_revisions":[{"data":{"2024-03-14T15:00:00":{"avg_llm_call_timing":2.45,"total_task_runs":150},"2024-03-14T16:00:00":{"avg_llm_call_timing":2.38,"total_task_runs":165}},"task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1"}],"total_task_runs":{"2024-03-14T15:00:00":150,"2024-03-14T16:00:00":165}}},"TaskRunRevisionTokenReport":{"properties":{"task_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Task Revision ID","description":"Unique identifier of the task revision, or 'test' for test revisions","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"reporting_group":{"type":"string","nullable":true,"title":"Reporting Group","description":"The name of the reporting group, or None if no reporting group is assigned. Only present when grouping by reporting groups.","example":"batch_processing"},"total_input_tokens":{"type":"integer","minimum":0.0,"title":"Total Input Tokens","description":"Total number of input tokens consumed by this revision during the reporting period","example":6000},"total_output_tokens":{"type":"integer","minimum":0.0,"title":"Total Output Tokens","description":"Total number of output tokens generated by this revision during the reporting period","example":3000},"total_tokens":{"type":"integer","minimum":0.0,"title":"Total Tokens","description":"Combined total of input and output tokens for this revision","example":9000},"total_task_runs":{"type":"integer","minimum":0.0,"title":"Total Task Runs","description":"Number of times this revision was executed during the reporting period","example":60}},"type":"object","required":["task_revision_id","total_input_tokens","total_output_tokens","total_tokens","total_task_runs"],"title":"TaskRunRevisionTokenReport","description":"Token usage report for a specific task revision.\n\nThis model represents detailed token consumption statistics for a single task revision,\nincluding input, output, and total token counts along with execution counts.","example":{"reporting_group":"batch_processing","task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","total_input_tokens":6000,"total_output_tokens":3000,"total_task_runs":60,"total_tokens":9000}},"TaskRunRevisionUsageReport":{"properties":{"task_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Task Revision Id","description":"The unique identifier of the Task Revision, or 'test' for test revisions.","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"data":{"additionalProperties":{"type":"integer"},"type":"object","title":"Data","description":"Usage counts for each time interval.","example":{"2024-03-14T15:00:00":150,"2024-03-14T16:00:00":165}}},"type":"object","required":["task_revision_id","data"],"title":"TaskRunRevisionUsageReport","example":{"aggregation":"day","date_range":{"end":"2024-03-15T15:00:00+00:00","start":"2024-03-14T15:00:00+00:00"},"task_id":"019011e6-e530-3aca-6cf7-2973387c255d","task_revisions":[{"data":{"2024-03-14T15:00:00":150,"2024-03-14T16:00:00":165},"task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1"}],"total_counts":{"2024-03-14T15:00:00":150,"2024-03-14T16:00:00":165}}},"TaskRunTimingReport":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"The unique identifier of the Task.","example":"019011e6-e530-3aca-6cf7-2973387c255d"},"date_range":{"additionalProperties":{"type":"string","nullable":true},"type":"object","title":"Date Range","description":"The time range for the report, with start and end timestamps.","example":{"end":"2024-03-15T15:00:00+00:00","start":"2024-03-14T15:00:00+00:00"}},"aggregation":{"type":"string","enum":["hour","day"],"title":"Aggregation","description":"The time interval for data aggregation. 'hour' shows last 24 hours in hourly blocks, 'day' shows last 7 days in daily blocks.","example":"hour"},"total_task_runs":{"additionalProperties":{"type":"integer"},"type":"object","title":"Total Task Runs","description":"Total number of task runs for each time interval.","example":{"2024-03-14T15:00:00":150,"2024-03-14T16:00:00":165}},"task_revisions":{"items":{"$ref":"#/components/schemas/TaskRunRevisionTimingReport"},"type":"array","title":"Task Revisions","description":"Timing data broken down by task revision, showing performance metrics for each active revision."}},"type":"object","required":["task_id","date_range","aggregation","total_task_runs","task_revisions"],"title":"TaskRunTimingReport","example":{"aggregation":"hour","date_range":{"end":"2024-03-15T15:00:00+00:00","start":"2024-03-14T15:00:00+00:00"},"task_id":"019011e6-e530-3aca-6cf7-2973387c255d","task_revisions":[{"data":{"2024-03-14T15:00:00":{"avg_llm_call_timing":2.45,"total_task_runs":150}},"task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1"}],"total_task_runs":{"2024-03-14T15:00:00":150,"2024-03-14T16:00:00":165}}},"TaskRunTokenReport":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task ID","description":"Unique identifier of the task","example":"0190a234-8dc6-6d08-aea9-928fcecad8f1"},"date_range":{"additionalProperties":{"type":"string","nullable":true},"type":"object","title":"Date Range","description":"Time period covered by the report, with start and end timestamps","example":{"end":"2024-01-31T23:59:59Z","start":"2024-01-01T00:00:00Z"}},"total_input_tokens":{"type":"integer","minimum":0.0,"title":"Total Input Tokens","description":"Total number of input tokens consumed across all revisions and runs","example":10000},"total_output_tokens":{"type":"integer","minimum":0.0,"title":"Total Output Tokens","description":"Total number of output tokens generated across all revisions and runs","example":5000},"total_tokens":{"type":"integer","minimum":0.0,"title":"Total Tokens","description":"Combined total of input and output tokens across all revisions","example":15000},"total_task_runs":{"type":"integer","minimum":0.0,"title":"Total Task Runs","description":"Total number of task executions across all revisions","example":100},"task_revisions":{"items":{"$ref":"#/components/schemas/TaskRunRevisionTokenReport"},"type":"array","title":"Task Revisions","description":"Token usage breakdown by task revision, showing detailed statistics for each active revision"}},"type":"object","required":["task_id","date_range","total_input_tokens","total_output_tokens","total_tokens","total_task_runs","task_revisions"],"title":"TaskRunTokenReport","description":"Comprehensive token usage report for a task.\n\nThis model provides a detailed breakdown of token consumption across all revisions\nof a task, including aggregated totals and per-revision statistics.","example":{"date_range":{"end":"2024-01-31T23:59:59Z","start":"2024-01-01T00:00:00Z"},"task_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1","task_revisions":[{"task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f2","total_input_tokens":6000,"total_output_tokens":3000,"total_task_runs":60,"total_tokens":9000},{"task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f3","total_input_tokens":4000,"total_output_tokens":2000,"total_task_runs":40,"total_tokens":6000}],"total_input_tokens":10000,"total_output_tokens":5000,"total_task_runs":100,"total_tokens":15000}},"TaskRunUsageReport":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"The unique identifier of the Task.","example":"019011e6-e530-3aca-6cf7-2973387c255d"},"date_range":{"additionalProperties":true,"type":"object","title":"Date Range","description":"The time range for the report, with start and end timestamps.","example":{"end":"2024-03-15T15:00:00+00:00","start":"2024-03-14T15:00:00+00:00"}},"aggregation":{"type":"string","enum":["day","week"],"title":"Aggregation","description":"The time interval for data aggregation. 'day' shows last 24 hours in hourly blocks, 'week' shows last 7 days in daily blocks.","example":"day"},"task_revisions":{"items":{"$ref":"#/components/schemas/TaskRunRevisionUsageReport"},"type":"array","title":"Task Revisions","description":"Usage data broken down by task revision, showing invocation counts for each active revision."},"total_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Total Counts","description":"Total number of task invocations for each time interval across all revisions.","example":{"2024-03-14T15:00:00":150,"2024-03-14T16:00:00":165}}},"type":"object","required":["task_id","date_range","aggregation","task_revisions","total_counts"],"title":"TaskRunUsageReport","example":{"aggregation":"day","date_range":{"end":"2024-03-15T15:00:00+00:00","start":"2024-03-14T15:00:00+00:00"},"task_id":"019011e6-e530-3aca-6cf7-2973387c255d","task_revisions":[{"data":{"2024-03-14T15:00:00":150,"2024-03-14T16:00:00":165},"task_revision_id":"0190a234-8dc6-6d08-aea9-928fcecad8f1"}],"total_counts":{"2024-03-14T15:00:00":150,"2024-03-14T16:00:00":165}}},"TaskShare":{"properties":{"title":{"type":"string","nullable":true,"title":"Title"},"description":{"type":"string","nullable":true,"title":"Description"},"expires_at":{"type":"string","nullable":true,"title":"Expires At"},"id":{"type":"string","format":"uuid","title":"Id"},"task_id":{"type":"string","format":"uuid","title":"Task Id"},"task_revision_id":{"type":"string","format":"uuid","title":"Task Revision Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"task_run_id":{"type":"string","format":"uuid","nullable":true,"title":"Task Run Id","description":"Optional TaskRun ID included as an example of the task's performance."},"task_name":{"type":"string","title":"Task Name","description":"Name of the associated task"},"short_id":{"type":"string","title":"Short Id"},"share_url":{"type":"string","title":"Share Url"},"views_count":{"type":"integer","title":"Views Count"},"active":{"type":"boolean","title":"Active"},"created":{"type":"string","title":"Created"},"modified":{"type":"string","title":"Modified"},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array","title":"Tags","default":[]}},"type":"object","required":["id","task_id","task_revision_id","user_id","task_name","short_id","share_url","views_count","active","created","modified"],"title":"TaskShare","description":"Schema for task share response data"},"TaskShareCreate":{"properties":{"title":{"type":"string","nullable":true,"title":"Title"},"description":{"type":"string","nullable":true,"title":"Description"},"expires_at":{"type":"string","format":"date-time","nullable":true,"title":"Expires At"},"task_revision_id":{"type":"string","format":"uuid","nullable":true,"title":"Task Revision Id"},"task_run_id":{"type":"string","format":"uuid","nullable":true,"title":"Task Run Id","description":"Optional TaskRun ID to include as an example. Must belong to the task revision being shared."},"custom_short_id":{"type":"string","maxLength":5,"minLength":3,"pattern":"^[a-zA-Z0-9]+$","nullable":true,"title":"Custom Short Id"}},"type":"object","title":"TaskShareCreate","description":"Schema for creating a new task share"},"TaskUpdate":{"properties":{"system_prompt":{"type":"string","nullable":true,"title":"System Prompt","description":"The system prompt that is used to set the LLM context."},"user_prompt":{"type":"string","nullable":true,"title":"User Prompt","description":"The description of the Task. It is not required to mention the outputs in the prompt, but it can help the model to understand the context better. Any input strings should be referenced with the dynamic `{...}` syntax, this informs the model to look for those values in the input data."},"llm_model_id":{"type":"string","format":"uuid","nullable":true,"title":"Llm Model Id","description":"The LLM model to use for the Task."},"llm_config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Llm Config","description":"Specific configuration parameters for the LLM model."},"output_format":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/TagOutputFormat-Input"},{"type":"string","enum":["str","string","boolean","bool","int","integer","list","object","number"]}]},"type":"object","nullable":true,"title":"Output Format","description":"This gives control over the structure of how the Task responds. Supports shorthand notation or an object with `type` can be specified for each attribute. In most instances, the LLM will be able to generate the desired output into the relevant property, but an optional `description` can be passed to provide it with additional context."},"task_forwarder_id":{"type":"string","format":"uuid","nullable":true,"title":"Task Forwarder Id","description":"The unique identifier for a valid Task Forwarder. It is used to forward the Task output to another system or service."},"rag":{"$ref":"#/components/schemas/TaskRAG","nullable":true,"description":"**Note: This is a Paid Tier feature.** Provide additional domain specific input to the LLM so that it is able to reference user specific information when executing the Task. Examples of this could be a product catalogue, terms and conditions or a user manual."},"image_required":{"type":"boolean","nullable":true,"title":"Image Required","description":"DEPRECATED: Use file_input_mode='image' instead. When true, equivalent to file_input_mode='image'.","deprecated":true},"file_input_mode":{"$ref":"#/components/schemas/FileInputMode","nullable":true,"description":"Specifies what file types are accepted for visual LLM processing. Values: 'none' (default), 'image', 'pdf', 'image_or_pdf', 'any'."},"annotation":{"type":"string","maxLength":255,"nullable":true,"title":"Annotation"},"test":{"type":"boolean","title":"Test","description":"True if revision is a test revision. Test revisions cannot be live and are used for rapid Task testing/iteration.","default":false},"input_processors":{"items":{"$ref":"#/components/schemas/TaskInputProcessor"},"type":"array","title":"Input Processors","default":[]},"optimise_images":{"type":"boolean","nullable":true,"title":"Optimise Images","description":"When `true` (default) images will be automatically optimised before processing. Set to `false` to disable lossy image optimisation.","default":true},"fallback_llm_model_id":{"type":"string","format":"uuid","nullable":true,"title":"Fallback Llm Model Id","description":"The LLM model to use as fallback if the primary model fails."},"fallback_llm_config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Fallback Llm Config","description":"Specific configuration parameters for the fallback LLM model."},"name":{"type":"string","maxLength":63,"pattern":"^[a-zA-Z0-9\\- ]+$","nullable":true,"title":"Name","description":"A name or reference for the Task."},"description":{"type":"string","nullable":true,"title":"Description","description":"A longer description of the Task for internal reference."},"enabled":{"type":"boolean","nullable":true,"title":"Enabled","description":"When `true` the Task is active and callable. `false` denotes the Task is not yet operational."},"exposed_to_agents":{"type":"boolean","nullable":true,"title":"Exposed To Agents","description":"When `true` the Task is accessible to agents through the unauthenticated agent endpoint."},"task_run_visibility":{"type":"string","enum":["owner_only","editors_and_owners","all_viewers"],"nullable":true,"title":"Task Run Visibility","description":"Controls who can view all task runs. 'owner_only' - only task owners see all runs (default), 'editors_and_owners' - task editors and owners see all runs, 'all_viewers' - all users with view permission see all runs."},"active_revisions":{"items":{"$ref":"#/components/schemas/TaskActiveRevision"},"type":"array","nullable":true,"title":"Active Revisions","description":"The revision currently active for this Task."},"tags":{"items":{"type":"string","format":"uuid"},"type":"array","nullable":true,"title":"Tags"},"revision_tags":{"items":{"type":"string","format":"uuid"},"type":"array","nullable":true,"title":"Revision Tags"}},"type":"object","title":"TaskUpdate"},"Task_ForwarderIAMMemberRoleUpdate":{"properties":{"add":{"items":{"type":"string","enum":["editor","owner","viewer"]},"type":"array","title":"Add","description":"A list of task_forwarder roles to grant to the member.\n\nRoles in this list are applied to the member AFTER any removals specified in `remove`.\n\nThis may be combined with `remove_all` to replace the member's entire role list."},"remove":{"items":{"type":"string","enum":["editor","owner","viewer"]},"type":"array","title":"Remove","description":"A list of task_forwarder roles to revoke from the member."},"remove_all":{"type":"boolean","nullable":true,"title":"Remove All","description":"Removes all existing roles from the member. This may be combined with `add` to replace all existing roles that the member holds.","default":false}},"type":"object","title":"Task ForwarderIAMMemberRoleUpdate"},"Task_ForwarderIAMPermissionTest":{"properties":{"permissions":{"items":{"type":"string","enum":["add_editor","add_member","add_owner","edit","remove_editor","remove_member","remove_owner","view","view_members"]},"type":"array","title":"Permissions","description":"A list of permissions to test on the task_forwarder."},"member":{"type":"string","nullable":true,"title":"Member"}},"type":"object","required":["permissions"],"title":"Task ForwarderIAMPermissionTest"},"ToolCallInfo":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the tool/skill called."},"args":{"additionalProperties":true,"type":"object","nullable":true,"title":"Args","description":"Arguments passed to the tool."}},"type":"object","required":["name"],"title":"ToolCallInfo","description":"Information about a tool/skill call within an event."},"ToolResultInfo":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the tool/skill."},"result":{"additionalProperties":true,"type":"object","nullable":true,"title":"Result","description":"Result returned by the tool."}},"type":"object","required":["name"],"title":"ToolResultInfo","description":"Information about a tool/skill result within an event."},"TriggerListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique identifier for the trigger."},"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"The Task this trigger is bound to."},"trigger_type":{"type":"string","title":"Trigger Type","description":"The type of trigger (webhook for this endpoint)."},"name":{"type":"string","title":"Name","description":"A descriptive name for the trigger."},"description":{"type":"string","nullable":true,"title":"Description","description":"Additional details about the trigger's purpose."},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the trigger is active and can receive webhooks."},"created":{"type":"string","title":"Created","description":"When the trigger was created."}},"type":"object","required":["id","task_id","trigger_type","name","enabled","created"],"title":"TriggerListItem","description":"List item for triggers (any type)."},"UpdateExpiredTrialsRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","description":"If true, only simulate the update without making changes","default":false},"grace_period_days":{"type":"integer","maximum":30.0,"minimum":0.0,"title":"Grace Period Days","description":"Number of days after trial expiration before updating status","default":1}},"type":"object","title":"UpdateExpiredTrialsRequest","description":"Request schema for updating expired trials."},"UpdateExpiredTrialsResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"total_found":{"type":"integer","title":"Total Found","description":"Total number of expired trials found"},"total_updated":{"type":"integer","title":"Total Updated","description":"Number of trials actually updated"},"organizations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Organizations","description":"List of affected organizations with details"},"message":{"type":"string","title":"Message","description":"Human-readable status message"}},"type":"object","required":["success","total_found","total_updated","organizations","message"],"title":"UpdateExpiredTrialsResponse","description":"Response schema for updating expired trials."},"User":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"type":"string","nullable":true,"title":"Name"},"bio":{"type":"string","nullable":true,"title":"Bio"},"avatar_url":{"type":"string","nullable":true,"title":"Avatar Url"},"subscribed_to_newsletter":{"type":"boolean","title":"Subscribed To Newsletter","default":false},"job_role":{"type":"string","enum":["student","engineer","designer","product manager","entrepreneur","marketer","educator","researcher","freelancer","other"],"nullable":true,"title":"Job Role"},"id":{"type":"string","format":"uuid","title":"Id"},"is_onboarding":{"type":"boolean","title":"Is Onboarding"}},"type":"object","required":["email","name","id","is_onboarding"],"title":"User"},"UserOAuthClientCreate":{"properties":{"name":{"type":"string","title":"Name","description":"Name for the new OAuth client.","example":"Production API Client"},"description":{"type":"string","nullable":true,"title":"Description","description":"Optional description of the client's purpose.","example":"OAuth client for production API access"},"redirect_uris":{"items":{"type":"string"},"type":"array","nullable":true,"title":"Redirect Uris","description":"List of authorized redirect URIs.\nRequired if using authorization_code or implicit grant types.","example":["https://app.example.com/oauth/callback"]},"grant_types":{"items":{"$ref":"#/components/schemas/OAuthClientGrantType"},"type":"array","nullable":true,"title":"Grant Types","description":"List of OAuth grant types to enable.","example":["client_credentials","refresh_token"]},"type":{"type":"string","enum":["user","project"],"title":"Type","description":"Type of OAuth client to create:\n- user: Standard client tied to creating user's permissions\n- project: Service account client with project-level permissions","default":"user","example":"user"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","none"],"title":"Token Endpoint Auth Method","description":"Authentication method for the client:\n- client_secret_basic: Client ID and secret sent in HTTP headers\n- client_secret_post: Client ID and secret sent in request body\n- none: No client authentication (required for public clients using PKCE)","default":"client_secret_basic","example":"client_secret_basic"},"pkce_required":{"type":"boolean","title":"Pkce Required","description":"Whether to require PKCE (Proof Key for Code Exchange) for authorization code flows.\nPKCE enhances security by requiring code_challenge and code_verifier parameters.\nIMPORTANT: Only applicable when 'authorization_code' is included in grant_types.\nStrongly recommended for public clients (mobile apps, SPAs) and beneficial for all clients.","default":false,"example":true},"pkce_challenge_method":{"$ref":"#/components/schemas/OAuthClientPKCEChallengeMethod","description":"PKCE code challenge method when PKCE is enabled.\n- S256: SHA256 hash of code verifier (recommended and secure)\n- plain: Plain text code verifier (not recommended, only for testing)","default":"S256","example":"S256"}},"type":"object","required":["name"],"title":"UserOAuthClientCreate"},"UserProfileUpdate":{"properties":{"name":{"type":"string","nullable":true,"title":"Name"},"bio":{"type":"string","nullable":true,"title":"Bio"},"subscribed_to_newsletter":{"type":"boolean","title":"Subscribed To Newsletter","default":false},"job_role":{"type":"string","enum":["student","engineer","designer","product manager","entrepreneur","marketer","educator","researcher","freelancer","other"],"nullable":true,"title":"Job Role"}},"type":"object","title":"UserProfileUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VisionFilter":{"type":"string","enum":["image","pdf"],"title":"VisionFilter","description":"Vision (input) capability filter for model listing."},"WebhookForwarderCreate":{"properties":{"name":{"type":"string","title":"Name","description":"A descriptive name for the Task Forwarder."},"description":{"type":"string","nullable":true,"title":"Description","description":"Additional details about the Task Forwarder's purpose or configuration."},"forwarder_type":{"type":"string","title":"Forwarder Type","description":"Type of forwarder: webhook for HTTP POST delivery","default":"webhook"},"config":{"$ref":"#/components/schemas/TaskForwarderConfig","description":"Configuration parameters for the Task Forwarder such as a `destination` URL."},"config_sensitive":{"$ref":"#/components/schemas/TaskForwarderSensitiveConfig","nullable":true,"description":"Sensitive parameters for the Task Forwarder such as a `signing_key`."}},"type":"object","required":["name","config"],"title":"WebhookForwarderCreate"},"WebhookForwarderInDB":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the Task Forwarder."},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"The Project that the Task Forwarder belongs to."},"created":{"type":"string","title":"Created","description":"When the Task Forwarder was created."},"modified":{"type":"string","title":"Modified","description":"When the Task Forwarder was last updated."},"name":{"type":"string","title":"Name","description":"A descriptive name for the Task Forwarder."},"description":{"type":"string","nullable":true,"title":"Description","description":"Additional details about the Task Forwarder's purpose or configuration."},"forwarder_type":{"type":"string","title":"Forwarder Type","description":"Type of forwarder: webhook for HTTP POST delivery","default":"webhook"},"config":{"$ref":"#/components/schemas/TaskForwarderConfig","description":"Configuration parameters for the Task Forwarder such as a `destination` URL."},"config_sensitive":{"$ref":"#/components/schemas/TaskForwarderSensitiveConfig","nullable":true,"description":"Sensitive parameters for the Task Forwarder such as a `signing_key`."}},"type":"object","required":["id","project_id","created","modified","name","config"],"title":"WebhookForwarderInDB"},"WebhookForwarderUpdate":{"properties":{"name":{"type":"string","nullable":true,"title":"Name","description":"A descriptive name for the Task Forwarder."},"description":{"type":"string","nullable":true,"title":"Description","description":"Additional details about the Task Forwarder's purpose or configuration."},"forwarder_type":{"type":"string","title":"Forwarder Type","description":"Type of forwarder: webhook","default":"webhook"},"config":{"$ref":"#/components/schemas/TaskForwarderConfig","nullable":true,"description":"Configuration parameters for the Task Forwarder such as a `destination` URL."},"config_sensitive":{"$ref":"#/components/schemas/TaskForwarderSensitiveConfig","nullable":true,"description":"Sensitive parameters for the Task Forwarder such as a `signing_key`."}},"type":"object","title":"WebhookForwarderUpdate"},"WebhookTriggerCreate":{"properties":{"name":{"type":"string","maxLength":63,"minLength":1,"title":"Name","description":"A descriptive name for the trigger."},"description":{"type":"string","maxLength":255,"nullable":true,"title":"Description","description":"Additional details about the trigger's purpose."},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the trigger is active and can receive webhooks.","default":true},"auth_method":{"type":"string","enum":["hmac_sha256","bearer_token"],"title":"Auth Method","description":"Authentication method for incoming webhooks."},"auth_config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Auth Config","description":"Authentication configuration (e.g., signature header name)."},"auth_secret":{"type":"string","nullable":true,"title":"Auth Secret","description":"Secret key for authentication (only shown on creation)."},"payload_mapping":{"additionalProperties":true,"type":"object","nullable":true,"title":"Payload Mapping","description":"JSONPath mappings from webhook payload to Task inputs."},"include_raw_payload":{"type":"boolean","title":"Include Raw Payload","description":"Whether to include the entire payload as _raw_payload.","default":false},"idempotency_key_path":{"type":"string","maxLength":255,"nullable":true,"title":"Idempotency Key Path","description":"JSONPath to extract idempotency key from payload."},"idempotency_ttl_seconds":{"type":"integer","maximum":604800.0,"minimum":60.0,"title":"Idempotency Ttl Seconds","description":"How long to remember processed idempotency keys.","default":86400}},"type":"object","required":["name","auth_method"],"title":"WebhookTriggerCreate","description":"Schema for creating a new webhook trigger."},"WebhookTriggerEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique identifier for the event."},"webhook_trigger_id":{"type":"string","format":"uuid","title":"Webhook Trigger Id","description":"The trigger this event belongs to."},"request_id":{"type":"string","title":"Request Id","description":"Request ID for tracing."},"idempotency_key":{"type":"string","nullable":true,"title":"Idempotency Key","description":"Idempotency key if extracted."},"http_method":{"type":"string","title":"Http Method","description":"HTTP method of the request."},"source_ip":{"type":"string","title":"Source Ip","description":"Source IP address of the request."},"status":{"type":"string","title":"Status","description":"Event status (received, completed, failed, duplicate)."},"error_message":{"type":"string","nullable":true,"title":"Error Message","description":"Error message if failed."},"error_code":{"type":"string","nullable":true,"title":"Error Code","description":"Error code if failed."},"task_run_id":{"type":"string","format":"uuid","nullable":true,"title":"Task Run Id","description":"Associated TaskRun ID if successful."},"received_at":{"type":"string","title":"Received At","description":"When the webhook was received."},"completed_at":{"type":"string","nullable":true,"title":"Completed At","description":"When processing completed."},"response_status_code":{"type":"integer","nullable":true,"title":"Response Status Code","description":"HTTP response status code."},"response_time_ms":{"type":"integer","nullable":true,"title":"Response Time Ms","description":"Response time in milliseconds."}},"type":"object","required":["id","webhook_trigger_id","request_id","http_method","source_ip","status","received_at"],"title":"WebhookTriggerEventResponse","description":"Response schema for a webhook trigger event."},"WebhookTriggerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique identifier for the trigger."},"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"The Task this trigger is bound to."},"trigger_type":{"type":"string","title":"Trigger Type","description":"The type of trigger (webhook for this endpoint).","default":"webhook"},"name":{"type":"string","title":"Name","description":"A descriptive name for the trigger."},"description":{"type":"string","nullable":true,"title":"Description","description":"Additional details about the trigger's purpose."},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the trigger is active and can receive webhooks."},"endpoint_id":{"type":"string","title":"Endpoint Id","description":"Unique endpoint identifier used in the webhook URL."},"endpoint_url":{"type":"string","title":"Endpoint Url","description":"Full URL for receiving webhook requests."},"auth_method":{"type":"string","title":"Auth Method","description":"Authentication method for incoming webhooks."},"auth_config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Auth Config","description":"Authentication configuration (e.g., signature header name)."},"payload_mapping":{"additionalProperties":true,"type":"object","nullable":true,"title":"Payload Mapping","description":"JSONPath mappings from webhook payload to Task inputs."},"include_raw_payload":{"type":"boolean","title":"Include Raw Payload","description":"Whether to include the entire payload as _raw_payload."},"idempotency_key_path":{"type":"string","nullable":true,"title":"Idempotency Key Path","description":"JSONPath to extract idempotency key from payload."},"idempotency_ttl_seconds":{"type":"integer","title":"Idempotency Ttl Seconds","description":"How long to remember processed idempotency keys."},"created":{"type":"string","title":"Created","description":"When the trigger was created."},"modified":{"type":"string","title":"Modified","description":"When the trigger was last updated."},"created_by_user_id":{"type":"string","format":"uuid","title":"Created By User Id","description":"User who created the trigger."}},"type":"object","required":["id","task_id","name","enabled","endpoint_id","endpoint_url","auth_method","include_raw_payload","idempotency_ttl_seconds","created","modified","created_by_user_id"],"title":"WebhookTriggerResponse","description":"Response schema for a webhook trigger."},"WebhookTriggerUpdate":{"properties":{"name":{"type":"string","maxLength":63,"minLength":1,"nullable":true,"title":"Name","description":"A descriptive name for the trigger."},"description":{"type":"string","maxLength":255,"nullable":true,"title":"Description","description":"Additional details about the trigger's purpose."},"enabled":{"type":"boolean","nullable":true,"title":"Enabled","description":"Whether the trigger is active and can receive webhooks."},"auth_config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Auth Config","description":"Authentication configuration (e.g., signature header name)."},"payload_mapping":{"additionalProperties":true,"type":"object","nullable":true,"title":"Payload Mapping","description":"JSONPath mappings from webhook payload to Task inputs."},"include_raw_payload":{"type":"boolean","nullable":true,"title":"Include Raw Payload","description":"Whether to include the entire payload as _raw_payload."},"idempotency_key_path":{"type":"string","maxLength":255,"nullable":true,"title":"Idempotency Key Path","description":"JSONPath to extract idempotency key from payload."},"idempotency_ttl_seconds":{"type":"integer","maximum":604800.0,"minimum":60.0,"nullable":true,"title":"Idempotency Ttl Seconds","description":"How long to remember processed idempotency keys."}},"type":"object","title":"WebhookTriggerUpdate","description":"Schema for updating a webhook trigger."},"WebhookTriggerWithSecret":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique identifier for the trigger."},"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"The Task this trigger is bound to."},"trigger_type":{"type":"string","title":"Trigger Type","description":"The type of trigger (webhook for this endpoint).","default":"webhook"},"name":{"type":"string","title":"Name","description":"A descriptive name for the trigger."},"description":{"type":"string","nullable":true,"title":"Description","description":"Additional details about the trigger's purpose."},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the trigger is active and can receive webhooks."},"endpoint_id":{"type":"string","title":"Endpoint Id","description":"Unique endpoint identifier used in the webhook URL."},"endpoint_url":{"type":"string","title":"Endpoint Url","description":"Full URL for receiving webhook requests."},"auth_method":{"type":"string","title":"Auth Method","description":"Authentication method for incoming webhooks."},"auth_config":{"additionalProperties":true,"type":"object","nullable":true,"title":"Auth Config","description":"Authentication configuration (e.g., signature header name)."},"payload_mapping":{"additionalProperties":true,"type":"object","nullable":true,"title":"Payload Mapping","description":"JSONPath mappings from webhook payload to Task inputs."},"include_raw_payload":{"type":"boolean","title":"Include Raw Payload","description":"Whether to include the entire payload as _raw_payload."},"idempotency_key_path":{"type":"string","nullable":true,"title":"Idempotency Key Path","description":"JSONPath to extract idempotency key from payload."},"idempotency_ttl_seconds":{"type":"integer","title":"Idempotency Ttl Seconds","description":"How long to remember processed idempotency keys."},"created":{"type":"string","title":"Created","description":"When the trigger was created."},"modified":{"type":"string","title":"Modified","description":"When the trigger was last updated."},"created_by_user_id":{"type":"string","format":"uuid","title":"Created By User Id","description":"User who created the trigger."},"auth_secret":{"type":"string","nullable":true,"title":"Auth Secret","description":"The authentication secret (only shown once on creation or rotation)."}},"type":"object","required":["id","task_id","name","enabled","endpoint_id","endpoint_url","auth_method","include_raw_payload","idempotency_ttl_seconds","created","modified","created_by_user_id"],"title":"WebhookTriggerWithSecret","description":"Response schema for webhook trigger creation (includes secret)."},"WhoAmIClientDetails":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"}},"type":"object","required":["org_id","project_id"],"title":"WhoAmIClientDetails","description":"OAuth client details when authenticated via OAuth."},"WhoAmIResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"name":{"type":"string","nullable":true,"title":"Name"},"client":{"$ref":"#/components/schemas/WhoAmIClientDetails","nullable":true}},"type":"object","required":["id","email","name"],"title":"WhoAmIResponse","description":"Response model for the whoami endpoint."},"brain__api__api_v1__iam__ProjectIAMMemberRoleUpdate":{"properties":{"add":{"items":{"type":"string","enum":["data_creator","data_editor","data_viewer","editor","mcp_server_creator","oauth_client_creator","owner","task_creator","task_mcp_server_creator","task_runner","viewer"]},"type":"array","title":"Add","description":"A list of project roles to grant to the member.\n\nRoles in this list are applied to the member AFTER any removals specified in `remove`.\n\nThis may be combined with `remove_all` to replace the member's entire role list."},"remove":{"items":{"type":"string","enum":["data_creator","data_editor","data_viewer","editor","mcp_server_creator","oauth_client_creator","owner","task_creator","task_mcp_server_creator","task_runner","viewer"]},"type":"array","title":"Remove","description":"A list of project roles to revoke from the member."},"remove_all":{"type":"boolean","nullable":true,"title":"Remove All","description":"Removes all existing roles from the member. This may be combined with `add` to replace all existing roles that the member holds.","default":false}},"type":"object","title":"ProjectIAMMemberRoleUpdate"},"brain__api__api_v1__iam__ProjectIAMPermissionTest":{"properties":{"permissions":{"items":{"type":"string","enum":["add_editor","add_member","add_owner","collections_edit","collections_view","create_chat","create_collection","create_compose","create_datasource_connection","create_document","create_mcp_server","create_oauth_client","create_task","create_task_agent","create_task_forwarder","create_task_mcp_server","datasource_connections_edit","datasource_connections_view","documents_edit","documents_view","edit","edit_data","list_documents","query_data","remove_editor","remove_member","remove_owner","run_task","run_task_agent","view","view_data","view_members"]},"type":"array","title":"Permissions","description":"A list of permissions to test on the project."},"member":{"type":"string","nullable":true,"title":"Member"}},"type":"object","required":["permissions"],"title":"ProjectIAMPermissionTest"},"ErrorResponse":{"type":"object","description":"Standardized error response format used across all endpoints","properties":{"detail":{"oneOf":[{"type":"string","description":"Simple error message"},{"type":"array","description":"Detailed validation errors","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"},"description":"Path to the error location"},"msg":{"type":"string","description":"Human-readable error message"},"type":{"type":"string","description":"Error type identifier"}},"required":["msg","type"]}}]},"type":{"type":"string","description":"Error category","enum":["validation_error","authorization_error","resource_error","server_error"]},"msg":{"type":"string","description":"Error summary"}},"required":["detail"]},"PaginationInfo":{"type":"object","description":"Pagination metadata for navigating large result sets","properties":{"has_next":{"type":"boolean","description":"Indicates if more results are available"},"next_cursor":{"type":"string","format":"uuid","description":"Cursor for fetching the next page","nullable":true},"page_limit":{"type":"integer","description":"Maximum items per page","minimum":1,"maximum":100,"default":20},"total_count":{"type":"integer","description":"Total number of items (if available)","nullable":true}},"required":["has_next","page_limit"]},"PaginatedResultSet":{"type":"object","description":"A paginated set of results with navigation information","properties":{"results":{"type":"array","description":"Array of items in the current page","items":{"type":"object"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["results","pagination"]},"PaginatedTaskResultSet":{"type":"object","description":"Paginated result set for tasks","properties":{"results":{"type":"array","description":"The task results for this page","items":{"type":"object","description":"Task object"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"required":["results","pagination"]}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication using JWT tokens from Ory Kratos/Hydra"},"OAuth2":{"type":"oauth2","description":"OAuth2 authentication for client applications","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","scopes":{"api.read":"Read access to API resources","api.write":"Write access to API resources","api.task":"Task execution access","project:view":"View project resources","project:edit":"Edit project resources","project:admin":"Administer project"}},"authorizationCode":{"authorizationUrl":"/oauth2/auth","tokenUrl":"/oauth2/token","scopes":{"openid":"OpenID Connect scope","profile":"User profile access","email":"User email access"}}}},"ApiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"API key authentication. Use format: Bearer {api_key}"}},"responses":{"BadRequest":{"description":"Bad Request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized - Missing or invalid authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - Resource does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"servers":[{"url":"https://api.rightbrain.ai/api/v1","description":"Production API"},{"url":"https://stag.leftbrain.me/api/v1","description":"Staging API"},{"url":"https://app.rblocal.dev/api/v1","description":"Local development"}],"externalDocs":{"description":"API Documentation","url":"https://docs.rightbrain.ai/api"},"x-tag-groups":[{"name":"Core Resources","tags":["Tasks","Projects","Organizations","Users"]},{"name":"AI Features","tags":["Compose","MCP Server","MCP Run"]},{"name":"Data Management","tags":["Document","Collection","Tags","Reporting Groups"]},{"name":"Authentication","tags":["OAuth Clients","API Keys"]},{"name":"System","tags":["Public","Internal","Metadata","Listings"]}]}