{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/healthz":{"get":{"tags":["healthcheck"],"summary":"Perform a Health Check","description":"## Perform a Health Check\nEndpoint to perform a healthcheck on. This endpoint can primarily be used Docker\nto ensure a robust container orchestration and management is in place. Other\nservices which rely on proper functioning of the API service will not deploy if this\nendpoint returns any other HTTP status code except 200 (OK).\nReturns:\n    HealthCheck: Returns a JSON response with the health status","operationId":"healthcheck_get_health","responses":{"200":{"description":"Return HTTP Status Code 200 (OK)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheck"}}}}}}},"/v1/auth/authorization":{"post":{"tags":["auth"],"summary":"Authorization","operationId":"auth_authorization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/callback":{"post":{"tags":["auth"],"summary":"Oauth Callback","operationId":"auth_oauth_callback","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackParams"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithAccessTokenSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/impersonate":{"post":{"tags":["auth"],"summary":"Impersonate User","operationId":"auth_impersonate_user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithAccessTokenSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/switch-impersonation":{"post":{"tags":["auth"],"summary":"Switch Impersonation","description":"Switch from impersonating one user to another without returning to admin portal.\n\nMust be called while already in an impersonation context. The token's subject\nis the currently impersonated user; the impersonator_id claim identifies the\nreal admin. We verify the admin is still SUPER_ADMIN and switch to the new target.","operationId":"auth_switch_impersonation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchImpersonationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithAccessTokenSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/impersonation-search":{"get":{"tags":["auth"],"summary":"Impersonation Search Users","description":"Search users while in impersonation context.\n\nThe standard admin/users endpoint requires SUPER_ADMIN role on current_user,\nwhich fails during impersonation (current_user is the impersonated user).\nThis endpoint verifies the impersonator is still a SUPER_ADMIN and performs\nthe same search.","operationId":"auth_impersonation_search_users","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by email, first name, last name, or organization name","title":"Search"},"description":"Search by email, first name, last name, or organization name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_UserAdminSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/csrf":{"get":{"tags":["auth"],"summary":"Get Csrf Token","description":"Get CSRF token for protection against CSRF attacks\nSets a non-HTTPOnly cookie that can be read by JavaScript","operationId":"auth_get_csrf_token","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CSRFResponse"}}}}}}},"/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh Token","operationId":"auth_refresh_token","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}}},"/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"auth_logout","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutResponse"}}}}}}},"/v1/auth/logout_all":{"post":{"tags":["auth"],"summary":"Logout All","operationId":"auth_logout_all","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutResponse"}}}}}}},"/v1/users/":{"get":{"tags":["users"],"summary":"Get All Users","description":"Fetch a paginated list of all users.\nOnly accessible by super admin users.\n\nQuery Parameters:\n- search: Search by email, first_name, last_name, or organization name\n- app_access_status: Filter users by their app access status (PENDING, APPROVED, REJECTED)\n                    Returns users who have at least one app with the specified status(es)","operationId":"users_get_all_users","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","title":"Search"}},{"name":"app_access_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AppAccessStatus"}},{"type":"null"}],"title":"App Access Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_UserSchema_"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/in-organization":{"get":{"tags":["users"],"summary":"List Users In Organization","description":"List users in the current user's organization (id, name, email only).\n\nIntended for populating user-picker UIs (e.g. \"Added by\" filters).","operationId":"users_list_users_in_organization","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationUserSchema"},"type":"array","title":"Response List Users In Organization V1 Users In Organization Get"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/v1/users/me":{"get":{"tags":["users"],"summary":"Get Profile","description":"Get current user profile with app access information.\n\nReturns user data including app_access records which the frontend uses\nto determine if user needs onboarding for specific apps.","operationId":"users_get_profile","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Mentium-App-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mentium-App-Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedUserSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/board":{"post":{"tags":["users"],"summary":"Onboard User","description":"Onboard user for an app. Handles both scenarios:\n- Scenario A (no org): Creates organization + workspace, requires all fields\n- Scenario B (has org): Creates workspace only, requires only workspace_name\n\nRequires Mentium-App-Type header.","operationId":"users_onboard_user","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Mentium-App-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mentium-App-Type"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardUserSchema"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedUserSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/{user_id}":{"put":{"tags":["users"],"summary":"Update User","operationId":"users_update_user","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/request-access":{"post":{"tags":["users"],"summary":"Request App Access","description":"Request access to a specific app. Creates a PENDING app access record.\nIf access already exists, returns the existing record.","operationId":"users_request_app_access","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAppAccessSchema"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAppAccessResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/users/{user_id}/app-access/{app_type}":{"put":{"tags":["users"],"summary":"Update User App Access","description":"Update a user's app access status. Requires SUPER_ADMIN role.\nUsed by admins to approve or reject app access requests.","operationId":"users_update_user_app_access","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"app_type","in":"path","required":true,"schema":{"type":"string","title":"App Type"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAppAccessSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAppAccessSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces":{"get":{"tags":["workspaces"],"summary":"List Workspaces","description":"Get workspace for current app.\n\nNote: Workspace is created during explicit onboarding (POST /v1/users/board).\nBoth Scenario A and B require explicit onboarding to create workspace.\n\nScenarios:\n- Scenario A (new user, no org): Returns 402 to trigger full onboarding\n- Scenario B (has org, new app): Returns 404 to trigger app-only onboarding","operationId":"workspaces_list_workspaces","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Mentium-App-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mentium-App-Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceSchema"},"title":"Response List Workspaces V1 Workspaces Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/members":{"get":{"tags":["workspaces"],"summary":"List Members","description":"List workspace members\n- If workspace_id is not provided: return current workspace members\n- If workspace_id is provided and user is SUPER_ADMIN: return specified workspace members\n- If workspace_id is provided and user is NOT admin: ignore parameter, use current workspace","operationId":"workspaces_list_members","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workspace ID (admin only)","title":"Workspace Id"},"description":"Workspace ID (admin only)"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserSchema"},"title":"Response List Members V1 Workspaces Members Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/":{"get":{"tags":["products"],"summary":"Get Organization Products","operationId":"products_get_organization_products","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProductSchema"},"type":"array","title":"Response Get Organization Products V1 Products  Get"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/v1/organizations/":{"get":{"tags":["organizations"],"summary":"Get All Organizations","description":"Fetch a paginated list of all organizations.\nOnly accessible by super admin users.","operationId":"organizations_get_all_organizations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_OrganizationSchema_"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations/{organization_id}":{"get":{"tags":["organizations"],"summary":"Get Organization","operationId":"organizations_get_organization","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["organizations"],"summary":"Update Organization","operationId":"organizations_update_organization","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations/{organization_id}/products":{"put":{"tags":["organizations"],"summary":"Update Organization Products","description":"Update multiple organization products enabled flags.\nOnly accessible by super admin users.","operationId":"organizations_update_organization_products","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductInput"},"title":"Products"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductSchema"},"title":"Response Update Organization Products V1 Organizations  Organization Id  Products Put"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invitations/":{"get":{"tags":["invitations"],"summary":"List Invitations","operationId":"invitations_list_invitations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvitationSchema"},"title":"Response List Invitations V1 Invitations  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["invitations"],"summary":"Invite Users","operationId":"invitations_invite_users","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationBulkCreateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invitations/resend/invitations/{invitation_id}":{"post":{"tags":["invitations"],"summary":"Resend Invitations","operationId":"invitations_resend_invitations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invitations/accept/{token}":{"post":{"tags":["invitations"],"summary":"Accept Invitation","operationId":"invitations_accept_invitation","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invitations/{invitation_id}":{"delete":{"tags":["invitations"],"summary":"Delete Invitation","operationId":"invitations_delete_invitation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/email-integration/default":{"get":{"tags":["email-integration"],"summary":"Get Email Default","operationId":"email-integration_get_email_default","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDefaultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/email-integration/check-availability":{"get":{"tags":["email-integration"],"summary":"Check Email Availability","operationId":"email-integration_check_email_availability","security":[{"HTTPBearer":[]}],"parameters":[{"name":"local","in":"query","required":true,"schema":{"type":"string","title":"Local"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/email-integration":{"post":{"tags":["email-integration"],"summary":"Provision Email Integration","operationId":"email-integration_provision_email_integration","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionEmailIntegrationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSenderIdentityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["email-integration"],"summary":"Get Email Integration","operationId":"email-integration_get_email_integration","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSenderIdentityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/email-integration/sender-health":{"get":{"tags":["email-integration"],"summary":"List Sender Health","description":"Read-only deliverability health for every sender identity (spec §10).\n\nIncludes disconnected identities (reputation is org-lifetime — §10a). This\nis a non-mutating peek: it NEVER draws a cold token.","operationId":"email-integration_list_sender_health","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderHealthListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/email-integration/sender-health/{sender_email}":{"get":{"tags":["email-integration"],"summary":"Get Sender Health","description":"Read-only deliverability health for one sender identity (non-mutating).","operationId":"email-integration_get_sender_health","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sender_email","in":"path","required":true,"schema":{"type":"string","title":"Sender Email"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderHealthSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/email-integration/{identity_id}":{"patch":{"tags":["email-integration"],"summary":"Update Email Integration","operationId":"email-integration_update_email_integration","security":[{"HTTPBearer":[]}],"parameters":[{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Identity Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailIntegrationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSenderIdentityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["email-integration"],"summary":"Deactivate Email Integration","operationId":"email-integration_deactivate_email_integration","security":[{"HTTPBearer":[]}],"parameters":[{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Identity Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations":{"get":{"tags":["integrations"],"summary":"List Integrations","operationId":"integrations_list_integrations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by integration name","title":"Name"},"description":"Filter by integration name"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationWithConnectionResponse"},"title":"Response List Integrations V1 Integrations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["integrations"],"summary":"Create Integration","operationId":"integrations_create_integration","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCreateInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/{integration_id}":{"get":{"tags":["integrations"],"summary":"Get Integration","operationId":"integrations_get_integration","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["integrations"],"summary":"Update Integration","operationId":"integrations_update_integration","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationUpdateInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/{integration_id}/connect":{"post":{"tags":["integrations"],"summary":"Connect Integration","operationId":"integrations_connect_integration","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConnectionInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/oauth2/callback":{"post":{"tags":["integrations"],"summary":"Integrations Oauth2 Callback","operationId":"integrations_integrations_oauth2_callback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAuthorizationState"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/{integration_name}/connection-status":{"get":{"tags":["integrations"],"summary":"Check Integration Connection Status","operationId":"integrations_check_integration_connection_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_name","in":"path","required":true,"schema":{"$ref":"#/components/schemas/IntegrationName"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConnectionStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/connection/{integration_connection_id}/events":{"get":{"tags":["integrations","integration-connections"],"summary":"List Integration Connection Events","operationId":"integrations_integration-connections_list_integration_connection_events","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationEventType"},{"type":"null"}],"title":"Event Type"}},{"name":"event_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by webhook event name (e.g., shipment-create)","title":"Event Name"},"description":"Filter by webhook event name (e.g., shipment-create)"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_IntegrationEventSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/connection/{integration_connection_id}":{"put":{"tags":["integrations","integration-connections"],"summary":"Update Integration Connection","description":"Update an integration connection's name and/or scope.","operationId":"integrations_integration-connections_update_integration_connection","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConnectionUpdateInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["integrations","integration-connections"],"summary":"Delete Integration Connection","operationId":"integrations_integration-connections_delete_integration_connection","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/connection/{integration_connection_id}/sync":{"post":{"tags":["integrations","integration-connections"],"summary":"Trigger Manual Sync","description":"Trigger a manual data synchronization for an integration connection.\n\nThis endpoint allows users to manually trigger a data sync with custom date ranges\nfor different entity types (customers, carriers, loads, locations).","operationId":"integrations_integration-connections_trigger_manual_sync","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualSyncRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/microsoft-teams/connection/{integration_connection_id}/users":{"get":{"tags":["integrations","microsoft-teams"],"summary":"List Users","description":"List users from the connected Microsoft Teams tenant directory.","operationId":"integrations_microsoft-teams_list_users","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by display name prefix","title":"Search"},"description":"Filter by display name prefix"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results to return","default":50,"title":"Limit"},"description":"Max results to return"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/microsoft-teams/connection/{integration_connection_id}/teams":{"get":{"tags":["integrations","microsoft-teams"],"summary":"List Teams","description":"List Microsoft Teams that the connected account has joined.","operationId":"integrations_microsoft-teams_list_teams","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTeamsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/microsoft-teams/connection/{integration_connection_id}/teams/{team_id}/channels":{"get":{"tags":["integrations","microsoft-teams"],"summary":"List Channels","description":"List channels in a Microsoft Teams team.","operationId":"integrations_microsoft-teams_list_channels","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChannelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/microsoft-teams/connection/{integration_connection_id}/teams/{team_id}/members":{"get":{"tags":["integrations","microsoft-teams"],"summary":"List Members","description":"List members of a Microsoft Teams team.","operationId":"integrations_microsoft-teams_list_members","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMembersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/inboxes":{"get":{"tags":["integrations","inboxes"],"summary":"List Inboxes","description":"List all inboxes for the current user.\n\nPass ``integration_connection_id`` to filter by a specific connection\n(used by the integration detail Inboxes tab).","operationId":"integrations_inboxes_list_inboxes","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InboxSchema"},"title":"Response List Inboxes V1 Integrations Inboxes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/inboxes/{inbox_id}":{"patch":{"tags":["integrations","inboxes"],"summary":"Update Inbox","description":"Enable or disable an inbox.","operationId":"integrations_inboxes_update_inbox","security":[{"HTTPBearer":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","title":"Inbox Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInboxRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["integrations","inboxes"],"summary":"Delete Inbox","description":"Delete a shared mailbox inbox. Cannot delete the personal inbox.","operationId":"integrations_inboxes_delete_inbox","security":[{"HTTPBearer":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","title":"Inbox Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/outlook/inboxes/verify":{"post":{"tags":["integrations","outlook-inboxes"],"summary":"Verify Shared Mailbox","description":"Verify the authenticated user has delegate access to a shared mailbox.","operationId":"integrations_outlook-inboxes_verify_shared_mailbox","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Outlook integration connection to verify against.","title":"Integration Connection Id"},"description":"Outlook integration connection to verify against."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyMailboxRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyMailboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/outlook/inboxes":{"post":{"tags":["integrations","outlook-inboxes"],"summary":"Add Shared Mailbox","description":"Add a shared mailbox inbox.\n\nVerifies delegate access first, then creates a new Inbox record\nlinked to the Outlook integration connection.","operationId":"integrations_outlook-inboxes_add_shared_mailbox","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Outlook integration connection to link the new inbox to.","title":"Integration Connection Id"},"description":"Outlook integration connection to link the new inbox to."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSharedMailboxRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSharedMailboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/email/forward":{"post":{"tags":["integrations-email"],"summary":"Forward Email","description":"Forward an existing email to the provided recipients.","operationId":"integrations-email_forward_email","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/saved-views/":{"post":{"tags":["saved-views"],"summary":"Create Saved View","description":"Create a new saved view.","operationId":"saved-views_create_saved_view","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedViewCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedViewSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["saved-views"],"summary":"List Saved Views","description":"List all saved views for the current user.","operationId":"saved-views_list_saved_views","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by page type","title":"Page Type"},"description":"Filter by page type"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SavedViewSchema"},"title":"Response List Saved Views V1 Saved Views  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/saved-views/{view_id}":{"get":{"tags":["saved-views"],"summary":"Get Saved View","description":"Get a specific saved view by ID.","operationId":"saved-views_get_saved_view","security":[{"HTTPBearer":[]}],"parameters":[{"name":"view_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"View Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedViewSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["saved-views"],"summary":"Update Saved View","description":"Update a saved view.","operationId":"saved-views_update_saved_view","security":[{"HTTPBearer":[]}],"parameters":[{"name":"view_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"View Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedViewUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedViewSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["saved-views"],"summary":"Delete Saved View","description":"Delete a saved view.","operationId":"saved-views_delete_saved_view","security":[{"HTTPBearer":[]}],"parameters":[{"name":"view_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"View Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/settings/registry":{"get":{"tags":["settings"],"summary":"Get Settings Registry","description":"Get all registered settings definitions with their JSON schemas.\nOnly returns settings for integrations that have active connections.\nOptionally filter by setting key.","operationId":"settings_get_settings_registry","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by setting key","title":"Key"},"description":"Filter by setting key"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Settings Registry V1 Settings Registry Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/settings/values":{"get":{"tags":["settings"],"summary":"Get Settings Values","description":"Get setting values (from DB or defaults) with configured status.","operationId":"settings_get_settings_values","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"Setting key","title":"Key"},"description":"Setting key"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingValueResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/settings/values/{key}":{"put":{"tags":["settings"],"summary":"Set Setting Value","description":"Save setting value at its fixed scope.","operationId":"settings_set_setting_value","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetValueRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Setting Value V1 Settings Values  Key  Put"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["settings"],"summary":"Delete Setting Value","description":"Delete a setting value, reverting it to its registry default.","operationId":"settings_delete_setting_value","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Setting Value V1 Settings Values  Key  Delete"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/settings/negotiation/simulate":{"post":{"tags":["settings"],"summary":"Simulate Negotiation Settings","description":"Dry-run an unsaved pricing config through the real negotiation strategy. Persists nothing.","operationId":"settings_simulate_negotiation_settings","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateNegotiationRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateNegotiationResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates/":{"post":{"tags":["templates"],"summary":"Create Template","description":"Create a new template.\n\nSubject (EMAIL only) and body can include variables using the {{variable_name}}\nsyntax. Variables will be automatically extracted and stored.\n\nTemplate titles must be unique within a workspace.\n\nExample:\n```\n{\n    \"title\": \"Welcome Email\",\n    \"subject\": \"Welcome to {{company}}\",\n    \"body\": \"Hello {{name}},\\n\\nWelcome to {{company}}!\\n\\nBest regards,\\n{{sender}}\",\n    \"template_type\": \"EMAIL\"\n}\n```","operationId":"templates_create_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["templates"],"summary":"List Templates","description":"List all templates for the current workspace with pagination.\n\nSupports filtering by template type and active status.","operationId":"templates_list_templates","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/TemplateType"},{"type":"null"}],"description":"Filter by template type (EMAIL or SMS)","title":"Template Type"},"description":"Filter by template type (EMAIL or SMS)"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items per page","default":50,"title":"Page Size"},"description":"Number of items per page"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateListResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates/render":{"post":{"tags":["templates"],"summary":"Render Template","description":"Render an email template from business context.\n\nThis endpoint is intentionally decoupled from offer sending: it does not create\noffers, carrier offers, conversations, or public booking tokens. Any server-only\nvalues such as ``offer.public_booking_link`` must be passed through overrides.","operationId":"templates_render_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateRenderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateRenderResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates/search":{"get":{"tags":["templates"],"summary":"Search Templates","description":"Search templates by title or content.\n\nThe search is case-sensitive and searches both title and content fields.","operationId":"templates_search_templates","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search query","title":"Q"},"description":"Search query"},{"name":"template_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/TemplateType"},{"type":"null"}],"description":"Filter by template type (EMAIL or SMS)","title":"Template Type"},"description":"Filter by template type (EMAIL or SMS)"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items per page","default":50,"title":"Page Size"},"description":"Number of items per page"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateListResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates/generate":{"post":{"tags":["templates"],"summary":"Generate Template","description":"Generate a template using AI based on user description.\nUses only valid {{variable}} syntax from LoadTemplateSchema, CarrierTemplateSchema, OfferTemplateSchema.","operationId":"templates_generate_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateGenerateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateGenerateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates/variables":{"get":{"tags":["templates"],"summary":"Get Available Template Variables","description":"Get all available template variables from LoadSchema and CarrierSchema.\n\nUse these variables in templates with {{variable_path}} syntax.\n\nExample variables:\n- {{load.external_reference_id}}\n- {{load.weight}}\n- {{carrier.name}}\n- {{load.customer.name}}\n- {{load.stops.0.city}} (first stop)\n- {{carrier.contacts.0.primary_email}} (first contact)\n\nThis endpoint is useful for:\n- Building variable picker UI in template editor\n- Autocomplete suggestions\n- Documentation of available fields","operationId":"templates_get_available_template_variables","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateVariableSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates/validate":{"post":{"tags":["templates"],"summary":"Validate Template Variables","description":"Validate that all variables in template content are valid Pydantic fields.\n\nThis endpoint checks:\n1. All {{variable}} references are extracted\n2. Each variable corresponds to a field in LoadSchema or CarrierSchema\n3. Nested paths are valid (e.g., load.customer.name)\n4. Array access is valid (e.g., load.stops.0.city)\n\nReturns validation result with any errors found.\n\nUse this for:\n- Real-time validation in template editor\n- Pre-save validation\n- Displaying helpful error messages to users","operationId":"templates_validate_template_variables","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateTemplateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateValidationResult"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates/{template_id}":{"get":{"tags":["templates"],"summary":"Get Template","description":"Get a specific template by ID.","operationId":"templates_get_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["templates"],"summary":"Update Template","description":"Update a template.\n\nAll fields are optional. Only provided fields will be updated.\n\n**Default Template Handling:**\n- When setting `is_default` to `true`, any existing default template for that channel\n  will be automatically unset\n- Only one template can be default per channel type (EMAIL, SMS, etc.) per workspace\n- The database constraint ensures this rule is enforced\n\nIf content is updated, variables will be automatically re-extracted.","operationId":"templates_update_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["templates"],"summary":"Delete Template","description":"Delete a template (soft delete).\n\nThe template will be marked as deleted but not removed from the database.","operationId":"templates_delete_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates/{template_id}/whatsapp/sync":{"post":{"tags":["templates"],"summary":"Sync Whatsapp Template Approval","description":"Refresh WhatsApp approval status from Twilio.","operationId":"templates_sync_whatsapp_template_approval","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email-signatures/":{"post":{"tags":["email-signatures"],"summary":"Create Email Signature","description":"Create the workspace's email signature.\n\nA workspace may hold only one; creating a second is a 400.","operationId":"email-signatures_create_email_signature","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["email-signatures"],"summary":"List Email Signatures","description":"List the workspace's email signature.\n\nA workspace has at most one, so this returns zero or one row. It stays a list\nresponse because the frontend reads it as a collection.","operationId":"email-signatures_list_email_signatures","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items per page","default":50,"title":"Page Size"},"description":"Number of items per page"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureListResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email-signatures/assets":{"post":{"tags":["email-signatures"],"summary":"Upload Email Signature Asset","description":"Store an image for the signature body to reference.\n\nReturns the absolute URL to put in an `<img src>`; the image itself is served\nunauthenticated from `/v2/public/signature-assets/{token}`, because the\nrecipient's mail client has no session.","operationId":"email-signatures_upload_email_signature_asset","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_email_signature_asset_v1_email_signatures_assets_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureAssetSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["email-signatures"],"summary":"List Email Signature Assets","description":"The workspace's uploaded signature images, newest first.\n\nDeclared above `/{signature_id}`: FastAPI matches in declaration order, so the\npath-param route would otherwise swallow `/assets` and 422 on the UUID.","operationId":"email-signatures_list_email_signature_assets","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailSignatureAssetSchema"},"title":"Response List Email Signature Assets V1 Email Signatures Assets Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email-signatures/assets/{asset_id}":{"delete":{"tags":["email-signatures"],"summary":"Delete Email Signature Asset","description":"Take an image out of the workspace's library.\n\nThe stored object and its public URL survive: an email already sent keeps its\npictures. This only stops the image being offered for new signatures.","operationId":"email-signatures_delete_email_signature_asset","security":[{"HTTPBearer":[]}],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email-signatures/{signature_id}":{"get":{"tags":["email-signatures"],"summary":"Get Email Signature","description":"Get one email signature by ID.","operationId":"email-signatures_get_email_signature","security":[{"HTTPBearer":[]}],"parameters":[{"name":"signature_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Signature Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["email-signatures"],"summary":"Update Email Signature","description":"Update an email signature. All fields are optional; only provided fields change.","operationId":"email-signatures_update_email_signature","security":[{"HTTPBearer":[]}],"parameters":[{"name":"signature_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Signature Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["email-signatures"],"summary":"Delete Email Signature","description":"Delete an email signature (soft delete).","operationId":"email-signatures_delete_email_signature","security":[{"HTTPBearer":[]}],"parameters":[{"name":"signature_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Signature Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email-signatures/{signature_id}/send-test":{"post":{"tags":["email-signatures"],"summary":"Send Signature Test","description":"Send the signature to an address so the author can see how it lands in a client.\n\nThe signature goes on its own, with no covering message — a sentence above it\nwould change the rendering being checked. It is sent from the chosen email\naccount, which must belong to this organization.","operationId":"email-signatures_send_signature_test","security":[{"HTTPBearer":[]}],"parameters":[{"name":"signature_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Signature Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSignatureTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSignatureTestResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/scopes":{"get":{"tags":["api-keys"],"summary":"List Available Scopes","description":"List available API key scopes.","operationId":"api-keys_list_available_scopes","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableScopesResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/":{"post":{"tags":["api-keys"],"summary":"Create Api Key","description":"Create a new API key.\n\nA key that reads/writes TMS data operates on a connection (data box). The\ncaller must name the TMS connection the key binds to — any TMS connection the\nworkspace can see is eligible (a real external TMS like TAI/Sunnybrook, a\nclient push connection, or Sandbox). The server does not pick one for you:\nbinding is the most consequential property of a key, so it is always explicit.\nA key that touches no TMS data (e.g. a webhook-trigger key) carries no\nconnection.\n\n**Important**: The API key value is only returned once. Store it securely.","operationId":"api-keys_create_api_key","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["api-keys"],"summary":"List Api Keys","description":"List all API keys for the current workspace.","operationId":"api-keys_list_api_keys","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","description":"Include revoked API keys","default":false,"title":"Include Revoked"},"description":"Include revoked API keys"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponse"},"title":"Response List Api Keys V1 Api Keys  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/{api_key_id}":{"get":{"tags":["api-keys"],"summary":"Get Api Key","description":"Get a specific API key by ID.","operationId":"api-keys_get_api_key","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Api Key Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["api-keys"],"summary":"Update Api Key","description":"Update an API key's metadata.","operationId":"api-keys_update_api_key","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Api Key Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/{api_key_id}/revoke":{"post":{"tags":["api-keys"],"summary":"Revoke Api Key","description":"Revoke an API key.","operationId":"api-keys_revoke_api_key","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Api Key Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/{api_key_id}/rotate":{"post":{"tags":["api-keys"],"summary":"Rotate Api Key","description":"Rotate an API key.\n\nThis will revoke the existing key and create a new one with the same settings.\n**Important**: The new API key value is only returned once. Store it securely.","operationId":"api-keys_rotate_api_key","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Api Key Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp-servers":{"post":{"tags":["mcp-servers"],"summary":"Create Mcp Server","operationId":"mcp-servers_create_mcp_server","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerCreateInput"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mcp-servers"],"summary":"List Mcp Servers","operationId":"mcp-servers_list_mcp_servers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpServerResponse"},"title":"Response List Mcp Servers V1 Mcp Servers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp-servers/{connection_id}":{"get":{"tags":["mcp-servers"],"summary":"Get Mcp Server","operationId":"mcp-servers_get_mcp_server","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["mcp-servers"],"summary":"Update Mcp Server","operationId":"mcp-servers_update_mcp_server","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerUpdateInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["mcp-servers"],"summary":"Delete Mcp Server","operationId":"mcp-servers_delete_mcp_server","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp-servers/{connection_id}/discover":{"post":{"tags":["mcp-servers"],"summary":"Discover Tools","operationId":"mcp-servers_discover_tools","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpDiscoverToolsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp-servers/agents/{agent_id}/bindings":{"get":{"tags":["mcp-servers"],"summary":"List Agent Bindings","operationId":"mcp-servers_list_agent_bindings","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentMcpBindingResponse"},"title":"Response List Agent Bindings V1 Mcp Servers Agents  Agent Id  Bindings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/billing/overview":{"get":{"tags":["admin","admin","billing"],"summary":"Get Admin Billing Overview","description":"Get provider cost overview for an organization.\n\nReturns ElevenLabs credits, Twilio USD, and Mentium revenue (estimated cost)\nfor the given period. Accessible only by super admins.","operationId":"admin_admin_billing_get_admin_billing_overview","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Organization ID","title":"Organization Id"},"description":"Organization ID"},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional workspace filter","title":"Workspace Id"},"description":"Optional workspace filter"},{"name":"period_start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start of period (ISO 8601)","title":"Period Start"},"description":"Start of period (ISO 8601)"},{"name":"period_end","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"End of period. Defaults to now.","title":"Period End"},"description":"End of period. Defaults to now."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBillingOverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/billing/pricing/{workspace_id}":{"get":{"tags":["admin","admin","billing"],"summary":"Get Pricing Config","description":"Get active pricing config for a workspace.","operationId":"admin_admin_billing_get_pricing_config","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin","admin","billing"],"summary":"Upsert Pricing Config","description":"Create or update pricing config for a workspace.\n\nPrevious config is archived (effective_until set) and a new version is created.","operationId":"admin_admin_billing_upsert_pricing_config","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPricingConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/dashboard":{"get":{"tags":["admin","dashboard"],"summary":"Get Dashboard Stats","description":"Get admin dashboard statistics: total users, total organizations,\nand total pending app access requests.\nOnly accessible by super admin users.","operationId":"admin_dashboard_get_dashboard_stats","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardStatsSchema"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/organizations":{"get":{"tags":["admin","organizations"],"summary":"List All Organizations","description":"List all organizations with user, workspace, and integration counts.\nOnly accessible by super admin users.","operationId":"admin_organizations_list_all_organizations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by organization name or domain","title":"Search"},"description":"Search by organization name or domain"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_OrganizationAdminSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin","organizations"],"summary":"Create Organization","description":"Create a new organization with a default workspace and assign an initial admin user.\nSends an invitation email to the new admin user as notification.\nOnly accessible by super admin users.","operationId":"admin_organizations_create_organization","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationAdminCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDetailAdminSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/organizations/{organization_id}":{"get":{"tags":["admin","organizations"],"summary":"Get Organization","description":"Get organization detail with users, workspaces, integrations, and products.\nOnly accessible by super admin users.","operationId":"admin_organizations_get_organization","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDetailAdminSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin","organizations"],"summary":"Update Organization","description":"Update an organization. Only accessible by super admin users.","operationId":"admin_organizations_update_organization","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationAdminUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDetailAdminSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin","organizations"],"summary":"Delete Organization","description":"Delete an organization: hard-deletes users and invitations (so emails can be reused),\nsoft-deletes workspaces and the organization itself.\nOnly accessible by super admin users.","operationId":"admin_organizations_delete_organization","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organization Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/organizations/{organization_id}/products":{"put":{"tags":["admin","organizations"],"summary":"Update Organization Products","description":"Update organization product feature flags. Only accessible by super admin users.","operationId":"admin_organizations_update_organization_products","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductInput"},"title":"Products"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductSchema"},"title":"Response Update Organization Products V1 Admin Organizations  Organization Id  Products Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/organizations/{organization_id}/integration-connections/{integration_connection_id}/contributes-to-carrier-pool":{"put":{"tags":["admin","organizations"],"summary":"Update Integration Connection Contributes To Carrier Pool","description":"Set whether a connection's observations grant other Carrier Pool participants visibility — read-time only, SUPER_ADMIN because it governs what OTHER organizations see.","operationId":"admin_organizations_update_integration_connection_contributes_to_carrier_pool","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organization Id"}},{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceIntegrationConnectionContributesToCarrierPoolUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceIntegrationConnectionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/settings/registry":{"get":{"tags":["admin","settings"],"summary":"Get Global Settings Registry","description":"Every GLOBAL-scoped settings definition, with its JSON schema.","operationId":"admin_settings_get_global_settings_registry","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by setting key","title":"Key"},"description":"Filter by setting key"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Global Settings Registry V1 Admin Settings Registry Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/settings/values":{"get":{"tags":["admin","settings"],"summary":"Get Global Setting Value","description":"Get a GLOBAL setting's value (from DB or default) with configured status.","operationId":"admin_settings_get_global_setting_value","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"Setting key","title":"Key"},"description":"Setting key"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingValueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/settings/values/{key}":{"put":{"tags":["admin","settings"],"summary":"Set Global Setting Value","description":"Save a GLOBAL setting's value.","operationId":"admin_settings_set_global_setting_value","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetValueRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Global Setting Value V1 Admin Settings Values  Key  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin","settings"],"summary":"Delete Global Setting Value","description":"Delete a GLOBAL setting's value, reverting it to its registry default.","operationId":"admin_settings_delete_global_setting_value","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Global Setting Value V1 Admin Settings Values  Key  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users":{"get":{"tags":["admin","users"],"summary":"List All Users","description":"List all platform users with admin-level filtering.\nOnly accessible by super admin users.","operationId":"admin_users_list_all_users","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by email, first name, last name, or organization name","title":"Search"},"description":"Search by email, first name, last name, or organization name"},{"name":"app_access_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AppAccessStatus"}},{"type":"null"}],"description":"Filter by app access status (PENDING, APPROVED, REJECTED)","title":"App Access Status"},"description":"Filter by app access status (PENDING, APPROVED, REJECTED)"},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by organization ID","title":"Organization Id"},"description":"Filter by organization ID"},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/UserRole"},{"type":"null"}],"description":"Filter by user role","title":"Role"},"description":"Filter by user role"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_UserAdminSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}":{"get":{"tags":["admin","users"],"summary":"Get User","description":"Get a user by ID with full admin context including active sessions.\nOnly accessible by super admin users.","operationId":"admin_users_get_user","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailAdminSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/app-access/{app_type}":{"put":{"tags":["admin","users"],"summary":"Update User App Access","description":"Approve or reject a user's app access request.\nOnly accessible by super admin users.","operationId":"admin_users_update_user_app_access","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"app_type","in":"path","required":true,"schema":{"type":"string","title":"App Type"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAppAccessSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAppAccessSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/impersonate":{"post":{"tags":["admin","users"],"summary":"Impersonate User","description":"Impersonate a user by generating an access token for them.\nOnly accessible by super admin users.","operationId":"admin_users_impersonate_user","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithAccessTokenSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/organization":{"put":{"tags":["admin","users"],"summary":"Assign User To Organization","description":"Assign a user (who has no organization) to an existing organization.\nOnly accessible by super admin users.","operationId":"admin_users_assign_user_to_organization","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignUserToOrganizationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailAdminSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin","users"],"summary":"Detach User From Organization","description":"Detach a user from their current organization.\nOnly accessible by super admin users.","operationId":"admin_users_detach_user_from_organization","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailAdminSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/workspaces":{"get":{"tags":["admin","workspaces"],"summary":"List All Workspaces","description":"List all workspaces across all organizations.\nOnly accessible by super admin users.","operationId":"admin_workspaces_list_all_workspaces","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by organization ID","title":"Organization Id"},"description":"Filter by organization ID"},{"name":"app_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AppType"},{"type":"null"}],"title":"App Type"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_WorkspaceAdminSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin","workspaces"],"summary":"Create Workspace","description":"Create a new workspace for an organization. Only accessible by super admin users.","operationId":"admin_workspaces_create_workspace","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceAdminCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceAdminSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/workspaces/{workspace_id}":{"get":{"tags":["admin","workspaces"],"summary":"Get Workspace","description":"Get workspace detail with members, workflows, and integration connections.\nOnly accessible by super admin users.","operationId":"admin_workspaces_get_workspace","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDetailAdminSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin","workspaces"],"summary":"Update Workspace","description":"Update a workspace. Only accessible by super admin users.","operationId":"admin_workspaces_update_workspace","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceAdminUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDetailAdminSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin","workspaces"],"summary":"Delete Workspace","description":"Soft delete a workspace. Only accessible by super admin users.","operationId":"admin_workspaces_delete_workspace","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/workspaces/{workspace_id}/members":{"post":{"tags":["admin","workspaces"],"summary":"Add Workspace Members","description":"Add existing users to a workspace. Auto-approves app access.\nOnly accessible by super admin users.","operationId":"admin_workspaces_add_workspace_members","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMemberAddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceMemberSchema"},"title":"Response Add Workspace Members V1 Admin Workspaces  Workspace Id  Members Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/workspaces/{workspace_id}/members/{user_id}":{"delete":{"tags":["admin","workspaces"],"summary":"Remove Workspace Member","description":"Remove a member from a workspace. Only accessible by super admin users.","operationId":"admin_workspaces_remove_workspace_member","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceMemberSchema"},"title":"Response Remove Workspace Member V1 Admin Workspaces  Workspace Id  Members  User Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/config-export/orgs":{"get":{"tags":["config-export"],"summary":"List Organizations","operationId":"config-export_list_organizations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigExportOrganizationList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/config-export/orgs/{org_id}/agents":{"get":{"tags":["config-export"],"summary":"List Agents","operationId":"config-export_list_agents","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/ConfigExportAgentList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/config-export/orgs/{org_id}/automation-tools":{"get":{"tags":["config-export"],"summary":"List Automation Tools","operationId":"config-export_list_automation_tools","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/ConfigExportAutomationToolList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/config-export/orgs/{org_id}/workflows":{"get":{"tags":["config-export"],"summary":"List Workflows","operationId":"config-export_list_workflows","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/ConfigExportWorkflowList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/config-export/orgs/{org_id}/proving":{"get":{"tags":["config-export"],"summary":"Get Proving","operationId":"config-export_get_proving","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/ConfigExportProving"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/config-export/orgs/{org_id}/templates":{"get":{"tags":["config-export"],"summary":"List Templates","operationId":"config-export_list_templates","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/ConfigExportTemplateList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/config-export/orgs/{org_id}/settings/tms-pricing":{"get":{"tags":["config-export"],"summary":"List Tms Pricing Settings","operationId":"config-export_list_tms_pricing_settings","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/ConfigExportSettingValues"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/config-export/orgs/{org_id}/settings/load-offers":{"get":{"tags":["config-export"],"summary":"List Load Offer Settings","operationId":"config-export_list_load_offer_settings","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/ConfigExportSettingValues"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/config-export/orgs/{org_id}/phone-numbers":{"get":{"tags":["config-export"],"summary":"List Phone Numbers","operationId":"config-export_list_phone_numbers","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/ConfigExportPhoneNumberList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/config-export/orgs/{org_id}/integration":{"get":{"tags":["config-export"],"summary":"List Integration Connections","operationId":"config-export_list_integration_connections","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/ConfigExportIntegrationConnectionList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/draft-authoring/orgs/{org_id}/workflows":{"post":{"tags":["draft-authoring"],"summary":"Stage Workflow Draft","description":"A new workflow as a draft, or, with ``workflow_id``, the draft of that live workflow.\n\nA live workflow has one draft; posting again rewrites it. Deploying the draft is a person's.","operationId":"draft-authoring_stage_workflow_draft","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAuthoringWorkflowCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAuthoringWorkflowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/draft-authoring/orgs/{org_id}/workflows/drafts/{draft_id}":{"put":{"tags":["draft-authoring"],"summary":"Update Workflow Draft","description":"Rewrite a workflow draft. A workflow that is not a draft is not found here.","operationId":"draft-authoring_update_workflow_draft","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAuthoringWorkflowUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAuthoringWorkflowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/draft-authoring/orgs/{org_id}/agents":{"post":{"tags":["draft-authoring"],"summary":"Stage Agent Draft","description":"A new agent as a draft, or, with ``agent_id``, the draft of that live agent.\n\nA live agent has one draft; posting again rewrites it. The live agent and its tool\nbindings are untouched until a person publishes. A new agent exists only once a person\nopens the returned link and creates it.","operationId":"draft-authoring_stage_agent_draft","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAuthoringAgentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAuthoringAgentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/draft-authoring/orgs/{org_id}/agents/drafts/{draft_id}":{"put":{"tags":["draft-authoring"],"summary":"Update Agent Draft","description":"Rewrite an agent draft. An agent that is not a draft is not found here.","operationId":"draft-authoring_update_agent_draft","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAuthoringAgentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAuthoringAgentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/draft-authoring/orgs/{org_id}/proving/scenarios":{"post":{"tags":["draft-authoring"],"summary":"Create Proving Scenario","description":"A test in the org's workspace, attached to nothing; a person attaches it in the app.","operationId":"draft-authoring_create_proving_scenario","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioCreate-Input"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/draft-authoring/orgs/{org_id}/proving/scenarios/{scenario_id}":{"put":{"tags":["draft-authoring"],"summary":"Update Proving Scenario","description":"Rewrite a test that no agent or group uses yet; once a person has put it to use, it is theirs.","operationId":"draft-authoring_update_proving_scenario","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/draft-authoring/orgs/{org_id}/proving/agents/{agent_id}/run-draft":{"post":{"tags":["draft-authoring"],"summary":"Run Proving On Draft","description":"Run tests on the agent's draft, as ``POST /v3/proving/agents/{agent_id}/run-draft`` does; read each run by its id.","operationId":"draft-authoring_run_proving_on_draft","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingDraftRunRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProvingRunResponse"},"title":"Response Run Proving On Draft V1 Draft Authoring Orgs  Org Id  Proving Agents  Agent Id  Run Draft Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/draft-authoring/orgs/{org_id}/proving/runs/{run_id}":{"get":{"tags":["draft-authoring"],"summary":"Get Proving Run","description":"A run's status, transcript and evaluation results.","operationId":"draft-authoring_get_proving_run","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/rewrite/":{"post":{"tags":["rewrite"],"summary":"Rewrite","description":"Rewrite selected text within the context of a full text.\n\nThis endpoint is designed to work with Tiptap's AI Changes extension:\n1. User selects text in the editor\n2. Editor calls this API with selected text + full text context\n3. API returns rewritten text\n4. Tiptap tracks changes and allows accept/reject workflow\n\nThe rewriting considers the full text context to maintain consistency and coherence with the surrounding content.","operationId":"rewrite_rewrite","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewriteResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/integration-connections/{integration_connection_id}/user-mappings":{"post":{"tags":["v2","tms","v2","tms","tms-user-mappings"],"summary":"Link TMS user to Mentium user","description":"Create or update a mapping from a TMS user ID (e.g. sales_rep_user_id) to a Mentium user. This is the first time an entry goes into tms_user_mentium_mapping. Subsequent get-load-details / TMS API responses will then return the Mentium user for that rep.","operationId":"v2_tms_v2_tms_tms-user-mappings_create_or_update_user_mapping","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmsUserMentiumMappingCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmsUserMentiumMappingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/loads/search":{"get":{"tags":["v2","tms","v2","tms","loads"],"summary":"Search Loads","description":"Search for loads with various filters\n\nUses LoadServiceClient from libs to call Vortex - clean and simple!\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n    - external_reference_id: Search by external reference ID (for autocomplete/partial matching)\n    - customer_name: Filter by customer name\n    - carrier_name: Filter by carrier name\n    - tms_status: Filter by raw TMS status (e.g., 'Dispatched', 'At Shipper')\n    - mentium_status: Filter by Mentium normalized load status (PLANNED, ACTIVE, COVERED, IN_TRANSIT, DELIVERED, COMPLETED, TERMINATED)\n    - reference_numbers: Filter by list of reference numbers\n    - pickup_date: Filter by pickup date (YYYY-MM-DD)\n    - delivery_date: Filter by delivery date (YYYY-MM-DD)\n    - limit: Maximum number of results (default: 20)\n    - offset: Offset for pagination (default: 0)\n\nReturns:\n    List of Load models with full OpenAPI documentation","operationId":"v2_tms_v2_tms_loads_search_loads","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"external_reference_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Id"}},{"name":"customer_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"}},{"name":"carrier_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Name"}},{"name":"tms_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tms Status"}},{"name":"mentium_status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsLoadStatus"},{"type":"null"}],"title":"Mentium Status"}},{"name":"reference_numbers","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[],"title":"Reference Numbers"}},{"name":"pickup_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pickup Date"}},{"name":"delivery_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LoadSchema"},"title":"Response Search Loads V2 Tms Loads Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/loads/team-members":{"get":{"tags":["v2","tms","v2","tms","loads"],"summary":"List Team Members","description":"Get unique team members (coverage reps and sales reps) for dropdown filters\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n\nReturns:\n    List of team member objects with id and name, sorted alphabetically by name","operationId":"v2_tms_v2_tms_loads_list_team_members","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamMemberOptionSchema"},"title":"Response List Team Members V2 Tms Loads Team Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/loads/tms-statuses":{"get":{"tags":["v2","tms","v2","tms","loads"],"summary":"List Tms Statuses","description":"Get valid TMS status options for a given integration.\n\nReturns the list of raw TMS statuses specific to the TMS system connected\nvia the given integration_connection_id. These are used to populate\ndropdown filter options for TMS status filtering.\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n\nReturns:\n    List of LoadTmsStatusOptionSchema with value and label for each status.","operationId":"v2_tms_v2_tms_loads_list_tms_statuses","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LoadTmsStatusOptionSchema"},"title":"Response List Tms Statuses V2 Tms Loads Tms Statuses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/loads/filter-schema":{"get":{"tags":["v2","tms","v2","tms","loads"],"summary":"Get Filter Schema Endpoint","description":"Get filter field definitions for loads.\n\nReturns the canonical filter schema that defines all available filter fields,\ntheir types, operators, and descriptions. This is the single source of truth\nfor filter definitions used by the frontend and AI service.\n\nReturns:\n    FilterSchemaResponse containing all filter field definitions","operationId":"v2_tms_v2_tms_loads_get_filter_schema_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterSchemaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/loads/ai-parse-filters":{"post":{"tags":["v2","tms","v2","tms","loads"],"summary":"Ai Parse Filters","description":"Parse a natural language query into structured filters using AI.\n\nThis endpoint uses LLM to extract filters from natural language queries like:\n- \"loads from Texas to California\"\n- \"refrigerated loads over $2000\"\n- \"active loads picking up today\"\n\nThe LLM normalizes values (states → ISO codes, dates → ISO format) and returns\nstructured filters that can be used with the list_loads endpoint.\n\nRequest Body:\n    - query: Natural language search query\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n\nReturns:\n    AIParseFiltersResponse with extracted filters","operationId":"v2_tms_v2_tms_loads_ai_parse_filters","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection ID","title":"Integration Connection Id"},"description":"TMS integration connection ID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_ai_parse_filters_v2_tms_loads_ai_parse_filters_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIParseFiltersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/loads/{external_reference_id}":{"get":{"tags":["v2","tms","v2","tms","loads"],"summary":"Get Load","description":"Get a single load by external reference ID\n\nPath Parameters:\n    - external_reference_id: The load's external reference ID (e.g., \"L302537\")\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n\nReturns:\n    Load model with full details and OpenAPI documentation","operationId":"v2_tms_v2_tms_loads_get_load","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/loads/{external_reference_id}/buy-rates":{"patch":{"tags":["v2","tms","v2","tms","loads"],"summary":"Set Load Buy Rates","description":"Set a load's buy-rate envelope from the Mentium load view.\n\nLoads synced from some TMSs arrive without a usable (beginning_buy_rate, max_buy_rate)\npair, so automated carrier outreach never starts and there is no Mentium-side way to\nfix it. This is that escape hatch.\n\nA successful write re-evaluates this load's automation templates, so\n`load_ready_to_be_booked` can fire without waiting for the next sync — provided the\nload's other conditions (ACTIVE, positive customer amount) also hold.\n\nPath Parameters:\n    - external_reference_id: The load's external reference ID\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n\nReturns:\n    The updated load, including who set the rates and when","operationId":"v2_tms_v2_tms_loads_set_load_buy_rates","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLoadBuyRatesRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/loads/{external_reference_id}/sync":{"post":{"tags":["v2","tms","v2","tms","loads"],"summary":"Sync Load","description":"Trigger a sync for a single load from the TMS\n\nThis endpoint starts a Temporal workflow to sync the load data from the TMS.\nThe workflow runs asynchronously on the Vortex queue.\n\nPath Parameters:\n    - external_reference_id: The load's external reference ID in the TMS\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n    - integration_name: Integration name like 'SUNNYBROOK', 'TAI' (required)\n\nReturns:\n    SyncLoadResponse with workflow ID and status","operationId":"v2_tms_v2_tms_loads_sync_load","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"integration_name","in":"query","required":true,"schema":{"type":"string","description":"Integration name (e.g., 'SUNNYBROOK', 'TAI')","title":"Integration Name"},"description":"Integration name (e.g., 'SUNNYBROOK', 'TAI')"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncLoadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/loads/{external_reference_id}/post-to-dat":{"post":{"tags":["v2","tms","v2","tms","loads"],"summary":"Post Load To Dat","description":"Post a single load to the DAT Load Board.\n\nDelegates to Vortex's LoadService.PostLoadToDAT gRPC — Vortex owns the load\ndata, DAT credentials, and the ``load_dat_posting`` audit row.","operationId":"v2_tms_v2_tms_loads_post_load_to_dat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection ID (used to fetch the load).","title":"Integration Connection Id"},"description":"TMS integration connection ID (used to fetch the load)."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostLoadToDATRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostLoadToDATResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/loads/":{"get":{"tags":["v2","tms","v2","tms","loads"],"summary":"List Loads","description":"List loads with flexible dynamic filtering, pagination and sorting\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n    - filters_json: JSON array of dynamic filters supporting ALL operators\n        Example: [{\"field\": \"mentium_status\", \"operator\": \"EQUALS\", \"value\": \"ACTIVE\"}]\n        Supported operators:\n            - EQUALS\n            - NOT_EQUALS\n            - GREATER_THAN\n            - LESS_THAN\n            - GREATER_THAN_OR_EQUAL\n            - LESS_THAN_OR_EQUAL\n            - CONTAINS\n            - NOT_CONTAINS\n            - IN\n            - NOT_IN\n    - limit: Maximum results (default: 50)\n    - offset: Pagination offset (default: 0)\n    - sort_by: Sort field (default: \"first_pickup_stop_appointment_start_at\")\n        Stop-bound canonical fields like \"first_pickup_stop_appointment_start_at\",\n        \"last_delivery_stop_appointment_start_at\", \"first_pickup_stop_target_arrival_earliest_at\",\n        etc. route through a stop-aware LATERAL sort in Vortex.\n    - sort_order: Sort order \"asc\" or \"desc\" (default: \"desc\")\n\nReturns:\n    List of Load models with pagination metadata in headers","operationId":"v2_tms_v2_tms_loads_list_loads","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"filters_json","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON array of dynamic filters: [{\"field\": \"miles\", \"operator\": \"EQUALS\", \"value\": 620}] - supports ALL operators (EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, CONTAINS, etc.)","title":"Filters Json"},"description":"JSON array of dynamic filters: [{\"field\": \"miles\", \"operator\": \"EQUALS\", \"value\": 620}] - supports ALL operators (EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, CONTAINS, etc.)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"first_pickup_stop_appointment_start_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Order"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LoadSchema"},"title":"Response List Loads V2 Tms Loads  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/late-loads/":{"get":{"tags":["v2","tms","v2","tms","late-loads"],"summary":"List Late Loads","description":"List late-load tracking episodes for the current workspace.\n\nEpisodes from org-level connections (NULL workspace_id) are shared across\nevery workspace in the org, so they match alongside the current workspace.","operationId":"v2_tms_v2_tms_late-loads_list_late_loads","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Status filter; defaults to active (LATE) episodes","title":"Status"},"description":"Status filter; defaults to active (LATE) episodes"},{"name":"integration_connection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Connection Id"}},{"name":"include_acknowledged","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Acknowledged"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"deadline_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Order"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LateLoadEpisodeListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/late-loads/{episode_id}/acknowledge":{"patch":{"tags":["v2","tms","v2","tms","late-loads"],"summary":"Acknowledge Late Load","description":"Acknowledge an active late-load episode (hides it from the default list view). Idempotent.","operationId":"v2_tms_v2_tms_late-loads_acknowledge_late_load","security":[{"HTTPBearer":[]}],"parameters":[{"name":"episode_id","in":"path","required":true,"schema":{"type":"string","title":"Episode Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcknowledgeLateLoadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/at-risk/":{"get":{"tags":["v2","tms","v2","tms","at-risk"],"summary":"List At Risk Loads","description":"List active at-risk loads for one signal (or all) + the total for counts.","operationId":"v2_tms_v2_tms_at-risk_list_at_risk_loads","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"signal","in":"query","required":false,"schema":{"type":"string","description":"all | urgent | loss_customer | loss_lane","default":"all","title":"Signal"},"description":"all | urgent | loss_customer | loss_lane"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"first_pickup_stop_target_arrival_earliest_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"asc","title":"Sort Order"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AtRiskLoadListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/favorites/ids":{"get":{"tags":["v2","tms","v2","tms","carriers","favorites"],"summary":"List Favorite Carrier Ids","description":"List favorite carrier external reference IDs for the current user.\n\nLightweight endpoint for rendering favorite indicators on the carriers list.","operationId":"v2_tms_v2_tms_carriers_favorites_list_favorite_carrier_ids","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection ID","title":"Integration Connection Id"},"description":"TMS integration connection ID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoriteCarrierIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/favorites":{"get":{"tags":["v2","tms","v2","tms","carriers","favorites"],"summary":"List Favorite Carriers","description":"List favorite carriers with full details from Vortex.\n\nFetches favorite IDs from Nexus, then queries Vortex for carrier data.\nSupports search and pagination within the favorites set.","operationId":"v2_tms_v2_tms_carriers_favorites_list_favorite_carriers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection ID","title":"Integration Connection Id"},"description":"TMS integration connection ID"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search within favorites by name or DOT#","title":"Search"},"description":"Search within favorites by name or DOT#"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Sort field","default":"name","title":"Sort By"},"description":"Sort field"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCarriersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["v2","tms","v2","tms","carriers","favorites"],"summary":"Add Favorite Carrier","description":"Add a carrier to the current user's favorites.","operationId":"v2_tms_v2_tms_carriers_favorites_add_favorite_carrier","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection ID","title":"Integration Connection Id"},"description":"TMS integration connection ID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddFavoriteCarrierRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoriteCarrierSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/favorites/{carrier_external_reference_id}":{"delete":{"tags":["v2","tms","v2","tms","carriers","favorites"],"summary":"Remove Favorite Carrier","description":"Remove a carrier from the current user's favorites.","operationId":"v2_tms_v2_tms_carriers_favorites_remove_favorite_carrier","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection ID","title":"Integration Connection Id"},"description":"TMS integration connection ID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/favorites/batch":{"post":{"tags":["v2","tms","v2","tms","carriers","favorites"],"summary":"Batch Update Favorite Carriers","description":"Batch add/remove carriers from favorites.","operationId":"v2_tms_v2_tms_carriers_favorites_batch_update_favorite_carriers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection ID","title":"Integration Connection Id"},"description":"TMS integration connection ID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchFavoriteCarriersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchFavoriteCarriersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_external_reference_id}/notes":{"get":{"tags":["v2","tms","v2","tms","carriers","notes"],"summary":"List Carrier Notes","description":"List notes for a carrier across the user's organization (newest first).","operationId":"v2_tms_v2_tms_carriers_notes_list_carrier_notes","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection ID","title":"Integration Connection Id"},"description":"TMS integration connection ID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCarrierNotesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["v2","tms","v2","tms","carriers","notes"],"summary":"Create Carrier Note","description":"Create a note on a carrier (visible to the whole organization).","operationId":"v2_tms_v2_tms_carriers_notes_create_carrier_note","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection ID","title":"Integration Connection Id"},"description":"TMS integration connection ID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCarrierNoteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierNoteSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/notes/{note_id}":{"patch":{"tags":["v2","tms","v2","tms","carriers","notes"],"summary":"Update Carrier Note","description":"Update a carrier note. Only the author may edit their own note.","operationId":"v2_tms_v2_tms_carriers_notes_update_carrier_note","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCarrierNoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierNoteSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v2","tms","v2","tms","carriers","notes"],"summary":"Delete Carrier Note","description":"Delete a carrier note. Only the author may delete their own note.","operationId":"v2_tms_v2_tms_carriers_notes_delete_carrier_note","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carrier-pool/carriers":{"get":{"tags":["v2","tms","v2","tms","carrier-pool"],"summary":"List Carrier Pool Mentium Tms Carriers","description":"List/search carriers some Carrier Pool participant has actually observed; no public origin is admitted here.","operationId":"v2_tms_v2_tms_carrier-pool_list_carrier_pool_mentium_tms_carriers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text search","title":"Query"},"description":"Free-text search"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"relevance","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Order"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCarrierPoolMentiumTmsCarriersResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/search":{"get":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Search Carriers","description":"Search for carriers with various filters\n\nUses CarrierServiceClient from libs to call Vortex - clean and simple!\nNote: Contacts and equipment are NOT included by default for performance.\nPass include_contacts=true to include contacts (needed for email availability checks).\nUse GET /carriers/{id} to fetch full carrier details.\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n    - external_reference_id: Search by external reference ID (for autocomplete/partial matching)\n    - name: Filter by carrier name (partial match)\n    - dot_number: Filter by DOT number (partial match)\n    - phone_number: Filter by phone number (partial match)\n    - include_contacts: Include carrier contacts in response (default: false)\n    - limit: Maximum number of results (default: 20)\n    - offset: Offset for pagination (default: 0)\n\nReturns:\n    List of Carrier models (basic info only unless include_contacts is true)","operationId":"v2_tms_v2_tms_carriers_search_carriers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"external_reference_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Id"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"dot_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number"}},{"name":"phone_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"}},{"name":"include_contacts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Contacts"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/nexus__app__schemas__tms_carriers__CarrierSchema"},"title":"Response Search Carriers V2 Tms Carriers Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/mentium-tms/carriers/search":{"get":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Search Mentium Tms Carriers","description":"Search the MentiumTMS golden database for a carrier by DOT, MC, or name/aliases.\nReturns matched carriers with their contacts. Used for Send Offer flow\nwhen the carrier doesn't exist in the operational database (e.g. DAT carriers).","operationId":"v2_tms_v2_tms_carriers_search_mentium_tms_carriers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Carrier name (alias match)","title":"Name"},"description":"Carrier name (alias match)"},{"name":"dot_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"DOT number (exact match)","title":"Dot Number"},"description":"DOT number (exact match)"},{"name":"mc_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"MC number (exact match)","title":"Mc Number"},"description":"MC number (exact match)"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/nexus__app__schemas__tms_carriers__CarrierSchema"},"title":"Response Search Mentium Tms Carriers V2 Tms Carriers Mentium Tms Carriers Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{external_reference_id}":{"get":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Get Carrier","description":"Get a single carrier by external reference ID\n\nReturns full carrier details including contacts, equipment, and financial summary.\n\nPath Parameters:\n    - external_reference_id: The carrier's external reference ID (e.g., \"CAR12345\")\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n\nReturns:\n    Carrier model with full details including:\n    - Basic carrier info (name, DOT#, phone, addresses)\n    - Contacts (dispatchers, admins, operations liaisons)\n    - Equipment (capabilities, reefer, hazmat, team, etc.)\n    - Certifications (SMART_WAY, CARB_TRU, TANKER_ENDORSED_DRIVERS, etc.)\n    - Financial summary (total paid, outstanding balance, average rate, recent payments)\n    - Engagement metrics (response_rate, acceptance_rate)","operationId":"v2_tms_v2_tms_carriers_get_carrier","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/nexus__app__schemas__tms_carriers__CarrierSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{external_reference_id}/shared-contacts":{"get":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Get Carrier Shared Contacts","description":"Contacts the shared carrier holds for this TMS carrier (by DOT then MC), which email and calls fall back to (ENG-2461).","operationId":"v2_tms_v2_tms_carriers_get_carrier_shared_contacts","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedCarrierContactsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{external_reference_id}/vendor-carrier-lookup":{"post":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Lookup Vendor Carrier","description":"Ask the workspace's own Highway / MyCarrierPackets / Genlogs connection for this carrier's contacts; the answer is kept on the shared carrier (ENG-2461).","operationId":"v2_tms_v2_tms_carriers_lookup_vendor_carrier","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorCarrierLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{external_reference_id}/compliance":{"get":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Get Carrier Compliance","description":"Live MyCarrierPackets compliance for this carrier's DOT through the organization's own connection, briefly cached (ENG-2461).","operationId":"v2_tms_v2_tms_carriers_get_carrier_compliance","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierComplianceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{external_reference_id}/custom-preferences":{"patch":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Update Carrier Custom Preferences","description":"Update carrier-specific preferences.\n\nThe request body carries the full desired state for every preference field:\neach value on the request is written as-is, with ``null`` persisted as NULL\n(i.e. fall back to the organization-wide default). To keep an existing value,\nthe client sends it back on the next update.","operationId":"v2_tms_v2_tms_carriers_update_carrier_custom_preferences","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCarrierCustomPreferencesRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/nexus__app__schemas__tms_carriers__CarrierSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{external_reference_id}/billing":{"patch":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Update Carrier Billing","description":"Update carrier billing currency\n\nPath Parameters:\n    - external_reference_id: Carrier external reference ID\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n    - billing_currency: Currency code - one of: USD, CAD, MXN (required)\n\nReturns:\n    Updated carrier object with financial amounts converted to org's base currency","operationId":"v2_tms_v2_tms_carriers_update_carrier_billing","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"billing_currency","in":"query","required":true,"schema":{"type":"string","description":"Billing currency (USD, CAD, MXN)","title":"Billing Currency"},"description":"Billing currency (USD, CAD, MXN)"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/nexus__app__schemas__tms_carriers__CarrierSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers":{"get":{"tags":["v2","tms","v2","tms","carriers"],"summary":"List Carriers","description":"List carriers with flexible filtering, pagination and sorting\n\nNote: Equipment and certifications are NOT included in list results for performance.\nUse GET /carriers/{id} to fetch full carrier details with contacts/equipment/certifications.\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n    - search: Search across name and DOT number (partial match, OR logic)\n    - external_reference_id: Filter by external reference ID (partial match, for autocomplete)\n    - name: Filter by carrier name (partial match)\n    - dot_number: Filter by DOT number (partial match)\n    - phone_number: Filter by phone number (partial match)\n    - email: Filter by email (partial match)\n    - filters_json: JSON array of dynamic filters for advanced filtering\n    - limit: Maximum results (default: 50, max: 1000)\n    - offset: Pagination offset (default: 0)\n    - sort_by: Sort field (default: \"name\")\n    - sort_order: Sort order \"asc\" or \"desc\" (default: \"asc\")\n\nReturns:\n    ListCarriersResponse with carriers list, total_count, and has_more flag","operationId":"v2_tms_v2_tms_carriers_list_carriers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"external_reference_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by external reference ID (partial match, for autocomplete)","title":"External Reference Id"},"description":"Filter by external reference ID (partial match, for autocomplete)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search across carrier name and DOT number (partial match, OR logic)","title":"Search"},"description":"Search across carrier name and DOT number (partial match, OR logic)"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"dot_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number"}},{"name":"phone_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"}},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},{"name":"filters_json","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON array of dynamic filters. Single value: [{\"field\": \"name\", \"operator\": \"CONTAINS\", \"value\": \"Swift\"}]. Array values (IN/NOT_IN): [{\"field\": \"name\", \"operator\": \"IN\", \"values\": [\"Swift\", \"JB Hunt\"]}]. Supported fields: external_reference_id, name, dot_number, phone_number, email. Supported operators: EQUALS, NOT_EQUALS, CONTAINS, NOT_CONTAINS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, IN, NOT_IN.","title":"Filters Json"},"description":"JSON array of dynamic filters. Single value: [{\"field\": \"name\", \"operator\": \"CONTAINS\", \"value\": \"Swift\"}]. Array values (IN/NOT_IN): [{\"field\": \"name\", \"operator\": \"IN\", \"values\": [\"Swift\", \"JB Hunt\"]}]. Supported fields: external_reference_id, name, dot_number, phone_number, email. Supported operators: EQUALS, NOT_EQUALS, CONTAINS, NOT_CONTAINS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, IN, NOT_IN."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum results (default: 50, max: 1000)","default":50,"title":"Limit"},"description":"Maximum results (default: 50, max: 1000)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset (default: 0)","default":0,"title":"Offset"},"description":"Pagination offset (default: 0)"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Sort field (default: 'name')","default":"name","title":"Sort By"},"description":"Sort field (default: 'name')"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","description":"Sort order 'asc' or 'desc' (default: 'asc')","default":"asc","title":"Sort Order"},"description":"Sort order 'asc' or 'desc' (default: 'asc')"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCarriersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_external_reference_id}/contacts":{"post":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Create Carrier Contact","description":"Create a new contact for a carrier via Vortex gRPC service.\n\nThis endpoint creates a contact in the TMS through Vortex gRPC.\nVortex handles:\n1. Creating the contact in the TMS\n2. Triggering a carrier sync workflow to update Vortex DB\n\nPath Parameters:\n    - carrier_external_reference_id: The carrier's external reference ID in TMS\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n\nRequest Body:\n    - first_name: Contact's first name (required)\n    - last_name: Contact's last name (required)\n    - primary_email: Contact's email address\n    - primary_phone: Contact's phone number\n    - contact_type: Contact type - one of: DISPATCHER, DRIVER, OPERATIONS, ACCOUNTING, AP, AR, OWNER, OTHER (required)\n    - is_primary_contact: Whether this is the primary contact for the carrier\n\nReturns:\n    Created carrier contact with TMS-generated ID","operationId":"v2_tms_v2_tms_carriers_create_carrier_contact","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCarrierContactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Carrier Contact V2 Tms Carriers  Carrier External Reference Id  Contacts Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_external_reference_id}/contacts/{contact_id}":{"put":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Update Carrier Contact","description":"Update an existing contact for a carrier via Vortex gRPC service.\n\nThis endpoint updates a contact in the TMS through Vortex gRPC.\nVortex handles:\n1. Updating the contact in the TMS\n2. Triggering a carrier sync workflow to update Vortex DB\n\nPath Parameters:\n    - carrier_external_reference_id: The carrier's external reference ID in TMS\n    - contact_id: The contact's UUID in Vortex DB\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n\nRequest Body:\n    - first_name: Contact's first name (optional)\n    - last_name: Contact's last name (optional)\n    - primary_email: Contact's email address (optional)\n    - primary_phone: Contact's phone number (optional)\n    - contact_type: Contact type - one of: DISPATCHER, DRIVER, OPERATIONS, ACCOUNTING, AP, AR, OWNER, OTHER (optional)\n    - is_primary_contact: Whether this is the primary contact for the carrier (optional)\n\nReturns:\n    Updated carrier contact with TMS-generated ID","operationId":"v2_tms_v2_tms_carriers_update_carrier_contact","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier External Reference Id"}},{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCarrierContactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Carrier Contact V2 Tms Carriers  Carrier External Reference Id  Contacts  Contact Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Delete Carrier Contact","description":"Delete an existing contact for a carrier via Vortex gRPC service.\n\nThis endpoint deletes a contact in the TMS through Vortex gRPC.\nVortex handles:\n1. Deleting the contact in the TMS\n2. Triggering a carrier sync workflow to update Vortex DB\n\nPath Parameters:\n    - carrier_external_reference_id: The carrier's external reference ID in TMS\n    - contact_id: The contact's UUID in Vortex DB\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n\nReturns:\n    Success status","operationId":"v2_tms_v2_tms_carriers_delete_carrier_contact","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier External Reference Id"}},{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Carrier Contact V2 Tms Carriers  Carrier External Reference Id  Contacts  Contact Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_external_reference_id}/contacts/{contact_external_reference_id}/deactivate":{"post":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Deactivate Carrier Contact","description":"Manually deactivate a carrier contact with a reason.\n\nThe contact is not deleted - it moves to the carrier's \"Deactivated\ncontacts\" section and is skipped by automated offer sends. Nexus-owned so\nit survives TMS sync. Reactivate via the sibling endpoint.","operationId":"v2_tms_v2_tms_carriers_deactivate_carrier_contact","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier External Reference Id"}},{"name":"contact_external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"Contact External Reference Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeactivateContactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDeactivationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_external_reference_id}/contacts/{contact_external_reference_id}/reactivate":{"post":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Reactivate Carrier Contact","description":"Reactivate a carrier contact: clears a manual deactivation AND releases\nthe contact email's bounce suppression (so a bounce-deactivated contact\nreactivates too).","operationId":"v2_tms_v2_tms_carriers_reactivate_carrier_contact","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier External Reference Id"}},{"name":"contact_external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"Contact External Reference Id"}},{"name":"contact_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Primary email - also releases its bounce suppression if set","title":"Contact Email"},"description":"Primary email - also releases its bounce suppression if set"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDeactivationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{external_reference_id}/sync":{"post":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Sync Carrier","description":"Trigger a sync for a single carrier from the TMS\n\nThis endpoint starts a Temporal workflow to sync the carrier data from the TMS.\nThe workflow runs asynchronously on the Vortex queue.\n\nPath Parameters:\n    - external_reference_id: The carrier's external reference ID in the TMS\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n    - integration_name: Integration name like 'SUNNYBROOK', 'TAI' (required)\n\nReturns:\n    SyncCarrierResponse with workflow ID and status","operationId":"v2_tms_v2_tms_carriers_sync_carrier","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"integration_name","in":"query","required":true,"schema":{"type":"string","description":"Integration name (e.g., 'SUNNYBROOK', 'TAI')","title":"Integration Name"},"description":"Integration name (e.g., 'SUNNYBROOK', 'TAI')"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncCarrierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_id}/ai-parse-capacity":{"post":{"tags":["v2","tms","v2","tms","carriers"],"summary":"Ai Parse Capacity","description":"Parse natural language text or screenshot into carrier capacity form data.\n\nUses AI to extract lane or availability data from descriptions or screenshots\nand returns pre-fill data for the Add Lane / Add Truck forms.","operationId":"v2_tms_v2_tms_carriers_ai_parse_capacity","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIParseCapacityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParsedCapacityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/customers":{"get":{"tags":["v2","tms","v2","tms","customers"],"summary":"List Customers","description":"Get list of customers for dropdown filters\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n\nReturns:\n    List of customer objects with id and name, sorted alphabetically by name","operationId":"v2_tms_v2_tms_customers_list_customers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerOptionSchema"},"title":"Response List Customers V2 Tms Customers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/customers/search":{"get":{"tags":["v2","tms","v2","tms","customers"],"summary":"Search Customers","description":"Search customers with full details\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n    - name: Filter by customer name (partial match, case-insensitive)\n    - limit: Maximum number of results (default: 50, max: 1000)\n    - offset: Pagination offset (default: 0)\n\nReturns:\n    List of customer objects with full details","operationId":"v2_tms_v2_tms_customers_search_customers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by customer name (partial match)","title":"Name"},"description":"Filter by customer name (partial match)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results to return","default":50,"title":"Limit"},"description":"Maximum number of results to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of results to skip","default":0,"title":"Offset"},"description":"Number of results to skip"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSchema"},"title":"Response Search Customers V2 Tms Customers Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/customers/{customer_id}":{"get":{"tags":["v2","tms","v2","tms","customers"],"summary":"Get Customer","description":"Get a single customer by ID\n\nPath Parameters:\n    - customer_id: Customer UUID\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n\nReturns:\n    Customer object with full details, with financial amounts converted to org currency","operationId":"v2_tms_v2_tms_customers_get_customer","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/customers/{customer_id}/billing":{"patch":{"tags":["v2","tms","v2","tms","customers"],"summary":"Update Customer Billing","description":"Update customer billing currency\n\nPath Parameters:\n    - customer_id: Customer UUID\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n    - billing_currency: Currency code - one of: USD, CAD, MXN (required)\n\nReturns:\n    Updated customer object with financial amounts converted to org's base currency","operationId":"v2_tms_v2_tms_customers_update_customer_billing","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"billing_currency","in":"query","required":true,"schema":{"type":"string","description":"Billing currency (USD, CAD, MXN)","title":"Billing Currency"},"description":"Billing currency (USD, CAD, MXN)"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/customers/{external_reference_id}/sync":{"post":{"tags":["v2","tms","v2","tms","customers"],"summary":"Sync Customer","description":"Trigger a sync for a single customer from the TMS\n\nThis endpoint starts a Temporal workflow to sync the customer data from the TMS.\nThe workflow runs asynchronously on the Vortex queue.\n\nPath Parameters:\n    - external_reference_id: The customer's external reference ID in the TMS\n\nQuery Parameters:\n    - integration_connection_id: TMS integration connection ID (required)\n    - integration_name: Integration name like 'SUNNYBROOK', 'TAI' (required)\n\nReturns:\n    SyncCustomerResponse with workflow ID and status","operationId":"v2_tms_v2_tms_customers_sync_customer","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"integration_name","in":"query","required":true,"schema":{"type":"string","description":"Integration name (e.g., 'SUNNYBROOK', 'TAI')","title":"Integration Name"},"description":"Integration name (e.g., 'SUNNYBROOK', 'TAI')"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncCustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_id}/lanes":{"post":{"tags":["v2","tms","v2","tms","lanes"],"summary":"Create Lane","description":"Create a new carrier defined lane","operationId":"v2_tms_v2_tms_lanes_create_lane","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLaneRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedLane"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["v2","tms","v2","tms","lanes"],"summary":"List Lanes","description":"List carrier defined lanes with optional filters","operationId":"v2_tms_v2_tms_lanes_list_lanes","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"shipping_method","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}],"title":"Shipping Method"}},{"name":"equipment_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}],"title":"Equipment Type"}},{"name":"preference_level","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsLanePreferenceLevel"},{"type":"null"}],"title":"Preference Level"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","enum":["mentium_created_at","mentium_updated_at"],"default":"mentium_created_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","title":"Sort Order"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLanesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_id}/lanes/{lane_id}":{"get":{"tags":["v2","tms","v2","tms","lanes"],"summary":"Get Lane","description":"Get a single carrier defined lane by ID","operationId":"v2_tms_v2_tms_lanes_get_lane","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"lane_id","in":"path","required":true,"schema":{"type":"string","title":"Lane Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedLane"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["v2","tms","v2","tms","lanes"],"summary":"Update Lane","description":"Update an existing carrier defined lane","operationId":"v2_tms_v2_tms_lanes_update_lane","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"lane_id","in":"path","required":true,"schema":{"type":"string","title":"Lane Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLaneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedLane"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v2","tms","v2","tms","lanes"],"summary":"Delete Lane","description":"Soft delete a carrier defined lane","operationId":"v2_tms_v2_tms_lanes_delete_lane","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"lane_id","in":"path","required":true,"schema":{"type":"string","title":"Lane Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_id}/historical-lanes":{"get":{"tags":["v2","tms","v2","tms","historical_lanes"],"summary":"List Historical Lanes","description":"List carrier historical lanes based on optional filters","operationId":"v2_tms_v2_tms_historical_lanes_list_historical_lanes","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"source_city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source City"}},{"name":"source_state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source State"}},{"name":"source_country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Country"}},{"name":"source_postal_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Postal Code"}},{"name":"source_postal_code_prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Postal Code Prefix"}},{"name":"source_latitude","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":90,"minimum":-90},{"type":"null"}],"title":"Source Latitude"}},{"name":"source_longitude","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":180,"minimum":-180},{"type":"null"}],"title":"Source Longitude"}},{"name":"source_radius_miles","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Source Radius Miles"}},{"name":"destination_city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination City"}},{"name":"destination_state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination State"}},{"name":"destination_country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination Country"}},{"name":"destination_postal_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination Postal Code"}},{"name":"destination_postal_code_prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination Postal Code Prefix"}},{"name":"destination_latitude","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":90,"minimum":-90},{"type":"null"}],"title":"Destination Latitude"}},{"name":"destination_longitude","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":180,"minimum":-180},{"type":"null"}],"title":"Destination Longitude"}},{"name":"destination_radius_miles","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Destination Radius Miles"}},{"name":"shipping_method","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}],"title":"Shipping Method"}},{"name":"equipment_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}],"title":"Equipment Type"}},{"name":"min_total_loads","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Min Total Loads"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","enum":["total_loads"],"default":"total_loads","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","title":"Sort Order"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListHistoricalLanesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/historical-lanes/search-carriers":{"post":{"tags":["v2","tms","v2","tms","historical_lanes"],"summary":"Search Carriers By Historical Lane","description":"Rank carriers by total loads run on a lane matching the given filters.","operationId":"v2_tms_v2_tms_historical_lanes_search_carriers_by_historical_lane","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchCarriersByHistoricalLaneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchCarriersByHistoricalLaneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_id}/availabilities":{"post":{"tags":["v2","tms","v2","tms","availabilities"],"summary":"Create Availability","description":"Create a new carrier defined availability. Duplicate configuration returns 200 with created=false.","operationId":"v2_tms_v2_tms_availabilities_create_availability","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvailabilityRequest"}}}},"responses":{"201":{"description":"New availability created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvailabilityResult"}}}},"200":{"description":"Identical availability already exists; existing record returned (deduplicated).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvailabilityResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["v2","tms","v2","tms","availabilities"],"summary":"List Availabilities","description":"List carrier defined availabilities with optional filters","operationId":"v2_tms_v2_tms_availabilities_list_availabilities","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"shipping_method","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}],"title":"Shipping Method"}},{"name":"equipment_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}],"title":"Equipment Type"}},{"name":"recurrence_frequency","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsAvailabilityRecurrenceFrequency"},{"type":"null"}],"title":"Recurrence Frequency"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","enum":["mentium_created_at","mentium_updated_at"],"default":"mentium_created_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","title":"Sort Order"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAvailabilitiesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_id}/availabilities/{availability_id}":{"get":{"tags":["v2","tms","v2","tms","availabilities"],"summary":"Get Availability","description":"Get a single carrier defined availability by ID","operationId":"v2_tms_v2_tms_availabilities_get_availability","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"availability_id","in":"path","required":true,"schema":{"type":"string","title":"Availability Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedAvailability"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["v2","tms","v2","tms","availabilities"],"summary":"Update Availability","description":"Update an existing carrier defined availability","operationId":"v2_tms_v2_tms_availabilities_update_availability","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"availability_id","in":"path","required":true,"schema":{"type":"string","title":"Availability Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAvailabilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedAvailability"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v2","tms","v2","tms","availabilities"],"summary":"Delete Availability","description":"Soft delete a carrier defined availability","operationId":"v2_tms_v2_tms_availabilities_delete_availability","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"availability_id","in":"path","required":true,"schema":{"type":"string","title":"Availability Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_id}/availabilities/{availability_id}/roll-to-tomorrow":{"post":{"tags":["v2","tms","v2","tms","availabilities"],"summary":"Roll Availability To Tomorrow","description":"Shift a one-time (ONCE) availability forward by one day (server-computed UTC).\n\nOnly supported for ``recurrence_frequency == ONCE`` rows. The target date is\ntomorrow at 00:00:00Z, with ``recurrence_end_at`` set to the next day at\n00:00:00Z (exclusive end-of-day), matching the convention used by the\nexisting create/update flows.","operationId":"v2_tms_v2_tms_availabilities_roll_availability_to_tomorrow","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"availability_id","in":"path","required":true,"schema":{"type":"string","title":"Availability Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Availability shifted to tomorrow (UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedAvailability"}}}},"400":{"description":"Row is not a one-time availability (recurring rows cannot be rolled)."},"404":{"description":"Availability not found."},"409":{"description":"A matching availability already exists on the target date."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carriers/{carrier_id}/availabilities/{availability_id}/duplicate-for-tomorrow":{"post":{"tags":["v2","tms","v2","tms","availabilities"],"summary":"Duplicate Availability For Tomorrow","description":"Create a new ONCE availability for tomorrow from an existing row.\n\nCopies ``source``, ``destination``, ``shipping_method``, ``equipment_type``,\nand ``notes`` from the source row. The new row is always ONCE (recurrence\npattern fields are dropped, as required by the ONCE validator). If an\nidentical row already exists for tomorrow (same ``availability_hash``), the\nexisting row is returned with ``created=false`` (HTTP 200), matching the\ncontract of ``POST /availabilities``.","operationId":"v2_tms_v2_tms_availabilities_duplicate_availability_for_tomorrow","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"availability_id","in":"path","required":true,"schema":{"type":"string","title":"Availability Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"201":{"description":"New ONCE availability created for tomorrow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvailabilityResult"}}}},"200":{"description":"A matching ONCE availability already exists for tomorrow; existing record returned (deduplicated).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvailabilityResult"}}}},"404":{"description":"Source availability not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/load-recommendation/get-recommended-loads-for-carrier-from-mentium":{"post":{"tags":["v2","tms","v2","tms"],"summary":"Get Recommended Loads For Carrier From Mentium","description":"Get recommended loads for carrier from Mentium.","operationId":"v2_tms_v2_tms_get_recommended_loads_for_carrier_from_mentium","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRecommendedLoadsForCarrierRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRecommendedLoadsForCarrierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carrier-recommendation/get-recommended-carriers-for-load-from-mentium":{"post":{"tags":["v2","tms","v2","tms"],"summary":"Get Recommended Carriers For Load From Mentium","description":"Get recommended carriers for load from Mentium.","operationId":"v2_tms_v2_tms_get_recommended_carriers_for_load_from_mentium","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRecommendedCarriersForLoadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRecommendedCarriersForLoadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carrier-recommendation/get-recommended-carriers-for-load-from-dat":{"post":{"tags":["v2","tms","v2","tms"],"summary":"Get Recommended Carriers For Load From Dat","description":"Get recommended carriers for load from DAT.","operationId":"v2_tms_v2_tms_get_recommended_carriers_for_load_from_dat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRecommendedCarriersForLoadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRecommendedCarriersForLoadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carrier-recommendation/get-recommended-carriers-for-load-from-genlogs":{"post":{"tags":["v2","tms","v2","tms"],"summary":"Get Recommended Carriers For Load From Genlogs","description":"Get recommended carriers for load from Genlogs.","operationId":"v2_tms_v2_tms_get_recommended_carriers_for_load_from_genlogs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRecommendedCarriersForLoadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRecommendedCarriersForLoadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/carrier-recommendation/get-recommended-carriers-for-load-from-carrier-pool":{"post":{"tags":["v2","tms","v2","tms"],"summary":"Get Recommended Carriers For Load From Carrier Pool","description":"Get recommended carriers for load from the Carrier Pool, scored in its own pass; a non-participant gets an empty list.","operationId":"v2_tms_v2_tms_get_recommended_carriers_for_load_from_carrier_pool","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRecommendedCarriersForLoadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRecommendedCarriersForLoadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/offers/{offer_id}":{"get":{"tags":["v2","tms","Load Offers"],"summary":"Get Offer","description":"Get offer with carrier offers included","operationId":"v2_tms_Load Offers_get_offer","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","title":"Offer Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["v2","tms","Load Offers"],"summary":"Update offer with automatic margin recalculation","description":"Update persisted offer fields.\n\n    Notes:\n    - `customer_rate_amount` is not stored in Nexus; Vortex is its source of truth.\n    - margins are computed at read-time for display\n\n    **Validation:**\n    - max_load_offer_carrier_rate_amount: >= min_load_offer_carrier_rate_amount","operationId":"v2_tms_Load Offers_update_offer","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","title":"Offer Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOfferRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/offers/by-load/{external_reference_load_id}":{"get":{"tags":["v2","tms","Load Offers"],"summary":"Get offer or calculated defaults (no auto-create)","description":"Returns existing offer or calculated defaults WITHOUT auto-creating.\n\n    Use this endpoint to display offer values without persisting them until\n    the user explicitly saves. This allows TMS changes (like Beginning Buy Rate\n    updates) to be reflected until user saves.\n\n    **Response includes `is_saved` flag:**\n    - `is_saved=true`: Offer exists in DB, showing saved values\n    - `is_saved=false`: No offer exists, showing calculated defaults from TMS","operationId":"v2_tms_Load Offers_get_or_default_offer_for_load","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_reference_load_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Load Id"}},{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferOrDefaultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/offers":{"post":{"tags":["v2","tms","Load Offers"],"summary":"Manually create offer for load","description":"Manually create an offer with user-provided rates.\n\n    Use this when auto-creation has nothing to persist — every listed\n    offer-settings source is empty — or the broker wants to set rates by hand.\n\n    **Required Fields:**\n    - min_load_offer_carrier_rate_amount: What the broker offers to the carrier\n\n    **Optional Fields:**\n    - max_load_offer_carrier_rate_amount: Maximum acceptable carrier bid (defaults to opening rate * 1.2)\n\n    **Validation:**\n    - max_load_offer_carrier_rate_amount (if provided) must be >= min_load_offer_carrier_rate_amount\n    - All amounts must be > 0","operationId":"v2_tms_Load Offers_create_offer_manually","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOfferRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/offers/prepare-public-booking-link":{"post":{"tags":["v2","tms","Load Offers"],"summary":"Prepare a public booking link for editable email composition","description":"Generates a pending booking link for the email preview. Nothing is persisted\n    until the final send call creates the offer and binds the token to it.","operationId":"v2_tms_Load Offers_prepare_public_booking_link","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreparePublicBookingLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/offers/{offer_id}/send":{"post":{"tags":["v2","tms","Load Offers"],"summary":"Send offer using default template","description":"Sends offer to carriers using the default template for the channel.\n\n    **Auto-Creation:**\n    - If the offer doesn't exist, it will be automatically created using calculated defaults\n    - Requires `integration_connection_id` in request body when offer doesn't exist\n    - Pass the literal string `new` as `offer_id` to skip the existing-offer lookup and force\n      creation from the request payload (used by the compose flow before any offer is persisted)\n    - When `min_load_offer_carrier_rate_amount` is provided in the body it overrides any saved value;\n      the LoadOffer is created or updated at send time using that amount\n\n    **Template System:**\n    - If `template_id` is provided, uses that specific template\n    - If `subject` and `body` are provided, uses them directly (no template)\n    - Otherwise, uses the default template for the channel\n    - Template variables are automatically filled with load and carrier data from Vortex\n\n    **Template Variables:**\n    Templates support {{variable}} syntax filled from LoadSchema and CarrierSchema:\n    - {{load.external_reference_id}}, {{load.weight}}, {{load.equipment_type}}\n    - {{carrier.name}}, {{carrier.dot_number}}\n    - {{load.customer.name}}, {{load.stops.0.city}}, etc.\n\n    **Channel Types:**\n    - EMAIL: Sends via workspace email integration\n    - SMS: Sends via SMS integration (future)\n    - WHATSAPP: Sends via WhatsApp integration (future)","operationId":"v2_tms_Load Offers_send_offer","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","title":"Offer Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOfferRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOfferBulkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/offers/{offer_id}/carriers/{carrier_id}/book":{"post":{"tags":["v2","tms","Load Offers"],"summary":"Book a carrier for this offer","description":"Book a carrier for this offer.\n\n    1. Find CarrierOffer by offer_id + carrier_id\n    2. Update status to BOOKED in TMS\n    3. Close all other CarrierOffers for same offer\n\n    For some TMS (like TAI), the API doesn't support updating carrier assignment\n    on existing shipments. In these cases, the booking is recorded in Mentium\n    and a `tms_link` is returned for manual carrier assignment in the TMS web UI.","operationId":"v2_tms_Load Offers_book_carrier","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","title":"Offer Id"}},{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookCarrierRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookCarrierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/offers/{offer_id}/carriers/{carrier_id}/counter":{"post":{"tags":["v2","tms","Load Offers"],"summary":"Send counter offer to carrier","description":"Send a counter offer to a carrier who has submitted a bid.\n\n    This endpoint is used when:\n    - Carrier submitted a bid that differs from the original offer\n    - Broker wants to negotiate by sending a counter amount\n\n    The carrier will receive an email notification with the counter offer\n    and a link to respond (accept, counter again, or decline).\n\n    **Flow:**\n    1. Carrier submits bid → status becomes NEGOTIATING\n    2. Broker sends counter → carrier notified\n    3. Carrier can: accept counter (ACCEPTED/BOOKED), submit new bid, or decline","operationId":"v2_tms_Load Offers_send_counter_offer","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","title":"Offer Id"}},{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterOfferRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterOfferResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/offers/{offer_id}/carriers/{carrier_id}/negotiation":{"get":{"tags":["v2","tms","Load Offers"],"summary":"Get negotiation state for a carrier offer","description":"Returns the current negotiation state between broker and carrier. Use conversation history for detailed bid history.","operationId":"v2_tms_Load Offers_get_negotiation_state","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","title":"Offer Id"}},{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/dashboard/metrics":{"get":{"tags":["v2","tms","v2","tms","dashboard"],"summary":"Get Tms Dashboard Metrics","description":"Get comprehensive TMS dashboard metrics with optimized performance.\n\nReturns all key metrics for the outreach dashboard:\n\n**Load Inventory:**\n- Total active loads (from TMS)\n- Loads with offers (not yet booked)\n\n**Outreach Performance:**\n- Offers sent\n- Unique carriers contacted\n- Response rate\n- Average offers per load\n\n**Conversion Metrics:**\n- Loads booked via Mentium\n- Booking rate\n- Accept rate\n- Acceptance-to-booking rate\n\n**Financial Performance (booked loads only):**\n- Average margin percentage\n- Average margin amount\n- Total revenue managed\n- Total profit generated","operationId":"v2_tms_v2_tms_dashboard_get_tms_dashboard_metrics","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Start date for filtering metrics","title":"Start Date"},"description":"Start date for filtering metrics"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"End date for filtering metrics","title":"End Date"},"description":"End date for filtering metrics"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TmsDashboardMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/global-dashboard/metrics":{"get":{"tags":["v2","tms","v2","tms","global-dashboard"],"summary":"Get Global Dashboard Metrics","description":"Get global TMS dashboard metrics for a focus timeframe with historical and projected trends.\n\nRequest: GetGlobalDashboardMetricsRequest\n    - integration_connection_id: str\n    - current_datetime: datetime\n    - timeframe_type: TimeframeType\n    - interval_type: IntervalType\n    - focus_timeframe_start_datetime: datetime\n    - focus_timeframe_end_datetime_exclusive: datetime\n    - historical_trend_timeframes_offset: int (≤ 0)\n    - projected_trend_timeframes_offset: int (== 0)\n\nResponse: GetGlobalDashboardMetricsResponse\n    - timeframe_metrics: list[TimeFrameMetrics]\n        - timeframe_type: TimeframeType\n        - timeframe_start_datetime: datetime\n        - timeframe_end_datetime_exclusive: datetime\n        - elapsed_working_days: int\n        - remaining_working_days: int\n        - organization_metrics: OrganizationMetrics\n            - total_loads: int\n            - average_loads_per_interval: float\n            - projected_total_loads: int\n            - total_revenue: float\n            - average_revenue_per_load: float\n            - average_revenue_per_interval: float\n            - projected_total_revenue: float\n            - total_margin: float\n            - average_margin_per_load: float\n            - average_margin_per_interval: float\n            - margin_percentage: float\n            - projected_total_margin: float\n        - sales_representative_metrics: list[SalesRepresentativeMetrics] (optional)\n        - top_carriers_metrics: list[TopCarriersMetrics] (optional)","operationId":"v2_tms_v2_tms_global-dashboard_get_global_dashboard_metrics","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"current_datetime","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"\n            Current datetime (UTC) sourced from request for consistency\n        ","title":"Current Datetime"},"description":"\n            Current datetime (UTC) sourced from request for consistency\n        "},{"name":"timeframe_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/TimeframeType","description":"\n            Calendar time window type in which to calculate metrics\n            - Standard types (DAY, WEEK, MONTH, QUARTER, YEAR): Enables historical/projected trends\n            - CUSTOM: Arbitrary date range for the focus timeframe\n        "},"description":"\n            Calendar time window type in which to calculate metrics\n            - Standard types (DAY, WEEK, MONTH, QUARTER, YEAR): Enables historical/projected trends\n            - CUSTOM: Arbitrary date range for the focus timeframe\n        "},{"name":"interval_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/IntervalType","description":"\n            Calender time unit type in which to average metrics\n        "},"description":"\n            Calender time unit type in which to average metrics\n        "},{"name":"focus_timeframe_start_datetime","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"\n            Start of the timeframe the user is viewing (inclusive lower bound)\n\n            Example:\n            - Viewing October 2025:         2025-10-01T00:00:00Z\n            - Viewing custom August 12-24:  2025-08-12T00:00:00Z\n        ","title":"Focus Timeframe Start Datetime"},"description":"\n            Start of the timeframe the user is viewing (inclusive lower bound)\n\n            Example:\n            - Viewing October 2025:         2025-10-01T00:00:00Z\n            - Viewing custom August 12-24:  2025-08-12T00:00:00Z\n        "},{"name":"focus_timeframe_end_datetime_exclusive","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"\n            End of the timeframe the user is viewing (exclusive upper bound)\n\n            Example:\n            - Viewing October 2025:         2025-11-01T00:00:00Z (November 1 start, not October 31 end)\n            - Viewing custom August 12-24:  2025-08-25T00:00:00Z (Aug 25 start)\n        ","title":"Focus Timeframe End Datetime Exclusive"},"description":"\n            End of the timeframe the user is viewing (exclusive upper bound)\n\n            Example:\n            - Viewing October 2025:         2025-11-01T00:00:00Z (November 1 start, not October 31 end)\n            - Viewing custom August 12-24:  2025-08-25T00:00:00Z (Aug 25 start)\n        "},{"name":"historical_trend_timeframes_offset","in":"query","required":true,"schema":{"type":"integer","maximum":0,"description":"\n            Number of timeframes to include in the historical trend before the focus timeframe\n\n            Example:\n            - timeframe_type = MONTH\n              focus_timeframe_start_datetime = 2025-11-01T00:00:00Z\n              focus_timeframe_end_datetime_exclusive = 2025-12-01T00:00:00Z\n              -> focus_timeframe = November 2025\n              historical_trend_timeframes_offset = 0  # no trends before focus\n              -> historical_trend_timeframes = []\n\n            Example:\n            - timeframe_type = MONTH\n              focus_timeframe_start_datetime = 2025-11-01T00:00:00Z\n              focus_timeframe_end_datetime_exclusive = 2025-12-01T00:00:00Z\n              -> focus_timeframe = November 2025\n              historical_trend_timeframes_offset = -2  # 2 months before focus\n              -> historical_trend_timeframes = [September 2025, October 2025]\n        ","title":"Historical Trend Timeframes Offset"},"description":"\n            Number of timeframes to include in the historical trend before the focus timeframe\n\n            Example:\n            - timeframe_type = MONTH\n              focus_timeframe_start_datetime = 2025-11-01T00:00:00Z\n              focus_timeframe_end_datetime_exclusive = 2025-12-01T00:00:00Z\n              -> focus_timeframe = November 2025\n              historical_trend_timeframes_offset = 0  # no trends before focus\n              -> historical_trend_timeframes = []\n\n            Example:\n            - timeframe_type = MONTH\n              focus_timeframe_start_datetime = 2025-11-01T00:00:00Z\n              focus_timeframe_end_datetime_exclusive = 2025-12-01T00:00:00Z\n              -> focus_timeframe = November 2025\n              historical_trend_timeframes_offset = -2  # 2 months before focus\n              -> historical_trend_timeframes = [September 2025, October 2025]\n        "},{"name":"projected_trend_timeframes_offset","in":"query","required":true,"schema":{"type":"integer","maximum":0,"minimum":0,"description":"\n            Number of timeframes to include in the projected trend after the focus timeframe\n\n            Example:\n            - timeframe_type = MONTH\n              focus_timeframe_start_datetime = 2025-12-01T00:00:00Z\n              focus_timeframe_end_datetime_exclusive = 2026-01-01T00:00:00Z\n              -> focus_timeframe = December 2025\n              projected_trend_timeframes_offset = 0  # no trends after focus\n              -> projected_trend_timeframes = []\n\n            Example:\n            - timeframe_type = MONTH\n              focus_timeframe_start_datetime = 2025-12-01T00:00:00Z\n              focus_timeframe_end_datetime_exclusive = 2026-01-01T00:00:00Z\n              -> focus_timeframe = December 2025\n              projected_trend_timeframes_offset = 3  # 3 months after focus\n              -> projected_trend_timeframes = [January 2026, February 2026, March 2026]\n        ","title":"Projected Trend Timeframes Offset"},"description":"\n            Number of timeframes to include in the projected trend after the focus timeframe\n\n            Example:\n            - timeframe_type = MONTH\n              focus_timeframe_start_datetime = 2025-12-01T00:00:00Z\n              focus_timeframe_end_datetime_exclusive = 2026-01-01T00:00:00Z\n              -> focus_timeframe = December 2025\n              projected_trend_timeframes_offset = 0  # no trends after focus\n              -> projected_trend_timeframes = []\n\n            Example:\n            - timeframe_type = MONTH\n              focus_timeframe_start_datetime = 2025-12-01T00:00:00Z\n              focus_timeframe_end_datetime_exclusive = 2026-01-01T00:00:00Z\n              -> focus_timeframe = December 2025\n              projected_trend_timeframes_offset = 3  # 3 months after focus\n              -> projected_trend_timeframes = [January 2026, February 2026, March 2026]\n        "},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetGlobalDashboardMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/profitability/snapshot":{"get":{"tags":["v2","tms","v2","tms","profitability"],"summary":"Get Profitability Snapshot","description":"Latest precomputed profitability snapshot for the caller's organization.\n\nReturns headline KPIs plus the customers-losing-money and lanes tables for\nthe requested trailing period. Data is computed asynchronously every 4h; when\nno snapshot exists yet, `exists` is False with zeroed metrics.","operationId":"v2_tms_v2_tms_profitability_get_profitability_snapshot","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ProfitabilityPeriod","description":"Trailing window: SEVEN_DAYS, THIRTY_DAYS, or NINETY_DAYS","default":"THIRTY_DAYS"},"description":"Trailing window: SEVEN_DAYS, THIRTY_DAYS, or NINETY_DAYS"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProfitabilitySnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/profitability/window":{"get":{"tags":["v2","tms","v2","tms","profitability"],"summary":"Get Profitability For Window","description":"Profitability computed live for a window no snapshot covers (all time, today, a custom range).\n\nSame figures as the snapshot, by booked-at, with `period` null. Prior-window\ntotals cover the equal-length window before a custom range; all time has none.","operationId":"v2_tms_v2_tms_profitability_get_profitability_for_window","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"start_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive.","title":"Start Datetime"},"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive."},{"name":"end_datetime_exclusive","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime.","title":"End Datetime Exclusive"},"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime."},{"name":"all_time","in":"query","required":false,"schema":{"type":"boolean","description":"Every load booked so far. Excludes the explicit bounds.","default":false,"title":"All Time"},"description":"Every load booked so far. Excludes the explicit bounds."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProfitabilitySnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/booking-board":{"get":{"tags":["v2","tms","v2","tms","booking-board"],"summary":"List Booking Board","description":"Prioritized Book Now board for the caller's organization (ENG-2284).\n\nRecommendations are precomputed by the vortex refresh; this is a read. Group\ncounts always reflect the currently-applied filters (but never the action\nfilter — the tabs always show the full picture).","operationId":"v2_tms_v2_tms_booking-board_list_booking_board","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"query","required":true,"schema":{"type":"string","description":"TMS integration connection UUID","title":"Integration Connection Id"},"description":"TMS integration connection UUID"},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BookingAction"},{"type":"null"}],"description":"Filter to a single action: BOOK_TODAY, WAIT_UNTIL_TOMORROW, CAN_WAIT","title":"Action"},"description":"Filter to a single action: BOOK_TODAY, WAIT_UNTIL_TOMORROW, CAN_WAIT"},{"name":"filters_json","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON array of dynamic filters, same shape/mechanism as /v2/tms/loads: [{\"field\": \"equipment_type\", \"operator\": \"EQUALS\", \"value\": \"DRY_VAN\"}]. Supports Load-column filters (equipment_type, origin/destination, customer_id, sales_rep, dates, external_reference_id, offer_status, ...), the booking-specific \"confidence\" field, and customer_historical_profitable/lane_historical_profitable.","title":"Filters Json"},"description":"JSON array of dynamic filters, same shape/mechanism as /v2/tms/loads: [{\"field\": \"equipment_type\", \"operator\": \"EQUALS\", \"value\": \"DRY_VAN\"}]. Supports Load-column filters (equipment_type, origin/destination, customer_id, sales_rep, dates, external_reference_id, offer_status, ...), the booking-specific \"confidence\" field, and customer_historical_profitable/lane_historical_profitable."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingBoardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/trucks/search-carriers-with-trucks":{"post":{"tags":["v2","tms","v2","tms","trucks"],"summary":"Search Carriers With Trucks","description":"Search for carriers with trucks","operationId":"v2_tms_v2_tms_trucks_search_carriers_with_trucks","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchCarriersWithTrucksRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchCarriersWithTrucksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms/trucks/get-loads-for-truck":{"post":{"tags":["v2","tms","v2","tms","trucks"],"summary":"Get Loads For Truck","description":"Get loads for truck","operationId":"v2_tms_v2_tms_trucks_get_loads_for_truck","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLoadsForTruckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLoadsForTruckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/mentium-tms/carriers":{"get":{"tags":["v2","mentium-tms","v2","mentium-tms","carriers"],"summary":"List Carriers","description":"List MentiumTMS carriers with free-text search and pagination.","operationId":"v2_mentium-tms_v2_mentium-tms_carriers_list_carriers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text search (name, DOT, MC, phone, email, city, state)","title":"Query"},"description":"Free-text search (name, DOT, MC, phone, email, city, state)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Page size","default":20,"title":"Limit"},"description":"Page size"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort by: legal_name, dot_number, mc_number, relevance","title":"Sort By"},"description":"Sort by: legal_name, dot_number, mc_number, relevance"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort order: asc, desc","title":"Sort Order"},"description":"Sort order: asc, desc"},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated includes: contacts, addresses, certifications","title":"Include"},"description":"Comma-separated includes: contacts, addresses, certifications"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMentiumTmsCarriersResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/mentium-tms/carriers/{carrier_id}":{"get":{"tags":["v2","mentium-tms","v2","mentium-tms","carriers"],"summary":"Get Carrier","description":"Get a single MentiumTMS carrier by ID with all details, including observer\nprovenance (which organizations/integration_connections observed this carrier).","operationId":"v2_mentium-tms_v2_mentium-tms_carriers_get_carrier","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_id","in":"path","required":true,"schema":{"type":"string","title":"Carrier Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated includes","default":"addresses,contacts,certifications","title":"Include"},"description":"Comma-separated includes"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MentiumTmsCarrierDetailSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/conversations/":{"post":{"tags":["conversations"],"summary":"Compose Conversation","description":"Compose and send a brand new conversation.","operationId":"conversations_compose_conversation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["conversations"],"summary":"List Conversations","description":"List conversations with optional filters and search.\n\nNOTE: when no ``status`` filter is provided the default response hides\nrows with ``status=\"FAILED\"`` — these are audit-only pre-flight /\nprovider-rejected compose attempts. To see them, pass\n``status=FAILED`` explicitly.\n\nEach row adds ``ai_agent_name``, ``direction`` (who wrote first) and, in\n``carrier_offers``, the latest offer with its rates, currency and load.","operationId":"conversations_list_conversations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"load_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by the thread's TMS load: its own external_reference_load_id or its offers' load","title":"Load Id"},"description":"Filter by the thread's TMS load: its own external_reference_load_id or its offers' load"},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter conversations that have this label","title":"Label"},"description":"Filter conversations that have this label"},{"name":"has_drafts","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only conversations with a draft message","title":"Has Drafts"},"description":"Only conversations with a draft message"},{"name":"has_sent","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only conversations that have outbound messages","title":"Has Sent"},"description":"Only conversations that have outbound messages"},{"name":"is_starred","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only starred conversations","title":"Is Starred"},"description":"Only starred conversations"},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by channel: email | sms | whatsapp, or several comma-separated","title":"Channel"},"description":"Filter by channel: email | sms | whatsapp, or several comma-separated"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search the subject, participants, each message's sender and subject, and the carrier name, email and load of the thread's offers (case-insensitive)","title":"Q"},"description":"Search the subject, participants, each message's sender and subject, and the carrier name, email and load of the thread's offers (case-insensitive)"},{"name":"search_body","in":"query","required":false,"schema":{"type":"boolean","description":"Also search the plain-text message bodies with `q` (slower)","default":false,"title":"Search Body"},"description":"Also search the plain-text message bodies with `q` (slower)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"thread_direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Who wrote first: all | inbound (the carrier) | outbound (us). When set, it replaces the legacy folder rule that the default view keeps only threads with a carrier message.","title":"Thread Direction"},"description":"Who wrote first: all | inbound (the carrier) | outbound (us). When set, it replaces the legacy folder rule that the default view keeps only threads with a carrier message."},{"name":"start_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Last message at or after this instant","title":"Start Datetime"},"description":"Last message at or after this instant"},{"name":"end_datetime_exclusive","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Last message before this instant","title":"End Datetime Exclusive"},"description":"Last message before this instant"},{"name":"ai_agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Only threads handled by one of these AI agents","title":"Ai Agent Id"},"description":"Only threads handled by one of these AI agents"},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The row's outcome pill: failed | ai_handling | booked | accepted | declined | negotiating | completed. The call-only outcomes (transferred, no_answer, stale, live, in_progress) match no thread.","title":"Outcome"},"description":"The row's outcome pill: failed | ai_handling | booked | accepted | declined | negotiating | completed. The call-only outcomes (transferred, no_answer, stale, live, in_progress) match no thread."},{"name":"filters_json","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON array of record filters: [{\"field\": \"carrier_id\", \"operator\": \"IN\", \"values\": [\"C-1\"]}, {\"field\": \"resource\", \"operator\": \"EQUALS\", \"resource_type\": \"Load\", \"identifier_field\": \"external_reference_id\", \"value\": \"484612\"}, {\"field\": \"load.origin_state\", \"operator\": \"IN\", \"values\": [\"TX\"]}]. carrier_id and the load id match the thread's own reference or any of its offers'; a load id may be the TMS display reference. load.* fields are those Calls filters on, answered by the TMS for the 5,000 most recently active loads of the matching threads.","title":"Filters Json"},"description":"JSON array of record filters: [{\"field\": \"carrier_id\", \"operator\": \"IN\", \"values\": [\"C-1\"]}, {\"field\": \"resource\", \"operator\": \"EQUALS\", \"resource_type\": \"Load\", \"identifier_field\": \"external_reference_id\", \"value\": \"484612\"}, {\"field\": \"load.origin_state\", \"operator\": \"IN\", \"values\": [\"TX\"]}]. carrier_id and the load id match the thread's own reference or any of its offers'; a load id may be the TMS display reference. load.* fields are those Calls filters on, answered by the TMS for the 5,000 most recently active loads of the matching threads."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/conversations/counts":{"get":{"tags":["conversations"],"summary":"Get Conversation Counts","description":"Return counts grouped by ConversationType for the same filters as the list.\n\nLike the list endpoint, when no ``status`` filter is passed,\n``status=\"FAILED\"`` rows are excluded from the counts. ``by_direction``\nsplits the same threads by who wrote first, so one call fills the\nAll / Inbound / Outbound tabs.","operationId":"conversations_get_conversation_counts","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"load_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load Id"}},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},{"name":"has_drafts","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Drafts"}},{"name":"has_sent","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Sent"}},{"name":"is_starred","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Starred"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Count only these channels (comma-separated)","title":"Channel"},"description":"Count only these channels (comma-separated)"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"search_body","in":"query","required":false,"schema":{"type":"boolean","description":"Also search the plain-text message bodies with `q` (slower)","default":false,"title":"Search Body"},"description":"Also search the plain-text message bodies with `q` (slower)"},{"name":"thread_direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Who wrote first: all | inbound (the carrier) | outbound (us). When set, it replaces the legacy folder rule that the default view keeps only threads with a carrier message.","title":"Thread Direction"},"description":"Who wrote first: all | inbound (the carrier) | outbound (us). When set, it replaces the legacy folder rule that the default view keeps only threads with a carrier message."},{"name":"start_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Datetime"}},{"name":"end_datetime_exclusive","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Datetime Exclusive"}},{"name":"ai_agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Ai Agent Id"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The row's outcome pill: failed | ai_handling | booked | accepted | declined | negotiating | completed. The call-only outcomes (transferred, no_answer, stale, live, in_progress) match no thread.","title":"Outcome"},"description":"The row's outcome pill: failed | ai_handling | booked | accepted | declined | negotiating | completed. The call-only outcomes (transferred, no_answer, stale, live, in_progress) match no thread."},{"name":"filters_json","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON array of record filters: [{\"field\": \"carrier_id\", \"operator\": \"IN\", \"values\": [\"C-1\"]}, {\"field\": \"resource\", \"operator\": \"EQUALS\", \"resource_type\": \"Load\", \"identifier_field\": \"external_reference_id\", \"value\": \"484612\"}, {\"field\": \"load.origin_state\", \"operator\": \"IN\", \"values\": [\"TX\"]}]. carrier_id and the load id match the thread's own reference or any of its offers'; a load id may be the TMS display reference. load.* fields are those Calls filters on, answered by the TMS for the 5,000 most recently active loads of the matching threads.","title":"Filters Json"},"description":"JSON array of record filters: [{\"field\": \"carrier_id\", \"operator\": \"IN\", \"values\": [\"C-1\"]}, {\"field\": \"resource\", \"operator\": \"EQUALS\", \"resource_type\": \"Load\", \"identifier_field\": \"external_reference_id\", \"value\": \"484612\"}, {\"field\": \"load.origin_state\", \"operator\": \"IN\", \"values\": [\"TX\"]}]. carrier_id and the load id match the thread's own reference or any of its offers'; a load id may be the TMS display reference. load.* fields are those Calls filters on, answered by the TMS for the 5,000 most recently active loads of the matching threads."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/conversations/labels":{"get":{"tags":["conversations"],"summary":"Get Conversation Labels","description":"Return distinct labels scoped to the workspace (optionally union with organization-wide labels).","operationId":"conversations_get_conversation_labels","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"include_organization_scope","in":"query","required":false,"schema":{"type":"boolean","description":"Include labels from the entire organization in addition to the workspace.","default":false,"title":"Include Organization Scope"},"description":"Include labels from the entire organization in addition to the workspace."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationLabelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/conversations/{conversation_id}":{"get":{"tags":["conversations"],"summary":"Get Conversation","description":"Get conversation details: the list's row, plus the thread agent's latest session (``ai_agent_session_id``).","operationId":"conversations_get_conversation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["conversations"],"summary":"Update Conversation","description":"Update conversation (status, labels, starred)","operationId":"conversations_update_conversation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConversationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["conversations"],"summary":"Delete Conversation","description":"Move conversation to DELETED status (soft delete)","operationId":"conversations_delete_conversation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/conversations/{conversation_id}/workflow-executions":{"get":{"tags":["conversations"],"summary":"Get Conversation Workflow Executions","description":"List the workflow executions linked to this conversation (most recent first).\n\nUnions two link sources (see ConversationWorkflowExecutionLink):\n  - conversation_workflow_execution junction rows (trigger attribution), and\n  - conversation_workflow_instance rows (the conversation-agent workflow that\n    handled the thread).\nDeduplicated by execution id; junction rows win so the trigger link_type is kept.","operationId":"conversations_get_conversation_workflow_executions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationWorkflowExecutionLink"},"title":"Response Get Conversation Workflow Executions V2 Conversations  Conversation Id  Workflow Executions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/conversations/{conversation_id}/messages":{"get":{"tags":["conversations"],"summary":"Get Messages","description":"Get messages in conversation (paginated)","operationId":"conversations_get_messages","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"include_drafts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Drafts"}},{"name":"mark_read","in":"query","required":false,"schema":{"type":"boolean","description":"If true, mark all messages in this conversation as read and reset unread_count","default":false,"title":"Mark Read"},"description":"If true, mark all messages in this conversation as read and reset unread_count"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["conversations"],"summary":"Send Reply","description":"Send a reply in the conversation thread.","operationId":"conversations_send_reply","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/conversations/{conversation_id}/draft":{"get":{"tags":["conversations"],"summary":"Get Draft","operationId":"conversations_get_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["conversations"],"summary":"Upsert Draft","description":"Create or update a draft (identified by external_message_id is null).","operationId":"conversations_upsert_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["conversations"],"summary":"Delete Draft","operationId":"conversations_delete_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/conversations/{conversation_id}/attachments":{"post":{"tags":["conversations"],"summary":"Upload Attachments","description":"Upload one or more attachments to S3 for use in composer; returns keys.","operationId":"conversations_upload_attachments","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_attachments_v2_conversations__conversation_id__attachments_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/public/loads/{token}":{"get":{"tags":["Public Load Booking"],"summary":"Get Public Load Offer","description":"Public endpoint to fetch load offer details by token.\n\nSecurity:\n- No authentication required\n- Token must be valid and not expired\n- Rate limited: 30 requests per minute per IP\n- All access is logged\n\nReturns:\n- Load details with sanitized data\n- is_booked flag indicates if load is already covered","operationId":"Public Load Booking_get_public_load_offer","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLoadOfferResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/public/loads/{token}/accept":{"post":{"tags":["Public Load Booking"],"summary":"Accept Public Load Offer","description":"Public endpoint for carriers to accept a load offer.\n\nSecurity:\n- No authentication required\n- Rate limited: 5 requests per minute per IP\n- DOT number validation\n- Duplicate submission prevention\n\nBehavior depends on workspace settings:\n- auto_book_on_acceptance=true: Goes directly to BOOKED, calls Vortex\n- auto_book_on_acceptance=false: Goes to ACCEPTED, requires broker review\n- allow_multiple_carrier_acceptance: Controls if multiple carriers can accept\n\nReturns:\n- Success/failure status\n- Booking ID if successful\n- Status: \"booked\" or \"accepted\"","operationId":"Public Load Booking_accept_public_load_offer","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptPublicOfferRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptPublicOfferResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/public/carriers/email-offers/opt-out/{token}":{"get":{"tags":["Public Carrier Email Offers"],"summary":"Get Email Offer Opt Out Context","operationId":"Public Carrier Email Offers_get_email_offer_opt_out_context","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"s","in":"query","required":true,"schema":{"type":"string","description":"HMAC signature","title":"S"},"description":"HMAC signature"},{"name":"ic","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Integration connection ID","title":"Ic"},"description":"Integration connection ID"},{"name":"carrier","in":"query","required":true,"schema":{"type":"string","description":"Carrier external reference ID","title":"Carrier"},"description":"Carrier external reference ID"},{"name":"org","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Organization ID","title":"Org"},"description":"Organization ID"},{"name":"ws","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Workspace ID","title":"Ws"},"description":"Workspace ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmailOfferOptOutContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Public Carrier Email Offers"],"summary":"Submit Email Offer Opt Out","operationId":"Public Carrier Email Offers_submit_email_offer_opt_out","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"s","in":"query","required":true,"schema":{"type":"string","description":"HMAC signature","title":"S"},"description":"HMAC signature"},{"name":"ic","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Integration connection ID","title":"Ic"},"description":"Integration connection ID"},{"name":"carrier","in":"query","required":true,"schema":{"type":"string","description":"Carrier external reference ID","title":"Carrier"},"description":"Carrier external reference ID"},{"name":"org","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Organization ID","title":"Org"},"description":"Organization ID"},{"name":"ws","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Workspace ID","title":"Ws"},"description":"Workspace ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmailOfferOptOutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmailOfferOptOutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/email-suppressions/{email}":{"delete":{"tags":["Email Suppressions"],"summary":"Release Suppression","description":"Un-flag an address previously marked undeliverable (\"Mark deliverable\").","operationId":"Email Suppressions_release_suppression","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSuppressionReleaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/automation/templates":{"get":{"tags":["v2","automation"],"summary":"List Automation Templates","description":"Get list of available automation templates with resolved variable options.","operationId":"v2_automation_list_automation_templates","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/TemplateCategory"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"popular_only","in":"query","required":false,"schema":{"type":"boolean","description":"Show only popular templates","default":false,"title":"Popular Only"},"description":"Show only popular templates"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tags (comma-separated)","title":"Tags"},"description":"Filter by tags (comma-separated)"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationTemplateResponse"},"title":"Response List Automation Templates V2 Automation Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/automation/templates/{template_id}":{"get":{"tags":["v2","automation"],"summary":"Get Automation Template","description":"Get a specific template with all details including resolved variable options.","operationId":"v2_automation_get_automation_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/automation/templates/{template_id}/apply":{"post":{"tags":["v2","automation"],"summary":"Apply Template","description":"Apply a template with user-provided variable values.\n\nReturns the resolved trigger configuration with metadata embedded inside\nconfig.metadata for workflow creation (trigger_name, trigger_description, etc.).","operationId":"v2_automation_apply_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyTemplateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/automation/operators":{"get":{"tags":["v2","automation"],"summary":"Get Available Operators","description":"Get list of available filter operators with metadata.","operationId":"v2_automation_get_available_operators","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OperatorInfo"},"title":"Response Get Available Operators V2 Automation Operators Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/integrations/{integration}/webhooks/{webhook_id}/{event}":{"head":{"tags":["webhooks","generic"],"summary":"Verify Webhook Head","description":"Handle HEAD requests for webhook URL verification.\n\nSome providers (like TAI) send HEAD requests to verify the webhook URL\nexists before sending actual POST webhooks.","operationId":"webhooks_generic_verify_webhook_head","parameters":[{"name":"integration","in":"path","required":true,"schema":{"type":"string","title":"Integration"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"event","in":"path","required":true,"schema":{"type":"string","title":"Event"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["webhooks","generic"],"summary":"Verify Webhook Get","description":"Handle GET requests for webhook URL verification.\n\nSome providers (like TAI) send GET requests to verify the webhook URL\nexists before sending actual POST webhooks.","operationId":"webhooks_generic_verify_webhook_get","parameters":[{"name":"integration","in":"path","required":true,"schema":{"type":"string","title":"Integration"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"event","in":"path","required":true,"schema":{"type":"string","title":"Event"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Verify Webhook Get V2 Integrations  Integration  Webhooks  Webhook Id   Event  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["webhooks","generic"],"summary":"Receive Webhook","description":"Receive generic inbound webhook from external provider.\n\nArgs:\n    integration: Integration name (e.g. TAI, NETSUITE)\n    webhook_id: Globally unique webhook identifier\n    event: Event key (e.g. shipment-create)\n    request: FastAPI Request object\n    service: Generic webhook service\n    \nReturns:\n    WebhookResponse with success status and IDs","operationId":"webhooks_generic_receive_webhook","parameters":[{"name":"integration","in":"path","required":true,"schema":{"type":"string","title":"Integration"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"event","in":"path","required":true,"schema":{"type":"string","title":"Event"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-numbers/available":{"post":{"tags":["v2","phone-numbers"],"summary":"Search Available Phone Numbers","description":"Search for available phone numbers from Twilio that can be purchased.\n\nFilter by area code, contains pattern, or get a general list for the country.","operationId":"v2_phone-numbers_search_available_phone_numbers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchAvailableNumbersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchAvailableNumbersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-numbers/provision":{"post":{"tags":["v2","phone-numbers"],"summary":"Provision Phone Number","description":"Provision a phone number: Purchase from Twilio, import to ElevenLabs, and save to database.\n\nThe number is imported into ElevenLabs but not yet assigned to an agent.\nLink a phone agent to this number from the Agents settings to activate calling.","operationId":"v2_phone-numbers_provision_phone_number","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionPhoneNumberRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionPhoneNumberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-numbers/{phone_number_id}/status":{"post":{"tags":["v2","phone-numbers"],"summary":"Change Phone Number Status","description":"Activate or deactivate a phone number.","operationId":"v2_phone-numbers_change_phone_number_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","title":"Phone Number Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePhoneNumberStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspacePhoneNumberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-numbers":{"get":{"tags":["v2","phone-numbers"],"summary":"List Workspace Phone Numbers","description":"List all phone numbers for the current workspace.","operationId":"v2_phone-numbers_list_workspace_phone_numbers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWorkspacePhoneNumbersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-numbers/voices":{"get":{"tags":["v2","phone-numbers"],"summary":"List Voices","description":"List available ElevenLabs voices for phone agents.\n\nUses AuthenticateUser (no workspace required) — returns global ElevenLabs\nmetadata, also needed by the admin catalog editor.","operationId":"v2_phone-numbers_list_voices","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_shared","in":"query","required":false,"schema":{"type":"boolean","description":"Include shared/community voices from ElevenLabs Voice Library. Set to false for agent creation (shared voices cause voice_not_found).","default":true,"title":"Include Shared"},"description":"Include shared/community voices from ElevenLabs Voice Library. Set to false for agent creation (shared voices cause voice_not_found)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVoicesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-numbers/voices/{voice_id}/settings":{"get":{"tags":["v2","phone-numbers"],"summary":"Get Voice Settings","description":"Get default TTS settings for a specific ElevenLabs voice.\n\nUses AuthenticateUser (no workspace required) — global metadata endpoint.","operationId":"v2_phone-numbers_get_voice_settings","security":[{"HTTPBearer":[]}],"parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","title":"Voice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVoiceSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-numbers/prompt-variables":{"get":{"tags":["v2","phone-numbers"],"summary":"Get Prompt Variables","description":"List available variables for phone call prompts.\n\nUses AuthenticateUser (no workspace required) — returns static variable\ndefinitions, also needed by the admin catalog editor.","operationId":"v2_phone-numbers_get_prompt_variables","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhonePromptVariablesResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/phone-numbers/{phone_number_id}":{"delete":{"tags":["v2","phone-numbers"],"summary":"Delete Workspace Phone Number","description":"Delete a workspace phone number.\n\nReleases the number from Twilio and ElevenLabs, then soft-deletes it\nfrom the database.","operationId":"v2_phone-numbers_delete_workspace_phone_number","security":[{"HTTPBearer":[]}],"parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","title":"Phone Number Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["v2","phone-numbers"],"summary":"Update Workspace Phone Number","description":"Update phone number settings (twilio_sid, elevenlabs_phone_number_id).\n\nFor status changes (activate/deactivate), use POST /{id}/status instead.\nFor deletion, use DELETE /{id}.","operationId":"v2_phone-numbers_update_workspace_phone_number","security":[{"HTTPBearer":[]}],"parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","title":"Phone Number Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspacePhoneNumberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspacePhoneNumberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-numbers/{phone_number_id}/whatsapp/enable":{"post":{"tags":["v2","phone-numbers"],"summary":"Enable Whatsapp For Phone Number","description":"Register a workspace phone number as a Twilio WhatsApp sender.\n\nThe sender is enabled only after Twilio reports it as ONLINE; pending states\nare returned so the UI can poll for status.","operationId":"v2_phone-numbers_enable_whatsapp_for_phone_number","security":[{"HTTPBearer":[]}],"parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","title":"Phone Number Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppSenderStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-numbers/{phone_number_id}/whatsapp/status":{"get":{"tags":["v2","phone-numbers"],"summary":"Get Whatsapp Sender Status","description":"Refresh and return the Twilio WhatsApp sender status for a phone number.","operationId":"v2_phone-numbers_get_whatsapp_sender_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","title":"Phone Number Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppSenderStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-numbers/{phone_number_id}/twilio-details":{"get":{"tags":["v2","phone-numbers"],"summary":"Get Phone Twilio Details","description":"Get live Twilio details for a phone number.\n\nFetches current capabilities, webhook URLs, and status directly from Twilio.","operationId":"v2_phone-numbers_get_phone_twilio_details","security":[{"HTTPBearer":[]}],"parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","title":"Phone Number Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneTwilioDetailsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-numbers/{phone_number_id}/a2p-status":{"get":{"tags":["v2","phone-numbers"],"summary":"Get Phone A2P Status","description":"Get the A2P 10DLC registration status for a phone number.\n\nReturns the brand registration status, campaign status, and whether\nthe phone number is fully registered for A2P messaging.","operationId":"v2_phone-numbers_get_phone_a2p_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","title":"Phone Number Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneA2PStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/a2p/brand":{"post":{"tags":["v2","a2p-registration"],"summary":"Register Brand","description":"Register a brand for A2P 10DLC.\n\nThis runs the full TrustHub ISV flow:\n- Creates Secondary Customer Profile\n- Attaches business info, authorized rep, and address\n- Creates TrustProduct and messaging profile\n- Submits BrandRegistration to TCR\n\nTakes ~10-20 seconds due to multiple sequential Twilio API calls.","operationId":"v2_a2p-registration_register_brand","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandRegistrationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["v2","a2p-registration"],"summary":"Get Brand Status","description":"Get the A2P brand registration status for the current organization.\n\nIf the brand is in PENDING or IN_REVIEW state, refreshes the status\nfrom Twilio before returning.","operationId":"v2_a2p-registration_get_brand_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/a2p/campaign":{"post":{"tags":["v2","a2p-registration"],"summary":"Register Campaign","description":"Register an A2P campaign under an existing brand.\n\nCreates a Messaging Service and A2P Campaign in Twilio.\nThe brand must be in APPROVED, PENDING, or IN_REVIEW state.","operationId":"v2_a2p-registration_register_campaign","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRegistrationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/a2p/campaign/{campaign_id}":{"get":{"tags":["v2","a2p-registration"],"summary":"Get Campaign Status","description":"Get an A2P campaign's current status.","operationId":"v2_a2p-registration_get_campaign_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/a2p/campaign/{campaign_id}/assign-phone":{"post":{"tags":["v2","a2p-registration"],"summary":"Assign Phone To Campaign","description":"Assign a phone number to an A2P campaign's Messaging Service.\n\nThis adds the phone number to the Twilio Messaging Service associated\nwith the campaign, enabling A2P-registered SMS sending.","operationId":"v2_a2p-registration_assign_phone_to_campaign","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignPhoneToCampaignRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignPhoneToCampaignResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/workspaces/integrations/connections/{integration_connection_id}/webhook/activate":{"post":{"tags":["v2","webhooks"],"summary":"Activate Webhook","description":"Activate webhook for an integration connection.","operationId":"v2_webhooks_activate_webhook","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookActivateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookActivateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/workspaces/integrations/connections/{integration_connection_id}/webhook/rotate-token":{"post":{"tags":["v2","webhooks"],"summary":"Rotate Webhook Token","description":"Rotate webhook token for an integration connection.","operationId":"v2_webhooks_rotate_webhook_token","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRotateTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/workspaces/integrations/connections/{integration_connection_id}/webhook/disable":{"post":{"tags":["v2","webhooks"],"summary":"Disable Webhook","description":"Disable webhook for an integration connection.","operationId":"v2_webhooks_disable_webhook","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/workspaces/integrations/connections/{integration_connection_id}/webhook":{"get":{"tags":["v2","webhooks"],"summary":"Inspect Webhook","description":"Inspect webhook configuration for an integration connection.","operationId":"v2_webhooks_inspect_webhook","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInspectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/workspaces/integrations/connections/{integration_connection_id}/events/{event_id}/replay":{"post":{"tags":["v2","webhooks"],"summary":"Replay Webhook Event","description":"Replay a stored webhook event.","operationId":"v2_webhooks_replay_webhook_event","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/workspaces/integrations/connections/{integration_connection_id}/webhook/events":{"get":{"tags":["v2","webhooks"],"summary":"Get Webhook Events","description":"Get webhook event definitions for an integration connection.\n\nReturns the list of webhook events that this integration supports,\nwhich can be used to configure webhooks in the external provider.","operationId":"v2_webhooks_get_webhook_events","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Connection Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/workspaces/integrations/connections/webhook/support/{integration_name}":{"get":{"tags":["v2","webhooks"],"summary":"Check Webhook Support","description":"Check if an integration supports webhooks.\n\nThis endpoint allows the frontend to determine if the Webhooks tab\nshould be displayed for a given integration.","operationId":"v2_webhooks_check_webhook_support","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_name","in":"path","required":true,"schema":{"type":"string","title":"Integration Name"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSupportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-calls":{"post":{"tags":["v2","phone-calls"],"summary":"Create Phone Call","description":"Create a phone call record.\n\nNote: In production, calls are created by:\n- Outbound API (Package 6)\n- Webhooks (Package 5)\n\nThis endpoint is primarily for testing purposes.","operationId":"v2_phone-calls_create_phone_call","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePhoneCallRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["v2","phone-calls"],"summary":"List Phone Calls","description":"List all phone calls with optional filters.\n\nQuery Parameters:\n    - direction: Filter by direction (INBOUND/OUTBOUND)\n    - filters_json: JSON array of dynamic filters\n        Example: [{\"field\": \"resource\", \"operator\": \"EQUALS\",\n        \"resource_type\": \"Load\", \"identifier_field\": \"external_reference_id\",\n        \"value\": \"123\"}]\n        Supported fields: resource (exact EQUALS/IN linking-tag filter),\n        load_id (Load compatibility alias),\n        tag (free-tag filter on tag definition ids - EQUALS/IN; IN\n        matches calls carrying ALL listed definitions),\n        carrier_id, status, initiated_at, agent_id / ai_agent_id,\n        ai_agent_revision_id, elevenlabs_agent_id, has_feedback\n        Supported operators: EQUALS, CONTAINS, NOT_EQUALS, etc.\nResults are paginated and ordered by initiated_at (most recent first).\nRecording URLs are returned as presigned URLs valid for 1 hour.","operationId":"v2_phone-calls_list_phone_calls","security":[{"HTTPBearer":[]}],"parameters":[{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PhoneCallDirection"},{"type":"null"}],"description":"Filter by call direction (INBOUND/OUTBOUND)","title":"Direction"},"description":"Filter by call direction (INBOUND/OUTBOUND)"},{"name":"filters_json","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON array of filters: [{\"field\": \"resource\", \"operator\": \"EQUALS\", \"resource_type\": \"Load\", \"identifier_field\": \"external_reference_id\", \"value\": \"123\"}]. Resource filters match linking-tag assignments. load_id remains a compatibility alias for that Load filter. The tag filter takes free (classification) tag definition ids: [{\"field\": \"tag\", \"operator\": \"IN\", \"values\": [\"<uuid>\", ...]}] returns only calls carrying every listed definition.","title":"Filters Json"},"description":"JSON array of filters: [{\"field\": \"resource\", \"operator\": \"EQUALS\", \"resource_type\": \"Load\", \"identifier_field\": \"external_reference_id\", \"value\": \"123\"}]. Resource filters match linking-tag assignments. load_id remains a compatibility alias for that Load filter. The tag filter takes free (classification) tag definition ids: [{\"field\": \"tag\", \"operator\": \"IN\", \"values\": [\"<uuid>\", ...]}] returns only calls carrying every listed definition."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search the carrier name and id, the load id (the call's or its offer's), the MC and DOT (the offer's or the call's carrier-mc / carrier-dot tag, exact) and, with 3+ digits, the phone numbers","title":"Q"},"description":"Search the carrier name and id, the load id (the call's or its offer's), the MC and DOT (the offer's or the call's carrier-mc / carrier-dot tag, exact) and, with 3+ digits, the phone numbers"},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The Calls table's outcome pill: booked | accepted | negotiating | declined | transferred | no_answer | failed | stale | live | in_progress | completed. ai_handling matches no call.","title":"Outcome"},"description":"The Calls table's outcome pill: booked | accepted | negotiating | declined | transferred | no_answer | failed | stale | live | in_progress | completed. ai_handling matches no call."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PhoneCallResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-calls/{call_id}":{"get":{"tags":["v2","phone-calls"],"summary":"Get Phone Call","description":"Get specific phone call details including all events.\nRecording URL is returned as a presigned URL valid for 1 hour.","operationId":"v2_phone-calls_get_phone_call","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["v2","phone-calls"],"summary":"Update Phone Call","description":"Update a phone call record.\n\nNote: In production, calls are updated by webhooks.\nThis endpoint is primarily for testing purposes.","operationId":"v2_phone-calls_update_phone_call","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePhoneCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-calls/{call_id}/workflow-executions":{"get":{"tags":["v2","phone-calls"],"summary":"Get Phone Call Workflow Executions","description":"The workflow runs this call's inbound-call trigger started, most recent first.","operationId":"v2_phone-calls_get_phone_call_workflow_executions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PhoneCallWorkflowExecutionLink"},"title":"Response Get Phone Call Workflow Executions V2 Phone Calls  Call Id  Workflow Executions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-calls/outbound/sequential":{"post":{"tags":["v2","outbound-calls"],"summary":"Initiate Sequential Calls","description":"Start a sequential outbound calling workflow for a load.\n\nThis workflow will:\n1. Get ranked carriers from the recommendation system\n2. Call carriers one by one until the load is booked\n3. Wait for each call to complete before calling the next carrier\n4. Stop when a carrier books the load or all carriers are exhausted\n\nThe workflow can be stopped at any time using the stop endpoint.\nProgress can be monitored using the status endpoint.","operationId":"v2_outbound-calls_initiate_sequential_calls","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateSequentialCallsRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateSequentialCallsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-calls/outbound/sequential/{workflow_id}":{"get":{"tags":["v2","outbound-calls"],"summary":"Get Sequential Calls Status","description":"Get the status of a sequential calling workflow.\n\nReturns:\n- workflow_id: The workflow ID\n- status: Current Temporal workflow status\n- run_id: Temporal run ID\n- current_status: Query result with calls_made, current_carrier, and results","operationId":"v2_outbound-calls_get_sequential_calls_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","description":"Temporal workflow ID","title":"Workflow Id"},"description":"Temporal workflow ID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequentialCallsStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-calls/outbound/sequential/{workflow_id}/stop":{"post":{"tags":["v2","outbound-calls"],"summary":"Stop Sequential Calls","description":"Stop a running sequential calling workflow.\n\nSends a signal to the workflow to stop making new calls.\nCurrent call in progress will complete, but no new calls will be initiated.","operationId":"v2_outbound-calls_stop_sequential_calls","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","description":"Temporal workflow ID","title":"Workflow Id"},"description":"Temporal workflow ID"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/phone-calls/billing/overview":{"get":{"tags":["v2","billing"],"summary":"Get Billing Overview","description":"Get billing overview for the current workspace within a date range.\n\nReturns aggregated estimated costs (Mentium's price), call counts,\nduration, and per-agent breakdown.","operationId":"v2_billing_get_billing_overview","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start of billing period (ISO 8601)","title":"Period Start"},"description":"Start of billing period (ISO 8601)"},{"name":"period_end","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"End of billing period (ISO 8601). Defaults to now.","title":"Period End"},"description":"End of billing period (ISO 8601). Defaults to now."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/locations":{"get":{"tags":["TMS API","TMS API - Locations"],"summary":"List Locations","description":"List all locations with optional filtering and pagination.","operationId":"TMS API_TMS API - Locations_list_locations","parameters":[{"name":"name_contains","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by name","title":"Name Contains"},"description":"Filter by name"},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by city","title":"City"},"description":"Filter by city"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by state/province (ISO 3166-2). Examples: `US-IL`, `CA-ON`, `MX-CMX`","title":"State"},"description":"Filter by state/province (ISO 3166-2). Examples: `US-IL`, `CA-ON`, `MX-CMX`"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by country (ISO 3166-1 alpha-2). Examples: `US`, `CA`, `MX`","title":"Country"},"description":"Filter by country (ISO 3166-1 alpha-2). Examples: `US`, `CA`, `MX`"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items","default":50,"title":"Limit"},"description":"Number of items"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort field","default":"name","title":"Sort By"},"description":"Sort field"},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order","default":"asc"},"description":"Sort order"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_LocationResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["TMS API","TMS API - Locations"],"summary":"Create Location","description":"Create a new location.","operationId":"TMS API_TMS API - Locations_create_location","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/locations/{external_reference_id}":{"get":{"tags":["TMS API","TMS API - Locations"],"summary":"Get Location","description":"Get a location by external reference ID.","operationId":"TMS API_TMS API - Locations_get_location","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["TMS API","TMS API - Locations"],"summary":"Update Location","description":"Update an existing location.","operationId":"TMS API_TMS API - Locations_update_location","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["TMS API","TMS API - Locations"],"summary":"Delete Location","description":"Delete a location.","operationId":"TMS API_TMS API - Locations_delete_location","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/loads":{"get":{"tags":["TMS API","TMS API - Loads"],"summary":"List Loads","description":"List all loads with optional filtering and pagination.","operationId":"TMS API_TMS API - Loads_list_loads","parameters":[{"name":"tms_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by raw TMS status (e.g., 'Dispatched', 'At Shipper')","title":"Tms Status"},"description":"Filter by raw TMS status (e.g., 'Dispatched', 'At Shipper')"},{"name":"mentium_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by Mentium normalized status (PLANNED, ACTIVE, COVERED, IN_TRANSIT, DELIVERED, COMPLETED, TERMINATED)","title":"Mentium Status"},"description":"Filter by Mentium normalized status (PLANNED, ACTIVE, COVERED, IN_TRANSIT, DELIVERED, COMPLETED, TERMINATED)"},{"name":"equipment_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by equipment","title":"Equipment Type"},"description":"Filter by equipment"},{"name":"customer_external_reference_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by customer","title":"Customer External Reference Id"},"description":"Filter by customer"},{"name":"carrier_external_reference_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by carrier","title":"Carrier External Reference Id"},"description":"Filter by carrier"},{"name":"pickup_date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Pickup date from","title":"Pickup Date From"},"description":"Pickup date from"},{"name":"pickup_date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Pickup date to","title":"Pickup Date To"},"description":"Pickup date to"},{"name":"delivery_date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Delivery date from","title":"Delivery Date From"},"description":"Delivery date from"},{"name":"delivery_date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Delivery date to","title":"Delivery Date To"},"description":"Delivery date to"},{"name":"is_hot","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by hot/priority","title":"Is Hot"},"description":"Filter by hot/priority"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items","default":50,"title":"Limit"},"description":"Number of items"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort field","default":"created_at","title":"Sort By"},"description":"Sort field"},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order","default":"desc"},"description":"Sort order"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_LoadResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["TMS API","TMS API - Loads"],"summary":"Create Load","description":"Create a new load.","operationId":"TMS API_TMS API - Loads_create_load","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/loads/{external_reference_id}":{"get":{"tags":["TMS API","TMS API - Loads"],"summary":"Get Load","description":"Get a load by external reference ID.","operationId":"TMS API_TMS API - Loads_get_load","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["TMS API","TMS API - Loads"],"summary":"Update Load","description":"Update an existing load.","operationId":"TMS API_TMS API - Loads_update_load","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["TMS API","TMS API - Loads"],"summary":"Delete Load","description":"Delete a load.","operationId":"TMS API_TMS API - Loads_delete_load","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/carriers":{"get":{"tags":["TMS API","TMS API - Carriers"],"summary":"List Carriers","description":"List all carriers with optional filtering and pagination.","operationId":"TMS API_TMS API - Carriers_list_carriers","parameters":[{"name":"name_contains","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by name","title":"Name Contains"},"description":"Filter by name"},{"name":"dot_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by DOT number","title":"Dot Number"},"description":"Filter by DOT number"},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by city","title":"City"},"description":"Filter by city"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by state","title":"State"},"description":"Filter by state"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items","default":50,"title":"Limit"},"description":"Number of items"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort field","default":"name","title":"Sort By"},"description":"Sort field"},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order","default":"asc"},"description":"Sort order"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_CarrierResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["TMS API","TMS API - Carriers"],"summary":"Create Carrier","description":"Create a new carrier.","operationId":"TMS API_TMS API - Carriers_create_carrier","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/carriers/{external_reference_id}":{"get":{"tags":["TMS API","TMS API - Carriers"],"summary":"Get Carrier","description":"Get a carrier by external reference ID.","operationId":"TMS API_TMS API - Carriers_get_carrier","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["TMS API","TMS API - Carriers"],"summary":"Update Carrier","description":"Update an existing carrier.","operationId":"TMS API_TMS API - Carriers_update_carrier","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["TMS API","TMS API - Carriers"],"summary":"Delete Carrier","description":"Delete a carrier.","operationId":"TMS API_TMS API - Carriers_delete_carrier","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/customers":{"get":{"tags":["TMS API","TMS API - Customers"],"summary":"List Customers","description":"List all customers with optional filtering and pagination.","operationId":"TMS API_TMS API - Customers_list_customers","parameters":[{"name":"name_contains","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by name","title":"Name Contains"},"description":"Filter by name"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"customer_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by customer type","title":"Customer Type"},"description":"Filter by customer type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items","default":50,"title":"Limit"},"description":"Number of items"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort field","default":"name","title":"Sort By"},"description":"Sort field"},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order","default":"asc"},"description":"Sort order"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_CustomerResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["TMS API","TMS API - Customers"],"summary":"Create Customer","description":"Create a new customer.","operationId":"TMS API_TMS API - Customers_create_customer","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/customers/{external_reference_id}":{"get":{"tags":["TMS API","TMS API - Customers"],"summary":"Get Customer","description":"Get a customer by external reference ID.","operationId":"TMS API_TMS API - Customers_get_customer","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["TMS API","TMS API - Customers"],"summary":"Update Customer","description":"Update an existing customer.","operationId":"TMS API_TMS API - Customers_update_customer","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["TMS API","TMS API - Customers"],"summary":"Delete Customer","description":"Delete a customer.","operationId":"TMS API_TMS API - Customers_delete_customer","parameters":[{"name":"external_reference_id","in":"path","required":true,"schema":{"type":"string","title":"External Reference Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/batch/locations":{"post":{"tags":["TMS API","TMS API - Batch Operations"],"summary":"Batch Locations","description":"Process batch location operations (create, update, upsert, delete).\n\n- For 'create' or 'upsert': all required fields must be provided\n- For 'update': only fields to update need to be provided\n- For 'delete': no data needed","operationId":"TMS API_TMS API - Batch Operations_batch_locations","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchLocationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/batch/loads":{"post":{"tags":["TMS API","TMS API - Batch Operations"],"summary":"Batch Loads","description":"Process batch load operations (create, update, upsert, delete).\n\n- For 'create' or 'upsert': all required fields must be provided\n- For 'update': only fields to update need to be provided\n- For 'delete': no data needed","operationId":"TMS API_TMS API - Batch Operations_batch_loads","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchLoadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/batch/carriers":{"post":{"tags":["TMS API","TMS API - Batch Operations"],"summary":"Batch Carriers","description":"Process batch carrier operations (create, update, upsert, delete).\n\n- For 'create' or 'upsert': 'name' is required\n- For 'update': only fields to update need to be provided\n- For 'delete': no data needed","operationId":"TMS API_TMS API - Batch Operations_batch_carriers","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCarrierRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/batch/customers":{"post":{"tags":["TMS API","TMS API - Batch Operations"],"summary":"Batch Customers","description":"Process batch customer operations (create, update, upsert, delete).\n\n- For 'create' or 'upsert': 'name' is required\n- For 'update': only fields to update need to be provided\n- For 'delete': no data needed","operationId":"TMS API_TMS API - Batch Operations_batch_customers","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCustomerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/batch/rates":{"post":{"tags":["TMS API","TMS API - Batch Operations"],"summary":"Batch Rates","description":"Create or upsert customer-supplied market rate snapshots in bulk.","operationId":"TMS API_TMS API - Batch Operations_batch_rates","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchMarketRateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/tms-api/rates":{"post":{"tags":["TMS API","TMS API - Market Rates"],"summary":"Create Market Rate","description":"Persist a customer-supplied market rate snapshot.","operationId":"TMS API_TMS API - Market Rates_create_market_rate","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketRateCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketRateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/exchange-rates/current":{"get":{"tags":["Exchange Rates"],"summary":"Get current exchange rate","description":"Fetch the current exchange rate between two currencies. Uses cached rates when available.","operationId":"Exchange Rates_get_current_exchange_rate","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from_currency","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":3,"description":"Source currency code (e.g., 'CAD')","title":"From Currency"},"description":"Source currency code (e.g., 'CAD')"},{"name":"to_currency","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":3,"description":"Target currency code (e.g., 'USD')","title":"To Currency"},"description":"Target currency code (e.g., 'USD')"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeRateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/exchange-rates/historical":{"get":{"tags":["Exchange Rates"],"summary":"Get historical exchange rate","description":"Look up the exchange rate that was used on a specific date.","operationId":"Exchange Rates_get_historical_exchange_rate","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from_currency","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":3,"description":"Source currency code (e.g., 'CAD')","title":"From Currency"},"description":"Source currency code (e.g., 'CAD')"},{"name":"to_currency","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":3,"description":"Target currency code (e.g., 'USD')","title":"To Currency"},"description":"Target currency code (e.g., 'USD')"},{"name":"rate_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Date to look up the rate for (YYYY-MM-DD)","title":"Rate Date"},"description":"Date to look up the rate for (YYYY-MM-DD)"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoricalRateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/canary/messages":{"get":{"tags":["Canary"],"summary":"Find Message","description":"Whether the key's workspace stored a message containing the code in the last hour, whatever its direction.","operationId":"Canary_find_message","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9-]+$","title":"Code"}},{"name":"channel","in":"query","required":true,"schema":{"enum":["SMS","WHATSAPP","EMAIL"],"type":"string","title":"Channel"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanaryMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/canary/phone-calls":{"get":{"tags":["Canary"],"summary":"Find Phone Call","description":"The newest inbound call between the two numbers in the key's own workspace since the given time.","operationId":"Canary_find_phone_call","parameters":[{"name":"from_number","in":"query","required":true,"schema":{"type":"string","pattern":"^\\+[0-9]{8,15}$","title":"From Number"}},{"name":"to_number","in":"query","required":true,"schema":{"type":"string","pattern":"^\\+[0-9]{8,15}$","title":"To Number"}},{"name":"since","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Only calls that started at or after this time","title":"Since"},"description":"Only calls that started at or after this time"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication","title":"X-Api-Key"},"description":"API key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanaryPhoneCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/agent-catalog":{"get":{"tags":["agent-catalog"],"summary":"List catalog entries","description":"Browse agent templates. Regular users see published entries that are not system agents; SUPER_ADMINs see system agents too and can pass include_unpublished=true to see all.","operationId":"agent-catalog_list_catalog_entries","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"agent_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Type"}},{"name":"include_unpublished","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Unpublished"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCatalogEntryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agent-catalog"],"summary":"Create catalog entry","description":"Create a new catalog entry from scratch. SUPER_ADMIN only.","operationId":"agent-catalog_create_catalog_entry","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCatalogEntryCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCatalogEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/agent-catalog/{entry_id}":{"get":{"tags":["agent-catalog"],"summary":"Get catalog entry","description":"Get a catalog entry by ID. Regular users can only see published entries; SUPER_ADMINs can see any entry.","operationId":"agent-catalog_get_catalog_entry","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCatalogEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agent-catalog"],"summary":"Update catalog entry","description":"Update a catalog entry. SUPER_ADMIN only.","operationId":"agent-catalog_update_catalog_entry","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCatalogEntryUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCatalogEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agent-catalog"],"summary":"Delete catalog entry","description":"Permanently delete a catalog entry. SUPER_ADMIN only.","operationId":"agent-catalog_delete_catalog_entry","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCatalogEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/agent-catalog/{entry_id}/install":{"post":{"tags":["agent-catalog"],"summary":"Install catalog entry into workspaces","description":"Create an editable agent from this entry in every workspace of an organization, or in the given workspaces. Workspaces that already have it are skipped, and so are those whose organization does not have the AGENT_CHAT product feature. SUPER_ADMIN only.","operationId":"agent-catalog_install_catalog_entry","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCatalogInstallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCatalogInstallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/types":{"get":{"tags":["v3","ai-agents"],"summary":"List available AI agent types","description":"Returns all supported AI agent types and their descriptions.","operationId":"v3_ai-agents_list_agent_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AIAgentTypeResponse"},"type":"array","title":"Response List Agent Types V3 Ai Agents Types Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v3/ai-agents/tools":{"get":{"tags":["v3","ai-agents"],"summary":"List available orchestration tools","description":"Returns the static list of orchestration tools that can be assigned to AI agents.","operationId":"v3_ai-agents_list_tools","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional agent type filter","title":"Agent Type"},"description":"Optional agent type filter"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AIAgentToolResponse"},"title":"Response List Tools V3 Ai Agents Tools Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/models":{"get":{"tags":["v3","ai-agents"],"summary":"List supported LLM models","description":"Returns all LLM models that can be selected when creating or updating an AI agent.","operationId":"v3_ai-agents_list_models","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter models by agent type (e.g. 'phone', 'text'). Currently all models are supported across all agent types; this parameter is reserved for future filtering.","title":"Agent Type"},"description":"Filter models by agent type (e.g. 'phone', 'text'). Currently all models are supported across all agent types; this parameter is reserved for future filtering."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AIAgentModelResponse"},"title":"Response List Models V3 Ai Agents Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents":{"get":{"tags":["v3","ai-agents"],"summary":"List AI agents","description":"List AI agents for the current workspace with pagination and optional filters.","operationId":"v3_ai-agents_list_agents","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":10,"title":"Size"},"description":"Page size"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or description","title":"Search"},"description":"Search by name or description"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"sort_by","in":"query","required":false,"schema":{"enum":["name","model","updated_at","created_at"],"type":"string","description":"Sort field","default":"updated_at","title":"Sort By"},"description":"Sort field"},{"name":"sort_dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort direction","default":"desc","title":"Sort Dir"},"description":"Sort direction"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["v3","ai-agents"],"summary":"Create AI agent","description":"Create a new AI agent in the current workspace.","operationId":"v3_ai-agents_create_agent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}":{"get":{"tags":["v3","ai-agents"],"summary":"Get AI agent","description":"Get a specific AI agent by ID.","operationId":"v3_ai-agents_get_agent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["v3","ai-agents"],"summary":"Update AI agent","description":"Update an AI agent. Only provided fields are updated.","operationId":"v3_ai-agents_update_agent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v3","ai-agents"],"summary":"Delete AI agent","description":"Soft delete an AI agent.","operationId":"v3_ai-agents_delete_agent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/test-call":{"post":{"tags":["v3","ai-agents"],"summary":"Call a number with this agent","description":"Place a real outbound call to one number using this agent, from the number the agent is linked to. Intended for demos and manual checks; the call is a normal PhoneCall and appears on the Calls page like any other.","operationId":"v3_ai-agents_start_agent_test_call","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentTestCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentTestCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/conversation-test-session":{"post":{"tags":["v3","ai-agents"],"summary":"Prepare in-app phone conversation test session","description":"Returns a short-lived ElevenLabs signed websocket URL and runtime conversation overrides derived from the latest UI settings.","operationId":"v3_ai-agents_prepare_conversation_test_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentConversationTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentConversationTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/draft":{"put":{"tags":["v3","ai-agents"],"summary":"Save agent draft","description":"Persist draft changes without publishing. Intended for debounced auto-save.","operationId":"v3_ai-agents_save_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentDraftSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v3","ai-agents"],"summary":"Discard agent draft","description":"Clear the staged draft without applying any changes.","operationId":"v3_ai-agents_discard_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/publish-impact":{"get":{"tags":["v3","ai-agents"],"summary":"Get publish impact","description":"Returns a summary of active workflows that will be affected when the agent's draft is published.","operationId":"v3_ai-agents_get_publish_impact","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentPublishImpactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/publish":{"post":{"tags":["v3","ai-agents"],"summary":"Publish agent draft (replaced by revisions)","description":"Refused: a draft is published as a revision, through the safety gate.","operationId":"v3_ai-agents_publish_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/revisions":{"get":{"tags":["v3","ai-agents"],"summary":"List agent revisions","description":"Every revision of the agent, newest first, with the tests it was evaluated on and who published it.","operationId":"v3_ai-agents_list_revisions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRevisionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["v3","ai-agents"],"summary":"Freeze the draft as a revision and test it","description":"Creates the next revision from the saved draft and starts its tests; publish it once they pass.","operationId":"v3_ai-agents_create_revision","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRevisionCreateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/revisions/{revision_id}":{"get":{"tags":["v3","ai-agents"],"summary":"Get an agent revision","operationId":"v3_ai-agents_get_revision","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/revisions/{revision_id}/publish":{"post":{"tags":["v3","ai-agents"],"summary":"Publish a revision","description":"Makes the revision live: the draft's new revision, or an earlier one to roll back to. Refused with 409 while a Mentium safety check that applies has not passed on it, unless an override reason is given.","operationId":"v3_ai-agents_publish_revision","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRevisionPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRevisionResponse"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRevisionGateRefusal"}}},"description":"Conflict"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/sessions":{"get":{"tags":["v3","ai-agents"],"summary":"List agent sessions","description":"List conversation sessions for a text AI agent with pagination and optional filters.","operationId":"v3_ai-agents_list_agent_sessions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":20,"title":"Size"},"description":"Page size"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: in_progress | completed | failed","title":"Status"},"description":"Filter by status: in_progress | completed | failed"},{"name":"workflow_execution_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by workflow execution ID","title":"Workflow Execution Id"},"description":"Filter by workflow execution ID"},{"name":"revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only sessions that ran on this agent version","title":"Revision Id"},"description":"Only sessions that ran on this agent version"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentSessionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/sessions/{session_id}":{"get":{"tags":["v3","ai-agents"],"summary":"Get agent session","description":"Get a single AI agent session by ID including the full message/tool-call history.","operationId":"v3_ai-agents_get_agent_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAgentSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/save-to-catalog":{"post":{"tags":["v3","ai-agents"],"summary":"Save agent to catalog","description":"Save an existing agent's configuration as a global catalog template. Super admin only.","operationId":"v3_ai-agents_save_agent_to_catalog","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAgentToCatalogRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCatalogEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/automation-tools":{"get":{"tags":["v3","ai-agents","v3","ai-agents","automation-tools"],"summary":"List shared tools attached to an agent","operationId":"v3_ai-agents_v3_ai-agents_automation-tools_list_agent_tools","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentAutomationToolBindingResponse"},"title":"Response List Agent Tools V3 Ai Agents  Agent Id  Automation Tools Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/automation-tools":{"get":{"tags":["v3","automation-tools"],"summary":"List shared automation tools","operationId":"v3_automation-tools_list_tools","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":20,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort_by","in":"query","required":false,"schema":{"enum":["name","updated_at","created_at"],"type":"string","default":"updated_at","title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Sort Dir"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationToolListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["v3","automation-tools"],"summary":"Create a shared automation tool","operationId":"v3_automation-tools_create_tool","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationToolCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/automation-tools/test":{"post":{"tags":["v3","automation-tools"],"summary":"Test an HTTP tool configuration","operationId":"v3_automation-tools_test_tool","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationToolTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationToolTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/automation-tools/{tool_id}":{"get":{"tags":["v3","automation-tools"],"summary":"Get a shared automation tool","operationId":"v3_automation-tools_get_tool","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tool Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["v3","automation-tools"],"summary":"Update a shared automation tool","operationId":"v3_automation-tools_update_tool","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tool Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationToolUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v3","automation-tools"],"summary":"Delete a shared automation tool","operationId":"v3_automation-tools_delete_tool","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tool Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/chat-agents":{"get":{"tags":["v3","chats"],"summary":"List chat agents","description":"Agents the caller can chat with: system agents installed in this workspace, then the workspace's text agents switched on for Agent Chat. The first is the default.","operationId":"v3_chats_list_chat_agents","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAgentListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/chats":{"post":{"tags":["v3","chats"],"summary":"Create chat","description":"Start a chat with a chat agent. Without integration_connection_id the chat uses the workspace's TMS connection, when there is exactly one.","operationId":"v3_chats_create_chat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["v3","chats"],"summary":"List chats","description":"The caller's agent chats in this workspace, most recent message first.","operationId":"v3_chats_list_chats","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ChatOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/chats/{chat_id}":{"get":{"tags":["v3","chats"],"summary":"Get chat","operationId":"v3_chats_get_chat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v3","chats"],"summary":"Delete chat","operationId":"v3_chats_delete_chat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/chats/{chat_id}/messages":{"get":{"tags":["v3","chats"],"summary":"List chat messages","description":"Rows after the after_seq cursor, oldest first.","operationId":"v3_chats_list_chat_messages","security":[{"HTTPBearer":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}},{"name":"after_seq","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Return rows with seq greater than this","default":0,"title":"After Seq"},"description":"Return rows with seq greater than this"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Limit"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChatMessageListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["v3","chats"],"summary":"Send chat message","description":"Store the message and start the chat's agent on it; its steps and reply are listed as they are written. 409 while the agent is still answering the previous message.","operationId":"v3_chats_send_chat_message","security":[{"HTTPBearer":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChatMessageCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChatMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/chats/{chat_id}/stream":{"get":{"tags":["v3","chats"],"summary":"Stream chat messages","description":"Server-sent events: every row after after_seq (or the Last-Event-ID header), then each new row as it is stored, as a `message` event whose id is the row's seq. A comment line every 25 seconds keeps the connection open; the stream ends after 30 minutes. Reconnect with the last id.","operationId":"v3_chats_stream_chat_messages","security":[{"HTTPBearer":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}},{"name":"after_seq","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Send rows with seq greater than this","default":0,"title":"After Seq"},"description":"Send rows with seq greater than this"},{"name":"Last-Event-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last-Event-Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Server-sent events","content":{"text/event-stream":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/chats/{chat_id}/approvals/{request_id}":{"post":{"tags":["v3","chats"],"summary":"Decide approval request","description":"Approve or reject an action the agent asked permission for. The agent records the outcome as an `approval` row. 409 when it was already decided or has expired.","operationId":"v3_chats_decide_chat_approval","security":[{"HTTPBearer":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatApprovalCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/offers/dashboard":{"get":{"tags":["offers"],"summary":"Carrier offers grouped by load, enriched with Vortex load detail","operationId":"offers_get_offers_dashboard","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"description":"Trailing window size in days. Offers are filtered by sent_at (skipped by updated_at). Mutually exclusive with start_datetime + end_datetime_exclusive.","title":"Period Days"},"description":"Trailing window size in days. Offers are filtered by sent_at (skipped by updated_at). Mutually exclusive with start_datetime + end_datetime_exclusive."},{"name":"start_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive; mutually exclusive with period_days.","title":"Start Datetime"},"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive; mutually exclusive with period_days."},{"name":"end_datetime_exclusive","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime; mutually exclusive with period_days. UI inclusive end dates must be converted to the next-day midnight.","title":"End Datetime Exclusive"},"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime; mutually exclusive with period_days. UI inclusive end dates must be converted to the next-day midnight."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OffersDashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/offers/dashboard/loads/{load_offer_id}/offers":{"get":{"tags":["offers"],"summary":"Offer rows for one dashboard load group (drawer contents)","operationId":"offers_get_load_offers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"load_offer_id","in":"path","required":true,"schema":{"type":"string","title":"Load Offer Id"}},{"name":"period_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"description":"Trailing window size in days. Offers are filtered by sent_at (skipped by updated_at). Mutually exclusive with start_datetime + end_datetime_exclusive.","title":"Period Days"},"description":"Trailing window size in days. Offers are filtered by sent_at (skipped by updated_at). Mutually exclusive with start_datetime + end_datetime_exclusive."},{"name":"start_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive; mutually exclusive with period_days.","title":"Start Datetime"},"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive; mutually exclusive with period_days."},{"name":"end_datetime_exclusive","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime; mutually exclusive with period_days. UI inclusive end dates must be converted to the next-day midnight.","title":"End Datetime Exclusive"},"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime; mutually exclusive with period_days. UI inclusive end dates must be converted to the next-day midnight."},{"name":"workflow_execution_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scope to a single workflow node execution (workflow-execution detail view). Bypasses the sent_at window so still-QUEUED offers the node produced are listed too.","title":"Workflow Execution Id"},"description":"Scope to a single workflow node execution (workflow-execution detail view). Bypasses the sent_at window so still-QUEUED offers the node produced are listed too."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadOffersListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/phone-call-analysis/runs":{"get":{"tags":["v3","phone-call-analysis"],"summary":"List phone-call analysis_run rows","operationId":"v3_phone-call-analysis_list_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"phone_call_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phone Call Id"}},{"name":"analyzer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to one analyzer (e.g. 'phone_call_tags', 'phone_call_offers'). Omit to return rows from every phone-call analyzer.","title":"Analyzer Id"},"description":"Filter to one analyzer (e.g. 'phone_call_tags', 'phone_call_offers'). Omit to return rows from every phone-call analyzer."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/phone-call-analysis/runs/{run_id}":{"get":{"tags":["v3","phone-call-analysis"],"summary":"Get one analysis_run row","operationId":"v3_phone-call-analysis_get_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/phone-call-analysis/calls-summary":{"get":{"tags":["v3","phone-call-analysis"],"summary":"Bulk per-call summary (tags + offers + per-analyzer run status)","operationId":"v3_phone-call-analysis_list_call_summaries","security":[{"HTTPBearer":[]}],"parameters":[{"name":"phone_call_ids","in":"query","required":true,"schema":{"type":"string","maxLength":8000,"description":"Comma-separated phone_call ids. Capped at 200 per call.","title":"Phone Call Ids"},"description":"Comma-separated phone_call ids. Capped at 200 per call."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCallAnalysisCallSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/phone-call-analysis/dashboard":{"get":{"tags":["v3","phone-call-analysis"],"summary":"Calls dashboard — funnel KPIs + last offers, per direction, period-over-period","operationId":"v3_phone-call-analysis_get_dashboard","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"description":"Window size in days. KPIs and last-offers come from the trailing window; deltas come from the prior window of the same length. Mutually exclusive with start_datetime + end_datetime_exclusive. Omit all window params to default to 30 days.","title":"Period Days"},"description":"Window size in days. KPIs and last-offers come from the trailing window; deltas come from the prior window of the same length. Mutually exclusive with start_datetime + end_datetime_exclusive. Omit all window params to default to 30 days."},{"name":"start_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive; mutually exclusive with period_days.","title":"Start Datetime"},"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive; mutually exclusive with period_days."},{"name":"end_datetime_exclusive","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime; mutually exclusive with period_days.","title":"End Datetime Exclusive"},"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime; mutually exclusive with period_days."},{"name":"agent_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"description":"Scope to calls handled by these AI agents. Omit for all agents.","title":"Agent Ids"},"description":"Scope to calls handled by these AI agents. Omit for all agents."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCallDashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/phone-call-analysis/tag-now":{"post":{"tags":["v3","phone-call-analysis"],"summary":"Synchronously tag a set of phone calls (phone_call_tags analyzer)","operationId":"v3_phone-call-analysis_tag_now","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCallTagNowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCallAnalysisSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/phone-call-analysis/extract-offers-now":{"post":{"tags":["v3","phone-call-analysis"],"summary":"Synchronously extract offers from a set of phone calls (phone_call_offers analyzer)","operationId":"v3_phone-call-analysis_extract_offers_now","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCallExtractOffersNowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCallAnalysisSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/phone-call-analysis/sweep":{"post":{"tags":["v3","phone-call-analysis"],"summary":"Trigger a phone-call-analysis sweep on demand (super-admin)","description":"Fires the backstop Claim sweep per phone-call analyzer using\ndeterministic workflow IDs shared with the cron schedules. Each sweep\nnow analyzes its claimed entities synchronously (ENG-2264 — no Submit/\nPoll stages). ``id_conflict_policy=FAIL`` 409s when a sweep is already\nin flight; ``id_reuse_policy=ALLOW_DUPLICATE`` lets the manual trigger\nsucceed *after* the cron tick has closed.","operationId":"v3_phone-call-analysis_trigger_sweep","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCallAnalysisSweepTrigger"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCallAnalysisSweepResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v3/conversation-analysis/{channel}/runs":{"get":{"tags":["v3","conversation-analysis"],"summary":"List conversation analysis_run rows","operationId":"v3_conversation-analysis_list_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"enum":["email","text","whatsapp"],"type":"string","description":"Conversation channel.","title":"Channel"},"description":"Conversation channel."},{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"}},{"name":"analyzer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to one analyzer (e.g. 'email_tags', 'text_offers'). Omit to return rows from every analyzer of this channel.","title":"Analyzer Id"},"description":"Filter to one analyzer (e.g. 'email_tags', 'text_offers'). Omit to return rows from every analyzer of this channel."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/conversation-analysis/{channel}/runs/{run_id}":{"get":{"tags":["v3","conversation-analysis"],"summary":"Get one analysis_run row","operationId":"v3_conversation-analysis_get_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"channel","in":"path","required":true,"schema":{"enum":["email","text","whatsapp"],"type":"string","description":"Conversation channel.","title":"Channel"},"description":"Conversation channel."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/conversation-analysis/{channel}/summary":{"get":{"tags":["v3","conversation-analysis"],"summary":"Bulk per-conversation summary (tags + offers + per-analyzer run status)","operationId":"v3_conversation-analysis_list_summaries","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"enum":["email","text","whatsapp"],"type":"string","description":"Conversation channel.","title":"Channel"},"description":"Conversation channel."},{"name":"conversation_ids","in":"query","required":true,"schema":{"type":"string","maxLength":8000,"description":"Comma-separated conversation ids. Capped at 200 per call.","title":"Conversation Ids"},"description":"Comma-separated conversation ids. Capped at 200 per call."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationAnalysisSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/conversation-analysis/dashboard":{"get":{"tags":["v3","conversation-analysis"],"summary":"Agents dashboard — outcome KPIs, trend, agent leaderboard, recent offers across all agent channels (email/text/whatsapp/phone); filterable by channel and agent","operationId":"v3_conversation-analysis_get_dashboard","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channels","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["email","text","whatsapp","phone"],"type":"string"}},{"type":"null"}],"description":"Channels to aggregate. Omit for all agent channels (email + text + whatsapp + phone).","title":"Channels"},"description":"Channels to aggregate. Omit for all agent channels (email + text + whatsapp + phone)."},{"name":"agent_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"description":"Scope to interactions handled by these AI agents. Omit for all agents.","title":"Agent Ids"},"description":"Scope to interactions handled by these AI agents. Omit for all agents."},{"name":"period_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"description":"Window size in days. KPIs/last-offers come from the trailing window; deltas come from the prior window of the same length. Mutually exclusive with start_datetime + end_datetime_exclusive. Omit all window params to default to 30 days.","title":"Period Days"},"description":"Window size in days. KPIs/last-offers come from the trailing window; deltas come from the prior window of the same length. Mutually exclusive with start_datetime + end_datetime_exclusive. Omit all window params to default to 30 days."},{"name":"start_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive; mutually exclusive with period_days.","title":"Start Datetime"},"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive; mutually exclusive with period_days."},{"name":"end_datetime_exclusive","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime; mutually exclusive with period_days.","title":"End Datetime Exclusive"},"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime; mutually exclusive with period_days."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/conversation-analysis/{channel}/tag-now":{"post":{"tags":["v3","conversation-analysis"],"summary":"Synchronously tag a set of conversations (channel ``*_tags`` analyzer)","operationId":"v3_conversation-analysis_tag_now","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"enum":["email","text","whatsapp"],"type":"string","description":"Conversation channel.","title":"Channel"},"description":"Conversation channel."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationTagNowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationAnalysisSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/conversation-analysis/{channel}/extract-offers-now":{"post":{"tags":["v3","conversation-analysis"],"summary":"Synchronously extract offers from a set of conversations (channel ``*_offers`` analyzer)","operationId":"v3_conversation-analysis_extract_offers_now","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"enum":["email","text","whatsapp"],"type":"string","description":"Conversation channel.","title":"Channel"},"description":"Conversation channel."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationExtractOffersNowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationAnalysisSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/conversation-analysis/{channel}/sweep":{"post":{"tags":["v3","conversation-analysis"],"summary":"Trigger a conversation-analysis sweep on demand (super-admin)","description":"Fires the backstop Claim sweep per channel analyzer using\ndeterministic workflow IDs shared with the cron schedules. Each sweep\nnow analyzes its claimed entities synchronously (ENG-2264 — no Submit/\nPoll stages).","operationId":"v3_conversation-analysis_trigger_sweep","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"enum":["email","text","whatsapp"],"type":"string","description":"Conversation channel.","title":"Channel"},"description":"Conversation channel."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationAnalysisSweepTrigger"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationAnalysisSweepResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/efficiency/dashboard":{"get":{"tags":["v3","efficiency"],"summary":"Efficiency dashboard — AI conversations by channel, who booked the loads, and trends","operationId":"v3_efficiency_get_dashboard","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"description":"Trailing window in days. Mutually exclusive with the explicit bounds and with all_time. Omit everything for 30 days.","title":"Period Days"},"description":"Trailing window in days. Mutually exclusive with the explicit bounds and with all_time. Omit everything for 30 days."},{"name":"start_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive.","title":"Start Datetime"},"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive."},{"name":"end_datetime_exclusive","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime.","title":"End Datetime Exclusive"},"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime."},{"name":"all_time","in":"query","required":false,"schema":{"type":"boolean","description":"From the workspace's first AI conversation to now. Excludes the other window params.","default":false,"title":"All Time"},"description":"From the workspace's first AI conversation to now. Excludes the other window params."},{"name":"time_zone","in":"query","required":false,"schema":{"type":"string","maxLength":64,"description":"IANA time zone the days, weeks (Monday start) and months are cut in.","default":"UTC","title":"Time Zone"},"description":"IANA time zone the days, weeks (Monday start) and months are cut in."},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"description":"Only the calls and email threads these AI agents handled. Omit for every agent.","title":"Agent Id"},"description":"Only the calls and email threads these AI agents handled. Omit for every agent."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EfficiencyDashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/efficiency/conversations":{"get":{"tags":["v3","efficiency"],"summary":"Efficiency dashboard — every AI call and email thread in the window, newest first","operationId":"v3_efficiency_list_conversations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EfficiencyChannelKey"}},{"type":"null"}],"description":"Only these channels. Omit for all four.","title":"Channel"},"description":"Only these channels. Omit for all four."},{"name":"closed_by","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EfficiencyClosedBy"},{"type":"null"}],"description":"Only conversations handled (or booked) by the AI, with its help, or by a person.","title":"Closed By"},"description":"Only conversations handled (or booked) by the AI, with its help, or by a person."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Case-insensitive match on carrier, contact, MC/DOT, load, lane, customer, rep and equipment.","title":"Search"},"description":"Case-insensitive match on carrier, contact, MC/DOT, load, lane, customer, rep and equipment."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"period_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"description":"Trailing window in days. Mutually exclusive with the explicit bounds and with all_time. Omit everything for 30 days.","title":"Period Days"},"description":"Trailing window in days. Mutually exclusive with the explicit bounds and with all_time. Omit everything for 30 days."},{"name":"start_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive.","title":"Start Datetime"},"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive."},{"name":"end_datetime_exclusive","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime.","title":"End Datetime Exclusive"},"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime."},{"name":"all_time","in":"query","required":false,"schema":{"type":"boolean","description":"From the workspace's first AI conversation to now. Excludes the other window params.","default":false,"title":"All Time"},"description":"From the workspace's first AI conversation to now. Excludes the other window params."},{"name":"time_zone","in":"query","required":false,"schema":{"type":"string","maxLength":64,"description":"IANA time zone the days, weeks (Monday start) and months are cut in.","default":"UTC","title":"Time Zone"},"description":"IANA time zone the days, weeks (Monday start) and months are cut in."},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"description":"Only the calls and email threads these AI agents handled. Omit for every agent.","title":"Agent Id"},"description":"Only the calls and email threads these AI agents handled. Omit for every agent."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EfficiencyConversationPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/efficiency/loads":{"get":{"tags":["v3","efficiency"],"summary":"Efficiency dashboard — every load the AI worked in the window, most recent first","operationId":"v3_efficiency_list_loads","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EfficiencyLoadStatus"}},{"type":"null"}],"description":"Only loads in these statuses. Omit for all.","title":"Status"},"description":"Only loads in these statuses. Omit for all."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Case-insensitive match on load, lane, customer, rep and equipment.","title":"Search"},"description":"Case-insensitive match on load, lane, customer, rep and equipment."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"next_cursor from the previous page.","title":"Cursor"},"description":"next_cursor from the previous page."},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}},{"name":"period_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"description":"Trailing window in days. Mutually exclusive with the explicit bounds and with all_time. Omit everything for 30 days.","title":"Period Days"},"description":"Trailing window in days. Mutually exclusive with the explicit bounds and with all_time. Omit everything for 30 days."},{"name":"start_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive.","title":"Start Datetime"},"description":"Inclusive window start (timezone-aware ISO-8601). Requires end_datetime_exclusive."},{"name":"end_datetime_exclusive","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime.","title":"End Datetime Exclusive"},"description":"Exclusive window end (timezone-aware ISO-8601). Requires start_datetime."},{"name":"all_time","in":"query","required":false,"schema":{"type":"boolean","description":"From the workspace's first AI conversation to now. Excludes the other window params.","default":false,"title":"All Time"},"description":"From the workspace's first AI conversation to now. Excludes the other window params."},{"name":"time_zone","in":"query","required":false,"schema":{"type":"string","maxLength":64,"description":"IANA time zone the days, weeks (Monday start) and months are cut in.","default":"UTC","title":"Time Zone"},"description":"IANA time zone the days, weeks (Monday start) and months are cut in."},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"description":"Only the calls and email threads these AI agents handled. Omit for every agent.","title":"Agent Id"},"description":"Only the calls and email threads these AI agents handled. Omit for every agent."},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EfficiencyLoadPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/tags/entity-fields":{"get":{"tags":["v3","tags"],"summary":"List linking tag target entities and available template fields","operationId":"v3_tags_list_entity_fields","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagEntityFieldCatalogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/tags/definitions":{"get":{"tags":["v3","tags"],"summary":"List tag definitions in the current workspace","operationId":"v3_tags_list_definitions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"only_active","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Only Active"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Size"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagDefinitionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["v3","tags"],"summary":"Create a custom (non-system) tag definition","operationId":"v3_tags_create_definition","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagDefinitionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/tags/definitions/{definition_id}":{"get":{"tags":["v3","tags"],"summary":"Get one tag definition","operationId":"v3_tags_get_definition","security":[{"HTTPBearer":[]}],"parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["v3","tags"],"summary":"Update a custom (non-system) tag definition","operationId":"v3_tags_update_definition","security":[{"HTTPBearer":[]}],"parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagDefinitionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v3","tags"],"summary":"Soft-delete a custom (non-system) tag definition","operationId":"v3_tags_delete_definition","security":[{"HTTPBearer":[]}],"parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/tags/assignments":{"get":{"tags":["v3","tags"],"summary":"List tag assignments by source (A) or target (B)","operationId":"v3_tags_list_assignments","security":[{"HTTPBearer":[]}],"parameters":[{"name":"a_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"A Type"}},{"name":"a_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"A Id"}},{"name":"b_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B Type"}},{"name":"b_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"B Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Size"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagAssignmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/tags/resource-overrides/{resource_type}/{resource_id}":{"get":{"tags":["v3","tags"],"summary":"List shared tags + their enabled state for an inbox / number / agent","operationId":"v3_tags_list_resource_tag_settings","security":[{"HTTPBearer":[]}],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["inbox","number","agent"],"type":"string","title":"Resource Type"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceTagSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["v3","tags"],"summary":"Enable/disable shared tags for an inbox / number / agent","operationId":"v3_tags_set_resource_tag_settings","security":[{"HTTPBearer":[]}],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["inbox","number","agent"],"type":"string","title":"Resource Type"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceTagSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceTagSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/prompt-feedback":{"post":{"tags":["v3","prompt-feedback"],"summary":"Submit feedback for prompt improvement","operationId":"v3_prompt-feedback_create_feedback","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFeedbackCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["v3","prompt-feedback"],"summary":"List prompt feedback for an agent","operationId":"v3_prompt-feedback_list_feedback","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"phone_call_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only feedback on this call","title":"Phone Call Id"},"description":"Only feedback on this call"},{"name":"ai_agent_session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only feedback on this agent session","title":"Ai Agent Session Id"},"description":"Only feedback on this agent session"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFeedbackListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/prompt-feedback/{feedback_id}":{"get":{"tags":["v3","prompt-feedback"],"summary":"Get prompt feedback details","operationId":"v3_prompt-feedback_get_feedback","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"feedback_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Feedback Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["v3","prompt-feedback"],"summary":"Update a prompt feedback entry","operationId":"v3_prompt-feedback_update_feedback","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"feedback_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Feedback Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFeedbackUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v3","prompt-feedback"],"summary":"Delete a prompt feedback entry","operationId":"v3_prompt-feedback_delete_feedback","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"feedback_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Feedback Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/prompt-versions":{"post":{"tags":["v3","prompt-versions"],"summary":"Create a prompt version checkpoint","operationId":"v3_prompt-versions_create_version","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["v3","prompt-versions"],"summary":"List prompt versions for an agent","operationId":"v3_prompt-versions_list_versions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"prompt_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by 'system' or 'user'","title":"Prompt Type"},"description":"Filter by 'system' or 'user'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-agents/{agent_id}/prompt-versions/{version_id}":{"get":{"tags":["v3","prompt-versions"],"summary":"Get a specific prompt version","operationId":"v3_prompt-versions_get_version","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/scenarios":{"post":{"tags":["v3","proving"],"summary":"Create proving scenario","operationId":"v3_proving_create_scenario","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioCreate-Input"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["v3","proving"],"summary":"List proving scenarios","operationId":"v3_proving_list_scenarios","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/scenarios/{scenario_id}":{"get":{"tags":["v3","proving"],"summary":"Get proving scenario","operationId":"v3_proving_get_scenario","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["v3","proving"],"summary":"Update proving scenario","operationId":"v3_proving_update_scenario","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v3","proving"],"summary":"Delete proving scenario","operationId":"v3_proving_delete_scenario","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/scenarios/{scenario_id}/versions":{"get":{"tags":["v3","proving"],"summary":"List the versions of a proving scenario","operationId":"v3_proving_list_scenario_versions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioVersionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/scenarios/{scenario_id}/restore":{"post":{"tags":["v3","proving"],"summary":"Make an earlier version of a proving scenario its next version","operationId":"v3_proving_restore_scenario_version","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioRestoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/agents/{agent_id}/tool-names":{"get":{"tags":["v3","proving"],"summary":"List available tool names for an agent (raw internal names)","operationId":"v3_proving_get_agent_tool_names","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get Agent Tool Names V3 Proving Agents  Agent Id  Tool Names Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/scenarios/generate":{"post":{"tags":["v3","proving"],"summary":"Generate a proving scenario using AI","operationId":"v3_proving_generate_scenario","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioGenerationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioGenerationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/groups":{"post":{"tags":["v3","proving"],"summary":"Create a scenario group","operationId":"v3_proving_create_group","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenariosGroupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenariosGroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["v3","proving"],"summary":"List scenario groups","operationId":"v3_proving_list_groups","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Size"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenariosGroupListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/groups/{group_id}":{"get":{"tags":["v3","proving"],"summary":"Get a scenario group","operationId":"v3_proving_get_group","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenariosGroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["v3","proving"],"summary":"Update a scenario group (replaces its scenario set)","operationId":"v3_proving_update_group","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenariosGroupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenariosGroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v3","proving"],"summary":"Delete a scenario group","operationId":"v3_proving_delete_group","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/agents/{agent_id}/scenarios":{"get":{"tags":["v3","proving"],"summary":"List scenarios linked to an agent","operationId":"v3_proving_list_agent_scenarios","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Size"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProvingScenarioListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["v3","proving"],"summary":"Set linked scenarios for an agent (replaces existing links)","operationId":"v3_proving_set_agent_scenarios","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProvingScenarioSet"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProvingScenarioListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/agents/{agent_id}/groups":{"put":{"tags":["v3","proving"],"summary":"Set the groups assigned to an agent (replaces existing assignments)","operationId":"v3_proving_set_agent_groups","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProvingScenariosGroupsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingEffectiveSuiteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/agents/{agent_id}/attach":{"post":{"tags":["v3","proving"],"summary":"Turn tests on for the agent (asking for one that is already on changes nothing)","operationId":"v3_proving_attach_to_agent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProvingChangeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingEffectiveSuiteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/agents/{agent_id}/detach":{"post":{"tags":["v3","proving"],"summary":"Turn tests off for the agent (asking for one that is already off changes nothing)","operationId":"v3_proving_detach_from_agent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProvingChangeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingEffectiveSuiteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/agents/{agent_id}/effective-suite":{"get":{"tags":["v3","proving"],"summary":"Every scenario attached to this agent, and so run for it, with suggested and unfitting safety checks","operationId":"v3_proving_get_effective_suite","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingEffectiveSuiteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/run":{"post":{"tags":["v3","proving"],"summary":"Start a proving run (returns immediately, processes in background)","operationId":"v3_proving_trigger_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingRunTrigger"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/agents/{agent_id}/run-draft":{"post":{"tags":["v3","proving"],"summary":"Test the agent's unpublished draft against its tests (returns immediately, runs in the background)","operationId":"v3_proving_run_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingDraftRunRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProvingRunResponse"},"title":"Response Run Draft V3 Proving Agents  Agent Id  Run Draft Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/agents/{agent_id}/scenario-stats":{"get":{"tags":["v3","proving"],"summary":"How many times each test ran for the agent, how many passed, and how the latest run went","operationId":"v3_proving_get_scenario_stats","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingScenarioStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/runs":{"get":{"tags":["v3","proving"],"summary":"List proving runs","operationId":"v3_proving_list_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}},{"name":"scenario_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/runs/stream":{"get":{"tags":["v3","proving"],"summary":"Stream proving runs' progress until every run finishes (server-sent events)","operationId":"v3_proving_stream_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100,"title":"Run Ids"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/proving/runs/{run_id}":{"get":{"tags":["v3","proving"],"summary":"Get proving run details","operationId":"v3_proving_get_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvingRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/ai-helper/":{"post":{"tags":["v3","ai-helper"],"summary":"Ai Helper","description":"AI-assisted content generation for the frontend.\n\nSend a JSON body with a `type` field to select the helper:\n\n- **prompt_generator** — generates a system prompt for an AI agent.\n- **prompt_rewriter** — rewrites an existing prompt based on user instructions.\n- **transcript_feedback_generator** — analyzes a conversation transcript and suggests feedback.","operationId":"v3_ai-helper_ai_helper","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PromptGeneratorRequest"},{"$ref":"#/components/schemas/PromptRewriterRequest"},{"$ref":"#/components/schemas/TranscriptFeedbackGeneratorRequest"},{"$ref":"#/components/schemas/CodeRewriterRequest"}],"discriminator":{"propertyName":"type","mapping":{"prompt_generator":"#/components/schemas/PromptGeneratorRequest","prompt_rewriter":"#/components/schemas/PromptRewriterRequest","transcript_feedback_generator":"#/components/schemas/TranscriptFeedbackGeneratorRequest","code_rewriter":"#/components/schemas/CodeRewriterRequest"}},"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIHelperResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/agent-editor/chat":{"post":{"tags":["agent-editor"],"summary":"Agent Editor Chat","description":"Send a message to the agent editor AI. Returns SSE stream.\n\nAuth and workspace scoping are independent here because this endpoint is\ndual-mode: catalog edits have no workspace, agent edits do.","operationId":"agent-editor_agent_editor_chat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEditorChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/agent-editor/{agent_id}/draft":{"get":{"tags":["agent-editor"],"summary":"Get Existing Draft","description":"Return the existing draft for a published agent, if one exists.","operationId":"agent-editor_get_existing_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExistingDraftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agent-editor"],"summary":"Discard Editor Draft","description":"Delete the AI editor draft row for a published agent.","operationId":"agent-editor_discard_editor_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/agent-editor/{draft_id}/publish":{"post":{"tags":["agent-editor"],"summary":"Publish Draft","description":"Refused: a draft agent is published as a revision, through the safety gate.\n\nNote: ``draft_id`` is the ID of the **draft** row (``is_draft=True``),\nnot the published agent it was cloned from.","operationId":"agent-editor_publish_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishDraftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/agent-editor/drafts/{draft_id}":{"get":{"tags":["agent-editor"],"summary":"Get New Agent Draft","description":"Return a new agent's draft (one with no live agent yet), to fill the New Agent form.","operationId":"agent-editor_get_new_agent_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExistingDraftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agent-editor"],"summary":"Discard New Agent Draft","description":"Delete a new agent's draft, once the agent has been created from it.","operationId":"agent-editor_discard_new_agent_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/agent-editor/catalog/{entry_id}/draft":{"get":{"tags":["agent-editor"],"summary":"Get Catalog Draft","description":"Return the current draft row for a catalog entry, if one exists.","operationId":"agent-editor_get_catalog_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogDraftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agent-editor"],"summary":"Save catalog draft","description":"Persist draft changes without publishing. Creates a draft row if none exists. Mirrors PUT /v3/ai-agents/{id}/draft.","operationId":"agent-editor_save_catalog_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogDraftSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCatalogEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agent-editor"],"summary":"Discard Catalog Draft","description":"Discard the catalog draft row without applying changes.","operationId":"agent-editor_discard_catalog_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/agent-editor/catalog/{entry_id}/publish":{"post":{"tags":["agent-editor"],"summary":"Publish Catalog Draft","description":"Publish a catalog draft: parse YAML to DB columns, delete the draft row.","operationId":"agent-editor_publish_catalog_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/nodes":{"get":{"tags":["workflow-editor"],"summary":"List Workflow Nodes","description":"List all available workflow node definitions.\n\nReturns node definitions in the format expected by the frontend\nworkflow editor palette.","operationId":"workflow-editor_list_workflow_nodes","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeDefinitionListOut"}}}}}}},"/v3/workflow-editor/sub-workflows":{"get":{"tags":["workflow-editor"],"summary":"List Sub Workflows","description":"List workflows that can be called as sub-workflows.\n\nReturns all STANDARD workflows in the user's workspace that have a\ntrigger node of type ``sub-workflow-trigger``, along with their\ninput field contract. ``runnable`` narrows them to what an agent may start.","operationId":"workflow-editor_list_sub_workflows","security":[{"HTTPBearer":[]}],"parameters":[{"name":"runnable","in":"query","required":false,"schema":{"type":"boolean","description":"Only the workflows an agent's run_workflow tool may start: active, not a test copy or a version child, on the v3 engine","default":false,"title":"Runnable"},"description":"Only the workflows an agent's run_workflow tool may start: active, not a test copy or a version child, on the v3 engine"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubWorkflowListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/chat":{"post":{"tags":["workflow-editor"],"summary":"Workflow Chat","description":"Send a message to the workflow chat agent.\n\nReturns a Server-Sent Events (SSE) stream with agent responses.\nEvents include:\n- text_delta: Streaming text content\n- tool_call: When the agent calls a tool\n- tool_result: Result of tool execution\n- sync_workflow: Updated workflow state (nodes, edges, YAML)\n- error: Error messages\n- done: Stream completion","operationId":"workflow-editor_workflow_chat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/drafts":{"get":{"tags":["workflow-editor"],"summary":"List Drafts","description":"List all workflow drafts in the user's workspace.","operationId":"workflow-editor_list_drafts","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditorListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workflow-editor"],"summary":"Create Draft","description":"Create a new workflow draft.","operationId":"workflow-editor_create_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDraftCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/drafts/{workflow_id}":{"get":{"tags":["workflow-editor"],"summary":"Get Draft","description":"Get a workflow draft by ID.","operationId":"workflow-editor_get_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["workflow-editor"],"summary":"Update Draft","description":"Update a workflow draft.","operationId":"workflow-editor_update_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDraftUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflow-editor"],"summary":"Delete Draft","description":"Delete a workflow draft.","operationId":"workflow-editor_delete_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/drafts/{workflow_id}/chat-history":{"delete":{"tags":["workflow-editor"],"summary":"Clear Chat History","description":"Clear the chat history for a draft.","operationId":"workflow-editor_clear_chat_history","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/drafts/{workflow_id}/undo":{"post":{"tags":["workflow-editor"],"summary":"Undo Draft","description":"Undo the last change to a workflow draft.\n\nReturns the restored YAML content and the undone YAML (for redo on frontend).","operationId":"workflow-editor_undo_draft","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UndoResponseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/drafts/{workflow_id}/truncate-chat":{"post":{"tags":["workflow-editor"],"summary":"Truncate Draft Chat","description":"Chat-aware undo: truncate chat at ``message_index`` and restore the\ncanvas YAML to the snapshot stored on that user message.\n\nUsed by both the undo button (with the index of the last user message)\nand the per-message pencil-edit button.","operationId":"workflow-editor_truncate_draft_chat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TruncateChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/drafts/{workflow_id}/deploy":{"patch":{"tags":["workflow-editor"],"summary":"Deploy Workflow","description":"Deploy (activate/deactivate) a v3 workflow.\n\nThis endpoint:\n1. Parses the YAML and validates every node against the node registry.\n2. Materializes ``WorkflowNode`` + ``WorkflowNodeConnection`` rows in the DB.\n3. If the workflow is a draft, promotes it to its parent (same as v2).\n4. Sets ``is_active`` and increments ``deployed_version``.\n\nCan also be called on an already-deployed workflow to deactivate it.","operationId":"workflow-editor_deploy_workflow","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDeployRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDeployOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/drafts/from-deployed":{"post":{"tags":["workflow-editor"],"summary":"Create Draft From Deployed","description":"Create a new draft by cloning a deployed workflow's YAML.\n\nThe draft is linked to the deployed workflow via ``workflow_parent_id``.\nIf a draft already exists for this parent, it is returned instead of\ncreating a duplicate.\n\nThis is used when the user wants to edit an already-deployed workflow:\nthe frontend calls this endpoint to get a draft, then opens the editor.","operationId":"workflow-editor_create_draft_from_deployed","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftFromDeployedRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/code/metadata":{"get":{"tags":["workflow-editor"],"summary":"Get Code Execution Metadata","description":"Return code execution editor metadata (scaffold, frozen lines, imports).\n\nSingle source of truth consumed by the frontend code editor.","operationId":"workflow-editor_get_code_execution_metadata","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeExecutionMetadataResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/code/validate":{"post":{"tags":["workflow-editor"],"summary":"Validate Code Execution","description":"Validate Python code for a code-execution node.\n\nPerforms static analysis (AST + ruff) without executing the code.\nReturns diagnostics, and suggestions for params/code/output_schema sync.","operationId":"workflow-editor_validate_code_execution","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeValidateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/drafts/{workflow_id}/test":{"post":{"tags":["workflow-editor"],"summary":"Test Workflow","description":"Test a V3 workflow via the V3 Temporal orchestrator.\n\nThe workflow is materialized (YAML → DB nodes/edges), then the\ntest service builds a ``WorkflowExecutionContext`` with the trigger\nnode's output pre-populated from ``body.context``  - the trigger\nitself is **not** executed.\n\nCurrently supports the **event-trigger** type for testing.","operationId":"workflow-editor_test_workflow","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowTestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/drafts/{workflow_id}/test-real-call":{"post":{"tags":["workflow-editor"],"summary":"Test Real Call","description":"Initiate a real phone call test for an inbound-call-trigger workflow.\n\nThe system calls the provided phone number using the same AI agent\nconfigured in the workflow's inbound-call-trigger.  After the\nconversation ends, the post-call webhook triggers the workflow with\nreal transcript, outcome, and dynamic variables.","operationId":"workflow-editor_test_real_call","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealCallTestRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealCallTestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-editor/drafts/{workflow_id}/test-real-call/{call_id}/status":{"get":{"tags":["workflow-editor"],"summary":"Get Real Call Test Status","description":"Poll the status of an in-progress real-call test.","operationId":"workflow-editor_get_real_call_test_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealCallTestStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-executions":{"get":{"tags":["v3","workflow-executions-v3"],"summary":"List Executions","description":"List v3 workflow executions with pagination and filtering.","operationId":"v3_workflow-executions-v3_list_executions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/WorkflowBusinessStatus"}},{"type":"null"}],"title":"Status"}},{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Id"}},{"name":"timeframe","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Timeframe"},{"type":"null"}],"title":"Timeframe"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"load_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_WorkflowExecutionListItem_"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-executions/{execution_id}":{"get":{"tags":["v3","workflow-executions-v3"],"summary":"Get Execution","description":"Get a single v3 execution with latest runs + events in one call.","operationId":"v3_workflow-executions-v3_get_execution","security":[{"HTTPBearer":[]}],"parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Execution Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowExecutionDetail"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["v3","workflow-executions-v3"],"summary":"Update Execution","description":"Update execution status, assignment, or resolution.\n\nConsolidates resolve, ignore, and assign into a single endpoint.","operationId":"v3_workflow-executions-v3_update_execution","security":[{"HTTPBearer":[]}],"parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Execution Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExecutionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Execution V3 Workflow Executions  Execution Id  Patch"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-executions/{execution_id}/runs":{"get":{"tags":["v3","workflow-executions-v3"],"summary":"Get Runs","description":"Get all runs for an execution, including events with resolved node labels.","operationId":"v3_workflow-executions-v3_get_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Execution Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RunOut"},"title":"Response Get Runs V3 Workflow Executions  Execution Id  Runs Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-executions/{execution_id}/rerun":{"post":{"tags":["v3","workflow-executions-v3"],"summary":"Rerun Execution","description":"Rerun a v3 execution.","operationId":"v3_workflow-executions-v3_rerun_execution","security":[{"HTTPBearer":[]}],"parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Execution Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerunRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerunResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-executions/bulk-rerun":{"post":{"tags":["v3","workflow-executions-v3"],"summary":"Bulk Rerun Executions","description":"Bulk rerun multiple v3 executions.","operationId":"v3_workflow-executions-v3_bulk_rerun_executions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRerunRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-executions/{execution_id}/runs/{run_number}/terminate":{"post":{"tags":["v3","workflow-executions-v3"],"summary":"Terminate Run","description":"Terminate a specific run of a v3 workflow execution.","operationId":"v3_workflow-executions-v3_terminate_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Execution Id"}},{"name":"run_number","in":"path","required":true,"schema":{"type":"integer","title":"Run Number"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminateRunResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/workflow-executions/{execution_id}/stream":{"get":{"tags":["v3","workflow-executions-v3"],"summary":"Stream Execution","description":"Stream live updates for a v3 workflow execution via SSE.","operationId":"v3_workflow-executions-v3_stream_execution","security":[{"HTTPBearer":[]}],"parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Execution Id"}},{"name":"mentium-workspace-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The workspace ID that contains the resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/webhooks/workflows/{webhook_id}":{"head":{"tags":["v3","webhooks","http-trigger"],"summary":"Verify Webhook Head","description":"HEAD verification  - confirms the webhook endpoint exists, is active,\nand has a backing workflow.  Uses the same resolution as the trigger\nendpoint so the two cannot diverge.","operationId":"v3_webhooks_http-trigger_verify_webhook_head","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["v3","webhooks","http-trigger"],"summary":"Receive Workflow Webhook","description":"Receive an inbound HTTP request to trigger a v3 workflow.\n\nThe ``webhook_id`` maps to a deployed workflow with an ``http-trigger``\nnode.  The request body is parsed as JSON and forwarded to the workflow\nas the trigger's output data.\n\nReturns **202 Accepted** immediately; the workflow runs asynchronously.","operationId":"v3_webhooks_http-trigger_receive_workflow_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for webhook authentication","title":"X-Api-Key"},"description":"API key for webhook authentication"}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v3","webhooks","http-trigger"],"summary":"Receive Workflow Webhook","description":"Receive an inbound HTTP request to trigger a v3 workflow.\n\nThe ``webhook_id`` maps to a deployed workflow with an ``http-trigger``\nnode.  The request body is parsed as JSON and forwarded to the workflow\nas the trigger's output data.\n\nReturns **202 Accepted** immediately; the workflow runs asynchronously.","operationId":"v3_webhooks_http-trigger_receive_workflow_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for webhook authentication","title":"X-Api-Key"},"description":"API key for webhook authentication"}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["v3","webhooks","http-trigger"],"summary":"Receive Workflow Webhook","description":"Receive an inbound HTTP request to trigger a v3 workflow.\n\nThe ``webhook_id`` maps to a deployed workflow with an ``http-trigger``\nnode.  The request body is parsed as JSON and forwarded to the workflow\nas the trigger's output data.\n\nReturns **202 Accepted** immediately; the workflow runs asynchronously.","operationId":"v3_webhooks_http-trigger_receive_workflow_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for webhook authentication","title":"X-Api-Key"},"description":"API key for webhook authentication"}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["v3","webhooks","http-trigger"],"summary":"Receive Workflow Webhook","description":"Receive an inbound HTTP request to trigger a v3 workflow.\n\nThe ``webhook_id`` maps to a deployed workflow with an ``http-trigger``\nnode.  The request body is parsed as JSON and forwarded to the workflow\nas the trigger's output data.\n\nReturns **202 Accepted** immediately; the workflow runs asynchronously.","operationId":"v3_webhooks_http-trigger_receive_workflow_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for webhook authentication","title":"X-Api-Key"},"description":"API key for webhook authentication"}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["v3","webhooks","http-trigger"],"summary":"Receive Workflow Webhook","description":"Receive an inbound HTTP request to trigger a v3 workflow.\n\nThe ``webhook_id`` maps to a deployed workflow with an ``http-trigger``\nnode.  The request body is parsed as JSON and forwarded to the workflow\nas the trigger's output data.\n\nReturns **202 Accepted** immediately; the workflow runs asynchronously.","operationId":"v3_webhooks_http-trigger_receive_workflow_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for webhook authentication","title":"X-Api-Key"},"description":"API key for webhook authentication"}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/elevenlabs/conversation-init":{"post":{"tags":["webhooks","elevenlabs"],"summary":"Handle Conversation Init","description":"Handle ElevenLabs conversation-init webhook.","operationId":"webhooks_elevenlabs_handle_conversation_init","parameters":[{"name":"x-webhook-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Webhook-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationInitiationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationInitiationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/elevenlabs/conversation-ended":{"post":{"tags":["webhooks","elevenlabs"],"summary":"Handle Conversation Ended","description":"Handle ElevenLabs conversation-ended webhook.","operationId":"webhooks_elevenlabs_handle_conversation_ended","parameters":[{"name":"elevenlabs-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Elevenlabs-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/sendgrid/inbound":{"post":{"tags":["webhooks","sendgrid"],"summary":"Handle Sendgrid Inbound","description":"Handle inbound emails via SendGrid Inbound Parse.\n\nWith send_raw=true, the full MIME message arrives in the ``email`` form\nfield. With send_raw=false, SendGrid pre-parses it into ``text``, ``html``,\n``headers``, etc. We handle both by preferring the raw email when present.","operationId":"webhooks_sendgrid_handle_sendgrid_inbound","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/sendgrid/events":{"post":{"tags":["webhooks","sendgrid"],"summary":"Handle Sendgrid Events","description":"Handle SendGrid Event Webhook callbacks (delivery, bounce, dropped, ...).\n\nSendGrid POSTs a JSON array of event objects. We persist recognized events\nand mark the originating message ``BOUNCED`` on non-delivery so the failure\nsurfaces in the inbox. Always returns 200 once parsed — SendGrid retries on\nnon-2xx, and unknown/uncorrelated events are intentionally no-ops.","operationId":"webhooks_sendgrid_handle_sendgrid_events","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/twilio/messaging/inbound":{"post":{"tags":["webhooks","twilio"],"summary":"Handle Inbound Message","description":"Handle inbound SMS/WhatsApp messages from Twilio.\n\nTwilio sends form-encoded POST with fields like:\n- From: sender phone (e.g. +15551234567 or whatsapp:+15551234567)\n- To: our phone number\n- Body: message text\n- MessageSid: unique Twilio message ID\n- NumMedia: number of media attachments\n- MediaUrl0..N: media URLs","operationId":"webhooks_twilio_handle_inbound_message","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/twilio/messaging/status":{"post":{"tags":["webhooks","twilio"],"summary":"Handle Delivery Status","description":"Handle Twilio delivery status callbacks.\n\nTwilio sends form-encoded POST with:\n- MessageSid: the message being updated\n- MessageStatus: queued, sent, delivered, undelivered, failed, read\n- ErrorCode / ErrorMessage: if failed","operationId":"webhooks_twilio_handle_delivery_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/twilio/voice/incoming":{"post":{"tags":["twilio_voice"],"summary":"Voice Incoming","description":"Answer an inbound call on a Mentium number routed to a native provider.\n\nAdmission — which agent owns the number, Highway screening, the\nMyCarrierPackets pre-call lookup, the call record and the caller-specific\nprompt — is the same code the ElevenLabs conversation-init webhook runs, so\na number behaves identically whichever provider picks up. The rendered\nprompt is stored on the call's metadata because, unlike ElevenLabs, there is\nno init response to carry it in: the WebSocket reads it back when it opens.","operationId":"twilio_voice_voice_incoming","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_voice_incoming_webhooks_twilio_voice_incoming_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/voice/recording-status":{"post":{"tags":["twilio_voice"],"summary":"Voice Recording Status","description":"Twilio RecordingStatusCallback for the caller-leg recording armed at call start.","operationId":"twilio_voice_voice_recording_status","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_voice_recording_status_webhooks_twilio_voice_recording_status_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/voice/status":{"post":{"tags":["twilio_voice"],"summary":"Voice Status","description":"Twilio's call status callback for a native-provider call.\n\nThin on purpose: what a status means for the call record — including closing\na dial nobody answered and signalling the workflow waiting on it — lives in\n``native_voice_call_status_service``.","operationId":"twilio_voice_voice_status","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_voice_status_webhooks_twilio_voice_status_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/voice/transfer-result":{"post":{"tags":["twilio_voice"],"summary":"Transfer Result","description":"What happened to a transfer, and what the caller hears next.","operationId":"twilio_voice_transfer_result","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_transfer_result_webhooks_twilio_voice_transfer_result_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/voice/transfer-briefing":{"post":{"tags":["twilio_voice"],"summary":"Transfer Briefing","description":"What the person picking up a warm transfer hears before the caller.\n\n``CallSid`` is the destination leg, which has just answered; the caller's\nsid comes on the query string the bridge put in the ``<Number url>``. The\nbriefing was written to the caller's row before the redirect, so an empty\ndocument here means nothing to say, and Twilio bridges the two at once.","operationId":"twilio_voice_transfer_briefing","parameters":[{"name":"call_sid","in":"query","required":false,"schema":{"type":"string","default":"","title":"Call Sid"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_transfer_briefing_webhooks_twilio_voice_transfer_briefing_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/voice/amd":{"post":{"tags":["twilio_voice"],"summary":"Amd Result","description":"Twilio's answer to \"was that a person?\".\n\nA machine gets hung up on. Doing it here rather than in the bridge is\ndeliberate: the Twilio REST hangup reaches the call whichever ECS task owns\nits WebSocket, and arrives at that task as an ordinary ``stop`` frame.","operationId":"twilio_voice_amd_result","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_amd_result_webhooks_twilio_voice_amd_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Read Root","operationId":"read_root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AIAgentConversationTestOpenAIRealtimeSettings":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"OpenAI voice model: a gpt-realtime-* or gpt-live-* model"},"backend_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backend Model","description":"gpt-live only: the Responses model that runs the agent's tools"},"voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice","description":"Voice name, validated against the model"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Reasoning effort, validated against the model"},"background_sound":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Background Sound","description":"gpt-live only: the room played under the voice, e.g. office"}},"type":"object","title":"AIAgentConversationTestOpenAIRealtimeSettings","description":"Subset of OpenAI voice settings allowed for browser voice-test sessions.\n\nFree-form rather than enumerated: the valid voices and reasoning efforts\ndepend on which model is selected (gpt-live has its own voices and accepts\n\"none\"), so the values are validated against that model server-side by the\nsame code that validates a saved agent."},"AIAgentConversationTestRequest":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"LLM model override"},"system_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt Template","description":"System prompt override"},"type_config":{"anyOf":[{"$ref":"#/components/schemas/AIAgentConversationTestTypeConfig"},{"type":"null"}],"description":"Runtime phone configuration from UI"},"include_conversation_id":{"type":"boolean","title":"Include Conversation Id","description":"Whether ElevenLabs should include a conversation_id in the signed URL","default":true},"environment":{"anyOf":[{"type":"string","enum":["production","staging"]},{"type":"null"}],"title":"Environment","description":"Optional ElevenLabs environment override"}},"type":"object","title":"AIAgentConversationTestRequest","description":"Request payload to prepare an authenticated in-app voice test session."},"AIAgentConversationTestResponse":{"properties":{"signed_url":{"type":"string","title":"Signed Url","description":"Temporary signed websocket URL"},"provider":{"type":"string","enum":["elevenlabs","gemini","openai"],"title":"Provider","description":"Voice provider used for this test session","default":"elevenlabs"},"transport":{"type":"string","enum":["elevenlabs_signed_url","mentium_browser_ws"],"title":"Transport","description":"Browser transport to use for this test session","default":"elevenlabs_signed_url"},"conversation_config_override":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Conversation Config Override","description":"Conversation override payload to send on websocket initiation"}},"type":"object","required":["signed_url"],"title":"AIAgentConversationTestResponse","description":"Response payload for in-app voice test bootstrap."},"AIAgentConversationTestTtsSettings":{"properties":{"stability":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Stability","description":"Voice stability"},"similarity_boost":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Similarity Boost","description":"Voice similarity boost"},"speed":{"anyOf":[{"type":"number","maximum":1.2,"minimum":0.7},{"type":"null"}],"title":"Speed","description":"Speech speed"}},"type":"object","title":"AIAgentConversationTestTtsSettings","description":"Subset of phone agent TTS settings allowed for per-conversation override."},"AIAgentConversationTestTypeConfig":{"properties":{"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id","description":"ElevenLabs voice ID"},"first_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message","description":"First message override"},"gemini_voice_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gemini Voice Settings","description":"Gemini Live voice settings override"},"openai_realtime_settings":{"anyOf":[{"$ref":"#/components/schemas/AIAgentConversationTestOpenAIRealtimeSettings"},{"type":"null"}],"description":"OpenAI Realtime voice settings override"},"voice_settings":{"anyOf":[{"$ref":"#/components/schemas/AIAgentConversationTestTtsSettings"},{"type":"null"}],"description":"Per-conversation TTS overrides"}},"type":"object","title":"AIAgentConversationTestTypeConfig","description":"Runtime phone settings from UI used for voice test sessions."},"AIAgentCreateRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Agent name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Agent description"},"agent_type":{"type":"string","title":"Agent Type","description":"Agent type identifier","default":"text"},"type_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Config","description":"Type-specific configuration. Required fields are defined by the agent type registry."},"workspace_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Phone Number Id","description":"Assigned workspace phone number ID (phone agents only)."},"model":{"type":"string","title":"Model","description":"LLM model identifier (e.g. gpt-5.5, claude-sonnet-4-6)"},"system_prompt_template":{"type":"string","title":"System Prompt Template","description":"System prompt template with {{variables}}"},"user_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Template","description":"User prompt template with {{variables}}"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"LLM temperature (0-2)"},"max_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Tokens","description":"Maximum output tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Reasoning effort level for reasoning models (dynamic, depends on model)"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","description":"List of tool identifiers the agent can use"},"tool_inputs":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Tool Inputs","description":"Agent-side default inputs per tool identifier (tool_identifier -> {param_key -> value}). Soft defaults that travel with the agent; runtime precedence is agent < node < LLM args."},"mcp_bindings":{"items":{"$ref":"#/components/schemas/AgentMcpBindingInput"},"type":"array","title":"Mcp Bindings","description":"MCP servers the agent may use; part of its first revision"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the agent is active","default":true}},"type":"object","required":["name","model","system_prompt_template"],"title":"AIAgentCreateRequest","description":"Request schema for creating a new AI agent."},"AIAgentDraftSaveRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Agent name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Agent description"},"type_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Config","description":"Type-specific configuration."},"workspace_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Phone Number Id","description":"Assigned workspace phone number ID."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"LLM model identifier"},"system_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt Template","description":"System prompt template"},"user_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Template","description":"User prompt template"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"LLM temperature (0-2)"},"max_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Tokens","description":"Maximum output tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Reasoning effort level for reasoning models (dynamic, depends on model)"},"tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools","description":"List of tool identifiers the agent can use"},"tool_inputs":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Tool Inputs","description":"Agent-side default inputs per tool identifier (tool_identifier -> {param_key -> value}). Soft defaults that travel with the agent; runtime precedence is agent < node < LLM args."},"mcp_bindings":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentMcpBindingInput"},"type":"array"},{"type":"null"}],"title":"Mcp Bindings","description":"MCP servers the agent may use; applied when the draft is published"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Whether the agent is active"}},"type":"object","title":"AIAgentDraftSaveRequest","description":"Request schema for saving draft changes (auto-save). Same shape as update."},"AIAgentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AIAgentResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"AIAgentListResponse","description":"Paginated response for listing AI agents."},"AIAgentModelResponse":{"properties":{"identifier":{"type":"string","title":"Identifier","description":"Model string used in API calls (matches LLMModel enum value)"},"label":{"type":"string","title":"Label","description":"Human-readable model name"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities","description":"Feature flags the model supports (e.g. 'reasoning_effort'). The frontend uses these to conditionally show/hide settings."},"available_reasoning_efforts":{"items":{"type":"string"},"type":"array","title":"Available Reasoning Efforts","description":"Allowed reasoning effort values for this model (e.g. ['low', 'medium', 'high']). Empty means the model does not support reasoning effort."},"max_tokens_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens Limit","description":"Maximum output tokens the model supports. None means unknown/unlimited. The frontend uses this to cap the max_tokens input."}},"type":"object","required":["identifier","label"],"title":"AIAgentModelResponse","description":"Response schema for a single supported LLM model."},"AIAgentPublishImpactResponse":{"properties":{"has_impact":{"type":"boolean","title":"Has Impact","description":"True when at least one active workflow references this agent."},"impacted_workflow_count":{"type":"integer","title":"Impacted Workflow Count","description":"Number of active workflows that use this agent.","default":0},"impacted_workflows":{"items":{"$ref":"#/components/schemas/ImpactedWorkflowRef"},"type":"array","title":"Impacted Workflows","description":"List of impacted active workflows."}},"type":"object","required":["has_impact"],"title":"AIAgentPublishImpactResponse","description":"Impact summary returned before confirming a publish."},"AIAgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"agent_type":{"type":"string","title":"Agent Type"},"type_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Config"},"workspace_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Phone Number Id"},"model":{"type":"string","title":"Model"},"system_prompt_template":{"type":"string","title":"System Prompt Template"},"user_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Template"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"},"tool_inputs":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Tool Inputs","description":"Agent-side default inputs per tool identifier (tool_identifier -> {param_key -> value}). Soft defaults that travel with the agent; runtime precedence is agent < node < LLM args."},"automation_tools_count":{"type":"integer","title":"Automation Tools Count","description":"Number of shared HTTP automation tools bound to this agent.","default":0},"is_active":{"type":"boolean","title":"Is Active"},"is_draft":{"type":"boolean","title":"Is Draft","default":false},"draft_of_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Of Id"},"yaml_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yaml Content"},"chat_history":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Chat History"},"yaml_history":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Yaml History"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"prompt_variables":{"items":{"type":"string"},"type":"array","title":"Prompt Variables","description":"{{variable}} placeholder names found in the agent's prompts (system_prompt_template, user_prompt_template, type_config.first_message). Excludes ElevenLabs system variables (system__*) injected automatically at runtime."},"has_draft":{"type":"boolean","title":"Has Draft","description":"True when the agent has unpublished draft changes.","default":false},"live_revision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Live Revision Id","description":"The revision the agent runs"},"draft":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Draft","description":"Staged draft changes that have not been published yet."}},"type":"object","required":["id","name","description","agent_type","type_config","model","system_prompt_template","user_prompt_template","temperature","max_tokens","reasoning_effort","tools","is_active","created_at","updated_at"],"title":"AIAgentResponse","description":"Response schema for a single AI agent."},"AIAgentSessionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AIAgentSessionResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"AIAgentSessionListResponse","description":"Paginated response for listing AI agent sessions."},"AIAgentSessionResponse":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"agent_revision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Revision Id","description":"The agent version this session ran on"},"agent_revision_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Revision Number","description":"That version's number"},"status":{"type":"string","enum":["in_progress","completed","failed"],"title":"Status","description":"Session status"},"message_count":{"type":"integer","title":"Message Count","description":"Number of LLM messages in this session.","default":0},"messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Messages","description":"Full LLM message history (system, user, assistant, tool messages). Only populated on detail endpoint."},"available_tools":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Available Tools","description":"Snapshot of tools available to the agent during this session run. Includes static tool identifiers plus resolved MCP/automation tools."},"workflow_execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Execution Id","description":"Linked workflow execution ID"},"workflow_node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Node Id","description":"Linked workflow node ID"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","agent_id","status","started_at","completed_at","created_at","updated_at"],"title":"AIAgentSessionResponse","description":"Response schema for a single AI agent session (one text-agent invocation)."},"AIAgentTestCallRequest":{"properties":{"phone_number":{"type":"string","maxLength":20,"title":"Phone Number","description":"Number to call, in E.164 format (for example +12025551234)."}},"type":"object","required":["phone_number"],"title":"AIAgentTestCallRequest","description":"Dial a number with this agent, from the number the agent answers on."},"AIAgentTestCallResponse":{"properties":{"phone_call_id":{"type":"string","title":"Phone Call Id","description":"PhoneCall id, for the call detail page"},"from_number":{"type":"string","title":"From Number","description":"The agent's own number, which the call is placed from"},"to_number":{"type":"string","title":"To Number","description":"The number actually dialled. A workspace in test mode redirects every outbound call, so this can differ from the one requested."},"status":{"type":"string","title":"Status","description":"Call status at initiation"}},"type":"object","required":["phone_call_id","from_number","to_number","status"],"title":"AIAgentTestCallResponse","description":"What was dialled, and the call row to follow it on."},"AIAgentToolParameter":{"properties":{"key":{"type":"string","title":"Key","description":"Parameter key used in tool_inputs"},"label":{"type":"string","title":"Label","description":"Human-readable label"},"description":{"type":"string","title":"Description","description":"Parameter description","default":""},"type":{"type":"string","title":"Type","description":"Schema type: string, number, integer, boolean","default":"string"},"required":{"type":"boolean","title":"Required","description":"Whether the parameter is required","default":false},"resource_lookup":{"anyOf":[{"$ref":"#/components/schemas/AIAgentToolParameterResourceLookup"},{"type":"null"}],"description":"Optional workspace resource lookup metadata for dynamic input rendering."}},"type":"object","required":["key","label"],"title":"AIAgentToolParameter","description":"One input parameter for a tool (e.g. email-send has email_to, subject, body, integration_connection_id)."},"AIAgentToolParameterResourceLookup":{"properties":{"tool":{"type":"string","title":"Tool","description":"Workspace lookup tool identifier (e.g. list_integration_connections)."},"static_params":{"additionalProperties":true,"type":"object","title":"Static Params","description":"Static lookup params always applied by the client."},"depends_on":{"additionalProperties":{"type":"string"},"type":"object","title":"Depends On","description":"Lookup params resolved from sibling config fields."}},"type":"object","required":["tool"],"title":"AIAgentToolParameterResourceLookup","description":"Resource lookup metadata for rendering dynamic tool input fields."},"AIAgentToolResponse":{"properties":{"identifier":{"type":"string","title":"Identifier","description":"Unique tool identifier"},"label":{"type":"string","title":"Label","description":"Human-readable tool name"},"description":{"type":"string","title":"Description","description":"What the tool does"},"parameters":{"anyOf":[{"items":{"$ref":"#/components/schemas/AIAgentToolParameter"},"type":"array"},{"type":"null"}],"title":"Parameters","description":"Input parameters for this tool (e.g. email_to, subject, body for email-send). Only set for text agent integration tools."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Canonical shared tool category."},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group","description":"Presentation grouping for the agent tool picker (e.g. 'offer_management', 'carrier_compliance', 'email'). The UI groups selectable tools by this value."},"registries":{"items":{"type":"string"},"type":"array","title":"Registries","description":"Shared registry scopes this tool belongs to."},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases","description":"Capability aliases that include this concrete tool."},"expands_to":{"items":{"type":"string"},"type":"array","title":"Expands To","description":"Concrete tool identifiers unlocked by an alias/capability."}},"type":"object","required":["identifier","label","description"],"title":"AIAgentToolResponse","description":"Response schema for a single available tool."},"AIAgentTypeResponse":{"properties":{"identifier":{"type":"string","title":"Identifier","description":"Unique agent type identifier"},"label":{"type":"string","title":"Label","description":"Human-readable agent type name"},"description":{"type":"string","title":"Description","description":"What this agent type is used for"}},"type":"object","required":["identifier","label","description"],"title":"AIAgentTypeResponse","description":"Response schema for a single available agent type."},"AIAgentUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Agent name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Agent description"},"agent_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Type","description":"Agent type identifier"},"type_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Config","description":"Type-specific configuration. Required fields are defined by the agent type registry."},"workspace_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Phone Number Id","description":"Assigned workspace phone number ID (phone agents only)."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"LLM model identifier"},"system_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt Template","description":"System prompt template"},"user_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Template","description":"User prompt template"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"LLM temperature (0-2)"},"max_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Tokens","description":"Maximum output tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Reasoning effort level for reasoning models (dynamic, depends on model)"},"tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools","description":"List of tool identifiers the agent can use"},"tool_inputs":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Tool Inputs","description":"Agent-side default inputs per tool identifier (tool_identifier -> {param_key -> value}). Soft defaults that travel with the agent; runtime precedence is agent < node < LLM args."},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Whether the agent is active"}},"type":"object","title":"AIAgentUpdateRequest","description":"Request schema for updating an AI agent. All fields optional for partial updates."},"AIFilterItem":{"properties":{"field":{"type":"string","title":"Field","description":"Filter field name (must match filter schema)"},"operator":{"type":"string","title":"Operator","description":"Filter operator"},"values":{"items":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"}]},"type":"array","title":"Values","description":"Filter values (single-item list for EQUALS/GREATER_THAN, multiple for IN/NOT_IN)"}},"type":"object","required":["field","operator","values"],"title":"AIFilterItem","description":"Single filter extracted from natural language query."},"AIHelperResponse":{"properties":{"type":{"type":"string","enum":["prompt_generator","prompt_rewriter","transcript_feedback_generator","code_rewriter"],"title":"Type","description":"Echoes the request type."},"result":{"type":"string","title":"Result","description":"The generated text content."},"chat_response":{"type":"string","title":"Chat Response","description":"Conversational reply from the agent (code_rewriter only).","default":""},"code_changed":{"type":"boolean","title":"Code Changed","description":"True iff the agent emitted a new ```python``` block (code_rewriter only).","default":false}},"type":"object","required":["type","result"],"title":"AIHelperResponse","description":"Generic response returned by all AI helper variants."},"AIParseCapacityRequest":{"properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"Natural language description of the lane or availability"},"image_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Base64","description":"Base64-encoded image (screenshot), max ~5 MB"},"capacity_type":{"type":"string","enum":["lane","availability"],"title":"Capacity Type","description":"Type of capacity data to extract: 'lane' or 'availability'"},"current_carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Carrier Name","description":"Name of the carrier whose page is currently open. Helps the AI distinguish carrier names from place names in ambiguous input."},"available_carriers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Available Carriers","description":"List of carrier names available in the system. The AI uses this to match fuzzy carrier references to exact names."},"existing_lane_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/ExistingLaneItem"},"type":"array"},{"type":"null"}],"title":"Existing Lane Items","description":"Current lane rows in the form, sent as context so the AI can modify/add/remove them."},"existing_availability_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/ExistingAvailabilityItem"},"type":"array"},{"type":"null"}],"title":"Existing Availability Items","description":"Current availability rows in the form, sent as context so the AI can modify/add/remove them."}},"type":"object","required":["capacity_type"],"title":"AIParseCapacityRequest","description":"Request to parse natural language or image input into capacity form data.","example":{"capacity_type":"lane","text":"Dry van from Dallas TX to Chicago IL, preferred carrier, $2500 line haul"}},"AIParseFiltersResponse":{"properties":{"filters":{"items":{"$ref":"#/components/schemas/AIFilterItem"},"type":"array","title":"Filters","description":"Extracted filters"},"skipped_filters":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Skipped Filters","description":"Filters that couldn't be applied (e.g., ambiguous customer name)"}},"type":"object","title":"AIParseFiltersResponse","description":"Response containing parsed filters from natural language query."},"AcceptPublicOfferRequest":{"properties":{"dot_number":{"type":"string","title":"Dot Number"},"carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Name"},"carrier_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Email"},"carrier_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Phone"},"carrier_rate_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Carrier Rate Amount"}},"type":"object","required":["dot_number"],"title":"AcceptPublicOfferRequest"},"AcceptPublicOfferResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"booking_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["success","message","status"],"title":"AcceptPublicOfferResponse"},"AcknowledgeLateLoadResponse":{"properties":{"id":{"type":"string","title":"Id"},"acknowledged_at":{"type":"string","format":"date-time","title":"Acknowledged At"},"acknowledged_by":{"type":"string","title":"Acknowledged By"}},"type":"object","required":["id","acknowledged_at","acknowledged_by"],"title":"AcknowledgeLateLoadResponse","description":"Result of acknowledging a late-load episode."},"AddFavoriteCarrierRequest":{"properties":{"carrier_external_reference_id":{"type":"string","title":"Carrier External Reference Id","description":"Carrier external reference ID from TMS"}},"type":"object","required":["carrier_external_reference_id"],"title":"AddFavoriteCarrierRequest"},"AddSharedMailboxRequest":{"properties":{"email_address":{"type":"string","title":"Email Address"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["email_address"],"title":"AddSharedMailboxRequest"},"AddSharedMailboxResponse":{"properties":{"inbox":{"anyOf":[{"$ref":"#/components/schemas/InboxSchema"},{"type":"null"}]},"accessible":{"type":"boolean","title":"Accessible"},"message":{"type":"string","title":"Message"}},"type":"object","required":["accessible","message"],"title":"AddSharedMailboxResponse"},"AddressCreate":{"properties":{"address_line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line1","description":"Street address line 1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2","description":"Street address line 2"},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"City","description":"City"},"state":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"State","description":"State/Province"},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Postal Code","description":"Postal/ZIP code"},"country":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Country","description":"Country"}},"type":"object","title":"AddressCreate","description":"Schema for an address."},"AddressResponse":{"properties":{"address_line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line1","description":"Street address line 1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2","description":"Street address line 2"},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"City","description":"City"},"state":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"State","description":"State/Province"},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Postal Code","description":"Postal/ZIP code"},"country":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Country","description":"Country"}},"type":"object","title":"AddressResponse","description":"Response schema for an address."},"AddressSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Address UUID"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Address name/label"},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street","description":"Street address (alias for address_line1)"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1","description":"Street address line 1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2","description":"Street address line 2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"State/province"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code","description":"Postal/ZIP code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country"},"full_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Text","description":"Full formatted address"}},"additionalProperties":true,"type":"object","title":"AddressSchema","description":"Reusable address schema for OpenAPI.\n\nUsed by customers, carriers, contacts, and locations."},"AdminBillingOverviewResponse":{"properties":{"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"total_calls":{"type":"integer","title":"Total Calls","default":0},"total_duration_seconds":{"type":"integer","title":"Total Duration Seconds","default":0},"total_elevenlabs_credits":{"type":"integer","title":"Total Elevenlabs Credits","default":0},"total_elevenlabs_cost_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Elevenlabs Cost Usd","default":"0"},"total_twilio_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Twilio Cost Usd"},"total_estimated_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Estimated Cost Usd"},"total_phone_number_fees_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Phone Number Fees Usd","default":"0"}},"type":"object","required":["period_start","period_end"],"title":"AdminBillingOverviewResponse"},"AdminUserInput":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["email","first_name","last_name"],"title":"AdminUserInput","description":"Admin user details for organization creation."},"AgentAutomationToolBindingResponse":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"automation_tool_id":{"type":"string","title":"Automation Tool Id"},"automation_tool":{"$ref":"#/components/schemas/AutomationToolResponse"},"configuration_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration Overrides"},"allowed_tool_names":{"items":{"type":"string"},"type":"array","title":"Allowed Tool Names"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","agent_id","automation_tool_id","automation_tool","created_at","updated_at"],"title":"AgentAutomationToolBindingResponse","description":"Response for an agent's bound automation tool."},"AgentBillingSummary":{"properties":{"ai_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Agent Id"},"ai_agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Agent Name"},"total_calls":{"type":"integer","title":"Total Calls","default":0},"total_duration_seconds":{"type":"integer","title":"Total Duration Seconds","default":0},"total_estimated_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Estimated Cost Usd"}},"type":"object","title":"AgentBillingSummary"},"AgentCatalogEntryCreateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Template name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Template description"},"agent_type":{"type":"string","title":"Agent Type","description":"Agent type identifier","default":"text"},"model":{"type":"string","title":"Model","description":"LLM model identifier"},"system_prompt_template":{"type":"string","title":"System Prompt Template","description":"System prompt template"},"user_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Template","description":"User prompt template"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"LLM temperature"},"max_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Tokens","description":"Maximum output tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Reasoning effort level"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","description":"Tool identifiers"},"type_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Config","description":"Type-specific configuration"},"is_published":{"type":"boolean","title":"Is Published","description":"Whether the entry is visible to non-admin users","default":true},"is_system_agent":{"type":"boolean","title":"Is System Agent","description":"System agents are installed into workspaces and appear in the Chat agent picker","default":false}},"type":"object","required":["name","model","system_prompt_template"],"title":"AgentCatalogEntryCreateRequest","description":"Request schema for creating a catalog entry directly (admin)."},"AgentCatalogEntryListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentCatalogEntryResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"AgentCatalogEntryListResponse","description":"Paginated response for listing catalog entries."},"AgentCatalogEntryResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"agent_type":{"type":"string","title":"Agent Type"},"model":{"type":"string","title":"Model"},"system_prompt_template":{"type":"string","title":"System Prompt Template"},"user_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Template"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"},"type_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Config"},"is_published":{"type":"boolean","title":"Is Published"},"is_system_agent":{"type":"boolean","title":"Is System Agent","description":"True when the entry is a system agent installed into workspaces for Chat.","default":false},"created_by_user_id":{"type":"string","title":"Created By User Id"},"source_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Agent Id"},"source_organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Organization Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"has_draft":{"type":"boolean","title":"Has Draft","description":"True when the entry has unpublished draft changes.","default":false},"draft":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Draft","description":"Staged draft changes parsed from the draft row's YAML."}},"type":"object","required":["id","name","description","agent_type","model","system_prompt_template","user_prompt_template","temperature","max_tokens","reasoning_effort","tools","type_config","is_published","created_by_user_id","source_agent_id","source_organization_id","created_at","updated_at"],"title":"AgentCatalogEntryResponse","description":"Response schema for a single catalog entry.\n\nMirrors AIAgentResponse for draft handling: has_draft + draft expose any\nunpublished changes so the same lifecycle adapter can drive both flows."},"AgentCatalogEntryUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name","description":"Template name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Template description"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"LLM model identifier"},"system_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt Template","description":"System prompt template"},"user_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Template","description":"User prompt template"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"LLM temperature"},"max_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Tokens","description":"Maximum output tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Reasoning effort level"},"tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Tool identifiers"},"type_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Config","description":"Type-specific configuration"},"is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Published","description":"Whether the entry is visible to non-admin users"},"is_system_agent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is System Agent","description":"System agents are installed into workspaces and appear in the Chat agent picker"}},"type":"object","title":"AgentCatalogEntryUpdateRequest","description":"Request schema for updating a catalog entry.\n\nAll fields are optional via exclude_unset — omit a field to leave it\nunchanged, send a value (including explicit null for nullable fields) to\nupdate it. Non-null DB fields reject explicit null in the service layer."},"AgentCatalogInstallRequest":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id","description":"Install into every workspace of this organization"},"workspace_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1},{"type":"null"}],"title":"Workspace Ids","description":"Install into these workspaces"}},"type":"object","title":"AgentCatalogInstallRequest","description":"Where to install a catalog entry: every workspace of one organization, or a list of workspaces."},"AgentCatalogInstallResponse":{"properties":{"entry_id":{"type":"string","title":"Entry Id"},"results":{"items":{"$ref":"#/components/schemas/AgentCatalogInstallResultOut"},"type":"array","title":"Results"}},"type":"object","required":["entry_id","results"],"title":"AgentCatalogInstallResponse","description":"Per-workspace results of installing a catalog entry."},"AgentCatalogInstallResultOut":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The workspace's agent installed from this entry"},"status":{"type":"string","enum":["created","already_installed","skipped","failed"],"title":"Status","description":"created; already_installed (the workspace already had a copy); skipped (its organization does not have AGENT_CHAT); failed (see error)"},"created":{"type":"boolean","title":"Created","description":"False when the workspace already had the agent, or on error"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Why the agent could not be created in this workspace"}},"type":"object","required":["workspace_id","status","created"],"title":"AgentCatalogInstallResultOut","description":"What happened in one workspace."},"AgentChatMessageCreate":{"properties":{"text":{"type":"string","maxLength":8000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"AgentChatMessageCreate"},"AgentChatMessageListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentChatMessageOut"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More","description":"True when more rows follow; fetch again with after_seq = the last seq"}},"type":"object","required":["items","has_more"],"title":"AgentChatMessageListOut","description":"Messages after a cursor, oldest first."},"AgentChatMessageOut":{"properties":{"id":{"type":"string","title":"Id"},"chat_id":{"type":"string","title":"Chat Id"},"kind":{"$ref":"#/components/schemas/ChatMessageKind"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"text":{"type":"string","title":"Text"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload","description":"Kind-specific fields (see libs.chat.contracts)"},"turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turn Id","description":"Id of the user message that started this row's turn"},"seq":{"type":"integer","title":"Seq","description":"Cursor for listing; rows are ordered by it"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["id","chat_id","kind","text","seq","created_at"],"title":"AgentChatMessageOut","description":"One row of a chat: a user message, an agent step, an approval request or a decision."},"AgentEditorChatRequest":{"properties":{"message":{"type":"string","maxLength":10000,"minLength":1,"title":"Message"},"target_kind":{"type":"string","enum":["agent","catalog"],"title":"Target Kind","description":"Whether editing an agent or a catalog template","default":"agent"},"draft_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Id","description":"Draft agent ID to continue editing. If None, a new draft is created."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Existing agent ID to create an edit-draft from."},"catalog_entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog Entry Id","description":"Catalog entry ID when target_kind is 'catalog'."},"agent_type":{"type":"string","enum":["text","phone"],"title":"Agent Type","description":"Agent type: 'text' or 'phone'","default":"text"},"yaml_content":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}],"title":"Yaml Content","description":"Current agent.yaml from the frontend. When provided, the editor draft is updated with this content before the AI runs."},"conversation":{"items":{"$ref":"#/components/schemas/ConversationMessage"},"type":"array","maxItems":100,"title":"Conversation","description":"Previous messages in this session (from frontend state). Backend uses this instead of server-persisted history."}},"type":"object","required":["message"],"title":"AgentEditorChatRequest","description":"Request body for the agent editor chat endpoint."},"AgentMcpBindingInput":{"properties":{"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"allowed_tool_names":{"items":{"type":"string"},"type":"array","title":"Allowed Tool Names"}},"type":"object","required":["integration_connection_id"],"title":"AgentMcpBindingInput","description":"One MCP server the agent may use, and which of its tools; empty allows all."},"AgentMcpBindingResponse":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"allowed_tool_names":{"items":{"type":"string"},"type":"array","title":"Allowed Tool Names"},"server_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Name"},"server_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","agent_id","integration_connection_id","allowed_tool_names","created_at","updated_at"],"title":"AgentMcpBindingResponse","description":"An agent's binding to an external MCP server."},"AgentOverride":{"properties":{"first_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message","description":"Override first message the agent says"},"prompt":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Prompt","description":"Override agent prompt configuration"}},"type":"object","title":"AgentOverride","description":"Override for agent configuration"},"AgentProvingChangeRequest":{"properties":{"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":200,"title":"Scenario Ids","description":"Tests to turn on, or off, for the agent"}},"type":"object","title":"AgentProvingChangeRequest"},"AgentProvingScenarioListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProvingScenarioResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"AgentProvingScenarioListResponse"},"AgentProvingScenarioSet":{"properties":{"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":200,"title":"Scenario Ids","description":"Scenario IDs to link to this agent"}},"type":"object","required":["scenario_ids"],"title":"AgentProvingScenarioSet"},"AgentProvingScenariosGroupsRequest":{"properties":{"group_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":200,"title":"Group Ids","description":"Replaces the agent's assigned groups with exactly these"}},"type":"object","title":"AgentProvingScenariosGroupsRequest"},"AgentRevisionAutomationToolBinding":{"properties":{"automation_tool_id":{"type":"string","title":"Automation Tool Id"},"allowed_tool_names":{"items":{"type":"string"},"type":"array","title":"Allowed Tool Names"},"configuration_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration Overrides"}},"type":"object","required":["automation_tool_id"],"title":"AgentRevisionAutomationToolBinding"},"AgentRevisionConfig":{"properties":{"agent_type":{"type":"string","title":"Agent Type"},"model":{"type":"string","title":"Model"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort"},"system_prompt_template":{"type":"string","title":"System Prompt Template"},"user_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Template"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"},"tool_inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Inputs"},"type_config":{"additionalProperties":true,"type":"object","title":"Type Config"},"automation_tool_bindings":{"items":{"$ref":"#/components/schemas/AgentRevisionAutomationToolBinding"},"type":"array","title":"Automation Tool Bindings"},"mcp_bindings":{"items":{"$ref":"#/components/schemas/AgentRevisionMcpBinding"},"type":"array","title":"Mcp Bindings"}},"type":"object","required":["agent_type","model","system_prompt_template"],"title":"AgentRevisionConfig","description":"Every field that changes how the agent behaves; name, activation and phone number are not behavior."},"AgentRevisionCreateRequest":{"properties":{"evaluate":{"type":"boolean","title":"Evaluate","description":"Run the agent's tests on it; without them it can only be published with an override reason","default":true}},"type":"object","title":"AgentRevisionCreateRequest"},"AgentRevisionGateRefusal":{"properties":{"message":{"type":"string","title":"Message"},"failed_safety_checks":{"items":{"type":"string"},"type":"array","title":"Failed Safety Checks"}},"type":"object","required":["message","failed_safety_checks"],"title":"AgentRevisionGateRefusal"},"AgentRevisionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentRevisionResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AgentRevisionListResponse"},"AgentRevisionMcpBinding":{"properties":{"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"allowed_tool_names":{"items":{"type":"string"},"type":"array","title":"Allowed Tool Names"}},"type":"object","required":["integration_connection_id"],"title":"AgentRevisionMcpBinding"},"AgentRevisionPublishRequest":{"properties":{"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message","description":"What this version changes, in a sentence or two, like a commit message; kept on the revision when it is first published"},"override_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Reason","description":"Why to publish although a Mentium safety check failed, has not finished or never ran; kept on the revision"}},"type":"object","title":"AgentRevisionPublishRequest"},"AgentRevisionResponse":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"revision_number":{"type":"integer","title":"Revision Number"},"status":{"$ref":"#/components/schemas/AgentRevisionStatus"},"is_live":{"type":"boolean","title":"Is Live","description":"The agent runs this revision now","default":false},"config":{"$ref":"#/components/schemas/AgentRevisionConfig"},"config_digest":{"type":"string","title":"Config Digest"},"platform_contract_digest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform Contract Digest"},"suite_digest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suite Digest"},"gate_passed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Gate Passed","description":"Every applicable Mentium safety check passed; null until evaluated, and for revisions never tested"},"gate_override_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gate Override Reason"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"What the version changes, written when it was first published"},"gate_overridden_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gate Overridden By Email"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"published_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By Email"},"based_on_revision_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Based On Revision Number","description":"The version that was live when this one was frozen: the version it was changed from"},"created_by_impersonator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Impersonator Email","description":"The admin acting as the user who created it"},"published_by_impersonator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By Impersonator Email","description":"The admin acting as the user who published it"},"gate_overridden_by_impersonator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gate Overridden By Impersonator Email","description":"The admin acting as the user who overrode the gate"},"tests":{"$ref":"#/components/schemas/AgentRevisionTestSummary"},"failed_safety_checks":{"items":{"type":"string"},"type":"array","title":"Failed Safety Checks","description":"Attached safety checks that did not pass"},"run_ids":{"items":{"type":"string"},"type":"array","title":"Run Ids"},"attached_since_tested":{"items":{"type":"string"},"type":"array","title":"Attached Since Tested","description":"Tests the agent runs now that this revision was not tested on"},"replaces_live_revision_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Replaces Live Revision Number","description":"The live version that making this one live replaces, when this one was made from an earlier version"},"phone_call_count":{"type":"integer","title":"Phone Call Count","description":"Phone calls this revision answered","default":0},"session_count":{"type":"integer","title":"Session Count","description":"Chat, email and workflow sessions this revision ran","default":0},"evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Evaluated At"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"mentium_created_at":{"type":"string","format":"date-time","title":"Mentium Created At"}},"type":"object","required":["id","agent_id","revision_number","status","config","config_digest","mentium_created_at"],"title":"AgentRevisionResponse"},"AgentRevisionStatus":{"type":"string","enum":["candidate","evaluated","published"],"title":"AgentRevisionStatus"},"AgentRevisionTestSummary":{"properties":{"total":{"type":"integer","title":"Total","default":0},"passed":{"type":"integer","title":"Passed","default":0},"failed":{"type":"integer","title":"Failed","default":0},"could_not_run":{"type":"integer","title":"Could Not Run","default":0},"running":{"type":"integer","title":"Running","default":0}},"type":"object","title":"AgentRevisionTestSummary"},"AnalysisRunListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AnalysisRunResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"AnalysisRunListResponse"},"AnalysisRunResponse":{"properties":{"id":{"type":"string","title":"Id"},"a_type":{"type":"string","title":"A Type"},"a_id":{"type":"string","title":"A Id"},"analyzer_id":{"type":"string","title":"Analyzer Id"},"status":{"$ref":"#/components/schemas/AnalysisStatus"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"batch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Id"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"},"attempt_count":{"type":"integer","title":"Attempt Count","default":0},"mentium_created_at":{"type":"string","format":"date-time","title":"Mentium Created At"},"mentium_updated_at":{"type":"string","format":"date-time","title":"Mentium Updated At"},"mentium_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mentium Completed At"}},"type":"object","required":["id","a_type","a_id","analyzer_id","status","mentium_created_at","mentium_updated_at"],"title":"AnalysisRunResponse","description":"One ``analysis_run`` row exposed to the UI."},"AnalysisStatus":{"type":"string","enum":["PENDING","SUBMITTED","SUCCEEDED","FAILED"],"title":"AnalysisStatus"},"ApiKeyCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Human-readable name for the API key"},"integration_connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Integration Connection Id","description":"TMS data box the key reads/writes. Required for keys with TMS-data scopes; any TMS connection in the workspace (or org-level) is eligible — TAI, Sunnybrook, Sandbox, etc. Omit for keys that touch no TMS data (e.g. webhook keys)."},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"Permission scopes (defaults to all TMS API scopes if not specified)"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Optional description"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Optional expiration datetime"},"rate_limit_per_minute":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Rate Limit Per Minute","description":"Rate limit per minute","default":100},"rate_limit_per_day":{"type":"integer","maximum":1000000.0,"minimum":1.0,"title":"Rate Limit Per Day","description":"Rate limit per day","default":10000}},"type":"object","required":["name"],"title":"ApiKeyCreateRequest","description":"Request schema for creating an API key."},"ApiKeyCreateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"status":{"$ref":"#/components/schemas/ApiKeyStatus"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rate_limit_per_minute":{"type":"integer","title":"Rate Limit Per Minute"},"rate_limit_per_day":{"type":"integer","title":"Rate Limit Per Day"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"usage_count":{"type":"integer","title":"Usage Count"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"integration_connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Integration Connection Id"},"created_by_user_id":{"type":"string","format":"uuid","title":"Created By User Id"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"integration_connection_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Connection Name"},"key":{"type":"string","title":"Key","description":"The full API key (only shown once)"}},"type":"object","required":["id","name","key_prefix","status","scopes","description","rate_limit_per_minute","rate_limit_per_day","last_used_at","usage_count","expires_at","revoked_at","created_at","updated_at","integration_connection_id","created_by_user_id","key"],"title":"ApiKeyCreateResponse","description":"Response schema for a newly created API key (includes the actual key value)."},"ApiKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"status":{"$ref":"#/components/schemas/ApiKeyStatus"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rate_limit_per_minute":{"type":"integer","title":"Rate Limit Per Minute"},"rate_limit_per_day":{"type":"integer","title":"Rate Limit Per Day"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"usage_count":{"type":"integer","title":"Usage Count"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"integration_connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Integration Connection Id"},"created_by_user_id":{"type":"string","format":"uuid","title":"Created By User Id"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"integration_connection_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Connection Name"}},"type":"object","required":["id","name","key_prefix","status","scopes","description","rate_limit_per_minute","rate_limit_per_day","last_used_at","usage_count","expires_at","revoked_at","created_at","updated_at","integration_connection_id","created_by_user_id"],"title":"ApiKeyResponse","description":"Response schema for an API key (without the actual key value)."},"ApiKeyStatus":{"type":"string","enum":["ACTIVE","REVOKED","EXPIRED"],"title":"ApiKeyStatus"},"ApiKeyUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"rate_limit_per_minute":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Rate Limit Per Minute"},"rate_limit_per_day":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":1.0},{"type":"null"}],"title":"Rate Limit Per Day"}},"type":"object","title":"ApiKeyUpdateRequest","description":"Request schema for updating an API key."},"AppAccessStatus":{"type":"string","enum":["APPROVED","PENDING","REJECTED"],"title":"AppAccessStatus"},"AppType":{"type":"string","enum":["AP","AP_NEW","CARRIER","OUTREACH"],"title":"AppType"},"ApplyTemplateRequest":{"properties":{"variable_values":{"additionalProperties":true,"type":"object","title":"Variable Values"}},"type":"object","required":["variable_values"],"title":"ApplyTemplateRequest","description":"Request to apply a template with variable values."},"ApplyTemplateResponse":{"properties":{"config":{"$ref":"#/components/schemas/VortexEventTriggerConfig","description":"Resolved trigger configuration with metadata included"}},"type":"object","required":["config"],"title":"ApplyTemplateResponse","description":"Response after applying a template.\n\nThe config contains all metadata needed for workflow creation inside\nconfig.metadata (trigger_name, trigger_description, trigger_icon, etc.)."},"AreaByPostalCodes":{"properties":{"kind":{"type":"string","const":"area_by_postal_codes","title":"Kind","default":"area_by_postal_codes"},"postal_codes":{"items":{"type":"string"},"type":"array","title":"Postal Codes"},"country":{"type":"string","title":"Country","default":"US"}},"type":"object","required":["postal_codes"],"title":"AreaByPostalCodes","description":"Area by a list of full postal/ZIP codes + country."},"AreaByPostalPrefixes":{"properties":{"kind":{"type":"string","const":"area_by_postal_prefixes","title":"Kind","default":"area_by_postal_prefixes"},"postal_code_prefixes":{"items":{"type":"string"},"type":"array","title":"Postal Code Prefixes"},"country":{"type":"string","title":"Country","default":"US"}},"type":"object","required":["postal_code_prefixes"],"title":"AreaByPostalPrefixes","description":"Area by a list of postal-code prefixes + country."},"AreaByStates":{"properties":{"kind":{"type":"string","const":"area_by_states","title":"Kind","default":"area_by_states"},"states":{"items":{"type":"string"},"type":"array","title":"States"},"country":{"type":"string","title":"Country","default":"US"}},"type":"object","required":["states"],"title":"AreaByStates","description":"Area by a list of states + country."},"AssignPhoneToCampaignRequest":{"properties":{"phone_number_id":{"type":"string","title":"Phone Number Id"}},"type":"object","required":["phone_number_id"],"title":"AssignPhoneToCampaignRequest","description":"Request to assign a phone number to an A2P campaign."},"AssignPhoneToCampaignResponse":{"properties":{"id":{"type":"string","title":"Id"},"campaign_id":{"type":"string","title":"Campaign Id"},"phone_number_id":{"type":"string","title":"Phone Number Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","campaign_id","phone_number_id","created_at"],"title":"AssignPhoneToCampaignResponse","description":"Response for phone assignment."},"AssignUserToOrganizationRequest":{"properties":{"organization_id":{"type":"string","title":"Organization Id"}},"type":"object","required":["organization_id"],"title":"AssignUserToOrganizationRequest"},"AtRiskLoadListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LoadSchema"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"AtRiskLoadListResponse","description":"At Risk loadboard page response — loads + total (for metric-card counts)."},"AuthenticatedUserSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationSchema"},{"type":"null"}]},"workspaces":{"items":{"$ref":"#/components/schemas/WorkspaceSchema"},"type":"array","title":"Workspaces","default":[]},"role":{"$ref":"#/components/schemas/UserRole"},"products":{"items":{"$ref":"#/components/schemas/ProductSchema"},"type":"array","title":"Products","default":[]},"app_access":{"items":{"$ref":"#/components/schemas/UserAppAccessSchema"},"type":"array","title":"App Access","default":[]}},"type":"object","required":["id","email","first_name","last_name","organization_id","role"],"title":"AuthenticatedUserSchema"},"AuthorizationRequest":{"properties":{"provider":{"$ref":"#/components/schemas/OAuthProviderEnum"},"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"}},"type":"object","required":["provider"],"title":"AuthorizationRequest"},"AuthorizationResponse":{"properties":{"integration":{"anyOf":[{"$ref":"#/components/schemas/IntegrationConnectionResponse"},{"type":"null"}]},"is_authorized":{"type":"boolean","title":"Is Authorized"},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"},"credentials_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Credentials Verified","description":"True when the credentials were exercised against the provider and accepted. False when the integration declares itself untestable, so the connection was saved without a check and may fail when first used. Null for OAuth flows, which authorize by redirect."},"credentials_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credentials Message","description":"User-facing result of the credential check."}},"type":"object","required":["integration","is_authorized","redirect_url"],"title":"AuthorizationResponse"},"AuthorizationState":{"properties":{"type":{"$ref":"#/components/schemas/AuthorizationType"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"},"state_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Token"},"nonce":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nonce"}},"type":"object","required":["type"],"title":"AuthorizationState"},"AuthorizationType":{"type":"string","enum":["AUTH","INBOX_CONNECT"],"title":"AuthorizationType"},"AutomationTemplateResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier"},"name":{"type":"string","title":"Name","description":"Human-readable name"},"description":{"type":"string","title":"Description","description":"Description of what this automation does"},"icon":{"type":"string","title":"Icon","description":"Emoji or icon name"},"category":{"$ref":"#/components/schemas/TemplateCategory","description":"Category this template belongs to"},"variables":{"additionalProperties":{"$ref":"#/components/schemas/TemplateVariableResponse"},"type":"object","title":"Variables","description":"Variables with resolved options"},"config":{"$ref":"#/components/schemas/VortexEventTriggerConfig","description":"Template configuration"},"example_use_cases":{"items":{"type":"string"},"type":"array","title":"Example Use Cases"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"is_popular":{"type":"boolean","title":"Is Popular","default":false}},"type":"object","required":["id","name","description","icon","category","config"],"title":"AutomationTemplateResponse","description":"Response model for automation templates with resolved variable options."},"AutomationToolCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Human-readable display name"},"function_name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$"},{"type":"null"}],"title":"Function Name","description":"LLM function identifier. Auto-generated from name if omitted."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Human-readable description of what this tool does"},"http_method":{"$ref":"#/components/schemas/HttpMethod","description":"HTTP method (GET, POST, …)"},"http_url":{"type":"string","maxLength":2048,"title":"Http Url","description":"Target URL (may contain {{template}} vars)"},"auth_type":{"$ref":"#/components/schemas/HttpAuthType","description":"Authentication strategy","default":"NONE"},"auth_secret":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Auth Secret","description":"Auth credentials to store in Vault. For API_KEY: {header_name, api_key}. For BEARER_TOKEN: {token}. For BASIC_AUTH: {username, password}."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Static HTTP headers"},"query_params":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Query Params","description":"Static query parameters"},"body_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body Template","description":"JSON body template"},"timeout_seconds":{"type":"integer","maximum":300.0,"minimum":1.0,"title":"Timeout Seconds","description":"Request timeout in seconds","default":30},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema","description":"JSON Schema describing parameters the LLM can supply at call-time"}},"type":"object","required":["name","http_method","http_url"],"title":"AutomationToolCreateRequest","description":"Request schema for creating a shared HTTP automation tool."},"AutomationToolListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AutomationToolResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"AutomationToolListResponse","description":"Paginated response for listing automation tools."},"AutomationToolResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"function_name":{"type":"string","title":"Function Name","default":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tool_type":{"type":"string","title":"Tool Type","default":"HTTP_TOOL"},"http_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Http Method"},"http_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Http Url"},"auth_type":{"$ref":"#/components/schemas/HttpAuthType","default":"NONE"},"has_secret":{"type":"boolean","title":"Has Secret","description":"Whether vault-backed auth credentials are configured","default":false},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"query_params":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Query Params"},"body_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body Template"},"timeout_seconds":{"type":"integer","title":"Timeout Seconds","default":30},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","created_at","updated_at"],"title":"AutomationToolResponse","description":"Response schema for a single shared automation tool."},"AutomationToolTestRequest":{"properties":{"tool_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Id","description":"Existing tool UUID used to reuse Vault credentials when auth_secret is omitted"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"http_method":{"$ref":"#/components/schemas/HttpMethod","description":"HTTP method to test"},"http_url":{"type":"string","maxLength":2048,"title":"Http Url","description":"Target URL (may contain {{template}} vars)"},"auth_type":{"$ref":"#/components/schemas/HttpAuthType","description":"Authentication strategy","default":"NONE"},"auth_secret":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Auth Secret","description":"Auth credentials for test-only execution. For API_KEY: {header_name, api_key}. For BEARER_TOKEN: {token}. For BASIC_AUTH: {username, password}."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Static HTTP headers"},"query_params":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Query Params","description":"Static query parameters"},"body_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body Template","description":"JSON body template"},"timeout_seconds":{"type":"integer","maximum":300.0,"minimum":1.0,"title":"Timeout Seconds","description":"Request timeout in seconds","default":30},"test_arguments":{"additionalProperties":true,"type":"object","title":"Test Arguments","description":"Template variables used for rendering URL/headers/query/body during test"}},"type":"object","required":["http_method","http_url"],"title":"AutomationToolTestRequest","description":"Request schema for testing an HTTP tool configuration without saving it."},"AutomationToolTestResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"title":"Body"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success","message"],"title":"AutomationToolTestResponse","description":"Response schema for HTTP tool test execution."},"AutomationToolUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"function_name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$"},{"type":"null"}],"title":"Function Name","description":"LLM function identifier"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"http_method":{"anyOf":[{"$ref":"#/components/schemas/HttpMethod"},{"type":"null"}]},"http_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Http Url"},"auth_type":{"anyOf":[{"$ref":"#/components/schemas/HttpAuthType"},{"type":"null"}]},"auth_secret":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Auth Secret","description":"New auth credentials. Overwrites existing vault secret."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"query_params":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Query Params"},"body_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body Template"},"timeout_seconds":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":1.0},{"type":"null"}],"title":"Timeout Seconds"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"}},"type":"object","title":"AutomationToolUpdateRequest","description":"Request schema for updating a shared automation tool. All fields optional."},"AvailablePhoneNumber":{"properties":{"phone_number":{"type":"string","title":"Phone Number","description":"E.164 formatted phone number"},"friendly_name":{"type":"string","title":"Friendly Name","description":"Human-readable phone number"},"area_code":{"type":"string","title":"Area Code","description":"Area code (e.g., 312)"},"city":{"type":"string","title":"City","description":"City name"},"state":{"type":"string","title":"State","description":"State/region code"},"country_code":{"type":"string","title":"Country Code","description":"ISO country code","default":"US"},"capabilities":{"$ref":"#/components/schemas/AvailablePhoneNumberCapabilities"}},"type":"object","required":["phone_number","friendly_name","area_code","city","state"],"title":"AvailablePhoneNumber","description":"Available phone number from Twilio that can be purchased"},"AvailablePhoneNumberCapabilities":{"properties":{"voice":{"type":"boolean","title":"Voice","default":true},"sms":{"type":"boolean","title":"Sms","default":false},"mms":{"type":"boolean","title":"Mms","default":false}},"type":"object","title":"AvailablePhoneNumberCapabilities","description":"Capabilities of an available phone number"},"AvailableScopesResponse":{"properties":{"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"descriptions":{"additionalProperties":{"type":"string"},"type":"object","title":"Descriptions"}},"type":"object","required":["scopes","descriptions"],"title":"AvailableScopesResponse","description":"Response schema for available API key scopes."},"BatchCarrierItem":{"properties":{"operation":{"$ref":"#/components/schemas/BatchOperation","description":"Operation to perform"},"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID of the carrier"},"carrier":{"anyOf":[{"$ref":"#/components/schemas/CarrierCreate"},{"$ref":"#/components/schemas/CarrierUpdate"},{"type":"null"}],"title":"Carrier","description":"Carrier data (CarrierCreate for create/upsert, CarrierUpdate for update)"}},"type":"object","required":["operation","external_reference_id"],"title":"BatchCarrierItem","description":"A single item in a batch carrier operation.\n\n- For 'create' or 'upsert': use 'carrier' field with full CarrierCreate schema\n- For 'update': use 'carrier' field with partial CarrierUpdate schema\n- For 'delete': no data needed"},"BatchCarrierRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BatchCarrierItem"},"type":"array","maxItems":100,"minItems":1,"title":"Items","description":"Batch items (max 100)"}},"type":"object","required":["items"],"title":"BatchCarrierRequest","description":"Request schema for batch carrier operations."},"BatchCustomerItem":{"properties":{"operation":{"$ref":"#/components/schemas/BatchOperation","description":"Operation to perform"},"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID of the customer"},"customer":{"anyOf":[{"$ref":"#/components/schemas/CustomerCreate"},{"$ref":"#/components/schemas/CustomerUpdate"},{"type":"null"}],"title":"Customer","description":"Customer data (CustomerCreate for create/upsert, CustomerUpdate for update)"}},"type":"object","required":["operation","external_reference_id"],"title":"BatchCustomerItem","description":"A single item in a batch customer operation.\n\n- For 'create' or 'upsert': use 'customer' field with full CustomerCreate schema\n- For 'update': use 'customer' field with partial CustomerUpdate schema\n- For 'delete': no data needed"},"BatchCustomerRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BatchCustomerItem"},"type":"array","maxItems":100,"minItems":1,"title":"Items","description":"Batch items (max 100)"}},"type":"object","required":["items"],"title":"BatchCustomerRequest","description":"Request schema for batch customer operations."},"BatchFavoriteCarriersRequest":{"properties":{"add":{"items":{"type":"string"},"type":"array","title":"Add","description":"Carrier external reference IDs to add"},"remove":{"items":{"type":"string"},"type":"array","title":"Remove","description":"Carrier external reference IDs to remove"}},"type":"object","title":"BatchFavoriteCarriersRequest"},"BatchFavoriteCarriersResponse":{"properties":{"added":{"items":{"type":"string"},"type":"array","title":"Added"},"removed":{"items":{"type":"string"},"type":"array","title":"Removed"}},"type":"object","title":"BatchFavoriteCarriersResponse"},"BatchLoadItem":{"properties":{"operation":{"$ref":"#/components/schemas/BatchOperation","description":"Operation to perform"},"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID of the load"},"load":{"anyOf":[{"$ref":"#/components/schemas/LoadCreate"},{"$ref":"#/components/schemas/LoadUpdate"},{"type":"null"}],"title":"Load","description":"Load data (LoadCreate for create/upsert, LoadUpdate for update)"}},"type":"object","required":["operation","external_reference_id"],"title":"BatchLoadItem","description":"A single item in a batch load operation.\n\n- For 'create' or 'upsert': use 'load' field with full LoadCreate schema\n- For 'update': use 'load' field with partial LoadUpdate schema (only fields to update)\n- For 'delete': no data needed"},"BatchLoadRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BatchLoadItem"},"type":"array","maxItems":100,"minItems":1,"title":"Items","description":"Batch items (max 100)"}},"type":"object","required":["items"],"title":"BatchLoadRequest","description":"Request schema for batch load operations."},"BatchLocationItem":{"properties":{"operation":{"$ref":"#/components/schemas/BatchOperation","description":"Operation to perform"},"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID of the location"},"data":{"anyOf":[{"$ref":"#/components/schemas/LocationCreate"},{"$ref":"#/components/schemas/LocationUpdate"},{"type":"null"}],"title":"Data","description":"Location data"},"location":{"anyOf":[{"$ref":"#/components/schemas/LocationCreate"},{"type":"null"}],"description":"Location data (deprecated, use 'data' instead)"}},"type":"object","required":["operation","external_reference_id"],"title":"BatchLocationItem","description":"A single item in a batch location operation.\n\n- For 'create' or 'upsert': use 'data' field with full LocationCreate schema\n- For 'update': use 'data' field with partial LocationUpdate schema  \n- For 'delete': no data needed"},"BatchLocationRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BatchLocationItem"},"type":"array","maxItems":100,"minItems":1,"title":"Items","description":"Batch items (max 100)"}},"type":"object","required":["items"],"title":"BatchLocationRequest","description":"Request schema for batch location operations."},"BatchMarketRateItem":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"BatchMarketRateItem"},"BatchMarketRateRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BatchMarketRateItem"},"type":"array","maxItems":100,"minItems":1,"title":"Items","description":"Market rate snapshots to create or upsert"}},"type":"object","required":["items"],"title":"BatchMarketRateRequest"},"BatchOperation":{"type":"string","enum":["create","update","upsert","delete"],"title":"BatchOperation","description":"Batch operation types."},"BatchResponse":{"properties":{"success_count":{"type":"integer","title":"Success Count","description":"Number of successful operations"},"error_count":{"type":"integer","title":"Error Count","description":"Number of failed operations"},"results":{"items":{"$ref":"#/components/schemas/BatchResultItem"},"type":"array","title":"Results","description":"Results for each item"}},"type":"object","required":["success_count","error_count","results"],"title":"BatchResponse","description":"Response for batch operations."},"BatchResultItem":{"properties":{"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID of the item"},"operation":{"$ref":"#/components/schemas/BatchOperation","description":"Operation performed"},"success":{"type":"boolean","title":"Success","description":"Whether the operation succeeded"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"ID of created/updated entity"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if failed"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Error code (e.g., DUPLICATE, NOT_FOUND)"}},"type":"object","required":["external_reference_id","operation","success"],"title":"BatchResultItem","description":"Result for a single item in a batch operation."},"BillingOverviewResponse":{"properties":{"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"total_calls":{"type":"integer","title":"Total Calls","default":0},"total_duration_seconds":{"type":"integer","title":"Total Duration Seconds","default":0},"total_duration_minutes":{"type":"number","title":"Total Duration Minutes","default":0.0},"total_estimated_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Estimated Cost Usd"},"inbound_calls":{"type":"integer","title":"Inbound Calls","default":0},"outbound_calls":{"type":"integer","title":"Outbound Calls","default":0},"inbound_duration_seconds":{"type":"integer","title":"Inbound Duration Seconds","default":0},"outbound_duration_seconds":{"type":"integer","title":"Outbound Duration Seconds","default":0},"inbound_estimated_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Inbound Estimated Cost Usd"},"outbound_estimated_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Outbound Estimated Cost Usd"},"phone_number_count":{"type":"integer","title":"Phone Number Count","default":0},"per_phone_number_monthly_rate":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Per Phone Number Monthly Rate","default":"0"},"total_phone_number_fees_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Phone Number Fees Usd","default":"0"},"total_due_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Due Usd","default":"0"},"by_agent":{"items":{"$ref":"#/components/schemas/AgentBillingSummary"},"type":"array","title":"By Agent","default":[]}},"type":"object","required":["period_start","period_end"],"title":"BillingOverviewResponse"},"Body_ai_parse_filters_v2_tms_loads_ai_parse_filters_post":{"properties":{"query":{"type":"string","title":"Query","description":"Natural language search query"}},"type":"object","required":["query"],"title":"Body_ai_parse_filters_v2_tms_loads_ai_parse_filters_post"},"Body_amd_result_webhooks_twilio_voice_amd_post":{"properties":{"CallSid":{"type":"string","title":"Callsid"},"AnsweredBy":{"type":"string","title":"Answeredby"},"MachineDetectionDuration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machinedetectionduration"}},"type":"object","required":["CallSid","AnsweredBy"],"title":"Body_amd_result_webhooks_twilio_voice_amd_post"},"Body_transfer_briefing_webhooks_twilio_voice_transfer_briefing_post":{"properties":{"CallSid":{"type":"string","title":"Callsid"}},"type":"object","required":["CallSid"],"title":"Body_transfer_briefing_webhooks_twilio_voice_transfer_briefing_post"},"Body_transfer_result_webhooks_twilio_voice_transfer_result_post":{"properties":{"CallSid":{"type":"string","title":"Callsid"},"DialCallStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialcallstatus"},"DialCallSid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialcallsid"},"DialCallDuration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialcallduration"}},"type":"object","required":["CallSid"],"title":"Body_transfer_result_webhooks_twilio_voice_transfer_result_post"},"Body_upload_attachments_v2_conversations__conversation_id__attachments_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_upload_attachments_v2_conversations__conversation_id__attachments_post"},"Body_upload_email_signature_asset_v1_email_signatures_assets_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_email_signature_asset_v1_email_signatures_assets_post"},"Body_voice_incoming_webhooks_twilio_voice_incoming_post":{"properties":{"To":{"type":"string","title":"To"},"From":{"type":"string","title":"From"},"CallSid":{"type":"string","title":"Callsid"}},"type":"object","required":["To","From","CallSid"],"title":"Body_voice_incoming_webhooks_twilio_voice_incoming_post"},"Body_voice_recording_status_webhooks_twilio_voice_recording_status_post":{"properties":{"RecordingSid":{"type":"string","title":"Recordingsid"},"RecordingStatus":{"type":"string","title":"Recordingstatus"},"CallSid":{"type":"string","title":"Callsid"},"RecordingUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordingurl"},"RecordingDuration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordingduration"}},"type":"object","required":["RecordingSid","RecordingStatus","CallSid"],"title":"Body_voice_recording_status_webhooks_twilio_voice_recording_status_post"},"Body_voice_status_webhooks_twilio_voice_status_post":{"properties":{"CallSid":{"type":"string","title":"Callsid"},"CallStatus":{"type":"string","title":"Callstatus"}},"type":"object","required":["CallSid","CallStatus"],"title":"Body_voice_status_webhooks_twilio_voice_status_post"},"BookCarrierRequest":{"properties":{"accepted_carrier_rate_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Accepted Carrier Rate Amount","description":"Carrier rate to book. If omitted, books at the current carrier rate."}},"type":"object","title":"BookCarrierRequest","description":"Request body for booking a carrier"},"BookCarrierResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the booking was successful"},"offer_id":{"type":"string","title":"Offer Id","description":"The load offer ID"},"carrier_id":{"type":"string","title":"Carrier Id","description":"The carrier's external reference ID"},"carrier_offer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Offer Id","description":"The carrier offer ID"},"status":{"type":"string","title":"Status","description":"BOOKED when the carrier was written to the TMS, ACCEPTED when they are not in the TMS yet and the acceptance was kept for a person to finish."},"booked_at":{"type":"string","format":"date-time","title":"Booked At","description":"Timestamp when the booking was made"},"closed_offers_count":{"type":"integer","title":"Closed Offers Count","description":"Number of other carrier offers that were closed"},"tms_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tms Link","description":"Link to TMS web UI for manual actions (e.g., TAI carrier assignment). When present, indicates the TMS requires manual completion."}},"type":"object","required":["success","offer_id","carrier_id","status","booked_at","closed_offers_count"],"title":"BookCarrierResponse","description":"Response from booking a carrier"},"BookingAction":{"type":"string","enum":["BOOK_TODAY","WAIT_UNTIL_TOMORROW","CAN_WAIT"],"title":"BookingAction"},"BookingBoardItem":{"properties":{"load_id":{"type":"string","title":"Load Id"},"external_reference_id":{"type":"string","title":"External Reference Id"},"action":{"$ref":"#/components/schemas/BookingAction"},"book_by_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Book By At"},"priority_score":{"type":"number","title":"Priority Score"},"coverage_risk":{"type":"number","title":"Coverage Risk"},"money_at_stake":{"type":"number","title":"Money At Stake"},"expected_margin_today":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Expected Margin Today"},"expected_margin_best":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Expected Margin Best"},"consequence_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Consequence Amount"},"optimal_lead_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Optimal Lead Days"},"confidence":{"$ref":"#/components/schemas/BookingConfidence"},"cost_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Basis"},"cohort_grain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort Grain"},"comparable_load_count":{"type":"integer","title":"Comparable Load Count"},"currency":{"type":"string","title":"Currency"},"computed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Computed At"},"origin_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin City"},"origin_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin State"},"destination_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination City"},"destination_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination State"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type"},"pickup_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pickup Earliest At"},"pickup_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pickup Latest At"},"delivery_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivery Earliest At"},"delivery_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivery Latest At"},"pickup_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pickup Timezone"},"delivery_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Timezone"},"sales_rep":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Rep"},"customer_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Customer Rate"},"max_buy_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Buy Rate"},"miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Miles"},"activity_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activity Date"},"assigned_dispatcher_rep_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Dispatcher Rep Id"},"actual_dispatcher_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Dispatcher Id"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tms_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tms Status"},"mentium_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mentium Status"}},"type":"object","required":["load_id","external_reference_id","action","priority_score","coverage_risk","money_at_stake","confidence","comparable_load_count","currency"],"title":"BookingBoardItem"},"BookingBoardResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BookingBoardItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"},"book_today_count":{"type":"integer","title":"Book Today Count"},"wait_until_tomorrow_count":{"type":"integer","title":"Wait Until Tomorrow Count"},"can_wait_count":{"type":"integer","title":"Can Wait Count"},"applied_sort":{"type":"string","title":"Applied Sort","default":"Recommended booking urgency"}},"type":"object","required":["items","total","has_more","book_today_count","wait_until_tomorrow_count","can_wait_count"],"title":"BookingBoardResponse"},"BookingConfidence":{"type":"string","enum":["HIGH","MEDIUM","LOW","NONE"],"title":"BookingConfidence"},"BrandRegistrationRequest":{"properties":{"business_name":{"type":"string","title":"Business Name","description":"Legal business name as registered with EIN"},"business_type":{"type":"string","title":"Business Type","description":"Corporation, LLC, Partnership, Non-profit, Co-operative"},"business_industry":{"type":"string","title":"Business Industry","description":"E.g. TECHNOLOGY, AUTOMOTIVE, HEALTHCARE"},"business_registration_type":{"type":"string","title":"Business Registration Type","description":"EIN, DUNS, CBN, etc."},"business_registration_number":{"type":"string","title":"Business Registration Number","description":"The actual tax ID number"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"business_regions_of_operation":{"type":"string","title":"Business Regions Of Operation","description":"USA_AND_CANADA, AFRICA, ASIA, AUSTRALIA, EUROPE, LATIN_AMERICA","default":"USA_AND_CANADA"},"company_type":{"type":"string","title":"Company Type","description":"public or private","default":"private"},"address_street":{"type":"string","title":"Address Street"},"address_city":{"type":"string","title":"Address City"},"address_region":{"type":"string","title":"Address Region","description":"Two-letter state/province abbreviation"},"address_postal_code":{"type":"string","title":"Address Postal Code"},"address_country":{"type":"string","title":"Address Country","default":"US"},"rep_first_name":{"type":"string","title":"Rep First Name"},"rep_last_name":{"type":"string","title":"Rep Last Name"},"rep_business_title":{"type":"string","title":"Rep Business Title"},"rep_job_position":{"type":"string","title":"Rep Job Position","description":"Director, VP, GM, CEO, CFO, General Counsel, Other"},"rep_phone":{"type":"string","title":"Rep Phone"},"rep_email":{"type":"string","title":"Rep Email"}},"type":"object","required":["business_name","business_type","business_industry","business_registration_type","business_registration_number","address_street","address_city","address_region","address_postal_code","rep_first_name","rep_last_name","rep_business_title","rep_job_position","rep_phone","rep_email"],"title":"BrandRegistrationRequest","description":"Request body for A2P brand registration."},"BrandRegistrationResponse":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"status":{"type":"string","title":"Status"},"business_name":{"type":"string","title":"Business Name"},"business_type":{"type":"string","title":"Business Type"},"business_industry":{"type":"string","title":"Business Industry"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"twilio_brand_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Twilio Brand Score"},"twilio_brand_feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Brand Feedback"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","status","business_name","business_type","business_industry","created_at","updated_at"],"title":"BrandRegistrationResponse","description":"Response for brand registration."},"BulkRerunRequest":{"properties":{"workflow_execution_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Workflow Execution Ids"}},"type":"object","required":["workflow_execution_ids"],"title":"BulkRerunRequest"},"BusinessHours":{"properties":{"start_time":{"type":"string","pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$","title":"Start Time","description":"Business start time in HH:MM format (e.g., '08:00')"},"end_time":{"type":"string","pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$","title":"End Time","description":"Business end time in HH:MM format (e.g., '18:00')"},"weekend_operations":{"type":"boolean","title":"Weekend Operations","description":"Whether operations are enabled on weekends","default":false}},"type":"object","required":["start_time","end_time"],"title":"BusinessHours","description":"Business hours configuration for organization operations"},"BusinessHoursInput":{"properties":{"start_time":{"type":"string","pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$","title":"Start Time"},"end_time":{"type":"string","pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$","title":"End Time"},"weekend_operations":{"type":"boolean","title":"Weekend Operations","default":false}},"type":"object","required":["start_time","end_time"],"title":"BusinessHoursInput"},"CSRFResponse":{"properties":{"csrf_token":{"type":"string","title":"Csrf Token"}},"type":"object","required":["csrf_token"],"title":"CSRFResponse"},"CallbackParams":{"properties":{"provider":{"$ref":"#/components/schemas/OAuthProviderEnum"},"code":{"type":"string","title":"Code"},"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"nonce":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nonce"}},"type":"object","required":["provider","code"],"title":"CallbackParams"},"CampaignRegistrationRequest":{"properties":{"brand_registration_id":{"type":"string","title":"Brand Registration Id"},"usecase":{"type":"string","title":"Usecase","description":"MIXED, MARKETING, CUSTOMER_CARE, DELIVERY_NOTIFICATIONS, etc."},"description":{"type":"string","title":"Description","description":"Description of what this campaign does"},"message_flow":{"type":"string","title":"Message Flow","description":"How end-users opt in to receive messages"},"message_samples":{"items":{"type":"string"},"type":"array","maxItems":5,"minItems":1,"title":"Message Samples","description":"1-5 sample messages"},"opt_in_message":{"type":"string","title":"Opt In Message"},"opt_out_message":{"type":"string","title":"Opt Out Message","default":"Reply STOP to unsubscribe"},"help_message":{"type":"string","title":"Help Message","default":"Reply HELP for assistance or contact support@example.com"},"has_embedded_links":{"type":"boolean","title":"Has Embedded Links","default":false},"has_embedded_phone":{"type":"boolean","title":"Has Embedded Phone","default":false}},"type":"object","required":["brand_registration_id","usecase","description","message_flow","message_samples","opt_in_message"],"title":"CampaignRegistrationRequest","description":"Request body for A2P campaign registration."},"CampaignRegistrationResponse":{"properties":{"id":{"type":"string","title":"Id"},"brand_registration_id":{"type":"string","title":"Brand Registration Id"},"status":{"type":"string","title":"Status"},"usecase":{"type":"string","title":"Usecase"},"description":{"type":"string","title":"Description"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","brand_registration_id","status","usecase","description","created_at","updated_at"],"title":"CampaignRegistrationResponse","description":"Response for campaign registration."},"CanaryMessageResponse":{"properties":{"found":{"type":"boolean","title":"Found","description":"Whether a message containing the code was stored"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At","description":"When the matching message was sent, if found"}},"type":"object","required":["found"],"title":"CanaryMessageResponse"},"CanaryPhoneCallResponse":{"properties":{"found":{"type":"boolean","title":"Found","description":"Whether an inbound call between the two numbers was recorded since the given time"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"The call's status, if found"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the call ended, if it has"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds","description":"Call duration in seconds, if known"},"has_transcript":{"type":"boolean","title":"Has Transcript","description":"Whether the call has a non-empty transcript","default":false},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Reason","description":"Why the call ended, when the provider recorded one"}},"type":"object","required":["found"],"title":"CanaryPhoneCallResponse"},"CarrierCallTargetRequest":{"properties":{"carrier_id":{"type":"string","title":"Carrier Id","description":"Carrier external reference ID"},"carrier_name":{"type":"string","title":"Carrier Name","description":"Carrier name"},"phone_number":{"type":"string","title":"Phone Number","description":"Phone number to call (E.164 format)"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name","description":"Contact name for reference"}},"type":"object","required":["carrier_id","carrier_name","phone_number"],"title":"CarrierCallTargetRequest","description":"Pre-selected carrier and phone number to call"},"CarrierComplianceResponse":{"properties":{"is_connected":{"type":"boolean","title":"Is Connected","description":"False when the organization has no MyCarrierPackets connection"},"mcp_compliance":{"anyOf":[{"$ref":"#/components/schemas/MCPComplianceSnapshotSchema"},{"type":"null"}],"description":"Live MyCarrierPackets snapshot; null when MyCarrierPackets has nothing for this DOT"}},"type":"object","required":["is_connected"],"title":"CarrierComplianceResponse","description":"The Compliance tab: whether the organization has MyCarrierPackets, and its live snapshot for the carrier's DOT (ENG-2461)."},"CarrierContactCreate":{"properties":{"external_reference_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Reference Id","description":"External reference ID for the contact"},"first_name":{"type":"string","maxLength":100,"title":"First Name","description":"First name"},"last_name":{"type":"string","maxLength":100,"title":"Last Name","description":"Last name"},"contact_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Contact Type","description":"Contact type (e.g., Primary, Dispatch)"},"job_title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Job Title","description":"Job title"},"primary_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Primary Email","description":"Primary email"},"primary_phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Primary Phone","description":"Primary phone number"},"primary_phone_extension":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Primary Phone Extension","description":"Phone extension"},"is_primary_contact":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Primary Contact","description":"Is this the primary contact","default":false},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Is the contact active","default":true}},"type":"object","required":["first_name","last_name"],"title":"CarrierContactCreate","description":"Schema for creating a carrier contact."},"CarrierContactResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Contact ID"},"external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Id","description":"External reference ID"},"first_name":{"type":"string","title":"First Name","description":"First name"},"last_name":{"type":"string","title":"Last Name","description":"Last name"},"contact_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type","description":"Contact type"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title","description":"Job title"},"primary_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Email","description":"Primary email"},"primary_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Phone","description":"Primary phone number"},"primary_phone_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Phone Extension","description":"Phone extension"},"is_primary_contact":{"type":"boolean","title":"Is Primary Contact","description":"Is this the primary contact"},"is_active":{"type":"boolean","title":"Is Active","description":"Is the contact active"}},"type":"object","required":["id","first_name","last_name","is_primary_contact","is_active"],"title":"CarrierContactResponse","description":"Response schema for a carrier contact."},"CarrierContactSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Contact UUID"},"carrier_id":{"type":"string","title":"Carrier Id","description":"Parent carrier UUID"},"external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Id","description":"External reference ID from TMS"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"First name (Sunnybrook)"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Last name (Sunnybrook)"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name","description":"Full name (3G TMS)"},"contact_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type","description":"Contact type (MentiumTmsContactType value, e.g. DISPATCHER)"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title","description":"Job title or position"},"is_primary_contact":{"type":"boolean","title":"Is Primary Contact","description":"Is this the primary contact?","default":false},"is_default":{"type":"boolean","title":"Is Default","description":"Is this the default contact?","default":false},"primary_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Phone","description":"Primary phone number"},"primary_phone_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Phone Extension","description":"Phone extension"},"secondary_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary Phone","description":"Secondary phone number"},"fax":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fax","description":"Fax number"},"primary_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Email","description":"Primary email address"},"secondary_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary Email","description":"Secondary email address"},"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers","description":"Phone numbers (ordered by priority)"},"fax_numbers":{"items":{"type":"string"},"type":"array","title":"Fax Numbers","description":"Fax numbers"},"email_addresses":{"items":{"type":"string"},"type":"array","title":"Email Addresses","description":"Email addresses (ordered by priority)"},"is_bill_to_contact":{"type":"boolean","title":"Is Bill To Contact","description":"Bill-to contact?","default":false},"is_remit_to_contact":{"type":"boolean","title":"Is Remit To Contact","description":"Remit-to contact?","default":false},"is_active":{"type":"boolean","title":"Is Active","description":"Is contact active?","default":true},"email_suppressed":{"type":"boolean","title":"Email Suppressed","description":"Primary email previously hard-bounced and is flagged undeliverable","default":false},"email_suppressed_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Suppressed Reason","description":"Provider failure reason from the bounce that flagged the email"},"email_suppressed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Email Suppressed At","description":"When the email was last flagged undeliverable"},"deactivated":{"type":"boolean","title":"Deactivated","description":"Contact is deactivated (bounce or manual)","default":false},"deactivation_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deactivation Source","description":"Why deactivated: \"bounce\" (email hard-bounced) or \"manual\""},"deactivation_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deactivation Reason","description":"Reason for deactivation"},"deactivated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deactivated At","description":"When the contact was deactivated"},"deactivation_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deactivation Email","description":"The exact blocked address (primary or secondary); pass to reactivate to release it"},"birthday":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthday","description":"Birthday (for CRM)"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"Contact notes"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Record created timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Record updated timestamp"},"data_origin":{"$ref":"#/components/schemas/MentiumTmsDataOrigin","description":"Source of this contact","default":"TMS"}},"additionalProperties":true,"type":"object","required":["id","carrier_id","created_at","updated_at"],"title":"CarrierContactSchema","description":"Carrier Contact schema for OpenAPI documentation\n\nRepresents a contact person at the carrier company (dispatcher, admin, etc.)","example":{"carrier_id":"carrier-uuid-456","contact_type":"DISPATCHER","data_origin":"TMS","email_addresses":["mark@carrier.com"],"external_reference_id":"Contact-00006711","full_name":"Mark Jagarnauth","id":"contact-uuid-123","is_active":true,"is_primary_contact":true,"job_title":"Operations Liaison","phone_numbers":["312-843-3833"],"primary_email":"mark@carrier.com","primary_phone":"312-843-3833"}},"CarrierCreate":{"properties":{"external_reference_id":{"type":"string","maxLength":255,"minLength":1,"title":"External Reference Id","description":"Unique identifier from your system"},"name":{"type":"string","maxLength":255,"title":"Name","description":"Carrier name"},"dot_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Dot Number","description":"DOT number"},"mc_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Mc Number","description":"MC (docket) number"},"phone_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone Number","description":"Main phone number"},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email","description":"Main email address"},"address":{"anyOf":[{"$ref":"#/components/schemas/AddressCreate"},{"type":"null"}],"description":"Carrier address"},"contacts":{"anyOf":[{"items":{"$ref":"#/components/schemas/CarrierContactCreate"},"type":"array"},{"type":"null"}],"title":"Contacts","description":"Carrier contacts"}},"type":"object","required":["external_reference_id","name"],"title":"CarrierCreate","description":"Schema for creating a carrier."},"CarrierEngagementMetricsSchema":{"properties":{"response_rate":{"type":"number","title":"Response Rate","description":"Percentage of times carrier responded to offers (0-100)","default":0.0},"acceptance_rate":{"type":"number","title":"Acceptance Rate","description":"Percentage of times carrier accepted offers (0-100)","default":0.0},"total_offers_sent":{"type":"integer","title":"Total Offers Sent","description":"Total number of offers sent to this carrier","default":0},"total_responses":{"type":"integer","title":"Total Responses","description":"Total number of responses from carrier","default":0},"total_accepted":{"type":"integer","title":"Total Accepted","description":"Total number of offers accepted by carrier","default":0}},"additionalProperties":true,"type":"object","title":"CarrierEngagementMetricsSchema","description":"Carrier engagement metrics for tracking carrier performance"},"CarrierEquipmentSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Equipment UUID"},"carrier_id":{"type":"string","title":"Carrier Id","description":"Parent carrier UUID"},"external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Id","description":"External reference ID from TMS"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type","description":"Equipment type (Tractor, Trailer, Reefer, Capabilities)"},"equipment_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Number","description":"Unit number or identifier"},"equipment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Name","description":"Equipment name or description"},"length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length","description":"Length in feet"},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"Width in feet"},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"Height in feet"},"is_owned":{"type":"boolean","title":"Is Owned","description":"Is equipment owned by carrier?","default":false},"is_active":{"type":"boolean","title":"Is Active","description":"Is equipment active?","default":true},"is_available":{"type":"boolean","title":"Is Available","description":"Is equipment available?","default":true},"is_reefer":{"type":"boolean","title":"Is Reefer","description":"Refrigerated capability","default":false},"is_hazmat_certified":{"type":"boolean","title":"Is Hazmat Certified","description":"HazMat certified","default":false},"is_team_equipped":{"type":"boolean","title":"Is Team Equipped","description":"Team driver equipped","default":false},"is_oversize_capable":{"type":"boolean","title":"Is Oversize Capable","description":"Can handle oversize loads","default":false},"is_overweight_capable":{"type":"boolean","title":"Is Overweight Capable","description":"Can handle overweight loads","default":false},"has_liftgate":{"type":"boolean","title":"Has Liftgate","description":"Has liftgate","default":false},"has_pallet_jack":{"type":"boolean","title":"Has Pallet Jack","description":"Has pallet jack","default":false},"has_blanket_wrap":{"type":"boolean","title":"Has Blanket Wrap","description":"Has blanket wrap","default":false},"temp_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Temp Min","description":"Minimum temperature capability"},"temp_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Temp Max","description":"Maximum temperature capability"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Record created timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Record updated timestamp"}},"additionalProperties":true,"type":"object","required":["id","carrier_id","created_at","updated_at"],"title":"CarrierEquipmentSchema","description":"Carrier Equipment schema for OpenAPI documentation\n\nRepresents equipment owned or operated by the carrier","example":{"carrier_id":"carrier-uuid-456","equipment_name":"Carrier Equipment Capabilities","equipment_type":"Capabilities","id":"equipment-uuid-789","is_active":true,"is_hazmat_certified":true,"is_reefer":true,"is_team_equipped":true}},"CarrierFactorInfoSchema":{"properties":{"factor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Factor Name","description":"Factoring company name"},"factor_address1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Factor Address1","description":"Factor address line 1"},"factor_address2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Factor Address2","description":"Factor address line 2"},"factor_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Factor City","description":"Factor city"},"factor_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Factor State","description":"Factor state"},"factor_zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Factor Zip","description":"Factor ZIP code"},"factor_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Factor Country","description":"Factor country"}},"additionalProperties":true,"type":"object","title":"CarrierFactorInfoSchema","description":"Factoring company info from TMS"},"CarrierFinancialSummarySchema":{"properties":{"total_paid":{"type":"number","title":"Total Paid","description":"Total amount paid to carrier for delivered loads","default":0.0},"total_loads":{"type":"integer","title":"Total Loads","description":"Total number of loads for this carrier","default":0},"delivered_loads":{"type":"integer","title":"Delivered Loads","description":"Number of delivered loads","default":0},"outstanding_balance":{"type":"number","title":"Outstanding Balance","description":"Outstanding balance for non-delivered loads","default":0.0},"average_load_rate":{"type":"number","title":"Average Load Rate","description":"Average carrier rate per load","default":0.0}},"additionalProperties":true,"type":"object","title":"CarrierFinancialSummarySchema","description":"Carrier financial summary - payment totals and statistics"},"CarrierHistoricalLaneSchema":{"properties":{"organization_id":{"type":"string","title":"Organization Id"},"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"carrier_id":{"type":"string","title":"Carrier Id"},"source":{"$ref":"#/components/schemas/HistoricalLaneLocationSchema"},"destination":{"$ref":"#/components/schemas/HistoricalLaneLocationSchema"},"shipping_method":{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},"equipment_type":{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},"total_loads":{"type":"integer","title":"Total Loads"}},"additionalProperties":false,"type":"object","required":["organization_id","integration_connection_id","carrier_id","source","destination","shipping_method","equipment_type","total_loads"],"title":"CarrierHistoricalLaneSchema","example":{"carrier_id":"carrier-789","destination":{"city":"Los Angeles","country":"USA","state":"CA"},"equipment_type":"DRY_VAN","integration_connection_id":"int-456","organization_id":"org-123","shipping_method":"FTL","source":{"city":"Chicago","country":"USA","state":"IL"},"total_loads":100}},"CarrierLane":{"properties":{"source_city":{"type":"string","title":"Source City","description":"Source city"},"source_state":{"type":"string","title":"Source State","description":"Source state"},"destination_city":{"type":"string","title":"Destination City","description":"Destination city"},"destination_state":{"type":"string","title":"Destination State","description":"Destination state"},"total_loads":{"type":"integer","title":"Total Loads","description":"Total loads"},"total_spend":{"type":"number","title":"Total Spend","description":"Total spend on carrier"},"total_margin":{"type":"number","title":"Total Margin","description":"Total margin"},"average_margin_per_load":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Margin Per Load","description":"Average margin per load"},"margin_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Percentage","description":"Margin percentage"}},"type":"object","required":["source_city","source_state","destination_city","destination_state","total_loads","total_spend","total_margin"],"title":"CarrierLane","example":{"average_margin_per_load":10.0,"destination_city":"DALLAS","destination_state":"TX","margin_percentage":10.0,"source_city":"CHICAGO","source_state":"IL","total_loads":25,"total_margin":100.0,"total_spend":1000.0}},"CarrierMatchScoreExplainability":{"properties":{"carrier_unscoped_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Unscoped Match Score"},"carrier_customer_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Customer Match Score"},"carrier_lane_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Lane Match Score"},"carrier_customer_lane_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Customer Lane Match Score"},"potential_empty_truck_nearby_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Potential Empty Truck Nearby Match Score"},"carrier_defined_lane_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Defined Lane Match Score"},"carrier_defined_availability_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Defined Availability Match Score"},"carrier_lane_propensity_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Lane Propensity Match Score"}},"type":"object","title":"CarrierMatchScoreExplainability"},"CarrierNoteAuthor":{"properties":{"id":{"type":"string","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["id","first_name","last_name","email"],"title":"CarrierNoteAuthor"},"CarrierNoteSchema":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"user_id":{"type":"string","title":"User Id"},"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"carrier_external_reference_id":{"type":"string","title":"Carrier External Reference Id"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"author":{"anyOf":[{"$ref":"#/components/schemas/CarrierNoteAuthor"},{"type":"null"}]}},"type":"object","required":["id","organization_id","user_id","integration_connection_id","carrier_external_reference_id","body","created_at","updated_at"],"title":"CarrierNoteSchema"},"CarrierOfferCarrierRateSource":{"type":"string","enum":["RELATIVE_TO_TMS_MIN_CARRIER_RATE","RELATIVE_TO_TMS_MAX_CARRIER_RATE","RELATIVE_TO_TMS_CUSTOMER_RATE","RELATIVE_TO_DAT_MARKET_RATE","RELATIVE_TO_GREENSCREENS_MARKET_RATE","RELATIVE_TO_MIN_LOAD_OFFER_CARRIER_RATE","RELATIVE_TO_MAX_LOAD_OFFER_CARRIER_RATE","RELATIVE_TO_HISTORICAL_CARRIER_RATE","RELATIVE_TO_LOAD_BOARD_POSTED_CARRIER_RATE","MANUAL_OVERRIDE","MENTIUM_UNKNOWN_VALUE"],"title":"CarrierOfferCarrierRateSource"},"CarrierOfferEmbedded":{"properties":{"id":{"type":"string","title":"Id"},"load_offer_id":{"type":"string","title":"Load Offer Id"},"status":{"type":"string","title":"Status"},"opening_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opening Carrier Rate Amount"},"latest_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Carrier Rate Amount"},"current_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Carrier Rate Amount"},"booked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Booked At"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"load_external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load External Reference Id"},"load_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load Origin"},"load_destination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load Destination"},"carrier_mc_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Mc Number"},"carrier_dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Dot Number"}},"type":"object","required":["id","load_offer_id","status"],"title":"CarrierOfferEmbedded"},"CarrierOfferSchema":{"properties":{"id":{"type":"string","title":"Id"},"load_offer_id":{"type":"string","title":"Load Offer Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"external_reference_carrier_id":{"type":"string","title":"External Reference Carrier Id"},"carrier_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Email"},"carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Name"},"status":{"$ref":"#/components/schemas/CarrierOfferStatus"},"skip_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skip Reason"},"min_carrier_offer_carrier_rate_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Carrier Offer Carrier Rate Amount"},"min_carrier_offer_carrier_rate_source":{"anyOf":[{"$ref":"#/components/schemas/CarrierOfferCarrierRateSource"},{"type":"null"}]},"min_carrier_offer_carrier_rate_source_raw_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Carrier Offer Carrier Rate Source Raw Amount"},"max_carrier_offer_carrier_rate_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Carrier Offer Carrier Rate Amount"},"max_carrier_offer_carrier_rate_source":{"anyOf":[{"$ref":"#/components/schemas/CarrierOfferCarrierRateSource"},{"type":"null"}]},"max_carrier_offer_carrier_rate_source_raw_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Carrier Offer Carrier Rate Source Raw Amount"},"opening_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opening Carrier Rate Amount"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"booked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Booked At"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"declined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Declined At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"latest_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Carrier Rate Amount"},"current_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Carrier Rate Amount"},"phone_calls":{"items":{"$ref":"#/components/schemas/PhoneCallEmbedded"},"type":"array","title":"Phone Calls","default":[]}},"type":"object","required":["id","load_offer_id","external_reference_carrier_id","status","created_at","updated_at"],"title":"CarrierOfferSchema","description":"CarrierOffer embedded in offer response"},"CarrierOfferStatus":{"type":"string","enum":["QUEUED","SENT","NEGOTIATING","HUMAN_HAND_OFF","BOOKED","ACCEPTED","DECLINED","CLOSED","CANCELLED","SKIPPED"],"title":"CarrierOfferStatus"},"CarrierPaymentSchema":{"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date","description":"Delivery date (payment date)"},"amount":{"type":"number","title":"Amount","description":"Carrier amount for this load","default":0.0},"load_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load Ref","description":"Load external reference ID"}},"additionalProperties":true,"type":"object","title":"CarrierPaymentSchema","description":"Recent payment entry based on delivered loads"},"CarrierPaymentTermsSchema":{"properties":{"payment_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Term","description":"Payment terms (e.g., 'Net 30', 'Net 25')"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method","description":"Payment method (e.g., 'ACH', 'Check')"}},"additionalProperties":true,"type":"object","title":"CarrierPaymentTermsSchema","description":"Carrier payment terms from TMS"},"CarrierPoolMentiumTmsCarrierSchema":{"properties":{"id":{"type":"string","title":"Id"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"dba_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dba Name"},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number"},"mc_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mc Number"},"service_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Status"},"equipment_types":{"items":{"type":"string"},"type":"array","title":"Equipment Types"},"contacts":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierContactSchema"},"type":"array","title":"Contacts"},"addresses":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierAddressSchema"},"type":"array","title":"Addresses"},"certifications":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierCertificationSchema"},"type":"array","title":"Certifications"},"observed_by_requester":{"type":"boolean","title":"Observed By Requester"}},"type":"object","required":["id","observed_by_requester"],"title":"CarrierPoolMentiumTmsCarrierSchema","description":"Observer organizations are never named or counted — only whether the requester already observes the carrier."},"CarrierRecipient":{"properties":{"carrier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Id"},"external_reference_id":{"type":"string","title":"External Reference Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"contact_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type"},"recipient_contacts":{"anyOf":[{"items":{"$ref":"#/components/schemas/OfferRecipientContact"},"type":"array"},{"type":"null"}],"title":"Recipient Contacts"},"public_booking_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Booking Token","description":"Pending booking token returned by /prepare-public-booking-link."},"public_booking_signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Booking Signature","description":"HMAC signature returned by /prepare-public-booking-link; required when token is set."},"public_booking_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Public Booking Expires At","description":"Expiry timestamp returned by /prepare-public-booking-link; required when token is set."},"subject_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Override","description":"Per-carrier rendered subject. When provided, the template is not re-rendered for this carrier."},"body_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Override","description":"Per-carrier rendered body HTML. When provided, the template is not re-rendered for this carrier."}},"type":"object","required":["external_reference_id"],"title":"CarrierRecipient"},"CarrierResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Internal Mentium ID"},"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID from your system"},"name":{"type":"string","title":"Name","description":"Carrier name"},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number","description":"DOT number"},"mc_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mc Number","description":"MC (docket) number"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Main phone number"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Main email address"},"address":{"anyOf":[{"$ref":"#/components/schemas/AddressResponse"},{"type":"null"}],"description":"Carrier address"},"contacts":{"items":{"$ref":"#/components/schemas/CarrierContactResponse"},"type":"array","title":"Contacts","description":"Carrier contacts"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["id","external_reference_id","name","created_at","updated_at"],"title":"CarrierResponse","description":"Response schema for a carrier."},"CarrierUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name","description":"Carrier name"},"dot_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Dot Number","description":"DOT number"},"mc_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Mc Number","description":"MC (docket) number"},"phone_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone Number","description":"Main phone number"},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email","description":"Main email address"},"address":{"anyOf":[{"$ref":"#/components/schemas/AddressCreate"},{"type":"null"}],"description":"Carrier address"},"contacts":{"anyOf":[{"items":{"$ref":"#/components/schemas/CarrierContactCreate"},"type":"array"},{"type":"null"}],"title":"Contacts","description":"Carrier contacts (replaces existing)"}},"type":"object","title":"CarrierUpdate","description":"Schema for updating a carrier. All fields are optional."},"CarrierWithTrucks":{"properties":{"carrier_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Carrier Id"},"carrier_external_reference_id":{"type":"string","title":"Carrier External Reference Id"},"carrier_name":{"type":"string","title":"Carrier Name"},"carrier_dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Dot Number"},"carrier_mc_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Mc Number"},"carrier_defined_availabilities":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedAvailability"},"type":"array","title":"Carrier Defined Availabilities"},"potential_empty_truck_nearby_related_loads":{"items":{"$ref":"#/components/schemas/libs__recommendations__carrier_recommendation__models__RelatedLoad"},"type":"array","title":"Potential Empty Truck Nearby Related Loads"},"data_origins":{"items":{"$ref":"#/components/schemas/MentiumTmsDataOrigin"},"type":"array","title":"Data Origins"}},"type":"object","required":["carrier_external_reference_id","carrier_name"],"title":"CarrierWithTrucks"},"CatalogDraftResponse":{"properties":{"entry_id":{"type":"string","title":"Entry Id"},"draft_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Id","description":"Draft row ID, if a draft exists"},"yaml_content":{"type":"string","title":"Yaml Content","description":"Current draft YAML content","default":""},"has_draft":{"type":"boolean","title":"Has Draft","description":"Whether a draft exists","default":false}},"type":"object","required":["entry_id"],"title":"CatalogDraftResponse","description":"Response body for catalog draft lookup."},"CatalogDraftSaveRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Template name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Template description"},"type_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Config","description":"Type-specific configuration."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"LLM model identifier"},"system_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt Template","description":"System prompt template"},"user_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Template","description":"User prompt template"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"LLM temperature (0-2)"},"max_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Tokens","description":"Maximum output tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Reasoning effort level"},"tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Tool identifiers"},"is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Published","description":"Whether the template is visible to non-admin users"}},"type":"object","title":"CatalogDraftSaveRequest","description":"Request schema for catalog draft auto-save. Mirrors AIAgentDraftSaveRequest."},"CatalogPublishResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Published catalog entry ID"},"published":{"type":"boolean","title":"Published","description":"Whether the entry was published"}},"type":"object","required":["id","published"],"title":"CatalogPublishResponse","description":"Response body for publishing a catalog draft."},"CertificationSchema":{"properties":{"certification_type":{"$ref":"#/components/schemas/MentiumTmsCertificationType","description":"Type of certification (PHMSA, TANKER_ENDORSED_DRIVERS, SMART_WAY, CARB_TRU, etc.)"},"certification_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certification Number","description":"Certification number or ID"},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At","description":"When certification becomes effective"},"expiration_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration At","description":"When certification expires"},"filed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filed At","description":"When certification was filed"},"first_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen At","description":"First time we saw this certification"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At","description":"Last time we saw this certification"},"is_verified":{"type":"boolean","title":"Is Verified","description":"Is this certification verified by a trusted source?","default":false},"verification_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Source","description":"Source that verified this certification (e.g., 'Highway')"},"data_origin":{"$ref":"#/components/schemas/MentiumTmsDataOrigin","description":"Source of this certification","default":"TMS"}},"additionalProperties":true,"type":"object","required":["certification_type"],"title":"CertificationSchema","description":"Certification schema for OpenAPI","example":{"certification_number":"1bb4726b4337e35d147ec6242b7b25ca","certification_type":"SMART_WAY","data_origin":"HIGHWAY","effective_at":"2024-01-01T00:00:00Z","expiration_at":"2024-12-31T00:00:00Z","filed_at":"2024-01-01T00:00:00Z","is_verified":true,"verification_source":"Highway"}},"ChangePhoneNumberStatusRequest":{"properties":{"is_active":{"type":"boolean","title":"Is Active","description":"True to activate, False to deactivate"}},"type":"object","required":["is_active"],"title":"ChangePhoneNumberStatusRequest","description":"Request to change phone number active status"},"ChannelItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ChannelItem"},"ChatAgentListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChatAgentOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ChatAgentListOut","description":"The chat agent picker: installed system agents, then the workspace's own; the first item is the default."},"ChatAgentOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"catalog_entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog Entry Id","description":"System agent catalog entry this agent was installed from; null for a workspace's own agent"}},"type":"object","required":["id","name"],"title":"ChatAgentOut","description":"An agent the caller can chat with: an installed system agent, or a text agent switched on for chat."},"ChatApprovalCreate":{"properties":{"approved":{"type":"boolean","title":"Approved"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"}},"type":"object","required":["approved"],"title":"ChatApprovalCreate"},"ChatCreate":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id","description":"Agent to chat with; must be one of GET /v3/chat-agents"},"integration_connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Integration Connection Id","description":"TMS connection the agent's freight tools use; defaults to the workspace's TMS connection"}},"type":"object","required":["agent_id"],"title":"ChatCreate"},"ChatMessageKind":{"type":"string","enum":["user","assistant","tool_call","tool_result","approval_request","approval","error","summary"],"title":"ChatMessageKind"},"ChatMessageOut":{"properties":{"role":{"type":"string","title":"Role","description":"Message role: 'user', 'assistant', or 'system'"},"content":{"type":"string","title":"Content","description":"Message content"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"ISO-8601 timestamp recorded when this message was appended."},"message_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Message Index","description":"Zero-based position in chat_history (used by truncate-chat)."},"yaml_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yaml Snapshot","description":"For user messages, the canvas YAML at the moment this message was sent. Used to anchor chat-aware undo / pencil-edit (truncate-chat)."},"tool_invocations":{"items":{"$ref":"#/components/schemas/ChatToolInvocationOut"},"type":"array","title":"Tool Invocations","description":"For assistant messages, the tool calls executed during this turn."}},"type":"object","required":["role","content"],"title":"ChatMessageOut","description":"A message in the chat history."},"ChatOut":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name","description":"Null when the agent has since been deleted"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Set from the first message"},"integration_connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Connection Id"},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","created_at","updated_at"],"title":"ChatOut"},"ChatToolInvocationOut":{"properties":{"call_id":{"type":"string","title":"Call Id","description":"Provider-issued call id"},"name":{"type":"string","title":"Name","description":"Tool name"},"arguments":{"type":"string","title":"Arguments","description":"JSON-encoded arguments string"},"output":{"type":"string","title":"Output","description":"Tool output string fed back to the model"},"success":{"type":"boolean","title":"Success","description":"Whether the tool call succeeded"}},"type":"object","required":["call_id","name","arguments","output","success"],"title":"ChatToolInvocationOut","description":"A single tool the agent ran during an assistant turn."},"CodeExecutionMetadataResponse":{"properties":{"scaffold_stdlib_imports_lines":{"items":{"type":"string"},"type":"array","title":"Scaffold Stdlib Imports Lines","description":"Scaffold stdlib import lines."},"scaffold_third_party_imports_lines":{"items":{"type":"string"},"type":"array","title":"Scaffold Third Party Imports Lines","description":"Scaffold third-party import lines."},"scaffold_class_params_line":{"type":"string","title":"Scaffold Class Params Line","description":"Scaffold class params line."},"scaffold_class_result_line":{"type":"string","title":"Scaffold Class Result Line","description":"Scaffold class result line."},"scaffold_def_main_line":{"type":"string","title":"Scaffold Def Main Line","description":"Scaffold def main line."},"scaffold":{"type":"string","title":"Scaffold","description":"Scaffold code for new code execution nodes."}},"type":"object","required":["scaffold_stdlib_imports_lines","scaffold_third_party_imports_lines","scaffold_class_params_line","scaffold_class_result_line","scaffold_def_main_line","scaffold"],"title":"CodeExecutionMetadataResponse","description":"Code execution editor metadata — single source of truth for class params line, class result line, def main line, stdlib imports, third-party imports, and scaffold."},"CodeFieldHintRequest":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name"},"type":{"type":"string","maxLength":200,"title":"Type","description":"Python type annotation, e.g. 'str', 'list[int]'."}},"type":"object","required":["name","type"],"title":"CodeFieldHintRequest","description":"A single Pydantic field of the current Params or Result class."},"CodeRewriterConversationTurnRequest":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":50000,"title":"Content"}},"type":"object","required":["role","content"],"title":"CodeRewriterConversationTurnRequest","description":"A single turn in the code rewrite conversation history."},"CodeRewriterRequest":{"properties":{"type":{"type":"string","const":"code_rewriter","title":"Type"},"current_code":{"type":"string","maxLength":50000,"title":"Current Code","description":"The existing Python code to rewrite. Empty for generation from scratch.","default":""},"instructions":{"type":"string","maxLength":2000,"title":"Instructions","description":"User instructions describing what to change or generate."},"params_hint":{"additionalProperties":true,"type":"object","title":"Params Hint","description":"Current config.params keys and values (for context)."},"param_fields":{"items":{"$ref":"#/components/schemas/CodeFieldHintRequest"},"type":"array","maxItems":200,"title":"Param Fields","description":"Current Params class fields parsed from the code."},"output_fields":{"items":{"$ref":"#/components/schemas/CodeFieldHintRequest"},"type":"array","maxItems":200,"title":"Output Fields","description":"Current Result class fields parsed from the code."},"available_variables":{"items":{"$ref":"#/components/schemas/UpstreamVariableHintRequest"},"type":"array","maxItems":500,"title":"Available Variables","description":"Variables produced by upstream workflow nodes."},"downstream_consumers":{"items":{"$ref":"#/components/schemas/DownstreamConsumerHintRequest"},"type":"array","maxItems":200,"title":"Downstream Consumers","description":"Downstream workflow nodes that reference this node's Result fields."},"conversation_history":{"items":{"$ref":"#/components/schemas/CodeRewriterConversationTurnRequest"},"type":"array","maxItems":20,"title":"Conversation History","description":"Previous conversation turns for multi-turn context."}},"type":"object","required":["type","instructions"],"title":"CodeRewriterRequest","description":"Request payload for the code rewriter helper."},"CodeValidateDiagnosticOut":{"properties":{"severity":{"type":"string","enum":["error","warning","info"],"title":"Severity"},"message":{"type":"string","title":"Message"},"line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line"},"column":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Column"},"rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule"}},"type":"object","required":["severity","message"],"title":"CodeValidateDiagnosticOut","description":"A single validation diagnostic."},"CodeValidateRequest":{"properties":{"code":{"type":"string","maxLength":100000,"title":"Code","description":"Python source code to validate."},"params":{"additionalProperties":true,"type":"object","title":"Params","description":"Current config.params keys and their values/variable refs."},"output_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Schema","description":"Current output schema (JSON schema) for the node."}},"type":"object","required":["code"],"title":"CodeValidateRequest","description":"Request to validate Python code for a code-execution node."},"CodeValidateResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"diagnostics":{"items":{"$ref":"#/components/schemas/CodeValidateDiagnosticOut"},"type":"array","title":"Diagnostics"},"suggested_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Suggested Params"},"suggested_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Code"},"suggested_output_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Suggested Output Schema"}},"type":"object","required":["valid"],"title":"CodeValidateResponse","description":"Response from code validation."},"ConditionType":{"type":"string","enum":["current_state","change_state"],"title":"ConditionType","description":"How to evaluate a condition."},"ConfigExportAgent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"agent_type":{"type":"string","title":"Agent Type"},"is_active":{"type":"boolean","title":"Is Active"},"model":{"type":"string","title":"Model"},"system_prompt_template":{"type":"string","title":"System Prompt Template"},"user_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Template"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"},"tool_inputs":{"anyOf":[{},{"type":"null"}],"title":"Tool Inputs","description":"Agent-side tool settings: tool -> {param -> value}"},"type_config":{"anyOf":[{},{"type":"null"}],"title":"Type Config","description":"Voice and channel config"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phone Number Id","description":"The workspace phone number the agent answers on"},"automation_tool_bindings":{"items":{"$ref":"#/components/schemas/ConfigExportAutomationToolBinding"},"type":"array","title":"Automation Tool Bindings"},"mcp_bindings":{"items":{"$ref":"#/components/schemas/ConfigExportMcpBinding"},"type":"array","title":"Mcp Bindings"},"live_revision_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Live Revision Number","description":"The version that is live, so a copy can say which version it was made from"},"live_config_digest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Live Config Digest","description":"The content fingerprint of that version; the same content has the same fingerprint in every environment"}},"type":"object","required":["id","name","agent_type","is_active","model","system_prompt_template"],"title":"ConfigExportAgent"},"ConfigExportAgentList":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/ConfigExportAgent"},"type":"array","title":"Agents"}},"type":"object","required":["agents"],"title":"ConfigExportAgentList"},"ConfigExportAgentProving":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids","description":"Scenarios linked to the agent directly"},"group_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Group Ids"},"system_scenario_names":{"items":{"type":"string"},"type":"array","title":"System Scenario Names","description":"Mentium safety checks linked to the agent directly, by name: each workspace seeds them with its own ids"}},"type":"object","required":["agent_id","scenario_ids","group_ids"],"title":"ConfigExportAgentProving"},"ConfigExportAutomationTool":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ConfigExportAutomationTool"},"ConfigExportAutomationToolBinding":{"properties":{"automation_tool_id":{"type":"string","format":"uuid","title":"Automation Tool Id"}},"type":"object","required":["automation_tool_id"],"title":"ConfigExportAutomationToolBinding"},"ConfigExportAutomationToolList":{"properties":{"automation_tools":{"items":{"$ref":"#/components/schemas/ConfigExportAutomationTool"},"type":"array","title":"Automation Tools"}},"type":"object","required":["automation_tools"],"title":"ConfigExportAutomationToolList"},"ConfigExportIntegrationConnection":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ConfigExportIntegrationConnection"},"ConfigExportIntegrationConnectionList":{"properties":{"integration_connections":{"items":{"$ref":"#/components/schemas/ConfigExportIntegrationConnection"},"type":"array","title":"Integration Connections"}},"type":"object","required":["integration_connections"],"title":"ConfigExportIntegrationConnectionList"},"ConfigExportMcpBinding":{"properties":{"integration_connection_id":{"type":"string","format":"uuid","title":"Integration Connection Id"}},"type":"object","required":["integration_connection_id"],"title":"ConfigExportMcpBinding"},"ConfigExportOrganization":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ConfigExportOrganization"},"ConfigExportOrganizationList":{"properties":{"organizations":{"items":{"$ref":"#/components/schemas/ConfigExportOrganization"},"type":"array","title":"Organizations"}},"type":"object","required":["organizations"],"title":"ConfigExportOrganizationList"},"ConfigExportPhoneNumber":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ConfigExportPhoneNumber"},"ConfigExportPhoneNumberList":{"properties":{"phone_numbers":{"items":{"$ref":"#/components/schemas/ConfigExportPhoneNumber"},"type":"array","title":"Phone Numbers"}},"type":"object","required":["phone_numbers"],"title":"ConfigExportPhoneNumberList"},"ConfigExportProving":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/ConfigExportProvingScenario"},"type":"array","title":"Scenarios"},"groups":{"items":{"$ref":"#/components/schemas/ConfigExportProvingGroup"},"type":"array","title":"Groups"},"agents":{"items":{"$ref":"#/components/schemas/ConfigExportAgentProving"},"type":"array","title":"Agents"}},"type":"object","required":["scenarios","groups","agents"],"title":"ConfigExportProving"},"ConfigExportProvingGroup":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids"},"system_scenario_names":{"items":{"type":"string"},"type":"array","title":"System Scenario Names","description":"Mentium safety checks in the group, by name: each workspace seeds them with its own ids"}},"type":"object","required":["id","name","scenario_ids"],"title":"ConfigExportProvingGroup"},"ConfigExportProvingScenario":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"severity":{"type":"string","title":"Severity"},"node_type":{"type":"string","title":"Node Type"},"node_config":{"title":"Node Config"},"prefix_transcript_turns":{"title":"Prefix Transcript Turns"},"mock_tool_calls":{"title":"Mock Tool Calls","description":"Scripted tool results"},"evaluations":{"title":"Evaluations","description":"Expected evaluations"}},"type":"object","required":["id","name","severity","node_type","node_config","prefix_transcript_turns","mock_tool_calls","evaluations"],"title":"ConfigExportProvingScenario"},"ConfigExportSettingValues":{"properties":{"values":{"items":{"type":"string"},"type":"array","title":"Values","description":"The setting's stored value column as raw JSON text, one per workspace row"}},"type":"object","required":["values"],"title":"ConfigExportSettingValues"},"ConfigExportTemplate":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ConfigExportTemplate"},"ConfigExportTemplateList":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/ConfigExportTemplate"},"type":"array","title":"Templates"}},"type":"object","required":["templates"],"title":"ConfigExportTemplateList"},"ConfigExportWorkflow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"yaml_content":{"type":"string","title":"Yaml Content"},"deployed_version":{"type":"integer","title":"Deployed Version"}},"type":"object","required":["id","yaml_content","deployed_version"],"title":"ConfigExportWorkflow"},"ConfigExportWorkflowList":{"properties":{"workflows":{"items":{"$ref":"#/components/schemas/ConfigExportWorkflow"},"type":"array","title":"Workflows"}},"type":"object","required":["workflows"],"title":"ConfigExportWorkflowList"},"ContactDeactivationResponse":{"properties":{"carrier_external_reference_id":{"type":"string","title":"Carrier External Reference Id"},"contact_external_reference_id":{"type":"string","title":"Contact External Reference Id"},"deactivated":{"type":"boolean","title":"Deactivated"}},"type":"object","required":["carrier_external_reference_id","contact_external_reference_id","deactivated"],"title":"ContactDeactivationResponse"},"ConversationAnalysisSummary":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"tags_status":{"anyOf":[{"$ref":"#/components/schemas/AnalysisStatus"},{"type":"null"}]},"offers_status":{"anyOf":[{"$ref":"#/components/schemas/AnalysisStatus"},{"type":"null"}]},"tags":{"items":{"$ref":"#/components/schemas/ConversationTagSummary"},"type":"array","title":"Tags"},"carrier_offer":{"anyOf":[{"$ref":"#/components/schemas/ConversationCarrierOfferSummary"},{"type":"null"}]}},"type":"object","required":["conversation_id"],"title":"ConversationAnalysisSummary"},"ConversationAnalysisSummaryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConversationAnalysisSummary"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ConversationAnalysisSummaryResponse"},"ConversationAnalysisSweepResponse":{"properties":{"claim_workflow_ids":{"items":{"type":"string"},"type":"array","title":"Claim Workflow Ids"}},"type":"object","required":["claim_workflow_ids"],"title":"ConversationAnalysisSweepResponse","description":"One workflow handle per fired backstop claim sweep (one per analyzer)."},"ConversationAnalysisSweepTrigger":{"properties":{"created_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},"type":"object","title":"ConversationAnalysisSweepTrigger","description":"Manual /sweep payload — narrow knobs the operator usually wants."},"ConversationAnalysisSyncResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ConversationAnalysisSyncResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"ConversationAnalysisSyncResponse"},"ConversationAnalysisSyncResult":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"status":{"type":"string","title":"Status"},"written":{"type":"integer","title":"Written","default":0},"rejected":{"type":"integer","title":"Rejected","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["conversation_id","status"],"title":"ConversationAnalysisSyncResult"},"ConversationCarrierOfferSummary":{"properties":{"id":{"type":"string","title":"Id"},"opening_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opening Carrier Rate Amount"},"latest_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Carrier Rate Amount"},"current_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Carrier Rate Amount"},"status":{"type":"string","title":"Status"},"sent_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["id","status"],"title":"ConversationCarrierOfferSummary","description":"The ``CarrierOffer`` linked to this conversation plus the position its rate events describe."},"ConversationConfigOverride":{"properties":{"agent":{"anyOf":[{"$ref":"#/components/schemas/AgentOverride"},{"type":"null"}]},"tts":{"anyOf":[{"$ref":"#/components/schemas/TtsOverride"},{"type":"null"}]}},"type":"object","title":"ConversationConfigOverride","description":"Conversation configuration override"},"ConversationDashboardChannelCount":{"properties":{"channel":{"type":"string","enum":["email","text","whatsapp","phone"],"title":"Channel"},"interactions":{"type":"integer","title":"Interactions"}},"type":"object","required":["channel","interactions"],"title":"ConversationDashboardChannelCount","description":"Interaction volume for one channel within the selected scope."},"ConversationDashboardResponse":{"properties":{"channels":{"items":{"type":"string","enum":["email","text","whatsapp","phone"]},"type":"array","title":"Channels"},"agent_ids":{"items":{"type":"string"},"type":"array","title":"Agent Ids"},"period_days":{"type":"integer","title":"Period Days"},"range_start":{"type":"string","format":"date-time","title":"Range Start"},"range_end":{"type":"string","format":"date-time","title":"Range End"},"trend_bucket_days":{"type":"integer","title":"Trend Bucket Days"},"current":{"$ref":"#/components/schemas/DashboardWindowKpis"},"previous":{"$ref":"#/components/schemas/DashboardWindowKpis"},"trend":{"items":{"$ref":"#/components/schemas/DashboardTrendBucket"},"type":"array","title":"Trend"},"agents":{"items":{"$ref":"#/components/schemas/DashboardAgentRow"},"type":"array","title":"Agents"},"channel_breakdown":{"items":{"$ref":"#/components/schemas/ConversationDashboardChannelCount"},"type":"array","title":"Channel Breakdown"},"recent_offers":{"items":{"$ref":"#/components/schemas/DashboardRecentOffer"},"type":"array","title":"Recent Offers"}},"type":"object","required":["channels","agent_ids","period_days","range_start","range_end","trend_bucket_days","current","previous","trend","agents","channel_breakdown","recent_offers"],"title":"ConversationDashboardResponse"},"ConversationExtractOffersNowRequest":{"properties":{"conversation_ids":{"items":{"type":"string"},"type":"array","maxItems":25,"minItems":1,"title":"Conversation Ids"},"force_retag":{"type":"boolean","title":"Force Retag","default":false}},"type":"object","required":["conversation_ids"],"title":"ConversationExtractOffersNowRequest","description":"Sync analyze using the channel's ``*_offers`` analyzer."},"ConversationInitiationRequest":{"properties":{"caller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Id","description":"Caller phone number (E.164)"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"ElevenLabs agent ID"},"called_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Called Number","description":"Called phone number (E.164)"},"call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Sid","description":"Twilio call SID"}},"type":"object","title":"ConversationInitiationRequest","description":"Request payload from ElevenLabs conversation initiation webhook.\n\nElevenLabs calls this webhook when an inbound call is received to get\ndynamic variables and first_message override for personalization.\n\nSee: https://elevenlabs.io/docs/agents-platform/customization/personalization/twilio-personalization"},"ConversationInitiationResponse":{"properties":{"dynamic_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dynamic Variables","description":"Variables available in agent prompt as {{variable_name}}"},"conversation_config_override":{"anyOf":[{"$ref":"#/components/schemas/ConversationConfigOverride"},{"type":"null"}],"description":"Override conversation configuration"}},"type":"object","title":"ConversationInitiationResponse","description":"Response to ElevenLabs conversation initiation webhook.\n\nReturns dynamic variables and optional conversation overrides\nto personalize the inbound call experience."},"ConversationLabelsResponse":{"properties":{"labels":{"items":{"type":"string"},"type":"array","title":"Labels"}},"type":"object","required":["labels"],"title":"ConversationLabelsResponse"},"ConversationMessage":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role","description":"Message role"},"content":{"type":"string","maxLength":50000,"title":"Content","description":"Message text"}},"type":"object","required":["role","content"],"title":"ConversationMessage","description":"A single message in the conversation history sent by the frontend."},"ConversationStatus":{"type":"string","enum":["DRAFT","ACTIVE","ARCHIVED","DELETED"],"title":"ConversationStatus"},"ConversationTagNowRequest":{"properties":{"conversation_ids":{"items":{"type":"string"},"type":"array","maxItems":25,"minItems":1,"title":"Conversation Ids"},"force_retag":{"type":"boolean","title":"Force Retag","default":false}},"type":"object","required":["conversation_ids"],"title":"ConversationTagNowRequest","description":"Sync analyze using the channel's ``*_tags`` analyzer."},"ConversationTagSummary":{"properties":{"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"},"b_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B Type"},"link_href":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Href"}},"type":"object","required":["name","color"],"title":"ConversationTagSummary"},"ConversationTurnRequest":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":50000,"title":"Content"}},"type":"object","required":["role","content"],"title":"ConversationTurnRequest","description":"A single turn in the rewrite conversation history."},"ConversationType":{"type":"string","enum":["EMAIL","SMS","WHATSAPP","TEAMS"],"title":"ConversationType"},"ConversationWorkflowExecutionLink":{"properties":{"workflow_execution_id":{"type":"string","title":"Workflow Execution Id"},"link_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Type"},"trigger_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Message Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name"},"execution_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Status"},"business_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["workflow_execution_id","created_at"],"title":"ConversationWorkflowExecutionLink","description":"A workflow execution linked to this conversation.\n\nTwo sources are unioned:\n  - the conversation_workflow_execution junction (email / inbound-text\n    triggers): link_type is TRIGGERED_BY or REPLIED_BY.\n  - the conversation_workflow_instance record (the conversation-agent\n    workflow handling the thread): link_type is None.\n\nNormally a conversation maps to a single execution; multiple appear when an\nexpired instance was re-triggered, or across separate trigger/agent runs."},"CounterOfferRequest":{"properties":{"carrier_rate_amount":{"type":"number","exclusiveMinimum":0.0,"title":"Carrier Rate Amount","description":"The carrier rate submitted by the broker."},"message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Message","description":"Optional message to send with the counter offer"}},"type":"object","required":["carrier_rate_amount"],"title":"CounterOfferRequest","description":"Request body for broker to send counter offer to carrier"},"CounterOfferResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"carrier_offer_id":{"type":"string","title":"Carrier Offer Id"},"carrier_rate_amount":{"type":"number","title":"Carrier Rate Amount"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"email_sent":{"type":"boolean","title":"Email Sent","default":false}},"type":"object","required":["success","carrier_offer_id","carrier_rate_amount"],"title":"CounterOfferResponse","description":"Response from counter offer operation"},"CreateAvailabilityRequest":{"properties":{"source":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Source"},"destination":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Destination"},"shipping_method":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}]},"equipment_type":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}]},"recurrence_frequency":{"$ref":"#/components/schemas/MentiumTmsAvailabilityRecurrenceFrequency"},"recurrence_interval":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Recurrence Interval"},"recurrence_start_at":{"type":"string","format":"date-time","title":"Recurrence Start At"},"recurrence_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recurrence End At"},"days_of_week":{"items":{"$ref":"#/components/schemas/MentiumTmsAvailabilityDayOfWeek"},"type":"array","title":"Days Of Week"},"days_of_week_monthly_occurrences":{"items":{"$ref":"#/components/schemas/MentiumTmsAvailabilityDayOfWeekMonthlyOccurrence"},"type":"array","title":"Days Of Week Monthly Occurrences"},"days_of_month":{"items":{"type":"integer"},"type":"array","title":"Days Of Month"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["recurrence_frequency","recurrence_start_at"],"title":"CreateAvailabilityRequest","example":{"days_of_month":[],"days_of_week":["TUESDAY","THURSDAY"],"days_of_week_monthly_occurrences":[],"destination":{"country":"USA","postal_code_prefix":"300"},"equipment_type":"REEFER","notes":"Weekly reefer capacity from Florida to Georgia","recurrence_end_at":"2026-12-31T23:59:59Z","recurrence_frequency":"WEEKLY_BY_DAY_OF_WEEK","recurrence_interval":1,"recurrence_start_at":"2026-02-01T00:00:00Z","shipping_method":"FTL","source":{"country":"USA","state":"FL"}}},"CreateAvailabilityResult":{"properties":{"availability":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedAvailability"},"created":{"type":"boolean","title":"Created","description":"False when an identical availability already existed (same dedupe hash); no new row was inserted."}},"type":"object","required":["availability","created"],"title":"CreateAvailabilityResult","description":"Response for POST availabilities: new row or existing row when duplicate hash."},"CreateCarrierContactRequest":{"properties":{"first_name":{"type":"string","title":"First Name","description":"Contact's first name"},"last_name":{"type":"string","title":"Last Name","description":"Contact's last name"},"primary_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Email"},"primary_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Phone"},"contact_type":{"$ref":"#/components/schemas/MentiumTmsContactType","description":"Contact type (MentiumTmsContactType enum)"},"is_primary_contact":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Primary Contact","description":"Whether this is the primary contact"}},"type":"object","required":["first_name","last_name","contact_type"],"title":"CreateCarrierContactRequest","description":"Request schema for creating a carrier contact"},"CreateCarrierNoteRequest":{"properties":{"body":{"type":"string","maxLength":10000,"minLength":1,"title":"Body","description":"Note body text"}},"type":"object","required":["body"],"title":"CreateCarrierNoteRequest"},"CreateConversationRequest":{"properties":{"channel":{"$ref":"#/components/schemas/ConversationType"},"body":{"type":"string","title":"Body"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"to_recipients":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"To Recipients"},"cc_recipients":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Cc Recipients"},"bcc_recipients":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Bcc Recipients"},"attachment_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Attachment Keys"},"integration_connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Connection Id"},"to_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Phone"},"from_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Phone Number Id"},"media_urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Media Urls"},"twilio_content_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Content Sid"},"twilio_content_variables":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Twilio Content Variables"},"teams_target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teams Target Type"},"teams_recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teams Recipient"},"teams_team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teams Team Name"},"teams_channel_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teams Channel Name"},"teams_mentions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Teams Mentions"},"external_reference_load_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Load Id"},"external_reference_carrier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Carrier Id"},"carrier_contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Contact Email"}},"type":"object","required":["channel","body"],"title":"CreateConversationRequest"},"CreateDraftFromDeployedRequest":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id","description":"ID of the deployed workflow to edit."}},"type":"object","required":["workflow_id"],"title":"CreateDraftFromDeployedRequest","description":"Request to create a draft from an existing deployed workflow."},"CreateLaneRequest":{"properties":{"source":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Source"},"destination":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Destination"},"shipping_method":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}]},"equipment_type":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}]},"preference_level":{"$ref":"#/components/schemas/MentiumTmsLanePreferenceLevel"},"target_line_haul_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Target Line Haul Rate"},"target_fuel_surcharge_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Target Fuel Surcharge Rate"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"automation_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automation Enabled"},"is_contract":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Contract"},"contract_status":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsContractStatus"},{"type":"null"}]},"contract_effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Contract Effective At"},"contract_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Contract Expires At"},"contract_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Notes"}},"additionalProperties":false,"type":"object","required":["preference_level"],"title":"CreateLaneRequest","example":{"automation_enabled":true,"contract_effective_at":"2024-01-01T00:00:00Z","contract_expires_at":"2024-12-31T23:59:59Z","contract_notes":"Annual contract for temperature-controlled shipments","contract_status":"ACTIVE","destination":{"country":"USA","postal_code":"90001"},"equipment_type":"REEFER","is_contract":true,"notes":"Temperature-controlled lane for produce","preference_level":"PRIMARY","shipping_method":"FTL","source":{"country":"USA","state":"TX"},"target_fuel_surcharge_rate":450.0,"target_line_haul_rate":3200.0}},"CreateOfferRequest":{"properties":{"external_reference_load_id":{"type":"string","title":"External Reference Load Id","description":"Load external reference ID"},"integration_connection_id":{"type":"string","title":"Integration Connection Id","description":"TMS integration connection UUID"},"min_load_offer_carrier_rate_amount":{"type":"number","exclusiveMinimum":0.0,"title":"Min Load Offer Carrier Rate Amount","description":"What broker offers carrier (in negotiation display currency, based on offer settings)"},"max_load_offer_carrier_rate_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Load Offer Carrier Rate Amount","description":"Maximum acceptable carrier bid (defaults to opening rate * 1.2)"}},"type":"object","required":["external_reference_load_id","integration_connection_id","min_load_offer_carrier_rate_amount"],"title":"CreateOfferRequest"},"CreatePhoneCallRequest":{"properties":{"direction":{"$ref":"#/components/schemas/PhoneCallDirection"},"from_number":{"type":"string","title":"From Number"},"to_number":{"type":"string","title":"To Number"},"ai_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Agent Id","description":"Internal Mentium ai_agent.id"},"elevenlabs_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Elevenlabs Agent Id","description":"External ElevenLabs agent ID"},"external_reference_carrier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Carrier Id","description":"TMS Carrier ID"},"external_reference_carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Carrier Name","description":"Carrier display name snapshotted at call creation time"},"external_reference_load_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Load Id","description":"TMS Load ID"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id","description":"ElevenLabs conversation ID"},"twilio_call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Call Sid","description":"Twilio call SID"}},"type":"object","required":["direction","from_number","to_number"],"title":"CreatePhoneCallRequest","description":"Request to create a phone call record.\n\nNote: In production, calls are created by:\n- Outbound API (Package 6)\n- Webhooks (Package 5)\nThis endpoint is primarily for testing purposes."},"CustomerContactSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Contact UUID"},"customer_id":{"type":"string","title":"Customer Id","description":"Parent customer UUID"},"external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Id","description":"External reference ID from TMS"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name","description":"Full name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"First name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Last name"},"contact_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type","description":"Contact type (e.g., Primary Accounting)"},"access_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Level","description":"Access level (e.g., Accounting, Admin)"},"is_primary":{"type":"boolean","title":"Is Primary","description":"Whether this is the primary contact","default":false},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1","description":"Address line 1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2","description":"Address line 2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code","description":"Postal code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country"},"hide_invoice_summary":{"type":"boolean","title":"Hide Invoice Summary","description":"Hide invoice summary flag","default":false},"accounting_email_required":{"type":"boolean","title":"Accounting Email Required","description":"Accounting email required flag","default":false},"consolidation":{"type":"boolean","title":"Consolidation","description":"Consolidation flag","default":false},"division":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Division","description":"Division"},"role_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Id","description":"Role ID"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether contact is active","default":true}},"additionalProperties":true,"type":"object","required":["id","customer_id"],"title":"CustomerContactSchema","description":"Customer Contact schema for OpenAPI documentation.\n\nRepresents a contact person at the customer company (accounting, admin, etc.)","example":{"contact_type":"Primary Accounting","customer_id":"customer-uuid-456","email":"jane@customer.com","external_reference_id":"Contact-00006711","full_name":"Jane Smith","id":"contact-uuid-123","is_active":true,"is_primary":true,"phone":"555-123-4567"}},"CustomerCreate":{"properties":{"external_reference_id":{"type":"string","maxLength":255,"minLength":1,"title":"External Reference Id","description":"Unique identifier from your system"},"name":{"type":"string","maxLength":255,"title":"Name","description":"Customer name"},"reference_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Reference Number","description":"Additional reference number"},"domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Domain","description":"Customer domain/website"},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone","description":"Phone number"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Is the customer active","default":true},"customer_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Customer Type","description":"Customer type/category"}},"type":"object","required":["external_reference_id","name"],"title":"CustomerCreate","description":"Schema for creating a customer."},"CustomerFinancialSummarySchema":{"properties":{"total_revenue":{"type":"number","title":"Total Revenue","description":"Total revenue from all loads","default":0.0},"total_loads":{"type":"integer","title":"Total Loads","description":"Total number of loads","default":0},"avg_revenue_per_load":{"type":"number","title":"Avg Revenue Per Load","description":"Average revenue per load","default":0.0},"total_carrier_cost":{"type":"number","title":"Total Carrier Cost","description":"Total carrier costs","default":0.0},"total_margin":{"type":"number","title":"Total Margin","description":"Total margin (revenue - cost)","default":0.0},"avg_margin_percentage":{"type":"number","title":"Avg Margin Percentage","description":"Average margin percentage","default":0.0}},"additionalProperties":true,"type":"object","title":"CustomerFinancialSummarySchema","description":"Financial summary for a customer - revenue and margin statistics."},"CustomerLoadSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Load UUID"},"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID from TMS"},"tms_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tms Status","description":"Raw TMS status"},"mentium_status":{"type":"string","title":"Mentium Status","description":"Mentium mapped status"},"origin_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin City","description":"Origin city"},"origin_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin State","description":"Origin state"},"destination_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination City","description":"Destination city"},"destination_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination State","description":"Destination state"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type","description":"Equipment type"},"first_pickup_stop_target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Target Arrival Earliest At","description":"First PICKUP stop's target_arrival_earliest_at"},"last_delivery_stop_target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Target Arrival Earliest At","description":"Last DELIVERY stop's target_arrival_earliest_at"},"total_customer_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Customer Amount","description":"Customer amount/revenue"},"total_carrier_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Carrier Amount","description":"Carrier cost"},"created_at":{"type":"string","title":"Created At","description":"Load created timestamp"}},"additionalProperties":true,"type":"object","required":["id","external_reference_id","mentium_status","created_at"],"title":"CustomerLoadSchema","description":"Simplified load schema for customer detail view."},"CustomerOptionSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Customer UUID"},"name":{"type":"string","title":"Name","description":"Customer name"}},"additionalProperties":false,"type":"object","required":["id","name"],"title":"CustomerOptionSchema","description":"Customer option for dropdown filters."},"CustomerResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Internal Mentium ID"},"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID from your system"},"name":{"type":"string","title":"Name","description":"Customer name"},"reference_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Number","description":"Additional reference"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"Customer domain/website"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number"},"is_active":{"type":"boolean","title":"Is Active","description":"Is the customer active"},"customer_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Type","description":"Customer type/category"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["id","external_reference_id","name","is_active","created_at","updated_at"],"title":"CustomerResponse","description":"Response schema for a customer."},"CustomerSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Customer UUID"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"Organization UUID"},"integration_connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Connection Id","description":"Integration connection UUID"},"external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Id","description":"External reference ID from TMS"},"name":{"type":"string","title":"Name","description":"Customer name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"Customer domain/website"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number"},"fax_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fax Number","description":"Fax number"},"reference_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Number","description":"Reference number"},"billing_currency":{"type":"string","title":"Billing Currency","description":"Billing currency (USD, CAD, MXN)","default":"USD"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether customer is active","default":true},"is_parent":{"type":"boolean","title":"Is Parent","description":"Whether customer is a parent account","default":false},"customer_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Type","description":"Customer type (Enterprise, Mid-Market, Small Business)"},"customer_team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Team","description":"Customer team assignment"},"customer_division":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Division","description":"Customer division"},"ordered_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ordered By Id","description":"Ordered by user ID"},"ordered_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ordered By Name","description":"Ordered by user name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/AddressSchema"},{"type":"null"}],"description":"Billing address"},"primary_address":{"anyOf":[{"$ref":"#/components/schemas/AddressSchema"},{"type":"null"}],"description":"Primary/shipping address"},"financial_summary":{"anyOf":[{"$ref":"#/components/schemas/CustomerFinancialSummarySchema"},{"type":"null"}],"description":"Financial summary"},"recent_loads":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerLoadSchema"},"type":"array"},{"type":"null"}],"title":"Recent Loads","description":"Recent loads for this customer"},"contacts":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomerContactSchema"},"type":"array"},{"type":"null"}],"title":"Contacts","description":"Customer contacts"},"payment_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Term","description":"Payment terms (e.g., 'Net 30')"},"credit_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit Limit","description":"Credit limit amount"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Customer created timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Customer last updated timestamp"}},"additionalProperties":true,"type":"object","required":["id","name"],"title":"CustomerSchema","description":"Customer schema for OpenAPI documentation.\n\nThis is the main TMS Customer object containing all customer details.","example":{"billing_currency":"USD","credit_limit":100000.0,"customer_type":"Enterprise","external_reference_id":"CUST12345","id":"123e4567-e89b-12d3-a456-426614174000","integration_connection_id":"int-456","is_active":true,"name":"Acme Corporation","organization_id":"org-123","payment_term":"Net 30","phone":"555-123-4567"}},"CustomerUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name","description":"Customer name"},"reference_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Reference Number","description":"Additional reference number"},"domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Domain","description":"Customer domain/website"},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone","description":"Phone number"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Is the customer active"},"customer_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Customer Type","description":"Customer type/category"}},"type":"object","title":"CustomerUpdate","description":"Schema for updating a customer. All fields are optional."},"DashboardAgentRow":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"name":{"type":"string","title":"Name"},"agent_type":{"type":"string","title":"Agent Type"},"channels":{"items":{"type":"string","enum":["email","text","whatsapp","phone"]},"type":"array","title":"Channels"},"interactions":{"type":"integer","title":"Interactions"},"booked":{"type":"integer","title":"Booked"},"offer_value":{"type":"number","title":"Offer Value"},"escalated":{"type":"integer","title":"Escalated"},"median_first_response_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median First Response Seconds"}},"type":"object","required":["agent_id","name","agent_type","interactions","booked","offer_value","escalated"],"title":"DashboardAgentRow","description":"One agent's line in the leaderboard — conversation *and* phone agents.\nAgents with no activity in the window appear with zeros rather than\nvanishing. The leaderboard always covers every active agent regardless of\nthe ``agent_ids`` filter — it doubles as the page's agent drill-down\nnavigation, so focusing one agent must not hide the other rows. Phone\nagents carry a null ``median_first_response_seconds`` (no message stream)."},"DashboardRecentOffer":{"properties":{"id":{"type":"string","title":"Id"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"load":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load"},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Carrier Rate Amount"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","received_at","status"],"title":"DashboardRecentOffer","description":"One row of the \"Recent offers\" widget."},"DashboardStatsSchema":{"properties":{"total_users":{"type":"integer","title":"Total Users"},"total_organizations":{"type":"integer","title":"Total Organizations"},"total_pending_requests":{"type":"integer","title":"Total Pending Requests"}},"type":"object","required":["total_users","total_organizations","total_pending_requests"],"title":"DashboardStatsSchema"},"DashboardTrendBucket":{"properties":{"bucket_start":{"type":"string","format":"date-time","title":"Bucket Start"},"interactions":{"type":"integer","title":"Interactions"},"booked":{"type":"integer","title":"Booked"},"escalated":{"type":"integer","title":"Escalated"}},"type":"object","required":["bucket_start","interactions","booked","escalated"],"title":"DashboardTrendBucket","description":"One time bucket of the trend chart (zero-filled across the window)."},"DashboardWindowKpis":{"properties":{"interactions":{"type":"integer","title":"Interactions"},"inbound":{"type":"integer","title":"Inbound"},"outbound":{"type":"integer","title":"Outbound"},"booked":{"type":"integer","title":"Booked"},"loads_booked":{"type":"integer","title":"Loads Booked"},"booked_value":{"type":"number","title":"Booked Value"},"offer_value":{"type":"number","title":"Offer Value"},"load_identified":{"type":"integer","title":"Load Identified"},"price_discussed":{"type":"integer","title":"Price Discussed"},"escalated":{"type":"integer","title":"Escalated"},"handled_by_ai":{"type":"integer","title":"Handled By Ai"},"callback_requested":{"type":"integer","title":"Callback Requested"},"median_first_response_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median First Response Seconds"},"after_hours_replies":{"type":"integer","title":"After Hours Replies"}},"type":"object","required":["interactions","inbound","outbound","booked","loads_booked","booked_value","offer_value","load_identified","price_discussed","escalated","handled_by_ai","callback_requested","after_hours_replies"],"title":"DashboardWindowKpis","description":"Outcome aggregates for one time window, summed across the selected\nchannels (conversation + phone). All rates the UI shows derive from\n``interactions`` — the full conversation + call count, not a\ntagged/analyzed subset. ``median_first_response_seconds`` and\n``after_hours_replies`` are message-channel metrics (a phone call has no\nmessage stream, so it contributes a null median and 0 after-hours)."},"DeactivateContactRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why the contact is being deactivated"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email","description":"Contact's email; stored so automated senders refuse it by address everywhere"}},"type":"object","title":"DeactivateContactRequest"},"DownstreamConsumerHintRequest":{"properties":{"node_label":{"type":"string","maxLength":200,"title":"Node Label"},"node_type":{"type":"string","maxLength":200,"title":"Node Type","default":""},"referenced_fields":{"items":{"type":"string"},"type":"array","maxItems":200,"title":"Referenced Fields","description":"Names of Result fields this downstream node currently references."}},"type":"object","required":["node_label"],"title":"DownstreamConsumerHintRequest","description":"A workflow node that follows this code execution node and reads its Result."},"DraftAuthoringAgentCreate":{"properties":{"yaml_content":{"type":"string","title":"Yaml Content","description":"The agent.yaml, as the agent editor stores it"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id","description":"A live agent to change; omit for a new agent"}},"type":"object","required":["yaml_content"],"title":"DraftAuthoringAgentCreate"},"DraftAuthoringAgentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The draft's id"},"draft_of_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Draft Of Id","description":"The live agent publishing this draft updates"},"review_url":{"type":"string","title":"Review Url","description":"Where a person reviews and publishes (or creates) the agent"}},"type":"object","required":["id","review_url"],"title":"DraftAuthoringAgentOut"},"DraftAuthoringAgentUpdate":{"properties":{"yaml_content":{"type":"string","title":"Yaml Content"}},"type":"object","required":["yaml_content"],"title":"DraftAuthoringAgentUpdate"},"DraftAuthoringWorkflowCreate":{"properties":{"yaml_content":{"type":"string","title":"Yaml Content","description":"The workflow YAML, as the workflow editor stores it"},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"Defaults to 'Untitled Workflow' for a new workflow"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id","description":"A live workflow to change; omit for a new workflow"}},"type":"object","required":["yaml_content"],"title":"DraftAuthoringWorkflowCreate"},"DraftAuthoringWorkflowOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The draft's id"},"name":{"type":"string","title":"Name"},"workflow_parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Parent Id","description":"The live workflow a deploy promotes this draft into"},"review_url":{"type":"string","title":"Review Url","description":"Where a person reviews and deploys the draft"}},"type":"object","required":["id","name","review_url"],"title":"DraftAuthoringWorkflowOut"},"DraftAuthoringWorkflowUpdate":{"properties":{"yaml_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yaml Content"},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"}},"type":"object","title":"DraftAuthoringWorkflowUpdate"},"EfficiencyBooked":{"properties":{"ai_loads":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ai Loads","default":0},"ai_priced_loads":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ai Priced Loads","default":0},"ai_revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ai Revenue","default":0.0},"ai_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ai Margin","default":0.0},"person_loads":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Person Loads","default":0},"person_priced_loads":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Person Priced Loads","default":0},"person_revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Person Revenue","default":0.0},"person_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Person Margin","default":0.0},"human_loads":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Human Loads"},"human_priced_loads":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Human Priced Loads"},"human_revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Human Revenue"},"human_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Human Margin"}},"type":"object","required":["ai_loads","ai_priced_loads","ai_revenue","ai_margin","person_loads","person_priced_loads","person_revenue","person_margin","human_loads","human_priced_loads","human_revenue","human_margin"],"title":"EfficiencyBooked","description":"Who booked the loads booked in the window.\n\nWith a TMS, every load the TMS booked in the window is one of three: ``ai`` and\n``person`` (with AI's help) as in ``EfficiencyOutcomes``, and ``human`` — the\ncarrier that hauled it never talked to the AI, or the AI talked to another\none. Without a TMS, ``ai`` / ``person`` come from Mentium's own booking records\nand ``human_*`` is null. ``ai_*`` / ``person_*`` are null when Vortex cannot\nsay who hauled the loads, ``human_*`` when it cannot count them."},"EfficiencyChannel":{"properties":{"key":{"$ref":"#/components/schemas/EfficiencyChannelKey"},"conversations":{"type":"integer","title":"Conversations","default":0},"stages":{"$ref":"#/components/schemas/EfficiencyStages"},"escalated":{"type":"integer","title":"Escalated","default":0},"ai_booked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ai Booked","default":0},"person_booked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Person Booked","default":0},"booked_revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Booked Revenue","default":0.0},"booked_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Booked Margin","default":0.0},"call_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Call Minutes"},"emails":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Emails"},"outbound_emails":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outbound Emails"},"reply_emails":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reply Emails"},"inbound_emails":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inbound Emails"}},"type":"object","required":["key","conversations","stages","escalated","ai_booked","person_booked","booked_revenue","booked_margin","call_minutes","emails","outbound_emails","reply_emails","inbound_emails"],"title":"EfficiencyChannel"},"EfficiencyChannelCounts":{"properties":{"call_in":{"type":"integer","title":"Call In","default":0},"call_out":{"type":"integer","title":"Call Out","default":0},"email_in":{"type":"integer","title":"Email In","default":0},"email_out":{"type":"integer","title":"Email Out","default":0}},"type":"object","required":["call_in","call_out","email_in","email_out"],"title":"EfficiencyChannelCounts"},"EfficiencyChannelKey":{"type":"string","enum":["call_in","call_out","email_in","email_out"],"title":"EfficiencyChannelKey"},"EfficiencyClosedBy":{"type":"string","enum":["ai","assisted","human"],"title":"EfficiencyClosedBy","description":"Who handled a conversation, or who booked a load."},"EfficiencyConversationPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EfficiencyConversationRow"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"EfficiencyConversationPage"},"EfficiencyConversationRow":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"channel":{"$ref":"#/components/schemas/EfficiencyChannelKey"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact"},"carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Name"},"carrier_mc_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Mc Number"},"carrier_dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Dot Number"},"load_offer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load Offer Id"},"load_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load Reference"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"destination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination"},"miles":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Miles"},"pickup_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pickup Earliest At"},"pickup_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pickup Latest At"},"delivery_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivery Earliest At"},"delivery_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivery Latest At"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"dispatch_rep":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatch Rep"},"equipment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment"},"closed_by":{"$ref":"#/components/schemas/EfficiencyClosedBy"},"status":{"$ref":"#/components/schemas/EfficiencyConversationStatus"},"offer_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Offer Amount"},"revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenue"},"margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin"},"margin_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Pct"}},"type":"object","required":["id","kind","channel","received_at","call_id","conversation_id","contact","carrier_name","carrier_mc_number","carrier_dot_number","load_offer_id","load_reference","origin","destination","miles","pickup_earliest_at","pickup_latest_at","delivery_earliest_at","delivery_latest_at","customer_name","dispatch_rep","equipment","closed_by","status","offer_amount","revenue","margin","margin_pct"],"title":"EfficiencyConversationRow","description":"One call or email thread. ``call_id`` / ``conversation_id`` open the record."},"EfficiencyConversationStatus":{"type":"string","enum":["booked","offer_accepted","declined","escalated","risky_carrier_stopped","in_progress","not_booked"],"title":"EfficiencyConversationStatus"},"EfficiencyDashboardResponse":{"properties":{"range_start":{"type":"string","format":"date-time","title":"Range Start"},"range_end":{"type":"string","format":"date-time","title":"Range End"},"window_days":{"type":"number","title":"Window Days"},"time_zone":{"type":"string","title":"Time Zone"},"currency":{"type":"string","title":"Currency"},"has_tms_connection":{"type":"boolean","title":"Has Tms Connection"},"channels":{"items":{"$ref":"#/components/schemas/EfficiencyChannel"},"type":"array","title":"Channels"},"loads":{"$ref":"#/components/schemas/EfficiencyLoads"},"outcomes":{"$ref":"#/components/schemas/EfficiencyOutcomes"},"booked":{"$ref":"#/components/schemas/EfficiencyBooked"},"series":{"$ref":"#/components/schemas/EfficiencySeries"}},"type":"object","required":["range_start","range_end","window_days","time_zone","currency","has_tms_connection","channels","loads","outcomes","booked","series"],"title":"EfficiencyDashboardResponse"},"EfficiencyLoadPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EfficiencyLoadRow"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"EfficiencyLoadPage"},"EfficiencyLoadRow":{"properties":{"load_offer_id":{"type":"string","title":"Load Offer Id"},"load_reference":{"type":"string","title":"Load Reference"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"destination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination"},"miles":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Miles"},"pickup_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pickup Earliest At"},"pickup_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pickup Latest At"},"delivery_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivery Earliest At"},"delivery_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivery Latest At"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"dispatch_rep":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatch Rep"},"equipment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment"},"calls":{"type":"integer","title":"Calls","default":0},"emails":{"type":"integer","title":"Emails","default":0},"carriers":{"type":"integer","title":"Carriers","default":0},"status":{"$ref":"#/components/schemas/EfficiencyLoadStatus"},"booked_by":{"anyOf":[{"$ref":"#/components/schemas/EfficiencyClosedBy"},{"type":"null"}]},"revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenue"},"margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin"},"margin_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Pct"},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At"},"customer_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Customer Rate"},"min_carrier_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Carrier Rate"},"max_carrier_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Carrier Rate"}},"type":"object","required":["load_offer_id","load_reference","origin","destination","miles","pickup_earliest_at","pickup_latest_at","delivery_earliest_at","delivery_latest_at","customer_name","dispatch_rep","equipment","calls","emails","carriers","status","booked_by","revenue","margin","margin_pct","last_activity_at","customer_rate","min_carrier_rate","max_carrier_rate"],"title":"EfficiencyLoadRow","description":"One load the AI worked on in the window, its calls and emails added up."},"EfficiencyLoadStatus":{"type":"string","enum":["booked","offer_accepted","escalated","in_progress","not_booked"],"title":"EfficiencyLoadStatus"},"EfficiencyLoads":{"properties":{"touched":{"type":"integer","title":"Touched","default":0},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["touched","total"],"title":"EfficiencyLoads","description":"How many loads the AI worked on in the window, against every load booked in it.\n\n``touched`` is the load table's count: loads named by an AI call or thread in\nthe window. ``total`` is every load booked in the window, whoever booked it\n(``booked`` AI + person + human, before any agent filter); null when\n``human_*`` is. The two are different cohorts (worked on vs. booked), so\n``touched`` can exceed ``total``."},"EfficiencyOutcomes":{"properties":{"booked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booked","default":0},"assisted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assisted","default":0}},"type":"object","required":["booked","assisted"],"title":"EfficiencyOutcomes","description":"Loads booked in the window: by the AI, and with the AI's help.\n\nWith a TMS: the carrier that hauled the load talked to the AI about it and was\npaid the rate they agreed with it (``booked``), or talked to it without settling\nat that rate (``assisted``). Null when Vortex cannot say who hauled the loads."},"EfficiencySeries":{"properties":{"daily":{"items":{"$ref":"#/components/schemas/EfficiencySeriesPoint"},"type":"array","title":"Daily"},"weekly":{"items":{"$ref":"#/components/schemas/EfficiencySeriesPoint"},"type":"array","title":"Weekly"},"monthly":{"items":{"$ref":"#/components/schemas/EfficiencySeriesPoint"},"type":"array","title":"Monthly"}},"type":"object","required":["daily","weekly","monthly"],"title":"EfficiencySeries"},"EfficiencySeriesPoint":{"properties":{"label":{"type":"string","title":"Label"},"start":{"type":"string","format":"date","title":"Start"},"conversations":{"$ref":"#/components/schemas/EfficiencyChannelCounts"},"ai_booked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ai Booked","default":0},"ai_priced":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ai Priced","default":0},"ai_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ai Margin","default":0.0},"person_booked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Person Booked","default":0},"person_priced":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Person Priced","default":0},"person_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Person Margin","default":0.0},"human_booked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Human Booked"},"human_priced":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Human Priced"},"human_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Human Margin"}},"type":"object","required":["label","start","conversations","ai_booked","ai_priced","ai_margin","person_booked","person_priced","person_margin","human_booked","human_priced","human_margin"],"title":"EfficiencySeriesPoint","description":"One day, week (Monday start) or month, in the requested time zone."},"EfficiencyStages":{"properties":{"mc_check":{"type":"integer","title":"Mc Check","default":0},"load_info":{"type":"integer","title":"Load Info","default":0},"negotiated":{"type":"integer","title":"Negotiated","default":0},"booked":{"type":"integer","title":"Booked","default":0}},"type":"object","required":["mc_check","load_info","negotiated","booked"],"title":"EfficiencyStages","description":"How far each conversation got; each one counts once, at its deepest stage."},"ElevenLabsVoice":{"properties":{"voice_id":{"type":"string","title":"Voice Id","description":"ElevenLabs voice ID"},"name":{"type":"string","title":"Name","description":"Voice name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Voice category (e.g., premade, cloned)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Voice description"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url","description":"URL to preview the voice"},"labels":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Labels","description":"Voice labels/tags"}},"type":"object","required":["voice_id","name"],"title":"ElevenLabsVoice","description":"ElevenLabs voice information"},"ElevenLabsVoiceSettings":{"properties":{"model_id":{"type":"string","enum":["flash","multilingual","v3_conversational"],"title":"Model Id","description":"TTS model family used by ElevenLabs conversational TTS.","default":"flash"},"expressive_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Expressive Mode","description":"Only used by v3_conversational TTS model family."},"stability":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Stability"},"similarity_boost":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Similarity Boost"},"speed":{"anyOf":[{"type":"number","maximum":1.2,"minimum":0.7},{"type":"null"}],"title":"Speed"}},"type":"object","title":"ElevenLabsVoiceSettings","description":"Voice settings fetched from ElevenLabs for a specific voice."},"EmailAvailabilityResponse":{"properties":{"local":{"type":"string","title":"Local"},"available":{"type":"boolean","title":"Available"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["local","available"],"title":"EmailAvailabilityResponse"},"EmailDefaultResponse":{"properties":{"default_local":{"type":"string","title":"Default Local"},"org_suffix":{"type":"string","title":"Org Suffix"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["default_local","org_suffix","domain"],"title":"EmailDefaultResponse"},"EmailOfferOptOutReasonCode":{"type":"string","enum":["too_many_emails","not_interested","wrong_contact","other"],"title":"EmailOfferOptOutReasonCode"},"EmailSenderIdentityResponse":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"sender_email":{"type":"string","title":"Sender Email"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"reply_to_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To Email"},"domain":{"type":"string","title":"Domain"},"provider_name":{"type":"string","title":"Provider Name"},"status":{"type":"string","title":"Status"},"status_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason"},"provisioned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Provisioned At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","workspace_id","sender_email","domain","provider_name","status","created_at","updated_at"],"title":"EmailSenderIdentityResponse"},"EmailSignatureAssetSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"file_name":{"type":"string","title":"File Name"},"size_bytes":{"type":"integer","title":"Size Bytes"},"src":{"type":"string","title":"Src"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","file_name","size_bytes","src","created_at"],"title":"EmailSignatureAssetSchema","description":"An image the signature body can reference.\n\n``src`` is the object's own public URL, built from ``S3_ENDPOINT`` and\n``S3_BUCKET_EMAIL_SIGNATURE_ASSETS``. It goes straight into the body's ``<img src>``:\nthe recipient's mail client fetches it from S3, never from us."},"EmailSignatureCreate":{"properties":{"body":{"type":"string","minLength":1,"title":"Body"},"is_active":{"type":"boolean","title":"Is Active","default":false}},"type":"object","required":["body"],"title":"EmailSignatureCreate"},"EmailSignatureListResponse":{"properties":{"signatures":{"items":{"$ref":"#/components/schemas/EmailSignatureSchema"},"type":"array","title":"Signatures"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["signatures","total","page","page_size"],"title":"EmailSignatureListResponse"},"EmailSignatureSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"body":{"type":"string","title":"Body"},"is_active":{"type":"boolean","title":"Is Active"},"rendered_body":{"type":"string","title":"Rendered Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"}},"type":"object","required":["id","organization_id","workspace_id","body","is_active","rendered_body","created_at","updated_at"],"title":"EmailSignatureSchema"},"EmailSignatureUpdate":{"properties":{"body":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Body"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EmailSignatureUpdate"},"EmailSuppressionReleaseResponse":{"properties":{"email":{"type":"string","title":"Email","description":"The (normalized) address that was un-flagged"},"released":{"type":"boolean","title":"Released","description":"True when an active suppression was released"}},"type":"object","required":["email","released"],"title":"EmailSuppressionReleaseResponse"},"EmptyRegion":{"properties":{"kind":{"type":"string","const":"empty","title":"Kind","default":"empty"}},"type":"object","title":"EmptyRegion","description":"No Region specified for this side — user omitted geographic info entirely."},"EngagementMetricsSchema":{"properties":{"contacted_count":{"type":"integer","title":"Contacted Count","description":"Number of unique carriers contacted for this load","default":0},"responses_count":{"type":"integer","title":"Responses Count","description":"Number of unique carriers who responded","default":0}},"additionalProperties":true,"type":"object","title":"EngagementMetricsSchema","description":"Carrier engagement metrics for load board."},"EventTriggerCondition":{"properties":{"resource_type":{"$ref":"#/components/schemas/VortexResourceType"},"type":{"$ref":"#/components/schemas/ConditionType"},"field":{"type":"string","title":"Field","description":"JSONPath-style field path: 'tms_status', 'mentium_status', 'stops[0].city', 'customer.name'"},"operator":{"$ref":"#/components/schemas/FilterOperator"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Value to compare against (for CURRENT_STATE or single-value comparisons)"},"from_value":{"anyOf":[{},{"type":"null"}],"title":"From Value","description":"Previous value (for CHANGE_STATE conditions). Can be a single value or a list of values."},"to_value":{"anyOf":[{},{"type":"null"}],"title":"To Value","description":"New value (for CHANGE_STATE conditions). Can be a single value or a list of values. Supports status normalization for 'tms_status' and 'mentium_status' fields."}},"type":"object","required":["resource_type","type","field","operator"],"title":"EventTriggerCondition","description":"A single condition that must be met for an automation to trigger.\n\nConditions can check either the current state of a resource or detect\nchanges in a field value (e.g., status changed from \"pending\" to \"active\")."},"ExchangeRateResponse":{"properties":{"from_currency":{"type":"string","title":"From Currency","description":"Source currency code (e.g., 'CAD')"},"to_currency":{"type":"string","title":"To Currency","description":"Target currency code (e.g., 'USD')"},"rate":{"type":"number","title":"Rate","description":"Exchange rate (1 from_currency = rate to_currency)"},"rate_date":{"type":"string","format":"date","title":"Rate Date","description":"Date the rate is valid for"},"source":{"type":"string","title":"Source","description":"Source of the rate (e.g., 'open_exchange_rates', 'cache')"}},"type":"object","required":["from_currency","to_currency","rate","rate_date","source"],"title":"ExchangeRateResponse","description":"Response schema for exchange rate queries."},"ExistingAvailabilityItem":{"properties":{"index":{"type":"integer","title":"Index","description":"1-based availability number in the form"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source location, e.g. 'Dallas, Texas, US'"},"destination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination","description":"Destination location, e.g. 'Chicago, Illinois, US'"},"shipping_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipping Method","description":"Shipping method, e.g. FTL, LTL"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type","description":"Equipment type, e.g. DRY_VAN, REEFER"},"recurrence_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Frequency","description":"Recurrence pattern, e.g. ONCE, WEEKLY_BY_DAY_OF_WEEK"},"recurrence_interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recurrence Interval","description":"Recurrence interval, e.g. every N weeks"},"recurrence_start_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Start At","description":"Start date in YYYY-MM-DD format"},"recurrence_end_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence End At","description":"End date in YYYY-MM-DD format"},"days_of_week":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Days Of Week","description":"Days of week, e.g. ['MONDAY', 'WEDNESDAY']"},"days_of_week_monthly_occurrences":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Days Of Week Monthly Occurrences","description":"Monthly occurrences, e.g. ['FIRST', 'THIRD']"},"days_of_month":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Days Of Month","description":"Days of month, e.g. [1, 15]"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"Notes for this availability"}},"type":"object","required":["index"],"title":"ExistingAvailabilityItem","description":"Full description of an availability already in the form, sent as context for AI editing.\n\nField names intentionally match ParsedAvailabilityData so the LLM sees the\nsame keys in the context as it must produce in the output."},"ExistingDraftResponse":{"properties":{"draft_id":{"type":"string","title":"Draft Id"},"yaml_content":{"type":"string","title":"Yaml Content","description":"Current agent.yaml content","default":""}},"type":"object","required":["draft_id"],"title":"ExistingDraftResponse","description":"Response body for the existing-draft lookup endpoint."},"ExistingLaneItem":{"properties":{"index":{"type":"integer","title":"Index","description":"1-based lane number in the form"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source location, e.g. 'Dallas, Texas, US'"},"destination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination","description":"Destination location, e.g. 'Chicago, Illinois, US'"},"shipping_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipping Method","description":"Shipping method, e.g. FTL, LTL"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type","description":"Equipment type, e.g. DRY_VAN, REEFER"},"preference_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preference Level","description":"Preference level, e.g. PREFERRED, PRIMARY"},"target_line_haul_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Line Haul Rate","description":"Line haul rate in dollars"},"target_fuel_surcharge_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Fuel Surcharge Rate","description":"Fuel surcharge in dollars"},"automation_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automation Enabled","description":"Whether automation is enabled"},"is_contract":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Contract","description":"Whether this is a contract lane"},"contract_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Status","description":"Contract status, e.g. ACTIVE, DRAFT"},"contract_effective_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Effective At","description":"Start date in YYYY-MM-DD format"},"contract_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Expires At","description":"End date in YYYY-MM-DD format"},"contract_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Notes","description":"Contract-specific notes"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"Notes for this lane"}},"type":"object","required":["index"],"title":"ExistingLaneItem","description":"Full description of a lane already in the form, sent as context for AI editing.\n\nField names intentionally match ParsedLaneData so the LLM sees the same\nkeys in the context as it must produce in the output."},"FavoriteCarrierIdsResponse":{"properties":{"carrier_external_reference_ids":{"items":{"type":"string"},"type":"array","title":"Carrier External Reference Ids"},"total_count":{"type":"integer","title":"Total Count","default":0}},"type":"object","title":"FavoriteCarrierIdsResponse"},"FavoriteCarrierSchema":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"carrier_external_reference_id":{"type":"string","title":"Carrier External Reference Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","workspace_id","integration_connection_id","carrier_external_reference_id","created_at"],"title":"FavoriteCarrierSchema"},"FilterFieldSchema":{"properties":{"key":{"type":"string","title":"Key","description":"Field key (matches backend field name)"},"label":{"type":"string","title":"Label","description":"Human-readable label for UI"},"type":{"type":"string","enum":["text","number","date","select","select_dynamic"],"title":"Type","description":"Field type determining UI component"},"description":{"type":"string","title":"Description","description":"Description for AI prompt context"},"operators":{"items":{"type":"string"},"type":"array","title":"Operators","description":"List of valid operators for this field"},"multi_select":{"type":"boolean","title":"Multi Select","description":"Whether multiple values can be selected","default":false},"options_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Options Source","description":"Source for dynamic options: 'customers', 'team_members', 'cities', 'states', 'equipment_types', 'mentium_statuses'"}},"additionalProperties":false,"type":"object","required":["key","label","type","description","operators"],"title":"FilterFieldSchema","description":"Schema for a single filter field definition."},"FilterOperator":{"type":"string","enum":["equals","not_equals","in","not_in","contains","not_contains","greater_than","less_than","greater_than_or_equal","less_than_or_equal","exists","not_exists"],"title":"FilterOperator","description":"Comparison operators for condition evaluation."},"FilterSchemaResponse":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/FilterFieldSchema"},"type":"array","title":"Fields","description":"List of all available filter fields"}},"additionalProperties":false,"type":"object","required":["fields"],"title":"FilterSchemaResponse","description":"Response containing filter field definitions."},"FinancialRateCreate":{"properties":{"rate_entity":{"$ref":"#/components/schemas/MentiumTmsFinancialRateEntity","description":"Rate entity (CUSTOMER or CARRIER)"},"charge_code":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Charge Code","description":"Charge code"},"charge_description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Charge Description","description":"Charge description"},"amount":{"type":"number","title":"Amount","description":"Rate amount"},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity","description":"Quantity"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate","description":"Rate per unit"}},"type":"object","required":["rate_entity","amount"],"title":"FinancialRateCreate","description":"Schema for financial rate."},"FinancialRateResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Rate ID"},"rate_entity":{"type":"string","title":"Rate Entity","description":"Rate entity"},"charge_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Charge Code","description":"Charge code"},"charge_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Charge Description","description":"Description"},"amount":{"type":"number","title":"Amount","description":"Amount"},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity","description":"Quantity"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate","description":"Rate per unit"}},"type":"object","required":["id","rate_entity","amount"],"title":"FinancialRateResponse","description":"Response schema for financial rate."},"FinancialSummarySchema":{"properties":{"total_customer_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Customer Amount","description":"What customer pays broker (revenue)"},"total_carrier_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Carrier Amount","description":"What broker pays carrier (cost)"},"net_margin_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Margin Amount","description":"Profit (revenue - cost)"},"net_margin_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Margin Percentage","description":"Margin percentage"}},"additionalProperties":true,"type":"object","title":"FinancialSummarySchema","description":"Financial summary schema for load profitability."},"ForwardEmailRequest":{"properties":{"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"message_id":{"type":"string","title":"Message Id"},"to":{"items":{"$ref":"#/components/schemas/ForwardRecipient"},"type":"array","title":"To"},"workflow_execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Execution Id"}},"type":"object","required":["integration_connection_id","message_id","to"],"title":"ForwardEmailRequest"},"ForwardEmailResponse":{"properties":{"sent_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent Message Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"ForwardEmailResponse"},"ForwardRecipient":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ForwardRecipient"},"GetGlobalDashboardMetricsResponse":{"properties":{"timeframe_metrics":{"items":{"$ref":"#/components/schemas/TimeFrameMetrics"},"type":"array","title":"Timeframe Metrics","description":"Timeframe metrics for the date range"}},"type":"object","required":["timeframe_metrics"],"title":"GetGlobalDashboardMetricsResponse","description":"Response model for global dashboard metrics","example":{"timeframe_metrics":[{"elapsed_working_days":21,"organization_metrics":{"average_loads_per_interval":169.62,"average_margin_per_interval":34712.2,"average_margin_per_load":204.68,"average_revenue_per_interval":311546.92,"average_revenue_per_load":1836.74,"margin_percentage":11.14,"projected_total_loads":3562,"projected_total_margin":728956.14,"projected_total_revenue":6542485.25,"total_loads":3562,"total_margin":728956.14,"total_revenue":6542485.25},"remaining_working_days":0,"timeframe_end_datetime_exclusive":"2024-12-01T00:00:00Z","timeframe_start_datetime":"2024-11-01T00:00:00Z","timeframe_type":"MONTH"},{"elapsed_working_days":23,"organization_metrics":{"average_loads_per_interval":184.78,"average_margin_per_interval":35319.38,"average_margin_per_load":191.14,"average_revenue_per_interval":314546.43,"average_revenue_per_load":1701.88,"margin_percentage":11.23,"projected_total_loads":4250,"projected_total_margin":812345.67,"projected_total_revenue":7234567.89,"total_loads":4250,"total_margin":812345.67,"total_revenue":7234567.89},"remaining_working_days":0,"timeframe_end_datetime_exclusive":"2025-01-01T00:00:00Z","timeframe_start_datetime":"2024-12-01T00:00:00Z","timeframe_type":"MONTH"},{"elapsed_working_days":9,"organization_metrics":{"average_loads_per_interval":194.78,"average_margin_per_interval":38242.06,"average_margin_per_load":196.34,"average_revenue_per_interval":343377.06,"average_revenue_per_load":1763.08,"margin_percentage":11.14,"projected_total_loads":3331,"projected_total_margin":653939.15,"projected_total_revenue":5871747.73,"total_loads":1753,"total_margin":344178.5,"total_revenue":3090393.54},"remaining_working_days":12,"sales_representative_metrics":[{"assigned_loads":202,"assigned_loads_handled_by_others":0,"assigned_loads_handled_by_others_percentage":0.0,"assigned_loads_handled_by_self":202,"assigned_loads_handled_by_self_percentage":100.0,"average_bids_placed_per_interval":19.22,"average_bids_placed_per_load":0.85,"average_loads_per_interval":22.67,"loads_per_interval_goal":16,"margin_percentage":11.14,"name":"Marcus Hix","non_assigned_loads_handled_by_self":2,"non_assigned_loads_handled_by_self_percentage":0.98,"rolled_percentage":0.0,"total_bids_placed":173,"total_carriers_booked":148,"total_loads":204,"total_margin":40071.61,"total_revenue":359691.96}],"timeframe_end_datetime_exclusive":"2025-02-01T00:00:00Z","timeframe_start_datetime":"2025-01-01T00:00:00Z","timeframe_type":"MONTH","top_carriers_metrics":[{"average_loads_per_interval":16.33,"average_margin_per_load":119.89,"average_spend_per_load":2240.83,"margin_percentage":5.35,"name":"LARRY WILLIAMS TRUCKING LLC","top_lanes":[{"average_margin_per_load":119.89,"destination_city":"DALLAS","destination_state":"TX","margin_percentage":5.35,"source_city":"CHICAGO","source_state":"IL","total_loads":25,"total_margin":2997.25,"total_spend":56020.75}],"total_loads":147,"total_margin":17623.8,"total_spend":329472.67}]},{"elapsed_working_days":0,"organization_metrics":{"total_loads":0,"total_margin":0.0,"total_revenue":0.0},"remaining_working_days":20,"timeframe_end_datetime_exclusive":"2025-03-01T00:00:00Z","timeframe_start_datetime":"2025-02-01T00:00:00Z","timeframe_type":"MONTH"}]}},"GetLoadsForTruckRequest":{"properties":{"integration_connection_id":{"type":"string","format":"uuid","title":"Integration Connection Id"},"carrier_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Carrier Id"},"carrier_external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier External Reference Id"},"availability_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Availability Id"},"source":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"type":"null"}]},"destination":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"type":"null"}]},"shipping_method":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}]},"equipment_type":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}]},"first_pickup_stop_target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Target Arrival Earliest At"},"first_pickup_stop_target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Target Arrival Latest At"},"limit":{"type":"integer","minimum":1.0,"title":"Limit","default":10}},"type":"object","required":["integration_connection_id"],"title":"GetLoadsForTruckRequest"},"GetLoadsForTruckResponse":{"properties":{"loads_for_truck":{"items":{"$ref":"#/components/schemas/LoadForTruck"},"type":"array","title":"Loads For Truck"},"total_count":{"type":"integer","title":"Total Count"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["total_count","has_more"],"title":"GetLoadsForTruckResponse"},"GetProfitabilitySnapshotResponse":{"properties":{"exists":{"type":"boolean","title":"Exists","description":"False when the cron has not yet computed this period"},"period":{"anyOf":[{"$ref":"#/components/schemas/ProfitabilityPeriod"},{"type":"null"}],"description":"The precomputed period; null for a live custom window"},"currency":{"type":"string","title":"Currency","description":"Organization base currency of all amounts"},"computed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Computed At","description":"When the snapshot was computed"},"window_start_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window Start Datetime"},"window_end_datetime_exclusive":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window End Datetime Exclusive"},"total_loads":{"type":"integer","title":"Total Loads","default":0},"loads_with_financials":{"type":"integer","title":"Loads With Financials","default":0},"profitable_loads":{"type":"integer","title":"Profitable Loads","default":0},"unprofitable_loads":{"type":"integer","title":"Unprofitable Loads","default":0},"profitable_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profitable Percentage","description":"profitable_loads / loads_with_financials * 100"},"unprofitable_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unprofitable Percentage","description":"unprofitable_loads / loads_with_financials * 100"},"total_revenue":{"type":"number","title":"Total Revenue","default":0.0},"total_margin":{"type":"number","title":"Total Margin","default":0.0},"total_loss":{"type":"number","title":"Total Loss","default":0.0},"average_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Margin","description":"Average margin per load with financials"},"margin_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Percentage","description":"total_margin / total_revenue * 100"},"average_margin_per_mile":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Margin Per Mile","description":"total_margin / total carrier miles (RPM-style)"},"average_time_to_book_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Time To Book Seconds"},"slow_booked_loads":{"type":"integer","title":"Slow Booked Loads","default":0},"slow_booked_loss":{"type":"number","title":"Slow Booked Loss","default":0.0},"slow_booked_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slow Booked Percentage","description":"slow_booked_loss / total_loss * 100"},"lead_time_buckets":{"items":{"$ref":"#/components/schemas/ProfitabilityLeadTimeBucket"},"type":"array","title":"Lead Time Buckets"},"lead_time_excluded_loads":{"type":"integer","title":"Lead Time Excluded Loads","description":"Loads with booking+pickup time booked at/after pickup, excluded from buckets","default":0},"lead_time_excluded_unprofitable_loads":{"type":"integer","title":"Lead Time Excluded Unprofitable Loads","description":"Of lead_time_excluded_loads, how many lost money","default":0},"prior_total_revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prior Total Revenue"},"prior_total_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prior Total Margin"},"prior_total_loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prior Total Loss"},"customers":{"items":{"$ref":"#/components/schemas/ProfitabilityCustomer"},"type":"array","title":"Customers"},"lanes":{"items":{"$ref":"#/components/schemas/ProfitabilityLane"},"type":"array","title":"Lanes"},"agents":{"items":{"$ref":"#/components/schemas/ProfitabilityAgent"},"type":"array","title":"Agents"}},"type":"object","required":["exists","currency"],"title":"GetProfitabilitySnapshotResponse","description":"Profitability for the caller's org: a precomputed snapshot, or a live window."},"GetRecommendedCarriersForLoadRequest":{"properties":{"integration_connection_id":{"type":"string","format":"uuid","title":"Integration Connection Id"},"load_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Load Id"},"load_external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load External Reference Id"},"limit":{"type":"integer","minimum":1.0,"title":"Limit","default":10}},"type":"object","required":["integration_connection_id"],"title":"GetRecommendedCarriersForLoadRequest","description":"Request body for getting carrier recommendations for a load."},"GetRecommendedCarriersForLoadResponse":{"properties":{"recommended_carriers":{"items":{"$ref":"#/components/schemas/RecommendedCarrier"},"type":"array","title":"Recommended Carriers"},"overall_explainability":{"$ref":"#/components/schemas/libs__recommendations__carrier_recommendation__models__OverallExplainability"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["overall_explainability"],"title":"GetRecommendedCarriersForLoadResponse"},"GetRecommendedLoadsForCarrierRequest":{"properties":{"integration_connection_id":{"type":"string","format":"uuid","title":"Integration Connection Id"},"carrier_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Carrier Id"},"carrier_external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier External Reference Id"},"limit":{"type":"integer","minimum":1.0,"title":"Limit","default":10}},"type":"object","required":["integration_connection_id"],"title":"GetRecommendedLoadsForCarrierRequest","description":"Request body for getting load recommendations for a carrier."},"GetRecommendedLoadsForCarrierResponse":{"properties":{"recommended_loads":{"items":{"$ref":"#/components/schemas/RecommendedLoad"},"type":"array","title":"Recommended Loads"},"overall_explainability":{"$ref":"#/components/schemas/libs__recommendations__load_recommendation__models__OverallExplainability"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["overall_explainability"],"title":"GetRecommendedLoadsForCarrierResponse"},"GetVoiceSettingsResponse":{"properties":{"voice_id":{"type":"string","title":"Voice Id"},"settings":{"$ref":"#/components/schemas/ElevenLabsVoiceSettings"},"source":{"type":"string","enum":["voice","workspace_default"],"title":"Source"}},"type":"object","required":["voice_id","settings","source"],"title":"GetVoiceSettingsResponse","description":"Response containing voice settings and source metadata."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthCheck":{"properties":{"status":{"type":"string","title":"Status","default":"OK"}},"type":"object","title":"HealthCheck","description":"Response model to validate and return when performing a health check."},"HistoricalLaneCarrierSchema":{"properties":{"organization_id":{"type":"string","title":"Organization Id"},"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"carrier_id":{"type":"string","title":"Carrier Id"},"carrier_external_reference_id":{"type":"string","title":"Carrier External Reference Id"},"carrier_name":{"type":"string","title":"Carrier Name"},"carrier_dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Dot Number"},"carrier_mc_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Mc Number"},"total_loads":{"type":"integer","title":"Total Loads"}},"additionalProperties":false,"type":"object","required":["organization_id","integration_connection_id","carrier_id","carrier_external_reference_id","carrier_name","total_loads"],"title":"HistoricalLaneCarrierSchema","description":"A carrier aggregated across loads run on a lane matching the search filters."},"HistoricalLaneLocationSchema":{"properties":{"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"type":"object","title":"HistoricalLaneLocationSchema","description":"Location schema for historical lanes - city/state/country only"},"HistoricalRateResponse":{"properties":{"from_currency":{"type":"string","title":"From Currency","description":"Source currency code"},"to_currency":{"type":"string","title":"To Currency","description":"Target currency code"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate","description":"Exchange rate, null if not found"},"rate_date":{"type":"string","format":"date","title":"Rate Date","description":"Requested date"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source of the rate"},"found":{"type":"boolean","title":"Found","description":"Whether a rate was found for this date"}},"type":"object","required":["from_currency","to_currency","rate_date","found"],"title":"HistoricalRateResponse","description":"Response schema for historical exchange rate queries."},"HttpAuthType":{"type":"string","enum":["NONE","API_KEY","BEARER_TOKEN","BASIC_AUTH"],"title":"HttpAuthType"},"HttpMethod":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"HttpMethod"},"HttpTriggerResponse":{"properties":{"execution_id":{"type":"string","title":"Execution Id"},"status":{"type":"string","title":"Status"},"temporal_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Workflow Id"}},"type":"object","required":["execution_id","status"],"title":"HttpTriggerResponse"},"ImpactedWorkflowRef":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"workflow_name":{"type":"string","title":"Workflow Name"}},"type":"object","required":["workflow_id","workflow_name"],"title":"ImpactedWorkflowRef","description":"Reference to a workflow impacted by publishing an agent draft."},"ImpersonateRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"}},"type":"object","required":["user_id"],"title":"ImpersonateRequest"},"InboxProvider":{"type":"string","enum":["GOOGLE","MICROSOFT"],"title":"InboxProvider"},"InboxSchema":{"properties":{"id":{"type":"string","title":"Id"},"integration_connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Connection Id"},"provider":{"$ref":"#/components/schemas/InboxProvider"},"email_address":{"type":"string","title":"Email Address"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"mailbox_type":{"type":"string","title":"Mailbox Type"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["id","provider","email_address","mailbox_type","enabled"],"title":"InboxSchema"},"InitiateSequentialCallsRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Outbound phone AI agent ID used for each call in the campaign"},"load_id":{"type":"string","title":"Load Id","description":"TMS Load external reference ID"},"integration_connection_id":{"type":"string","title":"Integration Connection Id","description":"Integration connection UUID for TMS"},"max_carriers":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Max Carriers","description":"Maximum number of carriers to call","default":10},"delay_between_calls_seconds":{"type":"integer","maximum":600.0,"minimum":10.0,"title":"Delay Between Calls Seconds","description":"Delay between calls in seconds","default":60},"call_timeout_seconds":{"type":"integer","maximum":900.0,"minimum":60.0,"title":"Call Timeout Seconds","description":"Max wait time for each call to complete (up to 15 mins)","default":600},"carrier_targets":{"anyOf":[{"items":{"$ref":"#/components/schemas/CarrierCallTargetRequest"},"type":"array"},{"type":"null"}],"title":"Carrier Targets","description":"Pre-selected carriers with phone numbers. If provided, calls these instead of using carrier recommendations."},"workspace_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Phone Number Id","description":"Workspace phone number ID to use for outbound caller identity and linked phone agent resolution."}},"type":"object","required":["agent_id","load_id","integration_connection_id"],"title":"InitiateSequentialCallsRequest","description":"Request to start sequential outbound calling workflow"},"InitiateSequentialCallsResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id","description":"Temporal workflow ID"},"status":{"type":"string","title":"Status","description":"Workflow status (initiated)"}},"type":"object","required":["workflow_id","status"],"title":"InitiateSequentialCallsResponse","description":"Response after starting sequential calling workflow"},"IntegrationAuthorizationState":{"properties":{"integration_id":{"type":"string","title":"Integration Id"},"integration_label":{"type":"string","title":"Integration Label"},"organization_id":{"type":"string","title":"Organization Id"},"scope":{"$ref":"#/components/schemas/IntegrationScope","default":"ORGANIZATION"},"connecting_user_id":{"type":"string","title":"Connecting User Id"},"connecting_workspace_id":{"type":"string","title":"Connecting Workspace Id"},"is_test":{"type":"boolean","title":"Is Test"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"non_secret_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Non Secret Params"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"},"redirect_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect After"},"expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires At"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"}},"type":"object","required":["integration_id","integration_label","organization_id","connecting_user_id","connecting_workspace_id","is_test"],"title":"IntegrationAuthorizationState","description":"Serialized OAuth ``state`` for integration connect + callback.\n\n``scope`` controls which fields are written onto ``IntegrationConnection`` (see service).\n``connecting_*`` is always the user and workspace active in the UI when Connect was clicked;\nthey are used for Inbox rows (and for deriving connection scope together with ``scope``)."},"IntegrationCategory":{"type":"string","enum":["TMS","COMMUNICATION","STORAGE","ERP","CARRIER_VERIFICATION","FREIGHT_INTELLIGENCE","MCP_SERVER","OTHER"],"title":"IntegrationCategory"},"IntegrationConnectionInput":{"properties":{"keys":{"items":{"$ref":"#/components/schemas/KeyInfo"},"type":"array","title":"Keys","default":[]},"scope":{"anyOf":[{"$ref":"#/components/schemas/IntegrationScope"},{"type":"null"}],"default":"ORGANIZATION"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"redirect_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect After"}},"type":"object","title":"IntegrationConnectionInput"},"IntegrationConnectionResponse":{"properties":{"id":{"type":"string","title":"Id"},"integration_id":{"type":"string","title":"Integration Id"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"secret_id":{"type":"string","title":"Secret Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"connected_with_deployed_workflow":{"type":"boolean","title":"Connected With Deployed Workflow","default":false},"contributes_to_carrier_pool":{"type":"boolean","title":"Contributes To Carrier Pool","default":false},"preferred_load_identifier":{"$ref":"#/components/schemas/PreferredLoadIdentifier","default":"EXTERNAL_REFERENCE_ID"},"past_pickup_grace_days":{"type":"integer","maximum":2.0,"minimum":0.0,"title":"Past Pickup Grace Days","default":0},"equipment_length_feet":{"additionalProperties":{"type":"integer"},"type":"object","title":"Equipment Length Feet"},"default_equipment_length_feet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Equipment Length Feet"}},"type":"object","required":["id","integration_id","organization_id","secret_id"],"title":"IntegrationConnectionResponse"},"IntegrationConnectionStatusResponse":{"properties":{"is_connected":{"type":"boolean","title":"Is Connected"}},"type":"object","required":["is_connected"],"title":"IntegrationConnectionStatusResponse"},"IntegrationConnectionUpdateInput":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"scope":{"anyOf":[{"$ref":"#/components/schemas/IntegrationScope"},{"type":"null"}]},"keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/KeyInfo"},"type":"array"},{"type":"null"}],"title":"Keys"},"contributes_to_carrier_pool":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Contributes To Carrier Pool"},"preferred_load_identifier":{"anyOf":[{"$ref":"#/components/schemas/PreferredLoadIdentifier"},{"type":"null"}]},"past_pickup_grace_days":{"anyOf":[{"type":"integer","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Past Pickup Grace Days"},"equipment_length_feet":{"anyOf":[{"additionalProperties":{"type":"integer","maximum":199.0,"minimum":1.0},"type":"object"},{"type":"null"}],"title":"Equipment Length Feet"},"default_equipment_length_feet":{"anyOf":[{"type":"integer","maximum":199.0,"minimum":1.0},{"type":"null"}],"title":"Default Equipment Length Feet"}},"type":"object","title":"IntegrationConnectionUpdateInput"},"IntegrationCreateInput":{"properties":{"name":{"type":"string","title":"Name"},"host":{"type":"string","title":"Host"},"version":{"type":"integer","title":"Version"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"integration_type":{"$ref":"#/components/schemas/IntegrationType"},"integration_category":{"$ref":"#/components/schemas/IntegrationCategory","default":"OTHER"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"app_credentials":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"App Credentials"},"user_form_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserFormKey"},"type":"array"},{"type":"null"}],"title":"User Form Keys"},"app_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"App Params"}},"type":"object","required":["name","host","version","integration_type","user_form_keys"],"title":"IntegrationCreateInput"},"IntegrationEventSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"integration_connection_id":{"type":"string","format":"uuid","title":"Integration Connection Id"},"event_type":{"$ref":"#/components/schemas/IntegrationEventType"},"temporal_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Workflow Id"},"temporal_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Run Id"},"temporal_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Link"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","integration_connection_id","event_type","created_at","updated_at"],"title":"IntegrationEventSchema"},"IntegrationEventType":{"type":"string","enum":["DATA_SYNC","WEBHOOK_RECEIVED","WEBHOOK_REPLAYED"],"title":"IntegrationEventType","description":"Types of integration events"},"IntegrationName":{"type":"string","enum":["SLACK","MICROSOFT_TEAMS","NETSUITE","GMAIL","OUTLOOK","SUNNYBROOK","SYLECTUS","GOOGLE_DRIVE","GOOGLE_SPREADSHEETS","SAP_BUSINESS_ONE","MFILES","HIGHWAY","GENLOGS","TAI","GREENSCREENS","DAT","TURVO","MCLEOD","EMERGE","MENTIUM_EMAIL","SANDBOX_TMS","MY_CARRIER_PACKETS"],"title":"IntegrationName"},"IntegrationSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"host":{"type":"string","title":"Host"},"version":{"type":"integer","title":"Version"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"integration_type":{"$ref":"#/components/schemas/IntegrationType"},"integration_category":{"$ref":"#/components/schemas/IntegrationCategory","default":"OTHER"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"user_form_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserFormKey"},"type":"array"},{"type":"null"}],"title":"User Form Keys"},"app_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"App Params"},"data_synchronization_enabled":{"type":"boolean","title":"Data Synchronization Enabled","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","host","version","integration_type","created_at","updated_at"],"title":"IntegrationSchema"},"IntegrationScope":{"type":"string","enum":["ORGANIZATION","WORKSPACE","USER"],"title":"IntegrationScope"},"IntegrationType":{"type":"string","enum":["OAUTH2","API_KEY","BASIC_AUTH","NO_AUTH","WEBHOOK","OTHER"],"title":"IntegrationType"},"IntegrationUpdateInput":{"properties":{"host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Host"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"app_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"App Params"}},"type":"object","title":"IntegrationUpdateInput"},"IntegrationWithConnectionResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"host":{"type":"string","title":"Host"},"version":{"type":"integer","title":"Version"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"integration_type":{"$ref":"#/components/schemas/IntegrationType"},"integration_category":{"$ref":"#/components/schemas/IntegrationCategory","default":"OTHER"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"user_form_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserFormKey"},"type":"array"},{"type":"null"}],"title":"User Form Keys"},"app_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"App Params"},"data_synchronization_enabled":{"type":"boolean","title":"Data Synchronization Enabled","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"connected":{"type":"boolean","title":"Connected"},"connections":{"items":{"$ref":"#/components/schemas/IntegrationConnectionResponse"},"type":"array","title":"Connections"}},"type":"object","required":["id","name","host","version","label","description","integration_type","icon","user_form_keys","app_params","created_at","updated_at","connected","connections"],"title":"IntegrationWithConnectionResponse"},"IntervalType":{"type":"string","enum":["DAY","WEEK","MONTH"],"title":"IntervalType","description":"Calender time unit type in which to average metrics\nE.g. revenue/week"},"InvitationBulkCreateSchema":{"properties":{"invitations":{"items":{"$ref":"#/components/schemas/InvitationCreateSchema"},"type":"array","title":"Invitations"}},"type":"object","required":["invitations"],"title":"InvitationBulkCreateSchema"},"InvitationCreateSchema":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["first_name","last_name","email"],"title":"InvitationCreateSchema"},"InvitationSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["id","first_name","last_name","email"],"title":"InvitationSchema"},"InviteUsersResponse":{"properties":{"message":{"type":"string","title":"Message"},"skipped_invitations":{"items":{"$ref":"#/components/schemas/SkippedInvitation"},"type":"array","title":"Skipped Invitations"}},"type":"object","required":["message","skipped_invitations"],"title":"InviteUsersResponse"},"KeyInfo":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"string","title":"Value"},"is_secret":{"type":"boolean","title":"Is Secret"}},"type":"object","required":["key","value","is_secret"],"title":"KeyInfo"},"LateLoadEpisodeListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LateLoadEpisodeSchema"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"LateLoadEpisodeListResponse","description":"Paged list of late-load episodes."},"LateLoadEpisodeSchema":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"load_external_reference_id":{"type":"string","title":"Load External Reference Id","description":"Load reference in the source TMS"},"vortex_load_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vortex Load Id"},"stop_key":{"type":"string","title":"Stop Key"},"stop_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stop Number"},"stop_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Type"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"contact_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Source","description":"Where the contact came from: load.driver_carrier_contact or load.dispatcher_carrier_contact"},"status":{"type":"string","enum":["LATE","RESOLVED_ON_TIME","RESOLVED_LATE","CLOSED"],"title":"Status","description":"Episode lifecycle status"},"appointment_start_at":{"type":"string","format":"date-time","title":"Appointment Start At"},"appointment_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment End At"},"deadline_at":{"type":"string","format":"date-time","title":"Deadline At"},"deadline_source":{"type":"string","enum":["appointment","target_arrival"],"title":"Deadline Source","description":"Which timestamp the deadline came from: 'appointment' (committed dock slot) or 'target_arrival' (looser routing latest-arrival bound, used when the TMS supplies no appointment). When 'target_arrival', appointment_start_at/deadline_at carry the target arrival time, not a booked appointment.","default":"appointment"},"predicted_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Predicted Arrival At"},"actual_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actual Arrival At"},"minutes_late":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minutes Late"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"tms_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tms Status","description":"Raw TMS load status (live when resolvable, else at detection time)"},"mentium_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mentium Status","description":"Mentium load status (live when resolvable, else at detection time)"},"tracking_link_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Link Url"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name","description":"Load customer name (live from Vortex)"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin","description":"First pickup location, e.g. 'Dallas, TX'"},"destination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination","description":"Last delivery location, e.g. 'Atlanta, GA'"},"assigned_rep":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Rep","description":"Assigned rep display value (email or name; TMS user id only as a last resort)"},"workflow_execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Execution Id","description":"Nexus workflow execution started by this episode's trigger"},"first_detected_at":{"type":"string","format":"date-time","title":"First Detected At"},"last_detected_at":{"type":"string","format":"date-time","title":"Last Detected At"},"triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Triggered At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"acknowledged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Acknowledged At"},"acknowledged_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acknowledged By"}},"type":"object","required":["id","organization_id","integration_connection_id","load_external_reference_id","stop_key","status","appointment_start_at","deadline_at","first_detected_at","last_detected_at"],"title":"LateLoadEpisodeSchema","description":"One late-load tracking episode (per appointment stop)."},"LinkedConversationSchema":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"type":{"type":"string","title":"Type"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"link_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Type"},"trigger_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Message Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["conversation_id","type","created_at"],"title":"LinkedConversationSchema","description":"A conversation (inbox thread) linked to this execution.\n\nSourced from the conversation_workflow_execution junction (link_type set) or\nthe conversation_workflow_instance record (link_type None — the execution is\nthe conversation-agent workflow handling the thread). Normally exactly one."},"ListAvailabilitiesResponse":{"properties":{"availabilities":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedAvailability"},"type":"array","title":"Availabilities"},"total_count":{"type":"integer","title":"Total Count"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["total_count","has_more"],"title":"ListAvailabilitiesResponse","example":{"availabilities":[{"carrier_id":"carrier-789","days_of_month":[],"days_of_week":[],"days_of_week_monthly_occurrences":[],"destination":{"city":"Atlanta","country":"USA","latitude":33.749,"longitude":-84.388,"postal_code":"30303","postal_code_prefix":"303","radius_miles":75.0,"state":"GA"},"equipment_type":"DRY_VAN","id":"123e4567-e89b-12d3-a456-426614174000","integration_connection_id":"int-456","notes":"One-time backhaul opportunity","organization_id":"org-123","recurrence_end_at":"2026-01-15T00:00:00Z","recurrence_frequency":"ONCE","recurrence_start_at":"2026-01-15T00:00:00Z","shipping_method":"FTL","source":{"city":"Dallas","country":"USA","latitude":32.7767,"longitude":-96.797,"postal_code":"75201","postal_code_prefix":"752","radius_miles":100.0,"state":"TX"}},{"carrier_id":"carrier-789","days_of_month":[],"days_of_week":["MONDAY","WEDNESDAY","FRIDAY"],"days_of_week_monthly_occurrences":[],"destination":{"country":"USA","state":"OR"},"equipment_type":"REEFER","id":"223e4567-e89b-12d3-a456-426614174001","integration_connection_id":"int-456","notes":"Weekly produce route","organization_id":"org-123","recurrence_end_at":"2026-12-31T23:59:59Z","recurrence_frequency":"WEEKLY_BY_DAY_OF_WEEK","recurrence_interval":2,"recurrence_start_at":"2026-01-05T00:00:00Z","shipping_method":"FTL","source":{"country":"USA","state":"CA"}}],"has_more":true,"total_count":27}},"ListCarrierNotesResponse":{"properties":{"notes":{"items":{"$ref":"#/components/schemas/CarrierNoteSchema"},"type":"array","title":"Notes"},"total_count":{"type":"integer","title":"Total Count","default":0}},"type":"object","title":"ListCarrierNotesResponse"},"ListCarrierPoolMentiumTmsCarriersResponseSchema":{"properties":{"carriers":{"items":{"$ref":"#/components/schemas/CarrierPoolMentiumTmsCarrierSchema"},"type":"array","title":"Carriers"},"total_count":{"type":"integer","title":"Total Count"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["carriers","total_count","has_more"],"title":"ListCarrierPoolMentiumTmsCarriersResponseSchema"},"ListCarriersResponse":{"properties":{"carriers":{"items":{"$ref":"#/components/schemas/nexus__app__schemas__tms_carriers__CarrierSchema"},"type":"array","title":"Carriers","description":"List of carriers"},"total_count":{"type":"integer","title":"Total Count","description":"Total count of carriers matching filters"},"has_more":{"type":"boolean","title":"Has More","description":"Whether more carriers exist beyond current page"}},"additionalProperties":true,"type":"object","required":["total_count","has_more"],"title":"ListCarriersResponse","description":"Response for listing carriers with pagination."},"ListChannelsResponse":{"properties":{"channels":{"items":{"$ref":"#/components/schemas/ChannelItem"},"type":"array","title":"Channels"}},"type":"object","required":["channels"],"title":"ListChannelsResponse"},"ListHistoricalLanesResponse":{"properties":{"historical_lanes":{"items":{"$ref":"#/components/schemas/CarrierHistoricalLaneSchema"},"type":"array","title":"Historical Lanes"},"total_count":{"type":"integer","title":"Total Count"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["total_count","has_more"],"title":"ListHistoricalLanesResponse","example":{"has_more":true,"historical_lanes":[{"carrier_id":"carrier-789","destination":{"city":"Los Angeles","country":"USA","state":"CA"},"equipment_type":"DRY_VAN","integration_connection_id":"int-456","organization_id":"org-123","shipping_method":"FTL","source":{"city":"Chicago","country":"USA","state":"IL"},"total_loads":100}],"total_count":100}},"ListLanesResponse":{"properties":{"lanes":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedLane"},"type":"array","title":"Lanes"},"total_count":{"type":"integer","title":"Total Count"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["total_count","has_more"],"title":"ListLanesResponse","example":{"has_more":true,"lanes":[{"automation_enabled":true,"carrier_id":"carrier-789","contract_effective_at":"2024-01-01T00:00:00Z","contract_expires_at":"2024-12-31T23:59:59Z","contract_notes":"Annual contract with preferred carrier","contract_status":"ACTIVE","destination":{"city":"Los Angeles","country":"USA","latitude":34.0522,"longitude":-118.2437,"postal_code":"90001","postal_code_prefix":"900","radius_miles":75.0,"state":"CA"},"equipment_type":"DRY_VAN","id":"123e4567-e89b-12d3-a456-426614174000","integration_connection_id":"int-456","is_contract":true,"notes":"Preferred lane with consistent backhaul opportunities","organization_id":"org-123","preference_level":"PREFERRED","shipping_method":"FTL","source":{"city":"Chicago","country":"USA","latitude":41.8781,"longitude":-87.6298,"postal_code":"60601","postal_code_prefix":"606","radius_miles":50.0,"state":"IL"},"target_fuel_surcharge_rate":350.0,"target_line_haul_rate":2500.0},{"automation_enabled":false,"carrier_id":"carrier-789","destination":{"country":"USA","state":"FL"},"equipment_type":"FLATBED","id":"223e4567-e89b-12d3-a456-426614174001","integration_connection_id":"int-456","is_contract":false,"notes":"Seasonal lane for construction materials","organization_id":"org-123","preference_level":"SECONDARY","shipping_method":"FTL","source":{"country":"USA","postal_code_prefix":"600"},"target_fuel_surcharge_rate":300.0,"target_line_haul_rate":2200.0}],"total_count":47}},"ListMembersResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/MemberItem"},"type":"array","title":"Members"}},"type":"object","required":["members"],"title":"ListMembersResponse"},"ListMentiumTmsCarriersResponseSchema":{"properties":{"carriers":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierSchema"},"type":"array","title":"Carriers"},"total_count":{"type":"integer","title":"Total Count","default":0},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","title":"ListMentiumTmsCarriersResponseSchema"},"ListTeamsResponse":{"properties":{"teams":{"items":{"$ref":"#/components/schemas/TeamItem"},"type":"array","title":"Teams"}},"type":"object","required":["teams"],"title":"ListTeamsResponse"},"ListUsersResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/UserItem"},"type":"array","title":"Users"}},"type":"object","required":["users"],"title":"ListUsersResponse"},"ListVoicesResponse":{"properties":{"voices":{"items":{"$ref":"#/components/schemas/ElevenLabsVoice"},"type":"array","title":"Voices"}},"type":"object","required":["voices"],"title":"ListVoicesResponse","description":"Response with available ElevenLabs voices"},"ListWorkspacePhoneNumbersResponse":{"properties":{"phone_numbers":{"items":{"$ref":"#/components/schemas/WorkspacePhoneNumberResponse"},"type":"array","title":"Phone Numbers"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["phone_numbers","total"],"title":"ListWorkspacePhoneNumbersResponse","description":"Response for listing workspace phone numbers"},"LoadAccessorialCreate":{"properties":{"code":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Code"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"scope":{"type":"string","title":"Scope","description":"PICKUP, DELIVERY, SHIPMENT, or UNSPECIFIED","default":"UNSPECIFIED"},"source_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Source Name"}},"type":"object","required":["name"],"title":"LoadAccessorialCreate","description":"A named service selected on a load, independent from monetary rates."},"LoadAccessorialResponse":{"properties":{"code":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Code"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"scope":{"type":"string","title":"Scope","description":"PICKUP, DELIVERY, SHIPMENT, or UNSPECIFIED","default":"UNSPECIFIED"},"source_name":{"type":"string","title":"Source Name","description":"Exact spelling supplied by the source"},"position":{"type":"integer","minimum":0.0,"title":"Position"}},"type":"object","required":["name","source_name","position"],"title":"LoadAccessorialResponse"},"LoadAccessorialSchema":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Source accessorial code when supplied"},"name":{"type":"string","title":"Name","description":"Normalized carrier-facing service name"},"scope":{"type":"string","title":"Scope","description":"PICKUP, DELIVERY, SHIPMENT, or UNSPECIFIED"},"source_name":{"type":"string","title":"Source Name","description":"Exact source spelling retained for audit"},"position":{"type":"integer","title":"Position","description":"Stable per-load source order (0-based)","default":0}},"additionalProperties":true,"type":"object","required":["name","scope","source_name"],"title":"LoadAccessorialSchema","description":"Carrier-facing named service selected on a load."},"LoadBoardPostingRateSource":{"type":"string","enum":["MANUAL_OVERRIDE","OFFER_MIN_RATE","OFFER_MAX_RATE"],"title":"LoadBoardPostingRateSource","description":"Where the rate advertised on a load-board posting came from.\n\nA posting may legally carry no rate, in which case no source is recorded."},"LoadBoardPostingStatus":{"type":"string","enum":["POSTED","ALREADY_POSTED","FAILED","RETRYING"],"title":"LoadBoardPostingStatus","description":"Outcome of an attempt to post a load to a load board.\n\nBoard-agnostic: DAT is the first board wired up, but nothing here names it."},"LoadBucketStats":{"properties":{"count":{"type":"integer","title":"Count","default":0},"message_count":{"type":"integer","title":"Message Count","default":0},"phone_count":{"type":"integer","title":"Phone Count","default":0},"min_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Carrier Rate Amount"},"min_carrier_rate_carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Carrier Rate Carrier Name"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"last_activity_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Activity Status"},"last_activity_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Activity Source"}},"type":"object","title":"LoadBucketStats","description":"Aggregates for one status tab within one load group."},"LoadCreate":{"properties":{"external_reference_id":{"type":"string","maxLength":255,"minLength":1,"title":"External Reference Id","description":"Unique identifier from your system"},"tms_status":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Tms Status","description":"Raw TMS status from your system (e.g., 'Dispatched', 'At Shipper')"},"mentium_status":{"$ref":"#/components/schemas/MentiumTmsLoadStatus","description":"Mentium normalized load status (PLANNED, ACTIVE, COVERED, IN_TRANSIT, DELIVERED, COMPLETED, TERMINATED). TERMINATED loads are excluded from analytics. ARCHIVED is read-only (set by Mentium's Load auto clean) and rejected on input, as is TEMP (a load Mentium created for quoting before it exists in the TMS)."},"equipment_type":{"$ref":"#/components/schemas/MentiumTmsEquipmentType","description":"Equipment type (DRY_VAN, REEFER, FLATBED, etc.) - REQUIRED for carrier matching"},"transport_mode":{"$ref":"#/components/schemas/MentiumTmsShippingMethod","description":"Shipping method (FTL, PTL, LTL) - REQUIRED for analytics"},"customer_external_reference_id":{"type":"string","maxLength":255,"title":"Customer External Reference Id","description":"Customer external reference ID - REQUIRED"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Load description"},"mode_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Mode Type","description":"Business mode (e.g., Brokerage, Asset)"},"service_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Service Type","description":"Service type"},"weight":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Weight","description":"Total weight"},"weight_uom":{"anyOf":[{"$ref":"#/components/schemas/WeightUOM"},{"type":"null"}],"description":"Weight unit (lbs, kg)"},"pieces":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Pieces","description":"Number of pieces"},"pallet_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Pallet Count","description":"Number of pallets"},"length":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Length","description":"Length"},"width":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Width","description":"Width"},"height":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Height","description":"Height"},"pickup_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pickup Datetime","description":"[Deprecated] Pickup date/time. Use stops[].target_arrival_earliest_at on the PICKUP stop.","deprecated":true},"delivery_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivery Datetime","description":"[Deprecated] Delivery date/time. Use stops[].target_arrival_earliest_at on the DELIVERY stop.","deprecated":true},"earliest_pickup":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earliest Pickup","description":"[Deprecated] Earliest pickup. Use stops[].target_arrival_earliest_at on the PICKUP stop.","deprecated":true},"latest_pickup":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Pickup","description":"Exclusive upper bound (half-open). Emitted verbatim from the canonical `*_latest_at` column; integrators that previously interpreted this as inclusive must adjust. Deprecated — see Sunset header.","deprecated":true},"earliest_delivery":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earliest Delivery","description":"[Deprecated] Earliest delivery. Use stops[].target_arrival_earliest_at on the DELIVERY stop.","deprecated":true},"latest_delivery":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Delivery","description":"Exclusive upper bound (half-open). Emitted verbatim from the canonical `*_latest_at` column; integrators that previously interpreted this as inclusive must adjust. Deprecated — see Sunset header.","deprecated":true},"carrier_external_reference_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Carrier External Reference Id","description":"Carrier external reference ID (for historical/covered loads)"},"total_distance":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Total Distance","description":"Total distance"},"carrier_miles":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Carrier Miles","description":"Carrier miles"},"customer_miles":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Customer Miles","description":"Customer miles"},"beginning_buy_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Beginning Buy Rate","description":"Beginning buy rate"},"max_buy_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Buy Rate","description":"Maximum buy rate"},"stops":{"items":{"$ref":"#/components/schemas/StopCreate"},"type":"array","minItems":2,"title":"Stops","description":"Load stops - MUST have at least 2 (Pickup/Shipper + Delivery/Receiver)"},"requirements":{"anyOf":[{"$ref":"#/components/schemas/ShipmentRequirementsCreate"},{"type":"null"}],"description":"Shipment requirements"},"financial_rates":{"anyOf":[{"items":{"$ref":"#/components/schemas/FinancialRateCreate"},"type":"array"},{"type":"null"}],"title":"Financial Rates","description":"Financial rates"},"accessorials":{"anyOf":[{"items":{"$ref":"#/components/schemas/LoadAccessorialCreate"},"type":"array"},{"type":"null"}],"title":"Accessorials","description":"Named accessorial services selected for this load"},"is_hot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hot","description":"Hot/priority load"},"is_tracking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tracking","description":"Tracking enabled"},"sales_rep":{"anyOf":[{"$ref":"#/components/schemas/TeamMemberCreate"},{"type":"null"}],"description":"Sales rep assigned to the load (provide at least one of name, email, external_reference_id)"},"dispatcher_rep":{"anyOf":[{"$ref":"#/components/schemas/TeamMemberCreate"},{"type":"null"}],"description":"Dispatcher rep on the load (provide at least one of name, email, external_reference_id)"},"actual_dispatcher":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Actual Dispatcher","description":"Actual dispatcher name or email"},"operation_user":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Operation User","description":"Operations user name or email"},"account_manager":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Account Manager","description":"Account manager name or email"},"mentium_booked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mentium Booked At","description":"When the load was booked (carrier secured). Timezone-aware. If omitted, inferred from mentium_status: COVERED -> now; IN_TRANSIT/DELIVERED/COMPLETED -> first PICKUP stop arrival; PLANNED/ACTIVE -> null."},"mentium_assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mentium Assigned At","description":"When a dispatcher was assigned. Timezone-aware. If omitted, set to now when dispatcher_rep is provided."}},"type":"object","required":["external_reference_id","mentium_status","equipment_type","transport_mode","customer_external_reference_id","stops"],"title":"LoadCreate","description":"Schema for creating a load.\n\nRequired fields for analytics and carrier recommendations:\n- external_reference_id: Your unique load ID\n- tms_status: Raw TMS status from your system (optional)\n- mentium_status: Mentium normalized load status (PLANNED, ACTIVE, COVERED, IN_TRANSIT, DELIVERED, COMPLETED, TERMINATED)\n- equipment_type: Equipment type for carrier matching (DRY_VAN, REEFER, FLATBED, etc.)\n- transport_mode: Shipping method (FTL, PTL, LTL)\n- customer_external_reference_id: Link to customer\n- stops: At least 2 stops (Pickup + Delivery) with arrival times\n\nNote: Loads with mentium_status=TERMINATED are accepted but excluded from analytics processing.\nARCHIVED is internal-only (set by Mentium's Load auto clean) and rejected on input."},"LoadForTruck":{"properties":{"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"type":"string","title":"Customer Name"},"load_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Load Id"},"load_external_reference_id":{"type":"string","title":"Load External Reference Id"},"source_city":{"type":"string","title":"Source City"},"source_state":{"type":"string","title":"Source State"},"source_country":{"type":"string","title":"Source Country"},"destination_city":{"type":"string","title":"Destination City"},"destination_state":{"type":"string","title":"Destination State"},"destination_country":{"type":"string","title":"Destination Country"},"shipping_method":{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},"equipment_type":{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},"first_pickup_stop_target_arrival_earliest_at":{"type":"string","format":"date-time","title":"First Pickup Stop Target Arrival Earliest At"},"first_pickup_stop_target_arrival_latest_at":{"type":"string","format":"date-time","title":"First Pickup Stop Target Arrival Latest At"},"tms_status":{"type":"string","title":"Tms Status"},"mentium_status":{"$ref":"#/components/schemas/MentiumTmsLoadStatus"},"distance_miles":{"type":"number","title":"Distance Miles"},"pickup_deadhead_distance_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pickup Deadhead Distance Miles"},"data_origins":{"items":{"$ref":"#/components/schemas/MentiumTmsDataOrigin"},"type":"array","minItems":1,"title":"Data Origins"}},"type":"object","required":["customer_name","load_external_reference_id","source_city","source_state","source_country","destination_city","destination_state","destination_country","shipping_method","equipment_type","first_pickup_stop_target_arrival_earliest_at","first_pickup_stop_target_arrival_latest_at","tms_status","mentium_status","distance_miles"],"title":"LoadForTruck"},"LoadMatchScoreExplainability":{"properties":{"carrier_customer_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Customer Match Score"},"carrier_lane_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Lane Match Score"},"carrier_customer_lane_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Customer Lane Match Score"},"carrier_defined_lane_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Defined Lane Match Score"},"carrier_defined_availability_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Defined Availability Match Score"},"potential_empty_truck_nearby_match_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Potential Empty Truck Nearby Match Score"}},"type":"object","title":"LoadMatchScoreExplainability"},"LoadOfferCarrierRateSource":{"type":"string","enum":["RELATIVE_TO_TMS_MIN_CARRIER_RATE","RELATIVE_TO_TMS_MAX_CARRIER_RATE","RELATIVE_TO_TMS_CUSTOMER_RATE","RELATIVE_TO_DAT_MARKET_RATE","RELATIVE_TO_GREENSCREENS_MARKET_RATE","RELATIVE_TO_MIN_LOAD_OFFER_CARRIER_RATE","RELATIVE_TO_MAX_LOAD_OFFER_CARRIER_RATE","RELATIVE_TO_HISTORICAL_CARRIER_RATE","RELATIVE_TO_LOAD_BOARD_POSTED_CARRIER_RATE","MANUAL_OVERRIDE","MENTIUM_UNKNOWN_VALUE"],"title":"LoadOfferCarrierRateSource"},"LoadOffersBuckets":{"properties":{"sent":{"$ref":"#/components/schemas/LoadBucketStats"},"negotiating":{"$ref":"#/components/schemas/LoadBucketStats"},"human_hand_off":{"$ref":"#/components/schemas/LoadBucketStats"},"accepted":{"$ref":"#/components/schemas/LoadBucketStats"},"booked":{"$ref":"#/components/schemas/LoadBucketStats"},"declined":{"$ref":"#/components/schemas/LoadBucketStats"},"closed":{"$ref":"#/components/schemas/LoadBucketStats"},"skipped":{"$ref":"#/components/schemas/LoadBucketStats"}},"type":"object","title":"LoadOffersBuckets","description":"One LoadBucketStats per dashboard status tab."},"LoadOffersGroup":{"properties":{"load_offer_id":{"type":"string","title":"Load Offer Id"},"external_reference_load_id":{"type":"string","title":"External Reference Load Id"},"is_active":{"type":"boolean","title":"Is Active","default":false},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"destination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination"},"dispatch_rep":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatch Rep"},"equipment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment"},"miles":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Miles"},"pickup_window":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pickup Window"},"delivery_window":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Window"},"customer_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Customer Rate Amount"},"min_load_offer_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Load Offer Carrier Rate Amount"},"market_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Rate Amount"},"load_board_posted_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Load Board Posted Carrier Rate Amount"},"total_offer_count":{"type":"integer","title":"Total Offer Count","default":0},"buckets":{"$ref":"#/components/schemas/LoadOffersBuckets"}},"type":"object","required":["load_offer_id","external_reference_load_id"],"title":"LoadOffersGroup"},"LoadOffersListOut":{"properties":{"load_offer_id":{"type":"string","title":"Load Offer Id"},"offers":{"items":{"$ref":"#/components/schemas/OfferItem"},"type":"array","title":"Offers"}},"type":"object","required":["load_offer_id","offers"],"title":"LoadOffersListOut","description":"Lazy per-load offer list (drawer contents), window-scoped by the same\nperiod_days the dashboard view used."},"LoadResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Internal Mentium ID"},"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID from your system"},"tms_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tms Status","description":"Raw TMS status from your system (e.g., 'Dispatched', 'At Shipper')"},"mentium_status":{"type":"string","title":"Mentium Status","description":"Mentium normalized load status (PLANNED, ACTIVE, COVERED, IN_TRANSIT, DELIVERED, COMPLETED, TERMINATED, or the read-only ARCHIVED set by Mentium's Load auto clean, or the read-only TEMP for a load Mentium created for quoting before it exists in the TMS) - Always present"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type","description":"Equipment type (DRY_VAN, REEFER, etc.)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Load description"},"mode_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode Type","description":"Mode type"},"transport_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transport Mode","description":"Transport mode"},"service_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Type","description":"Service type"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight","description":"Total weight"},"weight_uom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight Uom","description":"Weight unit"},"pieces":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pieces","description":"Number of pieces"},"pallet_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pallet Count","description":"Number of pallets"},"length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length","description":"Length"},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"Width"},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"Height"},"pickup_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pickup Datetime","description":"[Deprecated] Pickup arrival time. Use first PICKUP stop.actual_arrival_at / expected_arrival_at.","deprecated":true},"delivery_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivery Datetime","description":"[Deprecated] Delivery arrival time. Use last DELIVERY stop.actual_arrival_at / expected_arrival_at.","deprecated":true},"earliest_pickup":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earliest Pickup","description":"[Deprecated] Earliest pickup (inclusive). Use first_pickup_stop_target_arrival_earliest_at.","deprecated":true},"latest_pickup":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Pickup","description":"Exclusive upper bound (half-open). Emitted verbatim from the canonical `*_latest_at` column; integrators that previously interpreted this as inclusive must adjust. Deprecated — see Sunset header.","deprecated":true},"earliest_delivery":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earliest Delivery","description":"[Deprecated] Earliest delivery (inclusive). Use last_delivery_stop_target_arrival_earliest_at.","deprecated":true},"latest_delivery":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Delivery","description":"Exclusive upper bound (half-open). Emitted verbatim from the canonical `*_latest_at` column; integrators that previously interpreted this as inclusive must adjust. Deprecated — see Sunset header.","deprecated":true},"first_pickup_stop_target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Target Arrival Earliest At","description":"First-pickup stop target window start (inclusive)"},"first_pickup_stop_target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Target Arrival Latest At","description":"First-pickup stop target window end (exclusive)"},"last_delivery_stop_target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Target Arrival Earliest At","description":"Last-delivery stop target window start (inclusive)"},"last_delivery_stop_target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Target Arrival Latest At","description":"Last-delivery stop target window end (exclusive)"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id","description":"Customer ID"},"customer_external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer External Reference Id","description":"Customer external reference ID"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name","description":"Customer name"},"carrier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Id","description":"Carrier ID"},"carrier_external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier External Reference Id","description":"Carrier external reference ID"},"carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Name","description":"Carrier name"},"total_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Distance","description":"Total distance"},"carrier_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Carrier Miles","description":"Carrier miles"},"customer_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Customer Miles","description":"Customer miles"},"beginning_buy_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Beginning Buy Rate","description":"Beginning buy rate"},"max_buy_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Buy Rate","description":"Maximum buy rate"},"stops":{"items":{"$ref":"#/components/schemas/StopResponse"},"type":"array","title":"Stops","description":"Load stops"},"requirements":{"anyOf":[{"$ref":"#/components/schemas/nexus__app__schemas__tms_api__loads__ShipmentRequirementsResponse"},{"type":"null"}],"description":"Shipment requirements"},"financial_rates":{"items":{"$ref":"#/components/schemas/FinancialRateResponse"},"type":"array","title":"Financial Rates","description":"Financial rates"},"accessorials":{"items":{"$ref":"#/components/schemas/LoadAccessorialResponse"},"type":"array","title":"Accessorials","description":"Named accessorial services selected for this load"},"is_hot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hot","description":"Hot/priority load"},"is_tracking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tracking","description":"Tracking enabled"},"sales_rep":{"anyOf":[{"$ref":"#/components/schemas/TeamMemberResponse"},{"type":"null"}],"description":"Sales rep assigned to the load (includes mentium_user_id when mapped)"},"dispatcher_rep":{"anyOf":[{"$ref":"#/components/schemas/TeamMemberResponse"},{"type":"null"}],"description":"Dispatcher rep on the load (includes mentium_user_id when mapped)"},"actual_dispatcher":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Dispatcher","description":"Actual dispatcher name or email"},"operation_user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation User","description":"Operations user name or email"},"account_manager":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Manager","description":"Account manager name or email"},"mentium_booked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mentium Booked At","description":"When the load was booked (carrier secured)"},"mentium_assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mentium Assigned At","description":"When a dispatcher was assigned"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["id","external_reference_id","mentium_status","created_at","updated_at"],"title":"LoadResponse","description":"Response schema for a load."},"LoadSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Load UUID"},"organization_id":{"type":"string","title":"Organization Id","description":"Organization UUID"},"integration_connection_id":{"type":"string","title":"Integration Connection Id","description":"Integration connection UUID"},"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID (e.g., L302537)"},"tms_display_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tms Display Reference Id","description":"Human-facing reference supplied by the TMS (e.g., Turvo customId)"},"display_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Reference Id","description":"Connection-preferred display identifier, falling back to external_reference_id"},"tms_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tms Status","description":"Raw status from TMS system (e.g., 'Dispatched', 'At Shipper')"},"mentium_status":{"type":"string","title":"Mentium Status","description":"Mentium mapped status (PLANNED, ACTIVE, COVERED, IN_TRANSIT, DELIVERED, COMPLETED, TERMINATED, ARCHIVED, TEMP)"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type","description":"Equipment type (e.g., REEFER, VAN, DRY INTERMODAL TEST)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Load description"},"mode_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode Type","description":"Mode type (e.g., Brokerage, Asset)"},"transport_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transport Mode","description":"Transport mode (TL, LTL)"},"service_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Type","description":"Service type"},"route_num":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Num","description":"Route number"},"is_trunk":{"type":"boolean","title":"Is Trunk","description":"Is trunk load","default":false},"is_round_trip":{"type":"boolean","title":"Is Round Trip","description":"Is round trip","default":false},"is_primary_load":{"type":"boolean","title":"Is Primary Load","description":"Is primary load","default":false},"length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length","description":"Length"},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"Width"},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"Height"},"pieces":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pieces","description":"Total pieces"},"pallet_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pallet Count","description":"Total pallet count"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight","description":"Total weight"},"weight_uom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight Uom","description":"Weight unit of measure (lbs, kg)"},"billable_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Billable Weight","description":"Billable weight"},"billable_weight_uom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billable Weight Uom","description":"Billable weight unit"},"declared_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Declared Value","description":"Declared value"},"ltl_reference_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ltl Reference Number","description":"LTL reference number"},"carrier_pro_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Pro Number","description":"Carrier PRO number"},"beginning_buy_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Beginning Buy Rate","description":"Initial target offer to carriers"},"max_buy_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Buy Rate","description":"Maximum negotiation ceiling"},"buy_rates_set_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Buy Rates Set At","description":"When the buy rates were last set, by either an operator or the TMS"},"buy_rates_set_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buy Rates Set By User Id","description":"Mentium user who set the buy rates; null means the TMS set them"},"is_hot":{"type":"boolean","title":"Is Hot","description":"Is hot/priority shipment","default":false},"priority_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority Level","description":"Priority level"},"over_short_or_damaged":{"type":"boolean","title":"Over Short Or Damaged","description":"Over/short/damaged flag","default":false},"carrier_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Carrier Miles","description":"Carrier miles"},"customer_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Customer Miles","description":"Customer miles"},"total_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Distance","description":"Total distance"},"empty_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Empty Distance","description":"Empty/deadhead distance"},"trailer_length":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trailer Length","description":"Trailer length"},"equipment_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Code","description":"Equipment code"},"chassis_num":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chassis Num","description":"Chassis number"},"tractor_num":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tractor Num","description":"Tractor number"},"trailer_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trailer Number","description":"Trailer number"},"seal_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seal Number","description":"Seal number"},"driver_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Driver Name","description":"Driver name"},"driver_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Driver Phone","description":"Driver phone"},"first_pickup_stop_target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Target Arrival Earliest At","description":"Canonical pickup window start (first PICKUP stop's target_arrival_earliest_at)"},"first_pickup_stop_target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Target Arrival Latest At","description":"Canonical pickup window end (exclusive; first PICKUP stop's target_arrival_latest_at)"},"last_delivery_stop_target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Target Arrival Earliest At","description":"Canonical delivery window start (last DELIVERY stop's target_arrival_earliest_at)"},"last_delivery_stop_target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Target Arrival Latest At","description":"Canonical delivery window end (exclusive; last DELIVERY stop's target_arrival_latest_at)"},"elapsed_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Elapsed Time","description":"Elapsed time in minutes"},"transit_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transit Time","description":"Transit time in minutes"},"created_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Date","description":"Created date from TMS"},"activity_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activity Date","description":"Activity date"},"rate_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Source","description":"Rate source (SpotQuote, Contract, Manual)"},"load_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load Source","description":"Load source (Lmws, Manual)"},"is_tracking":{"type":"boolean","title":"Is Tracking","description":"Is tracking enabled","default":false},"tracking_link_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Link Url","description":"Tracking link URL"},"integration_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Status","description":"Integration status (Sent, New, Pending)"},"customer":{"anyOf":[{"$ref":"#/components/schemas/CustomerSchema"},{"type":"null"}],"description":"Customer details"},"carriers":{"items":{"$ref":"#/components/schemas/nexus__app__schemas__tms_loads__CarrierSchema"},"type":"array","title":"Carriers","description":"Carriers for this load"},"stops":{"items":{"$ref":"#/components/schemas/StopSchema"},"type":"array","title":"Stops","description":"Stops/route for this load"},"team_assignments":{"anyOf":[{"$ref":"#/components/schemas/TeamAssignmentsSchema"},{"type":"null"}],"description":"Team member assignments"},"financial_summary":{"anyOf":[{"$ref":"#/components/schemas/FinancialSummarySchema"},{"type":"null"}],"description":"Financial summary from TMS"},"engagement_metrics":{"anyOf":[{"$ref":"#/components/schemas/EngagementMetricsSchema"},{"type":"null"}],"description":"Carrier engagement metrics"},"accessorials":{"items":{"$ref":"#/components/schemas/LoadAccessorialSchema"},"type":"array","title":"Accessorials","description":"Named services selected on this load"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To","description":"Assigned dispatcher name"},"offer_statuses":{"items":{"$ref":"#/components/schemas/CarrierOfferStatus"},"type":"array","title":"Offer Statuses","description":"Distinct carrier offer statuses for the load"},"late_tracking_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Late Tracking Status","description":"Late-load tracking status when the load has an active late episode (LATE)"},"analytics_error_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analytics Error Category","description":"Category of the analytics error (INTERNAL_ERROR, EXTERNAL_DATA_VALIDATION, SKIPPED)"},"analytics_error_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analytics Error Description","description":"Description of the analytics error"},"batch_analytics":{"type":"boolean","title":"Batch Analytics","description":"True if analytics processing is pending","default":false},"lane_historical_load_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lane Historical Load Count","description":"All-time analyzed load count on this load's lane. None when no analytics history exists."},"lane_historical_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lane Historical Margin","description":"All-time total margin (customer − carrier) on this load's lane. Drives the lane P/L tag (>0 profit, <0 loss, 0 break-even)."},"customer_historical_load_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customer Historical Load Count","description":"All-time analyzed load count for this load's customer. None when no analytics history exists."},"customer_historical_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Customer Historical Margin","description":"All-time total margin (customer − carrier) for this load's customer. Drives the customer P/L tag (>0 profit, <0 loss, 0 break-even)."},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At","description":"When the load was auto-archived"},"archive_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archive Reason","description":"Human-readable reason the load was archived"},"external_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Link","description":"External TMS link to view load"},"sales_rep_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Rep Display Name","description":"Sales rep display name (from TMS user info or mapping)"},"sales_rep_mentium_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Rep Mentium User Id","description":"Mentium user ID when sales rep is mapped to a workspace user"},"assigned_dispatcher_rep_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Dispatcher Rep Display Name","description":"Assigned dispatcher rep display name (from TMS user info or mapping)"},"assigned_dispatcher_rep_mentium_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Dispatcher Rep Mentium User Id","description":"Mentium user ID when assigned dispatcher rep is mapped to a workspace user"},"actual_dispatcher_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Dispatcher Display Name","description":"Actual dispatcher display name (from TMS user info or mapping)"},"actual_dispatcher_mentium_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Dispatcher Mentium User Id","description":"Mentium user ID when actual dispatcher is mapped to a workspace user"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Record created timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Record updated timestamp"}},"additionalProperties":true,"type":"object","required":["id","organization_id","integration_connection_id","external_reference_id","mentium_status","created_at","updated_at"],"title":"LoadSchema","description":"Load schema for OpenAPI documentation.\n\nThis is the main TMS Load object containing all shipment details.","example":{"equipment_type":"REEFER","external_reference_id":"L302537","id":"123e4567-e89b-12d3-a456-426614174000","integration_connection_id":"int-456","mentium_status":"IN_TRANSIT","organization_id":"org-123","stops":[{"stop_number":1,"stop_type":"PICKUP","target_arrival_earliest_at":"2025-10-23T08:00:00Z","target_arrival_latest_at":"2025-10-23T16:00:00Z"},{"stop_number":2,"stop_type":"DELIVERY","target_arrival_earliest_at":"2025-10-24T08:00:00Z","target_arrival_latest_at":"2025-10-24T17:00:00Z"}],"tms_status":"At Shipper","weight":45000.0,"weight_uom":"lbs"}},"LoadTmsStatusOptionSchema":{"properties":{"value":{"type":"string","title":"Value","description":"Raw TMS status value (e.g., 'tendered', 'Dispatched')"},"label":{"type":"string","title":"Label","description":"Human-readable display label"}},"additionalProperties":false,"type":"object","required":["value","label"],"title":"LoadTmsStatusOptionSchema","description":"Load TMS status option for dropdown filters."},"LoadUpdate":{"properties":{"tms_status":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Tms Status","description":"Raw TMS status from your system (e.g., 'Dispatched', 'At Shipper')"},"mentium_status":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsLoadStatus"},{"type":"null"}],"description":"Mentium normalized load status (PLANNED, ACTIVE, COVERED, IN_TRANSIT, DELIVERED, COMPLETED, TERMINATED). TERMINATED loads are excluded from analytics. ARCHIVED is read-only (set by Mentium's Load auto clean) and rejected on input, as is TEMP (a load Mentium created for quoting before it exists in the TMS); re-sending ACTIVE for a load Mentium archived leaves it archived — any other status un-archives it."},"equipment_type":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}],"description":"Equipment type"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Load description"},"mode_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Mode Type","description":"Business mode (e.g., Brokerage, Asset)"},"transport_mode":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}],"description":"Shipping method (FTL, PTL, LTL)"},"service_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Service Type","description":"Service type"},"weight":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Weight","description":"Total weight"},"weight_uom":{"anyOf":[{"$ref":"#/components/schemas/WeightUOM"},{"type":"null"}],"description":"Weight unit"},"pieces":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Pieces","description":"Number of pieces"},"pallet_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Pallet Count","description":"Number of pallets"},"length":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Length","description":"Length"},"width":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Width","description":"Width"},"height":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Height","description":"Height"},"pickup_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pickup Datetime","description":"[Deprecated] Pickup date/time. Use stops[].target_arrival_earliest_at on the PICKUP stop.","deprecated":true},"delivery_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivery Datetime","description":"[Deprecated] Delivery date/time. Use stops[].target_arrival_earliest_at on the DELIVERY stop.","deprecated":true},"earliest_pickup":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earliest Pickup","description":"[Deprecated] Earliest pickup. Use stops[].target_arrival_earliest_at on the PICKUP stop.","deprecated":true},"latest_pickup":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Pickup","description":"Exclusive upper bound (half-open). Emitted verbatim from the canonical `*_latest_at` column; integrators that previously interpreted this as inclusive must adjust. Deprecated — see Sunset header.","deprecated":true},"earliest_delivery":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earliest Delivery","description":"[Deprecated] Earliest delivery. Use stops[].target_arrival_earliest_at on the DELIVERY stop.","deprecated":true},"latest_delivery":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Delivery","description":"Exclusive upper bound (half-open). Emitted verbatim from the canonical `*_latest_at` column; integrators that previously interpreted this as inclusive must adjust. Deprecated — see Sunset header.","deprecated":true},"customer_external_reference_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Customer External Reference Id","description":"Customer external reference ID"},"carrier_external_reference_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Carrier External Reference Id","description":"Carrier external reference ID"},"total_distance":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Total Distance","description":"Total distance"},"carrier_miles":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Carrier Miles","description":"Carrier miles"},"customer_miles":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Customer Miles","description":"Customer miles"},"beginning_buy_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Beginning Buy Rate","description":"Beginning buy rate"},"max_buy_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Buy Rate","description":"Maximum buy rate"},"mentium_booked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mentium Booked At","description":"When the load was booked (carrier secured). Timezone-aware. Explicit value wins; if omitted and mentium_status is provided, recomputed from the status (transition into COVERED -> now, already-COVERED loads keep their value; IN_TRANSIT/DELIVERED/COMPLETED -> preserved; PLANNED/ACTIVE -> cleared)."},"mentium_assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mentium Assigned At","description":"When a dispatcher was assigned. Timezone-aware. Explicit value wins; if omitted, stamped when dispatcher_rep is provided and the load is not yet assigned."},"stops":{"anyOf":[{"items":{"$ref":"#/components/schemas/StopCreate"},"type":"array"},{"type":"null"}],"title":"Stops","description":"Updated stops"},"requirements":{"anyOf":[{"$ref":"#/components/schemas/ShipmentRequirementsCreate"},{"type":"null"}],"description":"Updated requirements"},"financial_rates":{"anyOf":[{"items":{"$ref":"#/components/schemas/FinancialRateCreate"},"type":"array"},{"type":"null"}],"title":"Financial Rates","description":"Updated financial rates"},"is_hot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hot","description":"Hot/priority load"},"is_tracking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tracking","description":"Tracking enabled"},"sales_rep":{"anyOf":[{"$ref":"#/components/schemas/TeamMemberCreate"},{"type":"null"}],"description":"Sales rep assigned to the load (provide at least one of name, email, external_reference_id)"},"dispatcher_rep":{"anyOf":[{"$ref":"#/components/schemas/TeamMemberCreate"},{"type":"null"}],"description":"Dispatcher rep on the load (provide at least one of name, email, external_reference_id)"},"actual_dispatcher":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Actual Dispatcher","description":"Actual dispatcher name or email"},"operation_user":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Operation User","description":"Operations user name or email"},"account_manager":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Account Manager","description":"Account manager name or email"}},"type":"object","title":"LoadUpdate","description":"Schema for updating a load. All fields are optional."},"LocationByCity":{"properties":{"kind":{"type":"string","const":"city","title":"Kind","default":"city"},"city":{"type":"string","title":"City"},"state":{"type":"string","title":"State"},"country":{"type":"string","title":"Country","default":"US"}},"type":"object","required":["city","state"],"title":"LocationByCity","description":"Location by a single city + state + country."},"LocationByCoordinates":{"properties":{"kind":{"type":"string","const":"coordinates","title":"Kind","default":"coordinates"},"latitude":{"type":"number","title":"Latitude"},"longitude":{"type":"number","title":"Longitude"},"radius_miles":{"type":"number","title":"Radius Miles","default":100.0}},"type":"object","required":["latitude","longitude"],"title":"LocationByCoordinates","description":"Location by a single lat/long + radius in miles."},"LocationByPostalCode":{"properties":{"kind":{"type":"string","const":"postal_code","title":"Kind","default":"postal_code"},"postal_code":{"type":"string","title":"Postal Code"},"country":{"type":"string","title":"Country","default":"US"}},"type":"object","required":["postal_code"],"title":"LocationByPostalCode","description":"Location by a single full postal/ZIP code + country."},"LocationByPostalPrefix":{"properties":{"kind":{"type":"string","const":"postal_prefix","title":"Kind","default":"postal_prefix"},"postal_code_prefix":{"type":"string","title":"Postal Code Prefix"},"country":{"type":"string","title":"Country","default":"US"}},"type":"object","required":["postal_code_prefix"],"title":"LocationByPostalPrefix","description":"Location by a single postal-code prefix + country."},"LocationByState":{"properties":{"kind":{"type":"string","const":"state_only","title":"Kind","default":"state_only"},"state":{"type":"string","title":"State"},"country":{"type":"string","title":"Country","default":"US"}},"type":"object","required":["state"],"title":"LocationByState","description":"Location by a single state + country."},"LocationCreate":{"properties":{"external_reference_id":{"type":"string","maxLength":255,"minLength":1,"title":"External Reference Id","description":"Unique identifier from your system"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name","description":"Location name"},"address_line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line1","description":"Street address line 1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2","description":"Street address line 2"},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"City","description":"City"},"state":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"State","description":"State/Province"},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Postal Code","description":"Postal/ZIP code"},"country":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Country","description":"Country","default":"US"},"latitude":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Latitude","description":"Latitude"},"longitude":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Longitude","description":"Longitude"},"iana_timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Iana Timezone","description":"IANA timezone for the facility (e.g., 'America/Chicago'). Used to render stop times in the facility's local TZ."},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email","description":"Contact email"},"phone_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone Number","description":"Contact phone number"},"weekday_open_hours":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Weekday Open Hours","description":"Weekday opening hours (HH:MM)"},"weekday_close_hours":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Weekday Close Hours","description":"Weekday closing hours (HH:MM)"},"weekend_open_hours":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Weekend Open Hours","description":"Weekend opening hours (HH:MM)"},"weekend_close_hours":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Weekend Close Hours","description":"Weekend closing hours (HH:MM)"},"internal_notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Internal Notes","description":"Internal notes about the location"}},"type":"object","required":["external_reference_id"],"title":"LocationCreate","description":"Schema for creating a location.\n\nRequired: country defaults to US when omitted. State is required unless it can be\ninferred from coordinates.\n\nGeocoding Requirement: Must additionally provide EITHER:\n- (latitude + longitude) for direct coordinates (state can be inferred), OR\n- (postal_code) for address-based geocoding (with state + country)\n\nWithout geocoding data, the location cannot be used for lane matching\nand carrier recommendations."},"LocationFilterSchema":{"properties":{"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"postal_code_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code Prefix"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"latitude":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Longitude"},"radius_miles":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Radius Miles"}},"type":"object","title":"LocationFilterSchema","description":"Location filter input for search-carriers-by-historical-lane requests."},"LocationResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Internal Mentium ID"},"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID from your system"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Location name"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1","description":"Street address line 1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2","description":"Street address line 2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"State/Province"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code","description":"Postal/ZIP code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude","description":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude","description":"Longitude"},"iana_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iana Timezone","description":"IANA timezone for the facility (e.g., 'America/Chicago'). Used to render stop times in the facility's local TZ."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Contact email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Contact phone number"},"weekday_open_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekday Open Hours","description":"Weekday opening hours"},"weekday_close_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekday Close Hours","description":"Weekday closing hours"},"weekend_open_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekend Open Hours","description":"Weekend opening hours"},"weekend_close_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekend Close Hours","description":"Weekend closing hours"},"internal_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Notes","description":"Internal notes"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["id","external_reference_id","created_at","updated_at"],"title":"LocationResponse","description":"Response schema for a location."},"LocationUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name","description":"Location name"},"address_line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line1","description":"Street address line 1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2","description":"Street address line 2"},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"City","description":"City"},"state":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"State","description":"State/Province"},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Postal Code","description":"Postal/ZIP code"},"country":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Country","description":"Country"},"latitude":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Latitude","description":"Latitude"},"longitude":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Longitude","description":"Longitude"},"iana_timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Iana Timezone","description":"IANA timezone for the facility (e.g., 'America/Chicago')."},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email","description":"Contact email"},"phone_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone Number","description":"Contact phone number"},"weekday_open_hours":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Weekday Open Hours","description":"Weekday opening hours (HH:MM)"},"weekday_close_hours":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Weekday Close Hours","description":"Weekday closing hours (HH:MM)"},"weekend_open_hours":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Weekend Open Hours","description":"Weekend opening hours (HH:MM)"},"weekend_close_hours":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Weekend Close Hours","description":"Weekend closing hours (HH:MM)"},"internal_notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Internal Notes","description":"Internal notes"}},"type":"object","title":"LocationUpdate","description":"Schema for updating a location. All fields are optional."},"LogoutResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["ok"],"title":"LogoutResponse"},"MCPComplianceSnapshotSchema":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Carrier status from MCP"},"is_monitored":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Monitored","description":"Whether carrier is monitored in MCP"},"is_blocked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Blocked","description":"Whether carrier is blocked in MCP"},"packet_completed_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Packet Completed Date","description":"Date packet was completed"},"risk_overall":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Overall","description":"Overall risk assessment level"},"risk_assessment_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Assessment Details","description":"JSON string of risk category details"},"enriched_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enriched At","description":"ISO timestamp when compliance data was last fetched"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address","description":"JSON string of carrier basic address (legal name, dba, street, city, state, zip, phone, email)"},"contacts":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contacts","description":"JSON string of MCP carrier contacts (authorized for packets or verified)"}},"additionalProperties":true,"type":"object","title":"MCPComplianceSnapshotSchema","description":"MyCarrierPackets compliance snapshot, read live when the Compliance tab opens."},"ManualSyncRequest":{"properties":{"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"entities_to_sync":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Entities To Sync"},"sync_analytics_only":{"type":"boolean","title":"Sync Analytics Only","default":false},"reset_analytics_before_sync_analytics":{"type":"boolean","title":"Reset Analytics Before Sync Analytics","default":false}},"type":"object","title":"ManualSyncRequest","description":"Request schema for triggering manual data sync."},"ManualSyncResponse":{"properties":{"temporal_workflow_id":{"type":"string","title":"Temporal Workflow Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["temporal_workflow_id","status","message"],"title":"ManualSyncResponse","description":"Response schema for manual data sync."},"MarketRateCreate":{"properties":{"date":{"type":"string","format":"date-time","title":"Date","description":"Market rate timestamp. Include date and time with timezone."},"source":{"$ref":"#/components/schemas/MentiumTmsMarketRateSource","description":"Market rate source. Canonical values: DAT, GREENSCREENS, TRUCKSTOP, CUSTOMER, OTHER. Common aliases are normalized case-insensitively."},"equipment_type":{"$ref":"#/components/schemas/MentiumTmsEquipmentType","default":"DRY_VAN"},"rates":{"$ref":"#/components/schemas/MarketRateValues"},"origin":{"$ref":"#/components/schemas/MarketRateLocation"},"destination":{"$ref":"#/components/schemas/MarketRateLocation"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"}},"type":"object","required":["date","source","rates","origin","destination"],"title":"MarketRateCreate"},"MarketRateLocation":{"properties":{"city":{"type":"string","maxLength":128,"minLength":1,"title":"City"},"state":{"type":"string","maxLength":64,"minLength":1,"title":"State"},"country":{"anyOf":[{"type":"string","maxLength":64,"minLength":2},{"type":"null"}],"title":"Country"}},"type":"object","required":["city","state"],"title":"MarketRateLocation"},"MarketRateResponse":{"properties":{"id":{"type":"string","title":"Id"},"date":{"type":"string","format":"date-time","title":"Date"},"source":{"$ref":"#/components/schemas/MentiumTmsMarketRateSource"},"equipment_type":{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},"rates":{"$ref":"#/components/schemas/MarketRateValues"},"origin":{"$ref":"#/components/schemas/MarketRateLocation"},"destination":{"$ref":"#/components/schemas/MarketRateLocation"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["id","date","source","equipment_type","rates","origin","destination","currency"],"title":"MarketRateResponse"},"MarketRateValues":{"properties":{"total":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Total"},"fuel":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Fuel"}},"type":"object","title":"MarketRateValues"},"McpDiscoverToolsResponse":{"properties":{"server_id":{"type":"string","title":"Server Id"},"server_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Name"},"tools":{"items":{"$ref":"#/components/schemas/McpToolInfo"},"type":"array","title":"Tools"}},"type":"object","required":["server_id","tools"],"title":"McpDiscoverToolsResponse","description":"Result of live tool discovery from an external MCP server."},"McpServerCreateInput":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Display name"},"url":{"type":"string","title":"Url","description":"HTTPS endpoint of the MCP server"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Optional API key for authentication. Leave empty for no-auth servers."},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","url"],"title":"McpServerCreateInput","description":"Create a new external MCP server connection."},"McpServerResponse":{"properties":{"id":{"type":"string","title":"Id"},"integration_id":{"type":"string","title":"Integration Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"url":{"type":"string","title":"Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","integration_id","url","status","created_at","updated_at"],"title":"McpServerResponse","description":"An MCP server connection with metadata."},"McpServerUpdateInput":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"McpServerUpdateInput","description":"Update an existing MCP server connection."},"McpToolInfo":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"}},"type":"object","required":["name"],"title":"McpToolInfo","description":"A tool discovered live from an external MCP server (not persisted)."},"MemberItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email","default":""}},"type":"object","required":["id","name"],"title":"MemberItem"},"MentiumTmsArea":{"properties":{"kind":{"type":"string","const":"AREA","title":"Kind","default":"AREA"},"area_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Hash"},"states":{"items":{"type":"string"},"type":"array","title":"States"},"postal_codes":{"items":{"type":"string"},"type":"array","title":"Postal Codes"},"postal_code_prefixes":{"items":{"type":"string"},"type":"array","title":"Postal Code Prefixes"},"country":{"type":"string","title":"Country"}},"additionalProperties":false,"type":"object","required":["country"],"title":"MentiumTmsArea","description":"Represents a broad geographic area within a single country, defined by\nexactly one of: states, postal codes, or postal code prefixes.\n\nUse this when a carrier's lane/availability is described coarsely (\"we run\nfrom Kansas City to TX, OK, FL, GA\") rather than against a single point.\n\n- Exactly one of `states`, `postal_codes`, or `postal_code_prefixes` must be non-empty\n- All entries are normalized and de-duplicated; hash is deterministic","examples":[{"description":"Multi-state destination area (TX, OK, FL, GA)","value":{"country":"US","states":["TX","OK","FL","GA"]}},{"description":"Source area of multiple states (KS, MO)","value":{"country":"US","states":["KS","MO"]}},{"description":"Area defined by postal code prefixes","value":{"country":"US","postal_code_prefixes":["600","601","602"]}},{"description":"Area defined by specific postal codes","value":{"country":"US","postal_codes":["64101","64102"]}}]},"MentiumTmsAvailabilityCreatedByKind":{"type":"string","enum":["USER","SYSTEM"],"title":"MentiumTmsAvailabilityCreatedByKind"},"MentiumTmsAvailabilityDayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"title":"MentiumTmsAvailabilityDayOfWeek"},"MentiumTmsAvailabilityDayOfWeekMonthlyOccurrence":{"type":"string","enum":["FIRST","SECOND","THIRD","FOURTH","FIFTH","LAST","SECOND_TO_LAST"],"title":"MentiumTmsAvailabilityDayOfWeekMonthlyOccurrence"},"MentiumTmsAvailabilityRecurrenceFrequency":{"type":"string","enum":["ONCE","DAILY","WEEKLY_BY_DAY_OF_WEEK","MONTHLY_BY_DAY_OF_MONTH","MONTHLY_BY_DAY_OF_WEEK_MONTHLY_OCCURRENCE"],"title":"MentiumTmsAvailabilityRecurrenceFrequency"},"MentiumTmsCarrierAddressSchema":{"properties":{"id":{"type":"string","title":"Id"},"mentium_tms_carrier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mentium Tms Carrier Id"},"address_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Type"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"last_observed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Observed At"}},"type":"object","required":["id"],"title":"MentiumTmsCarrierAddressSchema"},"MentiumTmsCarrierCertificationSchema":{"properties":{"id":{"type":"string","title":"Id"},"mentium_tms_carrier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mentium Tms Carrier Id"},"certification_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certification Type"},"certification_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certification Number"},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At"},"expiration_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration At"}},"type":"object","required":["id"],"title":"MentiumTmsCarrierCertificationSchema"},"MentiumTmsCarrierContactSchema":{"properties":{"id":{"type":"string","title":"Id"},"mentium_tms_carrier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mentium Tms Carrier Id"},"contact_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers"},"fax_numbers":{"items":{"type":"string"},"type":"array","title":"Fax Numbers"},"email_addresses":{"items":{"type":"string"},"type":"array","title":"Email Addresses"},"last_observed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Observed At"}},"type":"object","required":["id"],"title":"MentiumTmsCarrierContactSchema"},"MentiumTmsCarrierDefinedAvailability":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"integration_connection_id":{"type":"string","format":"uuid","title":"Integration Connection Id"},"carrier_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Carrier Id"},"availability_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Availability Hash"},"source":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Source"},"destination":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Destination"},"shipping_method":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}]},"equipment_type":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}]},"recurrence_frequency":{"$ref":"#/components/schemas/MentiumTmsAvailabilityRecurrenceFrequency"},"recurrence_interval":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Recurrence Interval"},"recurrence_start_at":{"type":"string","format":"date-time","title":"Recurrence Start At"},"recurrence_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recurrence End At"},"days_of_week":{"items":{"$ref":"#/components/schemas/MentiumTmsAvailabilityDayOfWeek"},"type":"array","title":"Days Of Week"},"days_of_month":{"items":{"type":"integer"},"type":"array","title":"Days Of Month"},"days_of_week_monthly_occurrences":{"items":{"$ref":"#/components/schemas/MentiumTmsAvailabilityDayOfWeekMonthlyOccurrence"},"type":"array","title":"Days Of Week Monthly Occurrences"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"data_origins":{"items":{"$ref":"#/components/schemas/MentiumTmsDataOrigin"},"type":"array","title":"Data Origins"},"created_by_kind":{"$ref":"#/components/schemas/MentiumTmsAvailabilityCreatedByKind","default":"SYSTEM"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"created_by_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By First Name"},"created_by_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Last Name"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"}},"additionalProperties":false,"type":"object","required":["organization_id","integration_connection_id","recurrence_frequency","recurrence_start_at"],"title":"MentiumTmsCarrierDefinedAvailability","examples":[{"description":"ONCE - Single specific date availability","value":{"carrier_id":"carrier-789","data_origins":["MENTIUM"],"days_of_month":[],"days_of_week":[],"days_of_week_monthly_occurrences":[],"destination":{"city":"Atlanta","country":"US","latitude":33.749,"longitude":-84.388,"postal_code":"30303","postal_code_prefix":"303","radius_miles":75.0,"state":"GA"},"equipment_type":"DRY_VAN","id":"123e4567-e89b-12d3-a456-426614174000","integration_connection_id":"int-456","notes":"One-time backhaul opportunity after conference","organization_id":"org-123","recurrence_end_at":"2026-01-15T00:00:00Z","recurrence_frequency":"ONCE","recurrence_start_at":"2026-01-15T00:00:00Z","shipping_method":"FTL","source":{"city":"Dallas","country":"US","latitude":32.7767,"longitude":-96.797,"postal_code":"75201","postal_code_prefix":"752","radius_miles":100.0,"state":"TX"}}},{"description":"DAILY - Available every N days","value":{"carrier_id":"carrier-789","data_origins":["MENTIUM"],"days_of_month":[],"days_of_week":[],"days_of_week_monthly_occurrences":[],"destination":{"country":"US","state":"OR"},"equipment_type":"REEFER","id":"223e4567-e89b-12d3-a456-426614174001","integration_connection_id":"int-456","notes":"Available every 3 days for produce shipments","organization_id":"org-123","recurrence_end_at":"2026-12-31T23:59:59Z","recurrence_frequency":"DAILY","recurrence_interval":3,"recurrence_start_at":"2026-01-01T00:00:00Z","shipping_method":"FTL","source":{"country":"US","state":"CA"}}},{"description":"WEEKLY_BY_DAY_OF_WEEK - Available on specific weekdays every N weeks","value":{"carrier_id":"carrier-789","data_origins":["MENTIUM"],"days_of_month":[],"days_of_week":["MONDAY","WEDNESDAY","FRIDAY"],"days_of_week_monthly_occurrences":[],"destination":{"country":"US","postal_code_prefix":"980"},"equipment_type":"FLATBED","id":"323e4567-e89b-12d3-a456-426614174002","integration_connection_id":"int-456","notes":"Every other week on Mon/Wed/Fri for construction materials","organization_id":"org-123","recurrence_end_at":"2026-06-30T23:59:59Z","recurrence_frequency":"WEEKLY_BY_DAY_OF_WEEK","recurrence_interval":2,"recurrence_start_at":"2026-01-05T00:00:00Z","shipping_method":"FTL","source":{"country":"US","postal_code_prefix":"900"}}},{"description":"MONTHLY_BY_DAY_OF_MONTH - On specific dates of the month","value":{"carrier_id":"carrier-789","data_origins":["MENTIUM"],"days_of_month":[1,15],"days_of_week":[],"days_of_week_monthly_occurrences":[],"destination":{"city":"Phoenix","country":"US","latitude":33.4484,"longitude":-112.074,"postal_code":"85003","postal_code_prefix":"850","radius_miles":60.0,"state":"AZ"},"equipment_type":"DRY_VAN","id":"423e4567-e89b-12d3-a456-426614174003","integration_connection_id":"int-456","notes":"On 1st and 15th of each month","organization_id":"org-123","recurrence_end_at":"2026-12-31T23:59:59Z","recurrence_frequency":"MONTHLY_BY_DAY_OF_MONTH","recurrence_interval":1,"recurrence_start_at":"2026-01-01T00:00:00Z","shipping_method":"FTL","source":{"city":"Houston","country":"US","latitude":29.7604,"longitude":-95.3698,"postal_code":"77002","postal_code_prefix":"770","radius_miles":50.0,"state":"TX"}}},{"description":"MONTHLY_BY_DAY_OF_WEEK_MONTHLY_OCCURRENCE - On specific day occurrences in the month","value":{"carrier_id":"carrier-789","data_origins":["MENTIUM"],"days_of_month":[],"days_of_week":["MONDAY","FRIDAY"],"days_of_week_monthly_occurrences":["FIRST","THIRD"],"destination":{"latitude":39.9612,"longitude":-82.9988,"radius_miles":80.0},"equipment_type":"REEFER","id":"523e4567-e89b-12d3-a456-426614174004","integration_connection_id":"int-456","notes":"Every 2 months on first and third Monday and Friday","organization_id":"org-123","recurrence_frequency":"MONTHLY_BY_DAY_OF_WEEK_MONTHLY_OCCURRENCE","recurrence_interval":2,"recurrence_start_at":"2026-01-01T00:00:00Z","shipping_method":"FTL","source":{"latitude":41.8781,"longitude":-87.6298,"radius_miles":100.0}}}]},"MentiumTmsCarrierDefinedLane":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"integration_connection_id":{"type":"string","format":"uuid","title":"Integration Connection Id"},"carrier_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Carrier Id"},"lane_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane Hash"},"source":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Source"},"destination":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Destination"},"shipping_method":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}]},"equipment_type":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}]},"preference_level":{"$ref":"#/components/schemas/MentiumTmsLanePreferenceLevel"},"target_line_haul_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Target Line Haul Rate"},"target_fuel_surcharge_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Target Fuel Surcharge Rate"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"automation_enabled":{"type":"boolean","title":"Automation Enabled","default":false},"is_contract":{"type":"boolean","title":"Is Contract","default":false},"contract_status":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsContractStatus"},{"type":"null"}]},"contract_effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Contract Effective At"},"contract_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Contract Expires At"},"contract_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Notes"},"data_origins":{"items":{"$ref":"#/components/schemas/MentiumTmsDataOrigin"},"type":"array","title":"Data Origins"}},"additionalProperties":false,"type":"object","required":["organization_id","integration_connection_id","preference_level"],"title":"MentiumTmsCarrierDefinedLane","examples":[{"description":"Preferred lane from Chicago to Los Angeles","value":{"automation_enabled":false,"carrier_id":"carrier-789","data_origins":["MENTIUM"],"destination":{"city":"Los Angeles","country":"US","latitude":34.0522,"longitude":-118.2437,"postal_code":"90001","postal_code_prefix":"900","radius_miles":75.0,"state":"CA"},"equipment_type":"DRY_VAN","id":"123e4567-e89b-12d3-a456-426614174000","integration_connection_id":"int-456","is_contract":false,"notes":"Preferred lane with consistent backhaul opportunities","organization_id":"org-123","preference_level":"PREFERRED","shipping_method":"FTL","source":{"city":"Chicago","country":"US","latitude":41.8781,"longitude":-87.6298,"postal_code":"60601","postal_code_prefix":"606","radius_miles":50.0,"state":"IL"},"target_fuel_surcharge_rate":350.0,"target_line_haul_rate":2500.0}}]},"MentiumTmsCarrierDetailSchema":{"properties":{"id":{"type":"string","title":"Id"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"dba_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dba Name"},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number"},"mc_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mc Number"},"service_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Status"},"equipment_types":{"items":{"type":"string"},"type":"array","title":"Equipment Types"},"contacts":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierContactSchema"},"type":"array","title":"Contacts"},"addresses":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierAddressSchema"},"type":"array","title":"Addresses"},"certifications":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierCertificationSchema"},"type":"array","title":"Certifications"},"operating_scope_us":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operating Scope Us"},"operating_scope_mx":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operating Scope Mx"},"common_authority_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Common Authority Status"},"common_authority_grant_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Common Authority Grant Date"},"contract_authority_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Authority Status"},"contract_authority_grant_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Contract Authority Grant Date"},"out_of_service_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Out Of Service Date"},"cargo_types":{"items":{"type":"string"},"type":"array","title":"Cargo Types"},"hazmat_supported":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hazmat Supported"},"power_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Power Units"},"total_drivers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Drivers"},"bipd_insurance_on_file_1000":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bipd Insurance On File 1000"},"cargo_insurance_on_file":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cargo Insurance On File"},"bond_surety_on_file":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bond Surety On File"},"safety_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Safety Rating"},"safety_rating_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Safety Rating Date"},"mcs150_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mcs150 Date"},"mcs150_mileage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mcs150 Mileage"},"mcs150_mileage_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mcs150 Mileage Year"},"mentium_data_origins":{"items":{"type":"string"},"type":"array","title":"Mentium Data Origins"},"observations":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierObservationSchema"},"type":"array","title":"Observations"}},"type":"object","required":["id"],"title":"MentiumTmsCarrierDetailSchema"},"MentiumTmsCarrierObservationSchema":{"properties":{"organization_id":{"type":"string","title":"Organization Id"},"integration_connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Connection Id"},"last_observed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Observed At"}},"type":"object","required":["organization_id"],"title":"MentiumTmsCarrierObservationSchema","description":"Observer provenance, super-admin only — the one exception to pool anonymity."},"MentiumTmsCarrierSchema":{"properties":{"id":{"type":"string","title":"Id"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"dba_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dba Name"},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number"},"mc_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mc Number"},"service_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Status"},"equipment_types":{"items":{"type":"string"},"type":"array","title":"Equipment Types"},"contacts":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierContactSchema"},"type":"array","title":"Contacts"},"addresses":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierAddressSchema"},"type":"array","title":"Addresses"},"certifications":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierCertificationSchema"},"type":"array","title":"Certifications"}},"type":"object","required":["id"],"title":"MentiumTmsCarrierSchema"},"MentiumTmsCertificationType":{"type":"string","enum":["PHMSA","TANKER_ENDORSED_DRIVERS","SMART_WAY","CARB_TRUCK_AND_BUS","CARB_TRU","CTPAT","TWIC","TSA","CALIFORNIA","TEXAS","OKLAHOMA","MENTIUM_UNKNOWN_VALUE"],"title":"MentiumTmsCertificationType"},"MentiumTmsContactType":{"type":"string","enum":["OWNER","OPERATIONS","DISPATCHER","DRIVER","ACCOUNTING","AP","AR","OTHER","MENTIUM_UNKNOWN_VALUE"],"title":"MentiumTmsContactType"},"MentiumTmsContractStatus":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","EXPIRED"],"title":"MentiumTmsContractStatus"},"MentiumTmsDataOrigin":{"type":"string","enum":["TMS","HIGHWAY","GENLOGS","MY_CARRIER_PACKETS","FMCSA","DAT","MENTIUM"],"title":"MentiumTmsDataOrigin"},"MentiumTmsEquipmentType":{"type":"string","enum":["DRY_VAN","REEFER","FLATBED","FLATBED_CONESTOGA","STEPDECK","STEPDECK_CONESTOGA","LOWBOY","REMOVABLE_GOOSENECK","BULK_DRY_HOPPER","BULK_DRY_PNEUMATIC","BULK_DRY_DUMP","TANKER","INTERMODAL","STRAIGHT","SPRINTER","HOTSHOT","POWER_ONLY","MENTIUM_UNKNOWN_VALUE"],"title":"MentiumTmsEquipmentType"},"MentiumTmsFinancialRateEntity":{"type":"string","enum":["CARRIER","CUSTOMER","MENTIUM_UNKNOWN_VALUE"],"title":"MentiumTmsFinancialRateEntity"},"MentiumTmsLanePreferenceLevel":{"type":"string","enum":["PREFERRED","PRIMARY","SECONDARY","BACKUP","EXCLUDED"],"title":"MentiumTmsLanePreferenceLevel"},"MentiumTmsLoadStatus":{"type":"string","enum":["PLANNED","ACTIVE","COVERED","IN_TRANSIT","DELIVERED","COMPLETED","TERMINATED","ARCHIVED","TEMP","MENTIUM_UNKNOWN_VALUE"],"title":"MentiumTmsLoadStatus"},"MentiumTmsLocation":{"properties":{"kind":{"type":"string","const":"LOCATION","title":"Kind","default":"LOCATION"},"location_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Hash"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"postal_code_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code Prefix"},"country":{"type":"string","title":"Country"},"latitude":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Longitude"},"radius_miles":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Radius Miles"}},"additionalProperties":false,"type":"object","required":["country"],"title":"MentiumTmsLocation","description":"Represents a single geographic point within a country, defined by exactly\none of five valid combinations: city/state/country/lat/lon/radius,\nstate/country, postal-code/country, postal-code-prefix/country, or\nlat/lon/radius/country.\n\nUse this when a carrier's lane/availability is described precisely (\"from\nChicago, IL to Austin, TX\") rather than across a broad multi-state area.\n\n- Exactly one of the five field combinations must be satisfied\n- All fields are normalized and validated; hash is deterministic","examples":[{"description":"City with state, country, coordinates and radius","value":{"city":"Chicago","country":"US","latitude":41.8781,"longitude":-87.6298,"radius_miles":50.0,"state":"IL"}},{"description":"State with country","value":{"country":"US","state":"TX"}},{"description":"Postal code with country","value":{"country":"US","postal_code":"90001"}},{"description":"Postal code prefix with country","value":{"country":"US","postal_code_prefix":"600"}},{"description":"Coordinates with radius and country","value":{"country":"US","latitude":34.0522,"longitude":-118.2437,"radius_miles":25.0}}]},"MentiumTmsMarketRateSource":{"type":"string","enum":["DAT","GREENSCREENS","TRUCKSTOP","CUSTOMER","OTHER"],"title":"MentiumTmsMarketRateSource","description":"Canonical source for customer-supplied market rate snapshots.\n\nTight enough for reporting/validation without modelling every customer-specific\nvendor. Custom provider names are preserved verbatim in the snapshot's\n``raw_payload`` rather than expanding this enum."},"MentiumTmsShippingMethod":{"type":"string","enum":["FTL","PTL","LTL","MENTIUM_UNKNOWN_VALUE"],"title":"MentiumTmsShippingMethod"},"MentiumTmsStopSchedulingType":{"type":"string","enum":["APPOINTMENT","CALL_AHEAD","ETA_REQUIRED","FCFS","MENTIUM_UNKNOWN_VALUE"],"title":"MentiumTmsStopSchedulingType"},"MentiumTmsStopType":{"type":"string","enum":["PICKUP","DELIVERY","BOTH","MENTIUM_UNKNOWN_VALUE"],"title":"MentiumTmsStopType"},"NodeDefinitionListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NodeDefinitionOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"NodeDefinitionListOut","description":"List of node definitions."},"NodeDefinitionOut":{"properties":{"type":{"$ref":"#/components/schemas/NodeName"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"executionMode":{"type":"string","title":"Executionmode"},"configModelSchema":{"additionalProperties":true,"type":"object","title":"Configmodelschema"},"outputModelSchema":{"additionalProperties":true,"type":"object","title":"Outputmodelschema"}},"type":"object","required":["type","label","description","category","executionMode","configModelSchema","outputModelSchema"],"title":"NodeDefinitionOut","description":"A workflow node definition for the frontend palette."},"NodeName":{"type":"string","enum":["email-trigger","event-trigger","http-trigger","inbound-call-trigger","inbound-text-trigger","offer-response-trigger","sub-workflow-trigger","ai-agent","conversation-agent","document-classifier","conditional","decision","foreach","sub-workflow","wait","http-request","code-execution","notification","book-carrier","email-create-draft","email-forward","email-move-to-folder","email-send","get-load","get-recommended-carriers","get-recommended-loads","match-contract-lane","outbound-call","outbound-calling","post-load-to-dat","remove-load-from-dat","update-load-on-dat","microsoft-teams-send-message","microsoft-teams-get-users","send-offer","send-offer-conversational","verify-carrier-highway","verify-carrier-genlogs","verify-carrier-mcp","send-packet-verification-email","send-text"],"title":"NodeName","description":"Unique identifier for every workflow node type.\n\nThis enum is the single source of truth for node type strings.\nIt is used in:\n- Python ``NodeDefinition.type``\n- The REST API ``NodeDefinitionOut.type`` (→ OpenAPI enum)\n- The generated TypeScript SDK (consumed by the frontend registry)"},"NotificationType":{"type":"string","enum":["DONT_SEND_REJECTED_NOTIFICATION","SEND_REJECTED_WITH_REASON_NOTIFICATION","SEND_REJECTED_WITHOUT_REASON_NOTIFICATION"],"title":"NotificationType","description":"Email notification preference when rejecting app access"},"OAuthProviderEnum":{"type":"string","enum":["GOOGLE","MICROSOFT","GENERIC_INTEGRATION"],"title":"OAuthProviderEnum"},"OfferCreateResponse":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"external_reference_load_id":{"type":"string","title":"External Reference Load Id"},"customer_rate_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Customer Rate Amount","description":"What customer pays broker (revenue) from Vortex, converted to display_currency using today's rate"},"min_load_offer_carrier_rate_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Load Offer Carrier Rate Amount","description":"Minimum carrier-rate bound for the load offer (in display_currency)"},"min_load_offer_carrier_rate_source":{"anyOf":[{"$ref":"#/components/schemas/LoadOfferCarrierRateSource"},{"type":"null"}]},"min_load_offer_carrier_rate_source_raw_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Load Offer Carrier Rate Source Raw Amount"},"max_load_offer_carrier_rate_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Load Offer Carrier Rate Amount","description":"Maximum carrier-rate bound for the load offer"},"max_load_offer_carrier_rate_source":{"anyOf":[{"$ref":"#/components/schemas/LoadOfferCarrierRateSource"},{"type":"null"}]},"max_load_offer_carrier_rate_source_raw_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Load Offer Carrier Rate Source Raw Amount"},"customer_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Currency","description":"Customer billing currency from Vortex."},"org_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Currency","description":"Currency the load-offer carrier-rate bounds are stored in"},"negotiation_currency_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Negotiation Currency Basis","description":"Negotiation currency basis setting (organization|customer|carrier)."},"display_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Currency","description":"Currency amounts are displayed in (org's current base currency)"},"was_converted":{"type":"boolean","title":"Was Converted","description":"True if amounts were converted due to org currency change","default":false},"created_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By User Id","description":"User who created the offer (null for automated workflows)"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","workspace_id","integration_connection_id","external_reference_load_id","created_at","updated_at"],"title":"OfferCreateResponse","description":"Load offer data returned from API without carrier offers (for creation endpoints)"},"OfferItem":{"properties":{"id":{"type":"string","title":"Id"},"channel":{"type":"string","title":"Channel"},"carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Name"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Detail"},"status":{"type":"string","title":"Status"},"source":{"type":"string","title":"Source"},"latest_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Carrier Rate Amount"},"opening_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opening Carrier Rate Amount"},"current_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Carrier Rate Amount"},"negotiation_round":{"type":"integer","title":"Negotiation Round","default":0},"agreed_rate_above_ceiling":{"type":"boolean","title":"Agreed Rate Above Ceiling","default":false},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"phone_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Call Id"}},"type":"object","required":["id","channel","status","source"],"title":"OfferItem"},"OfferOrDefaultResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"external_reference_load_id":{"type":"string","title":"External Reference Load Id"},"customer_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Customer Rate Amount"},"min_load_offer_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Load Offer Carrier Rate Amount"},"min_load_offer_carrier_rate_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Load Offer Carrier Rate Source"},"max_load_offer_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Load Offer Carrier Rate Amount"},"max_load_offer_carrier_rate_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Max Load Offer Carrier Rate Source"},"load_board_posted_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Load Board Posted Carrier Rate Amount","description":"What the TMS has the load posted at on the load boards; no quote is below it (ENG-2550)."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"is_saved":{"type":"boolean","title":"Is Saved","description":"True if offer exists in DB, False if showing calculated defaults"},"carrier_offers":{"items":{"$ref":"#/components/schemas/CarrierOfferSchema"},"type":"array","title":"Carrier Offers","description":"Carrier offers for this load (only populated when is_saved=True)"},"customer_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Currency","description":"Customer billing currency from Vortex."},"org_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Currency","description":"Currency amounts are stored in Nexus"},"negotiation_currency_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Negotiation Currency Basis","description":"Negotiation currency basis setting (organization|customer|carrier)."},"display_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Currency","description":"Currency amounts are displayed in (org's current base currency)"},"was_converted":{"type":"boolean","title":"Was Converted","description":"True if amounts were converted from org_currency to display_currency","default":false}},"type":"object","required":["organization_id","workspace_id","integration_connection_id","external_reference_load_id","min_load_offer_carrier_rate_amount","is_saved"],"title":"OfferOrDefaultResponse","description":"Response from get_or_default endpoint - includes is_saved flag"},"OfferRecipientContact":{"properties":{"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"subject_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Override","description":"Per-contact rendered subject. Takes precedence over the carrier-level subject_override for this recipient only. Frontend ships this when the user edits the email for a specific contact (e.g. fixing a name spelling)."},"body_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Override","description":"Per-contact rendered body HTML. Takes precedence over the carrier-level body_override."}},"type":"object","required":["email"],"title":"OfferRecipientContact"},"OfferResponse":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"external_reference_load_id":{"type":"string","title":"External Reference Load Id"},"customer_rate_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Customer Rate Amount","description":"What customer pays broker (revenue) from Vortex, converted to display_currency using today's rate"},"min_load_offer_carrier_rate_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Load Offer Carrier Rate Amount","description":"Minimum carrier-rate bound for the load offer (in display_currency)"},"min_load_offer_carrier_rate_source":{"anyOf":[{"$ref":"#/components/schemas/LoadOfferCarrierRateSource"},{"type":"null"}]},"min_load_offer_carrier_rate_source_raw_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Load Offer Carrier Rate Source Raw Amount"},"max_load_offer_carrier_rate_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Load Offer Carrier Rate Amount","description":"Maximum carrier-rate bound for the load offer"},"max_load_offer_carrier_rate_source":{"anyOf":[{"$ref":"#/components/schemas/LoadOfferCarrierRateSource"},{"type":"null"}]},"max_load_offer_carrier_rate_source_raw_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Load Offer Carrier Rate Source Raw Amount"},"customer_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Currency","description":"Customer billing currency from Vortex."},"org_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Currency","description":"Currency the load-offer carrier-rate bounds are stored in"},"negotiation_currency_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Negotiation Currency Basis","description":"Negotiation currency basis setting (organization|customer|carrier)."},"display_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Currency","description":"Currency amounts are displayed in (org's current base currency)"},"was_converted":{"type":"boolean","title":"Was Converted","description":"True if amounts were converted due to org currency change","default":false},"created_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By User Id","description":"User who created the offer (null for automated workflows)"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"carrier_offers":{"items":{"$ref":"#/components/schemas/CarrierOfferSchema"},"type":"array","title":"Carrier Offers","default":[]}},"type":"object","required":["id","organization_id","workspace_id","integration_connection_id","external_reference_load_id","created_at","updated_at"],"title":"OfferResponse","description":"Load offer data returned from API"},"OffersDashboardResponse":{"properties":{"summary":{"$ref":"#/components/schemas/OffersDashboardSummary"},"loads":{"items":{"$ref":"#/components/schemas/LoadOffersGroup"},"type":"array","title":"Loads"}},"type":"object","required":["summary","loads"],"title":"OffersDashboardResponse"},"OffersDashboardSummary":{"properties":{"total_offers_sent":{"type":"integer","title":"Total Offers Sent"},"loads_with_offers":{"type":"integer","title":"Loads With Offers"},"message_offers":{"type":"integer","title":"Message Offers"},"phone_offers":{"type":"integer","title":"Phone Offers"},"sent":{"type":"integer","title":"Sent"},"negotiating":{"type":"integer","title":"Negotiating"},"human_hand_off":{"type":"integer","title":"Human Hand Off"},"accepted":{"type":"integer","title":"Accepted"},"booked":{"type":"integer","title":"Booked"},"declined":{"type":"integer","title":"Declined"},"closed":{"type":"integer","title":"Closed"},"skipped":{"type":"integer","title":"Skipped","default":0},"rate_disputes":{"type":"integer","title":"Rate Disputes","description":"Offers where a carrier asked to change an already-agreed rate","default":0}},"type":"object","required":["total_offers_sent","loads_with_offers","message_offers","phone_offers","sent","negotiating","human_hand_off","accepted","booked","declined","closed"],"title":"OffersDashboardSummary"},"OnboardUserSchema":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"workspace_name":{"type":"string","title":"Workspace Name"}},"type":"object","required":["workspace_name"],"title":"OnboardUserSchema","description":"Onboarding schema that handles both scenarios:\n- Scenario A (new user, no org): All fields required\n- Scenario B (existing org, new app): Only workspace_name required"},"OperatorInfo":{"properties":{"value":{"type":"string","title":"Value"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"applicable_types":{"items":{"type":"string"},"type":"array","title":"Applicable Types"}},"type":"object","required":["value","label","description","applicable_types"],"title":"OperatorInfo","description":"Information about a filter operator."},"OptionsSource":{"type":"string","enum":["static","mentium_statuses","tms_statuses"],"title":"OptionsSource","description":"Where to resolve SELECT/MULTI_SELECT options from.\n\nSTATIC  – use the inline ``options`` list (default, current behaviour).\nMENTIUM_STATUSES – use the MentiumTmsLoadStatus enum (universal across TMSs).\nTMS_STATUSES – fetch dynamically from the TMS-statuses API for the\n               user's connected integration (requires integration_connection_id)."},"OptionsSourceMapEntry":{"properties":{"source":{"$ref":"#/components/schemas/OptionsSource","description":"Where to resolve options from"},"options":{"items":{"$ref":"#/components/schemas/SelectOptionResponse"},"type":"array","title":"Options","description":"Pre-resolved options for this source (empty for dynamic sources like TMS_STATUSES)"}},"type":"object","required":["source"],"title":"OptionsSourceMapEntry","description":"Maps a dependency value to an OptionsSource + pre-resolved options."},"OrgIntegrationSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"integration_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Name"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","created_at"],"title":"OrgIntegrationSchema"},"OrgProductSchema":{"properties":{"id":{"type":"string","title":"Id"},"feature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feature"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["id","enabled"],"title":"OrgProductSchema"},"OrgUserSchema":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"type":"object","required":["id","email","first_name","last_name"],"title":"OrgUserSchema"},"OrgWorkspaceSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"app_type":{"type":"string","title":"App Type"}},"type":"object","required":["id","name","app_type"],"title":"OrgWorkspaceSchema"},"OrganizationAdminCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"domain_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"},"allow_domain_registration":{"type":"boolean","title":"Allow Domain Registration","default":false},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Name"},"workspace_app_type":{"$ref":"#/components/schemas/AppType","default":"AP"},"admin_user":{"$ref":"#/components/schemas/AdminUserInput"}},"type":"object","required":["name","admin_user"],"title":"OrganizationAdminCreateRequest","description":"Request schema for creating a new organization with default workspace and admin user."},"OrganizationAdminSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"domain_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"},"users_count":{"type":"integer","title":"Users Count","default":0},"workspaces_count":{"type":"integer","title":"Workspaces Count","default":0},"integrations_count":{"type":"integer","title":"Integrations Count","default":0},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","name","created_at"],"title":"OrganizationAdminSchema","description":"Schema for organization listing with relationship counts."},"OrganizationAdminUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"business_hours":{"anyOf":[{"$ref":"#/components/schemas/BusinessHoursInput"},{"type":"null"}]},"domain_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"},"allow_domain_registration":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Domain Registration"},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number"}},"type":"object","title":"OrganizationAdminUpdateRequest"},"OrganizationDetailAdminSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"domain_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"business_hours":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Business Hours"},"allow_domain_registration":{"type":"boolean","title":"Allow Domain Registration","default":false},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"users":{"items":{"$ref":"#/components/schemas/OrgUserSchema"},"type":"array","title":"Users","default":[]},"workspaces":{"items":{"$ref":"#/components/schemas/OrgWorkspaceSchema"},"type":"array","title":"Workspaces","default":[]},"integrations":{"items":{"$ref":"#/components/schemas/OrgIntegrationSchema"},"type":"array","title":"Integrations","default":[]},"products":{"items":{"$ref":"#/components/schemas/OrgProductSchema"},"type":"array","title":"Products","default":[]}},"type":"object","required":["id","name","created_at","updated_at"],"title":"OrganizationDetailAdminSchema","description":"Schema for organization detail with full nested data."},"OrganizationMetrics":{"properties":{"total_loads":{"type":"integer","title":"Total Loads","description":"Total loads"},"average_loads_per_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Loads Per Interval","description":"Average loads per interval"},"projected_total_loads":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Projected Total Loads","description":"Projected total loads in the timeframe"},"total_revenue":{"type":"number","title":"Total Revenue","description":"Total revenue"},"average_revenue_per_load":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Revenue Per Load","description":"Average revenue per load"},"average_revenue_per_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Revenue Per Interval","description":"Average revenue per interval"},"projected_total_revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Projected Total Revenue","description":"Projected total revenue in the timeframe"},"total_margin":{"type":"number","title":"Total Margin","description":"Total margin"},"average_margin_per_load":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Margin Per Load","description":"Average margin per load"},"average_margin_per_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Margin Per Interval","description":"Average margin per interval"},"margin_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Percentage","description":"Margin percentage"},"projected_total_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Projected Total Margin","description":"Projected total margin in the timeframe"}},"type":"object","required":["total_loads","total_revenue","total_margin"],"title":"OrganizationMetrics","example":{"average_loads_per_interval":169.62,"average_margin_per_interval":34712.2,"average_margin_per_load":204.68,"average_revenue_per_interval":311546.92,"average_revenue_per_load":1836.74,"margin_percentage":11.14,"projected_total_loads":3900,"projected_total_margin":798000.0,"projected_total_revenue":7150000.0,"total_loads":3562,"total_margin":728956.14,"total_revenue":6542485.25}},"OrganizationSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"business_hours":{"anyOf":[{"$ref":"#/components/schemas/BusinessHours"},{"type":"null"}]},"domain_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"},"allow_domain_registration":{"type":"boolean","title":"Allow Domain Registration","default":false},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number"},"products":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProductSchema"},"type":"array"},{"type":"null"}],"title":"Products","default":[]}},"type":"object","required":["id","name"],"title":"OrganizationSchema"},"OrganizationUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"business_hours":{"anyOf":[{"$ref":"#/components/schemas/BusinessHours"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"domain_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Name"},"allow_domain_registration":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Domain Registration"},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number"}},"type":"object","title":"OrganizationUpdateRequest"},"OrganizationUserSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["id","first_name","last_name","email"],"title":"OrganizationUserSchema","description":"Minimal user fields for listing org members (e.g. dropdowns)."},"Page_ChatOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChatOut"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ChatOut]"},"Page_IntegrationEventSchema_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/IntegrationEventSchema"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[IntegrationEventSchema]"},"Page_OrganizationAdminSchema_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrganizationAdminSchema"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[OrganizationAdminSchema]"},"Page_OrganizationSchema_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrganizationSchema"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[OrganizationSchema]"},"Page_PhoneCallResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PhoneCallResponse"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[PhoneCallResponse]"},"Page_UserAdminSchema_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserAdminSchema"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[UserAdminSchema]"},"Page_UserSchema_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserSchema"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[UserSchema]"},"Page_WorkflowExecutionListItem_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkflowExecutionListItem"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[WorkflowExecutionListItem]"},"Page_WorkspaceAdminSchema_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkspaceAdminSchema"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[WorkspaceAdminSchema]"},"PaginatedResponse_CarrierResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CarrierResponse"},"type":"array","title":"Data","description":"List of items"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of items matching the query"},"has_more":{"type":"boolean","title":"Has More","description":"Whether there are more items available"},"limit":{"type":"integer","title":"Limit","description":"Number of items requested"},"offset":{"type":"integer","title":"Offset","description":"Number of items skipped"}},"type":"object","required":["data","total_count","has_more","limit","offset"],"title":"PaginatedResponse[CarrierResponse]"},"PaginatedResponse_CustomerResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CustomerResponse"},"type":"array","title":"Data","description":"List of items"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of items matching the query"},"has_more":{"type":"boolean","title":"Has More","description":"Whether there are more items available"},"limit":{"type":"integer","title":"Limit","description":"Number of items requested"},"offset":{"type":"integer","title":"Offset","description":"Number of items skipped"}},"type":"object","required":["data","total_count","has_more","limit","offset"],"title":"PaginatedResponse[CustomerResponse]"},"PaginatedResponse_LoadResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LoadResponse"},"type":"array","title":"Data","description":"List of items"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of items matching the query"},"has_more":{"type":"boolean","title":"Has More","description":"Whether there are more items available"},"limit":{"type":"integer","title":"Limit","description":"Number of items requested"},"offset":{"type":"integer","title":"Offset","description":"Number of items skipped"}},"type":"object","required":["data","total_count","has_more","limit","offset"],"title":"PaginatedResponse[LoadResponse]"},"PaginatedResponse_LocationResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LocationResponse"},"type":"array","title":"Data","description":"List of items"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of items matching the query"},"has_more":{"type":"boolean","title":"Has More","description":"Whether there are more items available"},"limit":{"type":"integer","title":"Limit","description":"Number of items requested"},"offset":{"type":"integer","title":"Offset","description":"Number of items skipped"}},"type":"object","required":["data","total_count","has_more","limit","offset"],"title":"PaginatedResponse[LocationResponse]"},"ParentWorkflowWarning":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["workflow_id","reason"],"title":"ParentWorkflowWarning","description":"Warning about a parent workflow that was deactivated during deploy."},"ParsedAvailabilityData":{"properties":{"carrier":{"anyOf":[{"$ref":"#/components/schemas/ParsedCarrierIdentifier"},{"type":"null"}],"description":"Per-item carrier identifier (name or DOT#)"},"source":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LocationByState"},{"$ref":"#/components/schemas/LocationByPostalCode"},{"$ref":"#/components/schemas/LocationByPostalPrefix"},{"$ref":"#/components/schemas/LocationByCity"},{"$ref":"#/components/schemas/LocationByCoordinates"},{"$ref":"#/components/schemas/AreaByStates"},{"$ref":"#/components/schemas/AreaByPostalCodes"},{"$ref":"#/components/schemas/AreaByPostalPrefixes"},{"$ref":"#/components/schemas/EmptyRegion"}],"discriminator":{"propertyName":"kind","mapping":{"area_by_postal_codes":"#/components/schemas/AreaByPostalCodes","area_by_postal_prefixes":"#/components/schemas/AreaByPostalPrefixes","area_by_states":"#/components/schemas/AreaByStates","city":"#/components/schemas/LocationByCity","coordinates":"#/components/schemas/LocationByCoordinates","empty":"#/components/schemas/EmptyRegion","postal_code":"#/components/schemas/LocationByPostalCode","postal_prefix":"#/components/schemas/LocationByPostalPrefix","state_only":"#/components/schemas/LocationByState"}}},{"type":"null"}],"title":"Source","description":"Source Region (Location or Area)"},"destination":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LocationByState"},{"$ref":"#/components/schemas/LocationByPostalCode"},{"$ref":"#/components/schemas/LocationByPostalPrefix"},{"$ref":"#/components/schemas/LocationByCity"},{"$ref":"#/components/schemas/LocationByCoordinates"},{"$ref":"#/components/schemas/AreaByStates"},{"$ref":"#/components/schemas/AreaByPostalCodes"},{"$ref":"#/components/schemas/AreaByPostalPrefixes"},{"$ref":"#/components/schemas/EmptyRegion"}],"discriminator":{"propertyName":"kind","mapping":{"area_by_postal_codes":"#/components/schemas/AreaByPostalCodes","area_by_postal_prefixes":"#/components/schemas/AreaByPostalPrefixes","area_by_states":"#/components/schemas/AreaByStates","city":"#/components/schemas/LocationByCity","coordinates":"#/components/schemas/LocationByCoordinates","empty":"#/components/schemas/EmptyRegion","postal_code":"#/components/schemas/LocationByPostalCode","postal_prefix":"#/components/schemas/LocationByPostalPrefix","state_only":"#/components/schemas/LocationByState"}}},{"type":"null"}],"title":"Destination","description":"Destination Region (Location or Area)"},"shipping_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipping Method","description":"Shipping method: FTL, PTL, LTL"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type","description":"Equipment type: DRY_VAN, REEFER, FLATBED, etc."},"recurrence_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Frequency","description":"Recurrence frequency: ONCE, DAILY, WEEKLY_BY_DAY_OF_WEEK, MONTHLY_BY_DAY_OF_MONTH, MONTHLY_BY_DAY_OF_WEEK_MONTHLY_OCCURRENCE"},"recurrence_interval":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Recurrence Interval","description":"Recurrence interval (e.g., every N days/weeks)"},"recurrence_start_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Start At","description":"Start date in ISO format (YYYY-MM-DD)"},"recurrence_end_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence End At","description":"End date in ISO format (YYYY-MM-DD)"},"days_of_week":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Days Of Week","description":"Days of week: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY"},"days_of_week_monthly_occurrences":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Days Of Week Monthly Occurrences","description":"Monthly occurrences: FIRST, SECOND, THIRD, FOURTH, LAST, SECOND_TO_LAST"},"days_of_month":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Days Of Month","description":"Days of month (1-31)"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"Additional notes extracted from input"}},"type":"object","title":"ParsedAvailabilityData","description":"Availability form data extracted from AI input."},"ParsedCapacityResponse":{"properties":{"capacity_type":{"type":"string","enum":["lane","availability"],"title":"Capacity Type","description":"Type of capacity data extracted"},"carrier":{"anyOf":[{"$ref":"#/components/schemas/ParsedCarrierIdentifier"},{"type":"null"}],"description":"Carrier identifier extracted from input (name or DOT#)"},"lane_items":{"items":{"$ref":"#/components/schemas/ParsedLaneData"},"type":"array","title":"Lane Items","description":"Parsed lane items (one or more lanes)."},"availability_items":{"items":{"$ref":"#/components/schemas/ParsedAvailabilityData"},"type":"array","title":"Availability Items","description":"Parsed availability items (one or more availabilities)."},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","description":"Overall confidence score (0-1)"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Warnings about fields that couldn't be extracted"}},"type":"object","required":["capacity_type","confidence"],"title":"ParsedCapacityResponse","description":"Response containing parsed capacity data from AI input."},"ParsedCarrierIdentifier":{"properties":{"carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Name","description":"Carrier company name"},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number","description":"USDOT number (primary identifier)"}},"type":"object","title":"ParsedCarrierIdentifier","description":"Carrier identifier — name or DOT number."},"ParsedLaneData":{"properties":{"carrier":{"anyOf":[{"$ref":"#/components/schemas/ParsedCarrierIdentifier"},{"type":"null"}],"description":"Per-item carrier identifier (name or DOT#)"},"source":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LocationByState"},{"$ref":"#/components/schemas/LocationByPostalCode"},{"$ref":"#/components/schemas/LocationByPostalPrefix"},{"$ref":"#/components/schemas/LocationByCity"},{"$ref":"#/components/schemas/LocationByCoordinates"},{"$ref":"#/components/schemas/AreaByStates"},{"$ref":"#/components/schemas/AreaByPostalCodes"},{"$ref":"#/components/schemas/AreaByPostalPrefixes"},{"$ref":"#/components/schemas/EmptyRegion"}],"discriminator":{"propertyName":"kind","mapping":{"area_by_postal_codes":"#/components/schemas/AreaByPostalCodes","area_by_postal_prefixes":"#/components/schemas/AreaByPostalPrefixes","area_by_states":"#/components/schemas/AreaByStates","city":"#/components/schemas/LocationByCity","coordinates":"#/components/schemas/LocationByCoordinates","empty":"#/components/schemas/EmptyRegion","postal_code":"#/components/schemas/LocationByPostalCode","postal_prefix":"#/components/schemas/LocationByPostalPrefix","state_only":"#/components/schemas/LocationByState"}}},{"type":"null"}],"title":"Source","description":"Source Region (Location or Area)"},"destination":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LocationByState"},{"$ref":"#/components/schemas/LocationByPostalCode"},{"$ref":"#/components/schemas/LocationByPostalPrefix"},{"$ref":"#/components/schemas/LocationByCity"},{"$ref":"#/components/schemas/LocationByCoordinates"},{"$ref":"#/components/schemas/AreaByStates"},{"$ref":"#/components/schemas/AreaByPostalCodes"},{"$ref":"#/components/schemas/AreaByPostalPrefixes"},{"$ref":"#/components/schemas/EmptyRegion"}],"discriminator":{"propertyName":"kind","mapping":{"area_by_postal_codes":"#/components/schemas/AreaByPostalCodes","area_by_postal_prefixes":"#/components/schemas/AreaByPostalPrefixes","area_by_states":"#/components/schemas/AreaByStates","city":"#/components/schemas/LocationByCity","coordinates":"#/components/schemas/LocationByCoordinates","empty":"#/components/schemas/EmptyRegion","postal_code":"#/components/schemas/LocationByPostalCode","postal_prefix":"#/components/schemas/LocationByPostalPrefix","state_only":"#/components/schemas/LocationByState"}}},{"type":"null"}],"title":"Destination","description":"Destination Region (Location or Area)"},"shipping_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipping Method","description":"Shipping method: FTL, PTL, LTL"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type","description":"Equipment type: DRY_VAN, REEFER, FLATBED, etc."},"preference_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preference Level","description":"Preference level: PREFERRED, PRIMARY, SECONDARY, BACKUP, EXCLUDED"},"target_line_haul_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Target Line Haul Rate","description":"Target line haul rate in dollars"},"target_fuel_surcharge_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Target Fuel Surcharge Rate","description":"Target fuel surcharge rate in dollars"},"automation_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automation Enabled","description":"Whether automation is enabled"},"is_contract":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Contract","description":"Whether this is a contract lane"},"contract_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Status","description":"Contract status: DRAFT, ACTIVE, PAUSED, EXPIRED"},"contract_effective_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Effective At","description":"Start date in ISO format (YYYY-MM-DD)"},"contract_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Expires At","description":"End date in ISO format (YYYY-MM-DD)"},"contract_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Notes","description":"Contract-specific notes"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"Additional notes extracted from input"}},"type":"object","title":"ParsedLaneData","description":"Lane form data extracted from AI input."},"PhoneA2PStatusResponse":{"properties":{"brand_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Status"},"brand_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Name"},"brand_failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Failure Reason"},"brand_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Brand Score"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"},"campaign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Status"},"campaign_usecase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Usecase"},"campaign_failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Failure Reason"},"is_assigned_to_campaign":{"type":"boolean","title":"Is Assigned To Campaign","default":false},"is_fully_registered":{"type":"boolean","title":"Is Fully Registered","default":false}},"type":"object","title":"PhoneA2PStatusResponse","description":"A2P registration status for a phone number."},"PhoneCallAnalysisCallSummary":{"properties":{"phone_call_id":{"type":"string","title":"Phone Call Id"},"tags_status":{"anyOf":[{"$ref":"#/components/schemas/AnalysisStatus"},{"type":"null"}]},"offers_status":{"anyOf":[{"$ref":"#/components/schemas/AnalysisStatus"},{"type":"null"}]},"tags":{"items":{"$ref":"#/components/schemas/PhoneCallTagSummary"},"type":"array","title":"Tags"},"carrier_offer":{"anyOf":[{"$ref":"#/components/schemas/PhoneCallCarrierOfferSummary"},{"type":"null"}]}},"type":"object","required":["phone_call_id"],"title":"PhoneCallAnalysisCallSummary"},"PhoneCallAnalysisCallSummaryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PhoneCallAnalysisCallSummary"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"PhoneCallAnalysisCallSummaryResponse"},"PhoneCallAnalysisSweepResponse":{"properties":{"claim_workflow_ids":{"items":{"type":"string"},"type":"array","title":"Claim Workflow Ids"}},"type":"object","required":["claim_workflow_ids"],"title":"PhoneCallAnalysisSweepResponse","description":"One workflow handle per fired backstop claim sweep (one per analyzer)."},"PhoneCallAnalysisSweepTrigger":{"properties":{"created_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},"type":"object","title":"PhoneCallAnalysisSweepTrigger","description":"Manual /sweep payload — narrow knobs the operator usually wants."},"PhoneCallAnalysisSyncResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/PhoneCallAnalysisSyncResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"PhoneCallAnalysisSyncResponse"},"PhoneCallAnalysisSyncResult":{"properties":{"phone_call_id":{"type":"string","title":"Phone Call Id"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"status":{"type":"string","title":"Status"},"written":{"type":"integer","title":"Written","default":0},"rejected":{"type":"integer","title":"Rejected","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["phone_call_id","status"],"title":"PhoneCallAnalysisSyncResult"},"PhoneCallCarrierOfferSummary":{"properties":{"id":{"type":"string","title":"Id"},"opening_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opening Carrier Rate Amount"},"latest_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Carrier Rate Amount"},"current_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Carrier Rate Amount"},"status":{"type":"string","title":"Status"},"sent_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["id","status"],"title":"PhoneCallCarrierOfferSummary","description":"The ``CarrierOffer`` linked to this call plus the position its rate events describe."},"PhoneCallDashboardKpis":{"properties":{"total_calls":{"type":"integer","title":"Total Calls"},"tagged_calls":{"type":"integer","title":"Tagged Calls"},"load_identified":{"type":"integer","title":"Load Identified"},"carrier_identified":{"type":"integer","title":"Carrier Identified"},"offer_discussed":{"type":"integer","title":"Offer Discussed"},"offer_accepted":{"type":"integer","title":"Offer Accepted"},"resolved":{"type":"integer","title":"Resolved"},"escalated":{"type":"integer","title":"Escalated"},"callback_requested":{"type":"integer","title":"Callback Requested"},"objections":{"type":"integer","title":"Objections"},"carrier_verified":{"type":"integer","title":"Carrier Verified"},"carrier_rejected":{"type":"integer","title":"Carrier Rejected"},"unique_loads":{"type":"integer","title":"Unique Loads"}},"type":"object","required":["total_calls","tagged_calls","load_identified","carrier_identified","offer_discussed","offer_accepted","resolved","escalated","callback_requested","objections","carrier_verified","carrier_rejected","unique_loads"],"title":"PhoneCallDashboardKpis","description":"Aggregated counts for one (direction, window) slice."},"PhoneCallDashboardLastOffer":{"properties":{"id":{"type":"string","title":"Id"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"load":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load"},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Carrier Rate Amount"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","received_at","status"],"title":"PhoneCallDashboardLastOffer","description":"One row of the \"Last Offer received\" widget."},"PhoneCallDashboardResponse":{"properties":{"period_days":{"type":"integer","title":"Period Days"},"agent_ids":{"items":{"type":"string"},"type":"array","title":"Agent Ids"},"range_start":{"type":"string","format":"date-time","title":"Range Start"},"range_end":{"type":"string","format":"date-time","title":"Range End"},"sections":{"items":{"$ref":"#/components/schemas/PhoneCallDashboardSection"},"type":"array","title":"Sections"}},"type":"object","required":["period_days","range_start","range_end","sections"],"title":"PhoneCallDashboardResponse"},"PhoneCallDashboardSection":{"properties":{"direction":{"type":"string","title":"Direction"},"current":{"$ref":"#/components/schemas/PhoneCallDashboardKpis"},"previous":{"$ref":"#/components/schemas/PhoneCallDashboardKpis"},"last_offers":{"items":{"$ref":"#/components/schemas/PhoneCallDashboardLastOffer"},"type":"array","title":"Last Offers"}},"type":"object","required":["direction","current","previous","last_offers"],"title":"PhoneCallDashboardSection","description":"One direction (INBOUND or OUTBOUND) — current period + previous period\nfor delta computation, plus the latest offers in the current window."},"PhoneCallDirection":{"type":"string","enum":["INBOUND","OUTBOUND"],"title":"PhoneCallDirection"},"PhoneCallEmbedded":{"properties":{"id":{"type":"string","title":"Id"},"direction":{"type":"string","title":"Direction"},"status":{"type":"string","title":"Status"},"from_number":{"type":"string","title":"From Number"},"to_number":{"type":"string","title":"To Number"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"}},"type":"object","required":["id","direction","status","from_number","to_number"],"title":"PhoneCallEmbedded","description":"Minimal phone call data embedded in carrier offer response"},"PhoneCallEventResponse":{"properties":{"id":{"type":"string","title":"Id"},"phone_call_id":{"type":"string","title":"Phone Call Id"},"event_type":{"$ref":"#/components/schemas/PhoneCallEventType"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["id","phone_call_id","event_type","timestamp","data"],"title":"PhoneCallEventResponse","description":"Phone call event data returned from API"},"PhoneCallEventType":{"type":"string","enum":["TOOL_CALL","STATUS_CHANGE","CONVERSATION_STARTED","CONVERSATION_ENDED","TRANSFER_NUMBER_ASSIGNED","TRANSFER_LEG_OBSERVED","RECORDING_ARMED","RECORDING_RECEIVED","RECORDING_STORED"],"title":"PhoneCallEventType"},"PhoneCallExtractOffersNowRequest":{"properties":{"phone_call_ids":{"items":{"type":"string"},"type":"array","maxItems":25,"minItems":1,"title":"Phone Call Ids"},"force_retag":{"type":"boolean","title":"Force Retag","default":false}},"type":"object","required":["phone_call_ids"],"title":"PhoneCallExtractOffersNowRequest","description":"Sync analyze using the ``phone_call_offers`` analyzer."},"PhoneCallOutcome":{"type":"string","enum":["BOOKED","NEGOTIATING","REJECTED","ERROR","TRANSFERRED"],"title":"PhoneCallOutcome"},"PhoneCallResponse":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"direction":{"$ref":"#/components/schemas/PhoneCallDirection"},"status":{"$ref":"#/components/schemas/PhoneCallStatus"},"from_number":{"type":"string","title":"From Number"},"to_number":{"type":"string","title":"To Number"},"external_reference_carrier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Carrier Id"},"external_reference_carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Carrier Name"},"external_reference_load_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Load Id"},"ai_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Agent Id"},"ai_agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Agent Name"},"ai_agent_revision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Agent Revision Id"},"ai_agent_revision_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ai Agent Revision Number"},"elevenlabs_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Elevenlabs Agent Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"twilio_call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Call Sid"},"carrier_offer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Offer Id"},"carrier_offer":{"anyOf":[{"$ref":"#/components/schemas/CarrierOfferEmbedded"},{"type":"null"}]},"initiated_at":{"type":"string","format":"date-time","title":"Initiated At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"outcome":{"anyOf":[{"$ref":"#/components/schemas/PhoneCallOutcome"},{"type":"null"}]},"negotiated_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Negotiated Rate"},"negotiated_rate_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Negotiated Rate Currency"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"transfer_leg_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Leg Sid"},"transfer_leg_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Leg Status"},"transfer_leg_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transfer Leg Duration Seconds"},"transfer_connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Transfer Connected At"},"post_transfer_transcript":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Post Transfer Transcript"},"post_transfer_transcription_terminal_result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Post Transfer Transcription Terminal Result"},"post_transfer_recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Post Transfer Recording Url"},"notes_spanning_transfer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes Spanning Transfer"},"transfer_result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Result"},"transfer_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Detail"},"transfer_notify_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Notify Email"},"transfer_notify_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Notify Name"},"transfer_notify_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Notify Phone"},"transfer_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Source"},"transcript":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Transcript"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"events":{"items":{"$ref":"#/components/schemas/PhoneCallEventResponse"},"type":"array","title":"Events","default":[]},"estimated_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Estimated Cost Usd"},"feedback_count":{"type":"integer","title":"Feedback Count","default":0},"latest_feedback_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Feedback Text"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","workspace_id","direction","status","from_number","to_number","initiated_at","created_at","updated_at"],"title":"PhoneCallResponse","description":"Phone call data returned from API"},"PhoneCallStatus":{"type":"string","enum":["INITIATED","RINGING","ACTIVE","COMPLETED","FAILED","NO_ANSWER","BUSY"],"title":"PhoneCallStatus"},"PhoneCallTagNowRequest":{"properties":{"phone_call_ids":{"items":{"type":"string"},"type":"array","maxItems":25,"minItems":1,"title":"Phone Call Ids"},"force_retag":{"type":"boolean","title":"Force Retag","default":false}},"type":"object","required":["phone_call_ids"],"title":"PhoneCallTagNowRequest","description":"Sync analyze using the ``phone_call_tags`` analyzer."},"PhoneCallTagSummary":{"properties":{"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"},"b_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B Type"},"link_href":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Href"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"}},"type":"object","required":["name","color"],"title":"PhoneCallTagSummary"},"PhoneCallWorkflowExecutionLink":{"properties":{"workflow_execution_id":{"type":"string","title":"Workflow Execution Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name"},"execution_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Status"},"business_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["workflow_execution_id","created_at"],"title":"PhoneCallWorkflowExecutionLink","description":"A workflow run the call's inbound-call trigger started (its TRIGGER event carries the call id)."},"PhonePromptVariable":{"properties":{"key":{"type":"string","title":"Key","description":"Variable key to use in {{variable}} syntax"},"description":{"type":"string","title":"Description","description":"What this variable represents"},"category":{"type":"string","enum":["dynamic","system"],"title":"Category","description":"Variable category"},"direction":{"type":"string","enum":["inbound","outbound","both"],"title":"Direction","description":"Which call direction supports this variable"}},"type":"object","required":["key","description","category","direction"],"title":"PhonePromptVariable","description":"Variable available for phone call prompts"},"PhonePromptVariablesResponse":{"properties":{"variables":{"items":{"$ref":"#/components/schemas/PhonePromptVariable"},"type":"array","title":"Variables"}},"type":"object","required":["variables"],"title":"PhonePromptVariablesResponse","description":"Available variables for phone call prompts"},"PhoneTwilioDetailsResponse":{"properties":{"twilio_sid":{"type":"string","title":"Twilio Sid"},"capabilities":{"additionalProperties":true,"type":"object","title":"Capabilities"},"sms_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Url"},"sms_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Method"},"voice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Url"},"voice_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Method"},"status_callback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Callback"},"friendly_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Friendly Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["twilio_sid"],"title":"PhoneTwilioDetailsResponse","description":"Live Twilio details for the phone number detail drawer."},"PostLoadToDATRequest":{"properties":{"dat_integration_connection_id":{"type":"string","title":"Dat Integration Connection Id","description":"DAT integration connection ID used to post."},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments","description":"Optional comment posted with the load (max 70 chars)."},"is_tracking_required":{"type":"boolean","title":"Is Tracking Required","description":"Whether DAT tracking should be required.","default":false},"rate_usd":{"anyOf":[{"type":"number","maximum":100000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Rate Usd","description":"Rate to advertise on the board, in USD. The caller resolves it — the load view prefills the offer's configured minimum carrier rate. Required unless omit_rate is set."},"rate_source":{"anyOf":[{"$ref":"#/components/schemas/LoadBoardPostingRateSource"},{"type":"null"}],"description":"Where rate_usd was resolved from, recorded on the audit row. Defaults to MANUAL_OVERRIDE, the value for a rate a person typed."},"contact_method":{"anyOf":[{"type":"string","enum":["EMAIL","PRIMARY_PHONE","ALTERNATE_PHONE"]},{"type":"null"}],"title":"Contact Method","description":"DAT preferred contact method; defaults to email."},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email","description":"Contact email on the posting. Omit to let DAT use the posting account's own details."},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone","description":"Contact phone on the posting."},"omit_rate":{"type":"boolean","title":"Omit Rate","description":"Post with no rate at all ('call for rate'), ignoring rate_usd and the load's carrier target.","default":false}},"type":"object","required":["dat_integration_connection_id"],"title":"PostLoadToDATRequest","description":"Request to post an internal load to the DAT Load Board."},"PostLoadToDATResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"posting_status":{"$ref":"#/components/schemas/LoadBoardPostingStatus","description":"POSTED on a fresh posting, ALREADY_POSTED when the load was already on the board and nothing was sent, FAILED on validation errors or a DAT rejection, RETRYING on transient API errors."},"load_external_reference_id":{"type":"string","title":"Load External Reference Id"},"dat_posting_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dat Posting Id"},"dat_response":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dat Response"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"message":{"type":"string","title":"Message"},"rate_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Usd","description":"Rate advertised on the board; null means 'call for rate'."},"rate_source":{"anyOf":[{"$ref":"#/components/schemas/LoadBoardPostingRateSource"},{"type":"null"}],"description":"MANUAL_OVERRIDE when the caller set the rate, otherwise the load column it was read from. Null when the posting carries no rate."}},"type":"object","required":["success","posting_status","load_external_reference_id","message"],"title":"PostLoadToDATResponse","description":"Response from posting a load to DAT."},"PreferredLoadIdentifier":{"type":"string","enum":["EXTERNAL_REFERENCE_ID","TMS_DISPLAY_REFERENCE_ID"],"title":"PreferredLoadIdentifier"},"PreparePublicBookingLinkResponse":{"properties":{"public_booking_token":{"type":"string","title":"Public Booking Token"},"public_booking_link":{"type":"string","title":"Public Booking Link"},"public_booking_signature":{"type":"string","title":"Public Booking Signature","description":"HMAC signature that must be passed back to /send to bind this token to the offer."},"public_booking_expires_at":{"type":"string","format":"date-time","title":"Public Booking Expires At","description":"Expiry timestamp for the signature; the bundle is rejected after this point."}},"type":"object","required":["public_booking_token","public_booking_link","public_booking_signature","public_booking_expires_at"],"title":"PreparePublicBookingLinkResponse"},"PricingConfigResponse":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"per_minute_rate_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Per Minute Rate Usd"},"per_call_fee_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Per Call Fee Usd"},"per_phone_number_monthly_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Per Phone Number Monthly Usd"},"elevenlabs_cost_per_1k_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Elevenlabs Cost Per 1K Credits"},"effective_from":{"type":"string","format":"date-time","title":"Effective From"},"effective_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective Until"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","workspace_id","per_minute_rate_usd","per_call_fee_usd","per_phone_number_monthly_usd","elevenlabs_cost_per_1k_credits","created_at","updated_at"],"title":"PricingConfigResponse"},"ProductFeature":{"type":"string","enum":["AGENT_CHAT","BOOKING_INTELLIGENCE","CARRIER_POOL","CHATS","CONTRACTS","LOAD_ENTRY","QUOTES","SCHEMAS","TMS_CHAT","WORKFLOWS"],"title":"ProductFeature"},"ProductInput":{"properties":{"feature":{"$ref":"#/components/schemas/ProductFeature"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["feature","enabled"],"title":"ProductInput"},"ProductSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"feature":{"$ref":"#/components/schemas/ProductFeature"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["organization_id","workspace_id","feature","enabled","created_at","updated_at"],"title":"ProductSchema"},"ProfitabilityAgent":{"properties":{"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Dispatcher user UUID, if known"},"agent_name":{"type":"string","title":"Agent Name","description":"Agent display name"},"total_loads":{"type":"integer","title":"Total Loads","description":"Loads handled in the window"},"unprofitable_loads":{"type":"integer","title":"Unprofitable Loads","description":"Loads with negative margin"},"total_revenue":{"type":"number","title":"Total Revenue"},"total_margin":{"type":"number","title":"Total Margin"},"total_loss":{"type":"number","title":"Total Loss","description":"Sum of losses on loss-making loads (>= 0)"},"average_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Margin","description":"Average margin per load with financials"}},"type":"object","required":["agent_name","total_loads","unprofitable_loads","total_revenue","total_margin","total_loss"],"title":"ProfitabilityAgent","description":"An agent's (dispatcher's) profitability within the window (org base currency)."},"ProfitabilityCustomer":{"properties":{"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id","description":"Customer UUID, if known"},"customer_name":{"type":"string","title":"Customer Name","description":"Customer display name"},"total_loads":{"type":"integer","title":"Total Loads","description":"Loads booked in the window"},"unprofitable_loads":{"type":"integer","title":"Unprofitable Loads","description":"Loads with negative margin"},"total_revenue":{"type":"number","title":"Total Revenue","description":"Total customer revenue"},"total_margin":{"type":"number","title":"Total Margin","description":"Total net margin (can be negative)"},"total_loss":{"type":"number","title":"Total Loss","description":"Sum of losses on loss-making loads (>= 0)"},"average_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Margin","description":"Average margin per load with financials"}},"type":"object","required":["customer_name","total_loads","unprofitable_loads","total_revenue","total_margin","total_loss"],"title":"ProfitabilityCustomer","description":"A customer's profitability within the window (org base currency)."},"ProfitabilityLane":{"properties":{"source_city":{"type":"string","title":"Source City"},"source_state":{"type":"string","title":"Source State"},"destination_city":{"type":"string","title":"Destination City"},"destination_state":{"type":"string","title":"Destination State"},"total_loads":{"type":"integer","title":"Total Loads","description":"Loads on this lane in the window"},"unprofitable_loads":{"type":"integer","title":"Unprofitable Loads","description":"Loads with negative margin"},"total_revenue":{"type":"number","title":"Total Revenue"},"total_margin":{"type":"number","title":"Total Margin","description":"Net win/loss on this lane"},"total_loss":{"type":"number","title":"Total Loss","description":"Sum of losses on loss-making loads (>= 0)"},"average_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Margin","description":"Average margin per load with financials"}},"type":"object","required":["source_city","source_state","destination_city","destination_state","total_loads","unprofitable_loads","total_revenue","total_margin","total_loss"],"title":"ProfitabilityLane","description":"A lane's profitability within the window (org base currency)."},"ProfitabilityLeadTimeBucket":{"properties":{"bucket_index":{"type":"integer","title":"Bucket Index","description":"Stable display order (0 = Same Day)"},"bucket_label":{"type":"string","title":"Bucket Label","description":"Human label, e.g. 'Same Day', '2-3 days'"},"total_loads":{"type":"integer","title":"Total Loads","description":"Loads booked in this lead-time bucket"},"loads_with_financials":{"type":"integer","title":"Loads With Financials","description":"Loads in the bucket that have financials"},"unprofitable_loads":{"type":"integer","title":"Unprofitable Loads","description":"Loads with negative margin"},"total_revenue":{"type":"number","title":"Total Revenue"},"total_margin":{"type":"number","title":"Total Margin","description":"Net win/loss for the bucket"},"total_loss":{"type":"number","title":"Total Loss","description":"Sum of losses on loss-making loads (>= 0)"},"average_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Margin","description":"Average margin per load with financials"},"loss_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Loss Rate","description":"unprofitable_loads / loads_with_financials * 100"},"margin_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Percentage","description":"total_margin / total_revenue * 100"}},"type":"object","required":["bucket_index","bucket_label","total_loads","loads_with_financials","unprofitable_loads","total_revenue","total_margin","total_loss"],"title":"ProfitabilityLeadTimeBucket","description":"Profitability for one booking-lead-time bucket (org base currency).\n\nLead time = how far ahead of pickup a load was booked. Buckets are a fixed\n7-step scheme returned in display order via ``bucket_index``."},"ProfitabilityPeriod":{"type":"string","enum":["SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS"],"title":"ProfitabilityPeriod","description":"Trailing window a profitability snapshot is computed over."},"PromptFeedbackCreate":{"properties":{"phone_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phone Call Id","description":"Source phone call ID"},"ai_agent_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Ai Agent Session Id","description":"Source agent session ID"},"feedback_text":{"type":"string","maxLength":5000,"minLength":1,"title":"Feedback Text","description":"What failed and what was expected"},"transcript_excerpt":{"items":{"$ref":"#/components/schemas/PromptFeedbackTranscriptTurn"},"type":"array","maxItems":500,"minItems":1,"title":"Transcript Excerpt","description":"Full conversation transcript; the feedback_text describes what went wrong"}},"type":"object","required":["feedback_text","transcript_excerpt"],"title":"PromptFeedbackCreate"},"PromptFeedbackListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PromptFeedbackResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"PromptFeedbackListResponse"},"PromptFeedbackResponse":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"phone_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Call Id"},"ai_agent_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Agent Session Id"},"feedback_text":{"type":"string","title":"Feedback Text"},"transcript_excerpt":{"items":{"$ref":"#/components/schemas/PromptFeedbackTranscriptTurn"},"type":"array","title":"Transcript Excerpt"},"system_prompt_snapshot":{"type":"string","title":"System Prompt Snapshot"},"user_prompt_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Snapshot"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","agent_id","phone_call_id","ai_agent_session_id","feedback_text","transcript_excerpt","system_prompt_snapshot","user_prompt_snapshot","created_at","updated_at"],"title":"PromptFeedbackResponse"},"PromptFeedbackTranscriptTurn":{"properties":{"role":{"type":"string","enum":["agent","user"],"title":"Role"},"message":{"type":"string","maxLength":10000,"title":"Message"}},"additionalProperties":true,"type":"object","required":["role","message"],"title":"PromptFeedbackTranscriptTurn"},"PromptFeedbackUpdate":{"properties":{"feedback_text":{"type":"string","maxLength":5000,"minLength":1,"title":"Feedback Text","description":"Updated feedback text"}},"type":"object","required":["feedback_text"],"title":"PromptFeedbackUpdate"},"PromptGeneratorRequest":{"properties":{"type":{"type":"string","const":"prompt_generator","title":"Type"},"role":{"type":"string","maxLength":1000,"title":"Role","description":"The role and purpose of the AI agent to generate a prompt for.","default":""},"context":{"type":"string","maxLength":10000,"title":"Context","description":"Context and information the agent will have access to.","default":""},"tools":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Tools","description":"Tools or capabilities available to the agent."},"constraints":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Constraints","description":"Hard rules and constraints the agent must follow."},"tone":{"type":"string","maxLength":200,"title":"Tone","description":"Desired tone (e.g. professional, friendly, concise).","default":"professional"},"additional_instructions":{"type":"string","maxLength":50000,"title":"Additional Instructions","description":"Any additional nuances or instructions to incorporate.","default":""},"available_variables":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Available Variables","description":"Available {{variable}} placeholders for this agent type."},"feedback_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":20,"title":"Feedback Ids","description":"IDs of PromptFeedback records to include as context."}},"type":"object","required":["type"],"title":"PromptGeneratorRequest","description":"Request payload for the system-prompt generator helper."},"PromptRewriterRequest":{"properties":{"type":{"type":"string","const":"prompt_rewriter","title":"Type"},"current_prompt":{"type":"string","maxLength":50000,"title":"Current Prompt","description":"The existing prompt to rewrite."},"instructions":{"type":"string","maxLength":2000,"title":"Instructions","description":"User instructions describing what to change (tone, structure, etc.)."},"prompt_type":{"type":"string","enum":["system","user"],"title":"Prompt Type","description":"Whether editing a system prompt or user prompt template.","default":"system"},"agent_name":{"type":"string","maxLength":200,"title":"Agent Name","description":"Name of the agent being edited.","default":""},"agent_description":{"type":"string","maxLength":1000,"title":"Agent Description","description":"Description of the agent being edited.","default":""},"agent_tools":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Agent Tools","description":"Tools available to the agent."},"available_variables":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Available Variables","description":"Available {{variable}} placeholders for this agent type."},"conversation_history":{"items":{"$ref":"#/components/schemas/ConversationTurnRequest"},"type":"array","maxItems":20,"title":"Conversation History","description":"Previous rewrite conversation turns for multi-turn context."},"feedback_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":20,"title":"Feedback Ids","description":"IDs of PromptFeedback records to include as context."}},"type":"object","required":["type","current_prompt","instructions"],"title":"PromptRewriterRequest","description":"Request payload for the prompt rewriter helper."},"PromptVersionCreate":{"properties":{"prompt_type":{"type":"string","enum":["system","user"],"title":"Prompt Type"},"prompt_content":{"type":"string","minLength":1,"title":"Prompt Content"},"source_feedback_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"title":"Source Feedback Ids"}},"type":"object","required":["prompt_type","prompt_content"],"title":"PromptVersionCreate"},"PromptVersionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PromptVersionResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"PromptVersionListResponse"},"PromptVersionResponse":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"prompt_type":{"type":"string","title":"Prompt Type"},"prompt_content":{"type":"string","title":"Prompt Content"},"source_feedback_ids":{"items":{"type":"string"},"type":"array","title":"Source Feedback Ids"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","agent_id","prompt_type","prompt_content","source_feedback_ids","created_at"],"title":"PromptVersionResponse"},"ProvingAgentSnapshot":{"properties":{"name":{"type":"string","title":"Name"},"agent_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Type"},"model":{"type":"string","title":"Model"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort"},"system_prompt_template":{"type":"string","title":"System Prompt Template"},"user_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Template"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"},"type_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Config"},"tool_inputs":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Tool Inputs"},"mcp_bindings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Mcp Bindings"},"automation_tools":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Automation Tools","description":"Each bound webhook tool as the model is told about it; its URL, headers and secret are never stored"},"workspace_has_email_signature":{"type":"boolean","title":"Workspace Has Email Signature","default":false},"tested_draft":{"type":"boolean","title":"Tested Draft","description":"The run tested the agent's unpublished draft, not the live agent","default":false},"version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number","description":"The version the run tested: the live one, the one a draft is based on, or the revision it evaluated"},"system_prompt_template_overridden":{"type":"boolean","title":"System Prompt Template Overridden","default":false},"user_prompt_template_overridden":{"type":"boolean","title":"User Prompt Template Overridden","default":false},"tools_overridden":{"type":"boolean","title":"Tools Overridden","default":false},"type_config_overridden":{"type":"boolean","title":"Type Config Overridden","default":false}},"type":"object","required":["name","model","system_prompt_template"],"title":"ProvingAgentSnapshot"},"ProvingDraftRunRequest":{"properties":{"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids","description":"The tests to run; every test in the agent's suite when omitted"},"yaml_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yaml Content","description":"The draft to test, as agent.yaml; the agent's saved draft when omitted, and the live agent when it has none"}},"type":"object","title":"ProvingDraftRunRequest"},"ProvingEffectiveSuiteResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"system_scenarios":{"items":{"$ref":"#/components/schemas/ProvingScenarioResponse"},"type":"array","title":"System Scenarios","description":"The Mentium safety checks attached, directly or through a group"},"directly_linked_scenarios":{"items":{"$ref":"#/components/schemas/ProvingScenarioResponse"},"type":"array","title":"Directly Linked Scenarios","description":"The other scenarios linked to the agent directly"},"group_scenarios":{"items":{"$ref":"#/components/schemas/ProvingScenarioResponse"},"type":"array","title":"Group Scenarios","description":"The other scenarios its groups give it"},"total":{"type":"integer","title":"Total"},"direct_scenario_ids":{"items":{"type":"string"},"type":"array","title":"Direct Scenario Ids","description":"Every scenario linked directly, safety checks included: what setting its scenarios replaces"},"suggested_safety_scenarios":{"items":{"$ref":"#/components/schemas/ProvingScenarioResponse"},"type":"array","title":"Suggested Safety Scenarios","description":"Mentium safety checks that fit the agent's tools but are not attached"},"unfit_safety_scenario_ids":{"items":{"type":"string"},"type":"array","title":"Unfit Safety Scenario Ids","description":"Attached safety checks about tools the agent does not hold"}},"type":"object","required":["agent_id","total"],"title":"ProvingEffectiveSuiteResponse","description":"Every scenario attached to this agent, and so every one it runs, with where each one came from."},"ProvingEvaluation-Input":{"properties":{"type":{"type":"string","const":"evaluation","title":"Type","default":"evaluation"},"evaluation_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Idx","description":"0-indexed index of ProvingScenario.evaluations. Used by backend and frontend for ordering evaluations. Evaluations are ran sequentially. E.g. agent must call google search tool with terms 'weather in San Francisco' (evaluation item 0) and 'weather in New York' (evaluation item 1) and then must respond about temerature and rain chances (evaluation item 2).","default":0},"name":{"type":"string","title":"Name"},"transcript_turn_idx":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Transcript Turn Idx","description":"0-indexed index of ProvingScenario.prefix_transcript_turns. Used by backend and frontend for ordering evaluations. None for a transcript-level and must run for all turns serialized and passed to the LLM at once, 0 for agent introductory turn, 1 for first user turn, 2 for second agent turn, etc. Transcript-level evaluation limited to only LLM evaluation since message and tool call evaluation at transcript level does not make sense."},"operator":{"$ref":"#/components/schemas/ProvingEvaluationOperator"},"evaluation_items":{"items":{"oneOf":[{"$ref":"#/components/schemas/ProvingEvaluationItemMessage"},{"$ref":"#/components/schemas/ProvingEvaluationItemToolCall-Input"},{"$ref":"#/components/schemas/ProvingEvaluationItemLLM"},{"$ref":"#/components/schemas/ProvingEvaluationItemSafetyInvariant"}],"discriminator":{"propertyName":"type","mapping":{"evaluation_item_llm":"#/components/schemas/ProvingEvaluationItemLLM","evaluation_item_message":"#/components/schemas/ProvingEvaluationItemMessage","evaluation_item_safety_invariant":"#/components/schemas/ProvingEvaluationItemSafetyInvariant","evaluation_item_tool_call":"#/components/schemas/ProvingEvaluationItemToolCall-Input"}}},"type":"array","title":"Evaluation Items"}},"type":"object","required":["name","operator"],"title":"ProvingEvaluation"},"ProvingEvaluation-Output":{"properties":{"type":{"type":"string","const":"evaluation","title":"Type","default":"evaluation"},"evaluation_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Idx","description":"0-indexed index of ProvingScenario.evaluations. Used by backend and frontend for ordering evaluations. Evaluations are ran sequentially. E.g. agent must call google search tool with terms 'weather in San Francisco' (evaluation item 0) and 'weather in New York' (evaluation item 1) and then must respond about temerature and rain chances (evaluation item 2).","default":0},"name":{"type":"string","title":"Name"},"transcript_turn_idx":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Transcript Turn Idx","description":"0-indexed index of ProvingScenario.prefix_transcript_turns. Used by backend and frontend for ordering evaluations. None for a transcript-level and must run for all turns serialized and passed to the LLM at once, 0 for agent introductory turn, 1 for first user turn, 2 for second agent turn, etc. Transcript-level evaluation limited to only LLM evaluation since message and tool call evaluation at transcript level does not make sense."},"operator":{"$ref":"#/components/schemas/ProvingEvaluationOperator"},"evaluation_items":{"items":{"oneOf":[{"$ref":"#/components/schemas/ProvingEvaluationItemMessage"},{"$ref":"#/components/schemas/ProvingEvaluationItemToolCall-Output"},{"$ref":"#/components/schemas/ProvingEvaluationItemLLM"},{"$ref":"#/components/schemas/ProvingEvaluationItemSafetyInvariant"}],"discriminator":{"propertyName":"type","mapping":{"evaluation_item_llm":"#/components/schemas/ProvingEvaluationItemLLM","evaluation_item_message":"#/components/schemas/ProvingEvaluationItemMessage","evaluation_item_safety_invariant":"#/components/schemas/ProvingEvaluationItemSafetyInvariant","evaluation_item_tool_call":"#/components/schemas/ProvingEvaluationItemToolCall-Output"}}},"type":"array","title":"Evaluation Items"}},"type":"object","required":["name","operator"],"title":"ProvingEvaluation"},"ProvingEvaluationItemLLM":{"properties":{"type":{"type":"string","const":"evaluation_item_llm","title":"Type","default":"evaluation_item_llm"},"evaluation_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Item Idx","description":"0-indexed index of ProvingEvaluation.evaluation_items. Not used by backend since evaluation items are unordered. Used by frontend for ordering evaluation items in the UI. Evaluation item must run for all turn items serialized and passed to the LLM at once and pass for one of them to pass the evaluation.","default":0},"name":{"type":"string","title":"Name"},"expected_turn_observation":{"type":"string","title":"Expected Turn Observation","description":"Natural language expected observation in the turn"},"expected_turn_observation_criteria":{"items":{"type":"string"},"type":"array","title":"Expected Turn Observation Criteria","description":"Natural-language criteria, each judged met or not; empty judges expected_turn_observation alone."},"criteria_pass_fraction":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Criteria Pass Fraction","description":"Fraction of the criteria that must be met. Ignored when there are no criteria.","default":1.0}},"type":"object","required":["name","expected_turn_observation"],"title":"ProvingEvaluationItemLLM"},"ProvingEvaluationItemMessage":{"properties":{"type":{"type":"string","const":"evaluation_item_message","title":"Type","default":"evaluation_item_message"},"evaluation_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Item Idx","description":"0-indexed index of ProvingEvaluation.evaluation_items. Not used by backend since evaluation items are unordered. Used by frontend for ordering evaluation items in the UI. Evaluation item must run for each of the turn items and pass for one of them to pass the evaluation.","default":0},"name":{"type":"string","title":"Name"},"expected_message_content":{"type":"string","title":"Expected Message Content"},"match_method":{"$ref":"#/components/schemas/ProvingEvaluationItemMessageMatchMethod"},"case_sensitive":{"type":"boolean","title":"Case Sensitive","default":false}},"type":"object","required":["name","expected_message_content","match_method"],"title":"ProvingEvaluationItemMessage"},"ProvingEvaluationItemMessageMatchMethod":{"type":"string","enum":["exact_match","one_of","contains"],"title":"ProvingEvaluationItemMessageMatchMethod"},"ProvingEvaluationItemSafetyInvariant":{"properties":{"type":{"type":"string","const":"evaluation_item_safety_invariant","title":"Type","default":"evaluation_item_safety_invariant"},"evaluation_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Item Idx","description":"0-indexed index of ProvingEvaluation.evaluation_items. Not used by backend since evaluation items are unordered. Used by frontend for ordering evaluation items in the UI. Evaluation item runs once over the whole conversation.","default":0},"name":{"type":"string","title":"Name"},"invariant_id":{"$ref":"#/components/schemas/ProvingEvaluationItemSafetyInvariantId"},"invariant_params":{"additionalProperties":true,"type":"object","title":"Invariant Params","description":"What the scenario tells the invariant, such as figures it may speak"}},"type":"object","required":["name","invariant_id"],"title":"ProvingEvaluationItemSafetyInvariant"},"ProvingEvaluationItemSafetyInvariantId":{"type":"string","enum":["quotes_only_known_figures","names_only_allowed_figures","never_names_figures"],"title":"ProvingEvaluationItemSafetyInvariantId"},"ProvingEvaluationItemToolCall-Input":{"properties":{"type":{"type":"string","const":"evaluation_item_tool_call","title":"Type","default":"evaluation_item_tool_call"},"evaluation_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Item Idx","description":"0-indexed index of ProvingEvaluation.evaluation_items. Not used by backend since evaluation items are unordered. Used by frontend for ordering evaluation items in the UI. Evaluation item must run for each of the turn items and pass for one of them to pass the evaluation.","default":0},"name":{"type":"string","title":"Name"},"tool_call_name":{"type":"string","title":"Tool Call Name"},"expected_tool_call_params":{"items":{"$ref":"#/components/schemas/ProvingEvaluationItemToolCallParamItem"},"type":"array","title":"Expected Tool Call Params"}},"type":"object","required":["name","tool_call_name"],"title":"ProvingEvaluationItemToolCall"},"ProvingEvaluationItemToolCall-Output":{"properties":{"type":{"type":"string","const":"evaluation_item_tool_call","title":"Type","default":"evaluation_item_tool_call"},"evaluation_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Item Idx","description":"0-indexed index of ProvingEvaluation.evaluation_items. Not used by backend since evaluation items are unordered. Used by frontend for ordering evaluation items in the UI. Evaluation item must run for each of the turn items and pass for one of them to pass the evaluation.","default":0},"name":{"type":"string","title":"Name"},"tool_call_name":{"type":"string","title":"Tool Call Name"},"expected_tool_call_params":{"items":{"$ref":"#/components/schemas/ProvingEvaluationItemToolCallParamItem"},"type":"array","title":"Expected Tool Call Params"}},"type":"object","required":["name","tool_call_name"],"title":"ProvingEvaluationItemToolCall"},"ProvingEvaluationItemToolCallMatchMethod":{"type":"string","enum":["exact_match","one_of","contains","in_range"],"title":"ProvingEvaluationItemToolCallMatchMethod"},"ProvingEvaluationItemToolCallParamItem":{"properties":{"type":{"type":"string","const":"evaluation_item_tool_call_param_item","title":"Type","default":"evaluation_item_tool_call_param_item"},"evaluation_item_tool_call_param_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Item Tool Call Param Item Idx","description":"0-indexed index of ProvingEvaluationItemToolCall.expected_tool_call_params. Not used by backend since evaluation item tool call parameters are unordered. Used by frontend for ordering evaluation item tool call parameters in the UI.","default":0},"name":{"type":"string","title":"Name"},"tool_call_param_path":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Tool Call Param Path"},"tool_call_param_expected_value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Tool Call Param Expected Value"},"match_method":{"$ref":"#/components/schemas/ProvingEvaluationItemToolCallMatchMethod"},"case_sensitive":{"type":"boolean","title":"Case Sensitive","default":false}},"type":"object","required":["name","tool_call_param_path","tool_call_param_expected_value","match_method"],"title":"ProvingEvaluationItemToolCallParamItem"},"ProvingEvaluationOperator":{"type":"string","enum":["not","and","or"],"title":"ProvingEvaluationOperator"},"ProvingEvaluationResult":{"properties":{"type":{"type":"string","const":"evaluation_result","title":"Type","default":"evaluation_result"},"evaluation_result_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Result Idx","description":"0-indexed index of ProvingScenario.evaluation_results. Used by backend and frontend for ordering evaluation results. Evaluation results are ran sequentially. ","default":0},"evaluation_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Idx","description":"0-indexed index of ProvingScenario.evaluations. Used by backend and frontend for ordering evaluation results. ","default":0},"transcript_turn_idx":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Transcript Turn Idx","description":"0-indexed index of ProvingScenario.prefix_transcript_turns. Used by backend and frontend for ordering evaluation results. None for a transcript-level and must run for all turns serialized and passed to the LLM at once, 0 for agent introductory turn, 1 for first user turn, 2 for second agent turn, etc. Transcript-level evaluation limited to only LLM evaluation since message and tool call evaluation at transcript level does not make sense."},"evaluation_result_items":{"items":{"oneOf":[{"$ref":"#/components/schemas/ProvingEvaluationResultItemMessage"},{"$ref":"#/components/schemas/ProvingEvaluationResultItemToolCall"},{"$ref":"#/components/schemas/ProvingEvaluationResultItemLLM"},{"$ref":"#/components/schemas/ProvingEvaluationResultItemSafetyInvariant"}],"discriminator":{"propertyName":"type","mapping":{"evaluation_result_item_llm":"#/components/schemas/ProvingEvaluationResultItemLLM","evaluation_result_item_message":"#/components/schemas/ProvingEvaluationResultItemMessage","evaluation_result_item_safety_invariant":"#/components/schemas/ProvingEvaluationResultItemSafetyInvariant","evaluation_result_item_tool_call":"#/components/schemas/ProvingEvaluationResultItemToolCall"}}},"type":"array","title":"Evaluation Result Items"},"passed":{"type":"boolean","title":"Passed"}},"type":"object","required":["passed"],"title":"ProvingEvaluationResult"},"ProvingEvaluationResultItemLLM":{"properties":{"type":{"type":"string","const":"evaluation_result_item_llm","title":"Type","default":"evaluation_result_item_llm"},"evaluation_result_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Result Item Idx","description":"0-indexed index of ProvingEvaluationResult.evaluation_result_items","default":0},"evaluation_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Item Idx","description":"0-indexed index of ProvingEvaluation.evaluation_items. Not used by backend since evaluation items are unordered. Used by frontend for ordering evaluation items in the UI. Evaluation item must run for each of the turn items and pass for one of them to pass the evaluation.","default":0},"passed":{"type":"boolean","title":"Passed"},"result_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Message"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["passed"],"title":"ProvingEvaluationResultItemLLM"},"ProvingEvaluationResultItemMessage":{"properties":{"type":{"type":"string","const":"evaluation_result_item_message","title":"Type","default":"evaluation_result_item_message"},"evaluation_result_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Result Item Idx","description":"0-indexed index of ProvingEvaluationResult.evaluation_result_items","default":0},"evaluation_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Item Idx","description":"0-indexed index of ProvingEvaluation.evaluation_items. Not used by backend since evaluation items are unordered. Used by frontend for ordering evaluation items in the UI. Evaluation item must run for each of the turn items and pass for one of them to pass the evaluation.","default":0},"actual_message_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Message Content"},"passed":{"type":"boolean","title":"Passed"},"result_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Message"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["passed"],"title":"ProvingEvaluationResultItemMessage"},"ProvingEvaluationResultItemSafetyInvariant":{"properties":{"type":{"type":"string","const":"evaluation_result_item_safety_invariant","title":"Type","default":"evaluation_result_item_safety_invariant"},"evaluation_result_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Result Item Idx","description":"0-indexed index of ProvingEvaluationResult.evaluation_result_items","default":0},"evaluation_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Item Idx","description":"0-indexed index of ProvingEvaluation.evaluation_items. Not used by backend since evaluation items are unordered. Used by frontend for ordering evaluation items in the UI. Evaluation item runs once over the whole conversation.","default":0},"violations":{"items":{"type":"string"},"type":"array","title":"Violations","description":"Each way the conversation broke the invariant"},"passed":{"type":"boolean","title":"Passed"},"result_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Message"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["passed"],"title":"ProvingEvaluationResultItemSafetyInvariant"},"ProvingEvaluationResultItemToolCall":{"properties":{"type":{"type":"string","const":"evaluation_result_item_tool_call","title":"Type","default":"evaluation_result_item_tool_call"},"evaluation_result_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Result Item Idx","description":"0-indexed index of ProvingEvaluationResult.evaluation_result_items","default":0},"evaluation_item_idx":{"type":"integer","minimum":0.0,"title":"Evaluation Item Idx","description":"0-indexed index of ProvingEvaluation.evaluation_items. Not used by backend since evaluation items are unordered. Used by frontend for ordering evaluation items in the UI. Evaluation item must run for each of the turn items and pass for one of them to pass the evaluation.","default":0},"actual_tool_call_params":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProvingTranscriptTurnItemToolCall"},"type":"array"},{"type":"null"}],"title":"Actual Tool Call Params"},"passed":{"type":"boolean","title":"Passed"},"result_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Message"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["passed"],"title":"ProvingEvaluationResultItemToolCall"},"ProvingMockToolCall-Input":{"properties":{"type":{"type":"string","const":"mock_tool_call","title":"Type","default":"mock_tool_call"},"mock_tool_call_idx":{"type":"integer","minimum":0.0,"title":"Mock Tool Call Idx","description":"0-indexed index of ProvingScenario.mock_tool_calls. 0 for first mock tool call, 1 for second mock tool call, etc. Used by backend and frontend for ordering tool calls. Tool calls can be repeated with the same name and parameters and can only be consumed once so needed to be ordered for priority. E.g. first tool call to delete a database record must give success result but second tool call to delete the same record must give failure result.","default":0},"transcript_turn_idx":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Transcript Turn Idx","description":"0-indexed index of ProvingScenario.prefix_transcript_turns. None for a transcript-level, 0 for agent introductory turn, 1 for first user turn, 2 for second agent turn, etc."},"tool_call_name":{"type":"string","title":"Tool Call Name"},"tool_call_params":{"items":{"$ref":"#/components/schemas/ProvingMockToolCallParamItem"},"type":"array","title":"Tool Call Params"},"tool_call_result":{"additionalProperties":true,"type":"object","title":"Tool Call Result"}},"type":"object","required":["tool_call_name","tool_call_result"],"title":"ProvingMockToolCall"},"ProvingMockToolCall-Output":{"properties":{"type":{"type":"string","const":"mock_tool_call","title":"Type","default":"mock_tool_call"},"mock_tool_call_idx":{"type":"integer","minimum":0.0,"title":"Mock Tool Call Idx","description":"0-indexed index of ProvingScenario.mock_tool_calls. 0 for first mock tool call, 1 for second mock tool call, etc. Used by backend and frontend for ordering tool calls. Tool calls can be repeated with the same name and parameters and can only be consumed once so needed to be ordered for priority. E.g. first tool call to delete a database record must give success result but second tool call to delete the same record must give failure result.","default":0},"transcript_turn_idx":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Transcript Turn Idx","description":"0-indexed index of ProvingScenario.prefix_transcript_turns. None for a transcript-level, 0 for agent introductory turn, 1 for first user turn, 2 for second agent turn, etc."},"tool_call_name":{"type":"string","title":"Tool Call Name"},"tool_call_params":{"items":{"$ref":"#/components/schemas/ProvingMockToolCallParamItem"},"type":"array","title":"Tool Call Params"},"tool_call_result":{"additionalProperties":true,"type":"object","title":"Tool Call Result"}},"type":"object","required":["tool_call_name","tool_call_result"],"title":"ProvingMockToolCall"},"ProvingMockToolCallParamItem":{"properties":{"type":{"type":"string","const":"mock_tool_call_param_item","title":"Type","default":"mock_tool_call_param_item"},"mock_tool_call_param_item_idx":{"type":"integer","minimum":0.0,"title":"Mock Tool Call Param Item Idx","description":"0-indexed index of ProvingMockToolCall.tool_call_params. Not used by backend since tool call parameters are functionally unordered. Used by frontend for ordering tool call parameters in the UI for consistency.","default":0},"tool_call_param_path":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Tool Call Param Path"},"tool_call_param_value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Tool Call Param Value"},"match_method":{"$ref":"#/components/schemas/ProvingMockToolCallParamMatchMethod"},"case_sensitive":{"type":"boolean","title":"Case Sensitive","default":false}},"type":"object","required":["tool_call_param_path","tool_call_param_value","match_method"],"title":"ProvingMockToolCallParamItem"},"ProvingMockToolCallParamMatchMethod":{"type":"string","enum":["exact_match","one_of","contains","in_range"],"title":"ProvingMockToolCallParamMatchMethod"},"ProvingRunListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProvingRunResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"ProvingRunListResponse"},"ProvingRunResponse":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"agent_revision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Revision Id","description":"The revision this run evaluates, when it is one of a revision's runs"},"scenario_id":{"type":"string","title":"Scenario Id"},"agent_snapshot":{"$ref":"#/components/schemas/ProvingAgentSnapshot"},"scenario_snapshot":{"$ref":"#/components/schemas/ProvingScenarioSnapshot"},"transcript_turns":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProvingTranscriptTurn"},"type":"array"},{"type":"null"}],"title":"Transcript Turns"},"evaluation_results":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProvingEvaluationResult"},"type":"array"},{"type":"null"}],"title":"Evaluation Results"},"status":{"$ref":"#/components/schemas/ProvingRunStatus"},"passed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Passed"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url","description":"A phone run's call audio, agent left and carrier right: a one-hour link on GET /runs/{id}, null in lists and the stream"},"release":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Release","description":"The release a staging deploy's run tested"},"image_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Tag","description":"The image tag a staging deploy's run tested"},"mentium_created_at":{"type":"string","format":"date-time","title":"Mentium Created At"},"mentium_updated_at":{"type":"string","format":"date-time","title":"Mentium Updated At"}},"type":"object","required":["id","agent_id","scenario_id","agent_snapshot","scenario_snapshot","status","mentium_created_at","mentium_updated_at"],"title":"ProvingRunResponse"},"ProvingRunStatus":{"type":"string","enum":["pending","running","completed","failed"],"title":"ProvingRunStatus"},"ProvingRunTrigger":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id","description":"Agent ID (for tracking)"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id","description":"Scenario to run"},"system_prompt_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt Override","description":"If provided, use this prompt instead of the agent's saved system prompt for the run"},"user_prompt_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt Override","description":"If provided, use this prompt instead of the agent's saved user prompt for the run"},"response_format_override":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Format Override","description":"If provided, use this output schema instead of the agent's saved response format for the run"},"tools_override":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools Override","description":"If provided, use these tools instead of the agent's saved tools for the run"},"release":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Release","description":"The release a staging deploy's run tests"},"image_tag":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Image Tag","description":"The image tag a staging deploy's run tests"}},"type":"object","required":["agent_id","scenario_id"],"title":"ProvingRunTrigger"},"ProvingScenarioCreate-Input":{"properties":{"phone_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phone Call Id","description":"Source phone call ID (for auditing)"},"ai_agent_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Ai Agent Session Id","description":"Source AI agent session ID (for auditing)"},"severity":{"$ref":"#/components/schemas/ProvingSeverity","description":"How much a failure costs. p0_safety makes the proving job exit non-zero and is system-owned.","default":"p2_quality"},"name":{"type":"string","maxLength":500,"title":"Name","description":"Scenario name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Scenario description"},"node_type":{"type":"string","enum":["conversation-agent","ai-agent"],"title":"Node Type","description":"Which production workflow node the agent is run as: a conversation with a carrier, or one AI agent step.","default":"conversation-agent"},"node_config":{"additionalProperties":true,"type":"object","title":"Node Config","description":"That node's own settings: variables, tool_inputs and, for a conversation, channel and mode."},"prefix_transcript_turns":{"items":{"$ref":"#/components/schemas/ProvingTranscriptTurn"},"type":"array","maxItems":200,"title":"Prefix Transcript Turns","description":"Prefix transcript turns. May start with either a user or agent turn. Must end with an agent turn (latest response)."},"mock_tool_calls":{"items":{"$ref":"#/components/schemas/ProvingMockToolCall-Input"},"type":"array","maxItems":200,"title":"Mock Tool Calls","description":"Tool call mocks for replay during proving runs"},"evaluations":{"items":{"$ref":"#/components/schemas/ProvingEvaluation-Input"},"type":"array","maxItems":100,"title":"Evaluations","description":"Evaluation criteria for agent responses"}},"type":"object","required":["name","prefix_transcript_turns"],"title":"ProvingScenarioCreate"},"ProvingScenarioCreate-Output":{"properties":{"phone_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phone Call Id","description":"Source phone call ID (for auditing)"},"ai_agent_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Ai Agent Session Id","description":"Source AI agent session ID (for auditing)"},"severity":{"$ref":"#/components/schemas/ProvingSeverity","description":"How much a failure costs. p0_safety makes the proving job exit non-zero and is system-owned.","default":"p2_quality"},"name":{"type":"string","maxLength":500,"title":"Name","description":"Scenario name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Scenario description"},"node_type":{"type":"string","enum":["conversation-agent","ai-agent"],"title":"Node Type","description":"Which production workflow node the agent is run as: a conversation with a carrier, or one AI agent step.","default":"conversation-agent"},"node_config":{"additionalProperties":true,"type":"object","title":"Node Config","description":"That node's own settings: variables, tool_inputs and, for a conversation, channel and mode."},"prefix_transcript_turns":{"items":{"$ref":"#/components/schemas/ProvingTranscriptTurn"},"type":"array","maxItems":200,"title":"Prefix Transcript Turns","description":"Prefix transcript turns. May start with either a user or agent turn. Must end with an agent turn (latest response)."},"mock_tool_calls":{"items":{"$ref":"#/components/schemas/ProvingMockToolCall-Output"},"type":"array","maxItems":200,"title":"Mock Tool Calls","description":"Tool call mocks for replay during proving runs"},"evaluations":{"items":{"$ref":"#/components/schemas/ProvingEvaluation-Output"},"type":"array","maxItems":100,"title":"Evaluations","description":"Evaluation criteria for agent responses"}},"type":"object","required":["name","prefix_transcript_turns"],"title":"ProvingScenarioCreate"},"ProvingScenarioGenerationRequest":{"properties":{"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id","description":"Agent to generate scenarios for (used to resolve system prompt and available tools)"},"description":{"anyOf":[{"type":"string","maxLength":2000,"minLength":10},{"type":"null"}],"title":"Description","description":"Natural language description of the scenario to generate"}},"type":"object","title":"ProvingScenarioGenerationRequest"},"ProvingScenarioGenerationResponse":{"properties":{"scenario":{"$ref":"#/components/schemas/ProvingScenarioCreate-Output","description":"Generated scenario"}},"type":"object","required":["scenario"],"title":"ProvingScenarioGenerationResponse"},"ProvingScenarioListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProvingScenarioResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"ProvingScenarioListResponse"},"ProvingScenarioResponse":{"properties":{"id":{"type":"string","title":"Id"},"phone_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Call Id"},"ai_agent_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Agent Session Id"},"is_system":{"type":"boolean","title":"Is System","description":"System-owned; immutable through this API","default":false},"severity":{"$ref":"#/components/schemas/ProvingSeverity","default":"p2_quality"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"node_type":{"type":"string","enum":["conversation-agent","ai-agent"],"title":"Node Type","default":"conversation-agent"},"node_config":{"additionalProperties":true,"type":"object","title":"Node Config"},"prefix_transcript_turns":{"items":{"$ref":"#/components/schemas/ProvingTranscriptTurn"},"type":"array","title":"Prefix Transcript Turns"},"mock_tool_calls":{"items":{"$ref":"#/components/schemas/ProvingMockToolCall-Output"},"type":"array","title":"Mock Tool Calls"},"evaluations":{"items":{"$ref":"#/components/schemas/ProvingEvaluation-Output"},"type":"array","title":"Evaluations"},"linked_agent_count":{"type":"integer","title":"Linked Agent Count","default":0},"definition_version":{"type":"integer","title":"Definition Version","default":1},"definition_digest":{"type":"string","title":"Definition Digest","description":"A fingerprint of what the test is now; a run whose snapshot carries a different one ran an older version of the test","default":""},"mentium_created_at":{"type":"string","format":"date-time","title":"Mentium Created At"},"mentium_updated_at":{"type":"string","format":"date-time","title":"Mentium Updated At"}},"type":"object","required":["id","name","mentium_created_at","mentium_updated_at"],"title":"ProvingScenarioResponse"},"ProvingScenarioRestoreRequest":{"properties":{"version_number":{"type":"integer","minimum":1.0,"title":"Version Number","description":"The version whose definition becomes a new version of the test"}},"type":"object","required":["version_number"],"title":"ProvingScenarioRestoreRequest"},"ProvingScenarioSnapshot":{"properties":{"is_system":{"type":"boolean","title":"Is System","default":false},"severity":{"$ref":"#/components/schemas/ProvingSeverity","default":"p2_quality"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"node_type":{"type":"string","enum":["conversation-agent","ai-agent"],"title":"Node Type","default":"conversation-agent"},"node_config":{"additionalProperties":true,"type":"object","title":"Node Config"},"prefix_transcript_turns":{"items":{"$ref":"#/components/schemas/ProvingTranscriptTurn"},"type":"array","title":"Prefix Transcript Turns"},"mock_tool_calls":{"items":{"$ref":"#/components/schemas/ProvingMockToolCall-Output"},"type":"array","title":"Mock Tool Calls"},"evaluations":{"items":{"$ref":"#/components/schemas/ProvingEvaluation-Output"},"type":"array","title":"Evaluations"},"definition_digest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definition Digest","description":"A fingerprint of the test when the run started; runs with the same one ran the same test"},"definition_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Definition Version","description":"The test version when the run started"}},"type":"object","required":["name"],"title":"ProvingScenarioSnapshot"},"ProvingScenarioStats":{"properties":{"scenario_id":{"type":"string","title":"Scenario Id"},"runs":{"type":"integer","title":"Runs","description":"Runs that finished, passed, failed or could not run"},"passed":{"type":"integer","title":"Passed","description":"Runs whose test passed"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"last_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Outcome","description":"passed, failed or could_not_run, for the latest finished run"}},"type":"object","required":["scenario_id","runs","passed"],"title":"ProvingScenarioStats"},"ProvingScenarioStatsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProvingScenarioStats"},"type":"array","title":"Items"}},"type":"object","title":"ProvingScenarioStatsResponse"},"ProvingScenarioUpdate":{"properties":{"severity":{"anyOf":[{"$ref":"#/components/schemas/ProvingSeverity"},{"type":"null"}],"description":"How much a failure costs. p0_safety makes the proving job exit non-zero and is system-owned."},"name":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Name","description":"Scenario name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Scenario description"},"node_type":{"anyOf":[{"type":"string","enum":["conversation-agent","ai-agent"]},{"type":"null"}],"title":"Node Type","description":"Send together with node_config."},"node_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Node Config"},"prefix_transcript_turns":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProvingTranscriptTurn"},"type":"array","maxItems":200},{"type":"null"}],"title":"Prefix Transcript Turns","description":"Prefix transcript turns. May start with either a user or agent turn. Must end with an agent turn (latest response)."},"mock_tool_calls":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProvingMockToolCall-Input"},"type":"array","maxItems":200},{"type":"null"}],"title":"Mock Tool Calls","description":"Tool call mocks for replay during proving runs"},"evaluations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProvingEvaluation-Input"},"type":"array","maxItems":100},{"type":"null"}],"title":"Evaluations","description":"Evaluation criteria for agent responses"}},"type":"object","title":"ProvingScenarioUpdate"},"ProvingScenarioVersionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProvingScenarioVersionResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ProvingScenarioVersionListResponse"},"ProvingScenarioVersionResponse":{"properties":{"version_number":{"type":"integer","title":"Version Number"},"is_current":{"type":"boolean","title":"Is Current","description":"The version the test is on now","default":false},"definition":{"additionalProperties":true,"type":"object","title":"Definition","description":"The test as it was in this version: name, node, conversation, mock tool calls, evaluations"},"changed_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By Email"},"changed_by_impersonator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By Impersonator Email","description":"The admin acting as the user who made this version"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["version_number","definition"],"title":"ProvingScenarioVersionResponse"},"ProvingScenariosGroupListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProvingScenariosGroupResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"ProvingScenariosGroupListResponse"},"ProvingScenariosGroupRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"What the group of scenarios is called"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":200,"title":"Scenario Ids","description":"The scenarios in this group, Mentium's safety checks included"}},"type":"object","required":["name"],"title":"ProvingScenariosGroupRequest"},"ProvingScenariosGroupResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"scenario_ids":{"items":{"type":"string"},"type":"array","title":"Scenario Ids"},"agent_ids":{"items":{"type":"string"},"type":"array","title":"Agent Ids"},"mentium_created_at":{"type":"string","format":"date-time","title":"Mentium Created At"},"mentium_updated_at":{"type":"string","format":"date-time","title":"Mentium Updated At"}},"type":"object","required":["id","name","mentium_created_at","mentium_updated_at"],"title":"ProvingScenariosGroupResponse"},"ProvingSeverity":{"type":"string","enum":["p0_safety","p1_correctness","p2_quality"],"title":"ProvingSeverity"},"ProvingTranscriptTurn":{"properties":{"type":{"type":"string","const":"transcript_turn","title":"Type","default":"transcript_turn"},"transcript_turn_idx":{"type":"integer","minimum":0.0,"title":"Transcript Turn Idx","description":"0-indexed index of ProvingScenario.prefix_transcript_turns and ProvingRun.transcript_turns. 0 for introductory agent turn, 1 for first user turn, 2 for second agent turn, etc. Used by backend and frontend for ordering turns.","default":0},"role":{"$ref":"#/components/schemas/ProvingTranscriptTurnRole"},"transcript_turn_items":{"items":{"oneOf":[{"$ref":"#/components/schemas/ProvingTranscriptTurnItemMessage"},{"$ref":"#/components/schemas/ProvingTranscriptTurnItemToolCall"}],"discriminator":{"propertyName":"type","mapping":{"transcript_turn_item_message":"#/components/schemas/ProvingTranscriptTurnItemMessage","transcript_turn_item_tool_call":"#/components/schemas/ProvingTranscriptTurnItemToolCall"}}},"type":"array","title":"Transcript Turn Items"}},"type":"object","required":["role"],"title":"ProvingTranscriptTurn"},"ProvingTranscriptTurnItemMessage":{"properties":{"type":{"type":"string","const":"transcript_turn_item_message","title":"Type","default":"transcript_turn_item_message"},"transcript_turn_item_idx":{"type":"integer","minimum":0.0,"title":"Transcript Turn Item Idx","description":"0-indexed index of ProvingTranscriptTurn.transcript_turn_items. Used by backend and frontend for ordering turn items.","default":0},"message_content":{"type":"string","title":"Message Content"}},"type":"object","required":["message_content"],"title":"ProvingTranscriptTurnItemMessage"},"ProvingTranscriptTurnItemToolCall":{"properties":{"type":{"type":"string","const":"transcript_turn_item_tool_call","title":"Type","default":"transcript_turn_item_tool_call"},"transcript_turn_item_idx":{"type":"integer","minimum":0.0,"title":"Transcript Turn Item Idx","description":"0-indexed index of ProvingTranscriptTurn.transcript_turn_items. Used by backend and frontend for ordering turn items.","default":0},"tool_call_id":{"type":"string","title":"Tool Call Id"},"tool_call_name":{"type":"string","title":"Tool Call Name"},"tool_call_params":{"additionalProperties":true,"type":"object","title":"Tool Call Params"},"tool_call_result":{"additionalProperties":true,"type":"object","title":"Tool Call Result"}},"type":"object","required":["tool_call_id","tool_call_name","tool_call_params","tool_call_result"],"title":"ProvingTranscriptTurnItemToolCall"},"ProvingTranscriptTurnRole":{"type":"string","enum":["user","agent"],"title":"ProvingTranscriptTurnRole"},"ProvisionEmailIntegrationRequest":{"properties":{"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"reply_to_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Reply To Email"},"sender_email_local":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email Local"}},"type":"object","title":"ProvisionEmailIntegrationRequest"},"ProvisionPhoneNumberRequest":{"properties":{"phone_number":{"type":"string","title":"Phone Number","description":"E.164 formatted phone number to purchase"},"area_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Code"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"}},"type":"object","required":["phone_number"],"title":"ProvisionPhoneNumberRequest","description":"Request to provision (purchase from Twilio + deploy to ElevenLabs) a phone number"},"ProvisionPhoneNumberResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Internal phone number record ID"},"phone_number":{"type":"string","title":"Phone Number"},"twilio_sid":{"type":"string","title":"Twilio Sid","description":"Twilio phone number SID"},"elevenlabs_phone_number_id":{"type":"string","title":"Elevenlabs Phone Number Id","description":"ElevenLabs phone number ID"},"area_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Code"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"status":{"type":"string","title":"Status","description":"Provisioning status","default":"active"}},"type":"object","required":["id","phone_number","twilio_sid","elevenlabs_phone_number_id"],"title":"ProvisionPhoneNumberResponse","description":"Response after provisioning a phone number"},"PublicEmailOfferOptOutContextResponse":{"properties":{"carrier_name":{"type":"string","title":"Carrier Name"},"organization_name":{"type":"string","title":"Organization Name"},"already_opted_out":{"type":"boolean","title":"Already Opted Out","default":false}},"type":"object","required":["carrier_name","organization_name"],"title":"PublicEmailOfferOptOutContextResponse"},"PublicEmailOfferOptOutRequest":{"properties":{"reason_code":{"anyOf":[{"$ref":"#/components/schemas/EmailOfferOptOutReasonCode"},{"type":"null"}],"description":"Preset reason code (too_many_emails, not_interested, wrong_contact, other)"},"reason_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason Text"}},"type":"object","title":"PublicEmailOfferOptOutRequest"},"PublicEmailOfferOptOutResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"PublicEmailOfferOptOutResponse"},"PublicLoadAccessorialResponse":{"properties":{"name":{"type":"string","title":"Name"},"scope":{"type":"string","title":"Scope"}},"type":"object","required":["name","scope"],"title":"PublicLoadAccessorialResponse","description":"Carrier-relevant service details, intentionally excluding financials and source metadata."},"PublicLoadOfferResponse":{"properties":{"load_id":{"type":"string","title":"Load Id"},"origin_city":{"type":"string","title":"Origin City"},"origin_state":{"type":"string","title":"Origin State"},"origin_zip":{"type":"string","title":"Origin Zip"},"destination_city":{"type":"string","title":"Destination City"},"destination_state":{"type":"string","title":"Destination State"},"destination_zip":{"type":"string","title":"Destination Zip"},"miles":{"type":"number","title":"Miles"},"equipment_type":{"type":"string","title":"Equipment Type"},"stops":{"type":"integer","title":"Stops"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight"},"opening_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opening Carrier Rate Amount"},"latest_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Carrier Rate Amount"},"current_carrier_rate_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Carrier Rate Amount"},"rate_updated":{"type":"boolean","title":"Rate Updated","default":false},"currency":{"type":"string","title":"Currency"},"is_booked":{"type":"boolean","title":"Is Booked"},"token_expired":{"type":"boolean","title":"Token Expired","default":false},"carrier_offer_status":{"type":"string","title":"Carrier Offer Status"},"carrier_dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Dot Number"},"is_available_for_acceptance":{"type":"boolean","title":"Is Available For Acceptance"},"shipment_requirements":{"anyOf":[{"$ref":"#/components/schemas/nexus__app__api__routers__v2__public__loads__ShipmentRequirementsResponse"},{"type":"null"}]},"accessorials":{"items":{"$ref":"#/components/schemas/PublicLoadAccessorialResponse"},"type":"array","title":"Accessorials"},"first_pickup_stop":{"anyOf":[{"$ref":"#/components/schemas/StopDetailsResponse"},{"type":"null"}]},"last_delivery_stop":{"anyOf":[{"$ref":"#/components/schemas/StopDetailsResponse"},{"type":"null"}]},"first_pickup_stop_target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Target Arrival Earliest At"},"first_pickup_stop_target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Target Arrival Latest At"},"last_delivery_stop_target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Target Arrival Earliest At"},"last_delivery_stop_target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Target Arrival Latest At"}},"type":"object","required":["load_id","origin_city","origin_state","origin_zip","destination_city","destination_state","destination_zip","miles","equipment_type","stops","weight","currency","is_booked","carrier_offer_status","is_available_for_acceptance"],"title":"PublicLoadOfferResponse","description":"Sanitized load offer data for public view"},"PublishDraftResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Published agent ID"},"published":{"type":"boolean","title":"Published","description":"Whether the agent was published"}},"type":"object","required":["id","published"],"title":"PublishDraftResponse","description":"Response body for the publish draft endpoint."},"RealCallTestOut":{"properties":{"call_id":{"type":"string","title":"Call Id","description":"PhoneCall record ID."},"conversation_id":{"type":"string","title":"Conversation Id","description":"ElevenLabs conversation ID."},"status":{"type":"string","title":"Status","description":"Initial call status.","default":"calling"}},"type":"object","required":["call_id","conversation_id"],"title":"RealCallTestOut","description":"Response after initiating a real-call test."},"RealCallTestRequest":{"properties":{"phone_number":{"type":"string","maxLength":20,"minLength":2,"pattern":"^\\+[1-9]\\d{1,14}$","title":"Phone Number","description":"Phone number to call in E.164 format (e.g. +15551234567)."}},"type":"object","required":["phone_number"],"title":"RealCallTestRequest","description":"Request to initiate a real phone call test for an inbound-call-trigger workflow."},"RealCallTestStatusOut":{"properties":{"call_id":{"type":"string","title":"Call Id","description":"PhoneCall record ID."},"status":{"type":"string","title":"Status","description":"Current call status (INITIATED, COMPLETED, FAILED, etc.)."},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id","description":"ElevenLabs conversation ID."},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome","description":"Call outcome if completed."},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds","description":"Call duration if completed."},"temporal_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Workflow Id","description":"Temporal workflow ID if workflow was started."},"execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Id","description":"Workflow execution ID if workflow was started."}},"type":"object","required":["call_id","status"],"title":"RealCallTestStatusOut","description":"Status of an in-progress real-call test."},"RecommendedCarrier":{"properties":{"carrier_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Carrier Id"},"carrier_external_reference_id":{"type":"string","title":"Carrier External Reference Id"},"carrier_name":{"type":"string","title":"Carrier Name"},"carrier_dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Dot Number"},"carrier_mc_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Mc Number"},"carrier_defined_lanes":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedLane"},"type":"array","title":"Carrier Defined Lanes"},"carrier_defined_availabilities":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedAvailability"},"type":"array","title":"Carrier Defined Availabilities"},"potential_empty_truck_nearby_related_loads":{"items":{"$ref":"#/components/schemas/libs__recommendations__carrier_recommendation__models__RelatedLoad"},"type":"array","title":"Potential Empty Truck Nearby Related Loads"},"carrier_match_score_explainability":{"$ref":"#/components/schemas/CarrierMatchScoreExplainability"},"carrier_match_score":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Carrier Match Score"},"data_origins":{"items":{"$ref":"#/components/schemas/MentiumTmsDataOrigin"},"type":"array","minItems":1,"title":"Data Origins"},"from_carrier_pool":{"type":"boolean","title":"From Carrier Pool","default":false},"send_email_offers_enabled":{"type":"boolean","title":"Send Email Offers Enabled","default":true}},"type":"object","required":["carrier_external_reference_id","carrier_name","carrier_match_score_explainability","carrier_match_score"],"title":"RecommendedCarrier"},"RecommendedLoad":{"properties":{"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"type":"string","title":"Customer Name"},"load_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Load Id"},"load_external_reference_id":{"type":"string","title":"Load External Reference Id"},"first_pickup_stop_city":{"type":"string","title":"First Pickup Stop City"},"first_pickup_stop_state":{"type":"string","title":"First Pickup Stop State"},"first_pickup_stop_country":{"type":"string","title":"First Pickup Stop Country"},"last_delivery_stop_city":{"type":"string","title":"Last Delivery Stop City"},"last_delivery_stop_state":{"type":"string","title":"Last Delivery Stop State"},"last_delivery_stop_country":{"type":"string","title":"Last Delivery Stop Country"},"shipping_method":{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},"equipment_type":{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},"weight_lbs":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Weight Lbs"},"first_pickup_stop_target_arrival_earliest_at":{"type":"string","format":"date-time","title":"First Pickup Stop Target Arrival Earliest At"},"first_pickup_stop_target_arrival_latest_at":{"type":"string","format":"date-time","title":"First Pickup Stop Target Arrival Latest At"},"first_pickup_stop_scheduling_type":{"$ref":"#/components/schemas/MentiumTmsStopSchedulingType","default":"MENTIUM_UNKNOWN_VALUE"},"first_pickup_stop_is_appointment_confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"First Pickup Stop Is Appointment Confirmed"},"first_pickup_stop_appointment_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Appointment Start At"},"first_pickup_stop_appointment_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Appointment End At"},"first_pickup_stop_actual_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Actual Arrival At"},"first_pickup_stop_actual_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Actual Departure At"},"first_pickup_stop_iana_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Pickup Stop Iana Timezone"},"last_delivery_stop_target_arrival_earliest_at":{"type":"string","format":"date-time","title":"Last Delivery Stop Target Arrival Earliest At"},"last_delivery_stop_target_arrival_latest_at":{"type":"string","format":"date-time","title":"Last Delivery Stop Target Arrival Latest At"},"last_delivery_stop_scheduling_type":{"$ref":"#/components/schemas/MentiumTmsStopSchedulingType","default":"MENTIUM_UNKNOWN_VALUE"},"last_delivery_stop_is_appointment_confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Last Delivery Stop Is Appointment Confirmed"},"last_delivery_stop_appointment_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Appointment Start At"},"last_delivery_stop_appointment_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Appointment End At"},"last_delivery_stop_estimated_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Estimated Earliest At"},"last_delivery_stop_estimated_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Estimated Latest At"},"last_delivery_stop_actual_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Actual Arrival At"},"last_delivery_stop_actual_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Actual Departure At"},"last_delivery_stop_iana_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delivery Stop Iana Timezone"},"tms_status":{"type":"string","title":"Tms Status"},"mentium_status":{"$ref":"#/components/schemas/MentiumTmsLoadStatus"},"total_distance":{"type":"number","title":"Total Distance"},"beginning_buy_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Beginning Buy Rate","description":"Initial target offer to carriers"},"max_buy_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Buy Rate","description":"Maximum negotiation ceiling"},"carrier_defined_lanes":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedLane"},"type":"array","title":"Carrier Defined Lanes"},"carrier_defined_availabilities":{"items":{"$ref":"#/components/schemas/MentiumTmsCarrierDefinedAvailability"},"type":"array","title":"Carrier Defined Availabilities"},"potential_empty_truck_nearby_related_loads":{"items":{"$ref":"#/components/schemas/libs__recommendations__load_recommendation__models__RelatedLoad"},"type":"array","title":"Potential Empty Truck Nearby Related Loads"},"load_match_score_explainability":{"$ref":"#/components/schemas/LoadMatchScoreExplainability"},"load_match_score":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Load Match Score"},"data_origins":{"items":{"$ref":"#/components/schemas/MentiumTmsDataOrigin"},"type":"array","minItems":1,"title":"Data Origins"}},"type":"object","required":["customer_name","load_external_reference_id","first_pickup_stop_city","first_pickup_stop_state","first_pickup_stop_country","last_delivery_stop_city","last_delivery_stop_state","last_delivery_stop_country","shipping_method","equipment_type","first_pickup_stop_target_arrival_earliest_at","first_pickup_stop_target_arrival_latest_at","last_delivery_stop_target_arrival_earliest_at","last_delivery_stop_target_arrival_latest_at","tms_status","mentium_status","total_distance","load_match_score_explainability","load_match_score"],"title":"RecommendedLoad"},"RequestAppAccessResponse":{"properties":{"message":{"type":"string","title":"Message"},"app_access":{"$ref":"#/components/schemas/UserAppAccessSchema"}},"type":"object","required":["message","app_access"],"title":"RequestAppAccessResponse","description":"Response after requesting app access"},"RequestAppAccessSchema":{"properties":{"app_type":{"$ref":"#/components/schemas/AppType"}},"type":"object","required":["app_type"],"title":"RequestAppAccessSchema","description":"Schema for requesting app access"},"RerunRequest":{"properties":{},"type":"object","title":"RerunRequest"},"RerunResponse":{"properties":{"execution_id":{"type":"string","title":"Execution Id"},"new_run_id":{"type":"string","title":"New Run Id"},"run_number":{"type":"integer","title":"Run Number"}},"type":"object","required":["execution_id","new_run_id","run_number"],"title":"RerunResponse"},"ResourceTagSetting":{"properties":{"tag_definition_id":{"type":"string","title":"Tag Definition Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"},"b_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B Type"},"link_href_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Href Template"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["tag_definition_id","name","color","enabled"],"title":"ResourceTagSetting","description":"A shared tag + whether it's enabled for a given inbox / number / agent."},"ResourceTagSettingUpdateItem":{"properties":{"tag_definition_id":{"type":"string","title":"Tag Definition Id"},"enabled":{"type":"boolean","title":"Enabled"}},"additionalProperties":false,"type":"object","required":["tag_definition_id","enabled"],"title":"ResourceTagSettingUpdateItem"},"ResourceTagSettingsResponse":{"properties":{"resource_type":{"type":"string","enum":["inbox","number","agent"],"title":"Resource Type"},"resource_id":{"type":"string","title":"Resource Id"},"items":{"items":{"$ref":"#/components/schemas/ResourceTagSetting"},"type":"array","title":"Items"}},"type":"object","required":["resource_type","resource_id","items"],"title":"ResourceTagSettingsResponse"},"ResourceTagSettingsUpdate":{"properties":{"settings":{"items":{"$ref":"#/components/schemas/ResourceTagSettingUpdateItem"},"type":"array","title":"Settings"}},"additionalProperties":false,"type":"object","title":"ResourceTagSettingsUpdate"},"RewriteRequest":{"properties":{"full_text_with_embedded_selection":{"type":"string","minLength":1,"title":"Full Text With Embedded Selection","description":"The full text with embedded selection"},"rewrite_instructions_for_selection":{"type":"string","minLength":1,"title":"Rewrite Instructions For Selection","description":"The rewrite instructions for the selection"}},"type":"object","required":["full_text_with_embedded_selection","rewrite_instructions_for_selection"],"title":"RewriteRequest","description":"Request model for text rewriting in Tiptap editor with AI Changes tracking."},"RewriteResponse":{"properties":{"rewritten_selection":{"type":"string","minLength":1,"title":"Rewritten Selection","description":"The rewritten selection"}},"type":"object","required":["rewritten_selection"],"title":"RewriteResponse","description":"Response model for text rewriting compatible with Tiptap AI Changes."},"RoundDetail":{"properties":{"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action","description":"The negotiation strategy's raw action for this round."},"raw_carrier_rate_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Raw Carrier Rate Amount","description":"The rate before it was rounded to the increment."},"negotiation_round_before":{"type":"integer","title":"Negotiation Round Before"},"negotiation_round_after":{"type":"integer","title":"Negotiation Round After"},"negotiation_moves":{"type":"integer","title":"Negotiation Moves","description":"How many genuine concessions the carrier has made so far."},"undercut_rounds_used":{"type":"integer","title":"Undercut Rounds Used"},"recorded":{"type":"boolean","title":"Recorded","description":"Whether this round put an agent-side rate on the record."},"recorded_as":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recorded As","description":"The event source it was recorded under."},"note":{"type":"string","title":"Note","description":"Why the negotiation strategy did what it did, in plain language."}},"type":"object","required":["negotiation_round_before","negotiation_round_after","negotiation_moves","undercut_rounds_used","recorded","note"],"title":"RoundDetail","description":"Everything the negotiation strategy reported for one round."},"RoundOutcome":{"type":"string","enum":["opening","quote","hold","accept","stop","undercut","broker_override","no_carrier_ask"],"title":"RoundOutcome"},"RunEventOut":{"properties":{"id":{"type":"string","title":"Id"},"workflow_node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Node Id"},"node_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Label"},"node_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Type"},"node_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Category"},"ai_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Agent Id"},"event_type":{"type":"string","title":"Event Type"},"execution_status":{"type":"string","title":"Execution Status"},"business_status":{"type":"string","title":"Business Status"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output"},"external_link":{"anyOf":[{},{"type":"null"}],"title":"External Link"},"sub_workflow_execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Workflow Execution Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","event_type","execution_status","business_status","created_at","updated_at"],"title":"RunEventOut"},"RunOut":{"properties":{"id":{"type":"string","title":"Id"},"run_number":{"type":"integer","title":"Run Number"},"execution_status":{"type":"string","title":"Execution Status"},"business_status":{"type":"string","title":"Business Status"},"temporal_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Link"},"langfuse_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Langfuse Link"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"triggered_by":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Triggered By"},"events":{"items":{"$ref":"#/components/schemas/RunEventOut"},"type":"array","title":"Events","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","run_number","execution_status","business_status","created_at","updated_at"],"title":"RunOut"},"SalesRepresentativeMetrics":{"properties":{"name":{"type":"string","title":"Name","description":"Name of sales representative"},"total_loads":{"type":"integer","title":"Total Loads","description":"Total loads"},"average_loads_per_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Loads Per Interval","description":"Average loads per interval"},"loads_per_interval_goal":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Loads Per Interval Goal","description":"Loads per interval goal"},"assigned_loads":{"type":"integer","title":"Assigned Loads","description":"Loads assigned to this sales representative"},"assigned_loads_handled_by_self":{"type":"integer","title":"Assigned Loads Handled By Self","description":"Loads where assigned_sales_representative_id == actual_sales_representative_id"},"assigned_loads_handled_by_self_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assigned Loads Handled By Self Percentage","description":"Percentage of assigned loads handled by self (assigned_loads_handled_by_self / assigned_loads)"},"assigned_loads_handled_by_others":{"type":"integer","title":"Assigned Loads Handled By Others","description":"Loads handled by other sales representatives"},"assigned_loads_handled_by_others_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assigned Loads Handled By Others Percentage","description":"Percentage of assigned loads handled by others (assigned_loads_handled_by_others / assigned_loads)"},"non_assigned_loads_handled_by_self":{"type":"integer","title":"Non Assigned Loads Handled By Self","description":"Loads not assigned to this sales representative"},"non_assigned_loads_handled_by_self_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Non Assigned Loads Handled By Self Percentage","description":"Percentage of non-assigned loads handled by self (non_assigned_loads_handled_by_self / total_loads)"},"total_revenue":{"type":"number","title":"Total Revenue","description":"Total revenue"},"total_margin":{"type":"number","title":"Total Margin","description":"Total margin"},"margin_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Percentage","description":"Margin percentage"},"total_bids_placed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Bids Placed","description":"Total bids placed"},"average_bids_placed_per_load":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Bids Placed Per Load","description":"Average bids placed per load"},"average_bids_placed_per_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Bids Placed Per Interval","description":"Average bids placed per interval"},"rolled_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rolled Percentage","description":"Percentage of loads for which both booked_at and assigned_at are not null and (booked_at - assigned_at) is greater than 1 day"},"total_carriers_booked":{"type":"integer","title":"Total Carriers Booked","description":"Total carriers booked"}},"type":"object","required":["name","total_loads","assigned_loads","assigned_loads_handled_by_self","assigned_loads_handled_by_others","non_assigned_loads_handled_by_self","total_revenue","total_margin","total_carriers_booked"],"title":"SalesRepresentativeMetrics","example":{"assigned_loads":202,"assigned_loads_handled_by_others":0,"assigned_loads_handled_by_others_percentage":0.0,"assigned_loads_handled_by_self":202,"assigned_loads_handled_by_self_percentage":100.0,"average_bids_placed_per_interval":17.3,"average_bids_placed_per_load":0.85,"average_loads_per_interval":20.4,"loads_per_interval_goal":16,"margin_percentage":11.14,"name":"Marcus Hix","non_assigned_loads_handled_by_self":2,"non_assigned_loads_handled_by_self_percentage":0.98,"rolled_percentage":0.0,"total_bids_placed":173,"total_carriers_booked":148,"total_loads":204,"total_margin":40071.61,"total_revenue":359691.96}},"SaveAgentToCatalogRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name","description":"Override the agent's name in the catalog entry"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Override the agent's description"},"is_published":{"type":"boolean","title":"Is Published","description":"Whether the entry is immediately visible","default":true}},"type":"object","title":"SaveAgentToCatalogRequest","description":"Request body for saving an existing agent to the catalog."},"SavedViewCreate":{"properties":{"name":{"type":"string","maxLength":50,"minLength":1,"title":"Name"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"},"page_type":{"type":"string","maxLength":50,"title":"Page Type"}},"type":"object","required":["name","filters","page_type"],"title":"SavedViewCreate"},"SavedViewSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"},"page_type":{"type":"string","title":"Page Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","workspace_id","name","filters","page_type","created_at","updated_at"],"title":"SavedViewSchema"},"SavedViewUpdate":{"properties":{"name":{"type":"string","maxLength":50,"minLength":1,"title":"Name"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"}},"type":"object","required":["name","filters"],"title":"SavedViewUpdate"},"SearchAvailableNumbersRequest":{"properties":{"country_code":{"type":"string","title":"Country Code","description":"ISO country code","default":"US"},"area_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Code","description":"Filter by area code (e.g., 312)"},"contains":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contains","description":"Filter by numbers containing digits"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"Max results to return","default":20}},"type":"object","title":"SearchAvailableNumbersRequest","description":"Request to search for available phone numbers"},"SearchAvailableNumbersResponse":{"properties":{"phone_numbers":{"items":{"$ref":"#/components/schemas/AvailablePhoneNumber"},"type":"array","title":"Phone Numbers"}},"type":"object","required":["phone_numbers"],"title":"SearchAvailableNumbersResponse","description":"Response with available phone numbers"},"SearchCarriersByHistoricalLaneRequest":{"properties":{"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"source":{"anyOf":[{"$ref":"#/components/schemas/LocationFilterSchema"},{"type":"null"}]},"destination":{"anyOf":[{"$ref":"#/components/schemas/LocationFilterSchema"},{"type":"null"}]},"shipping_method":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}]},"equipment_type":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}]},"min_total_loads":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Min Total Loads"},"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","default":50},"offset":{"type":"integer","minimum":0.0,"title":"Offset","default":0},"sort_by":{"type":"string","title":"Sort By","default":"total_loads"},"sort_order":{"type":"string","title":"Sort Order","default":"desc"}},"additionalProperties":false,"type":"object","required":["integration_connection_id"],"title":"SearchCarriersByHistoricalLaneRequest"},"SearchCarriersByHistoricalLaneResponse":{"properties":{"carriers":{"items":{"$ref":"#/components/schemas/HistoricalLaneCarrierSchema"},"type":"array","title":"Carriers"},"total_count":{"type":"integer","title":"Total Count"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["total_count","has_more"],"title":"SearchCarriersByHistoricalLaneResponse"},"SearchCarriersWithTrucksRequest":{"properties":{"integration_connection_id":{"type":"string","format":"uuid","title":"Integration Connection Id"},"source":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"type":"null"}]},"destination":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"type":"null"}]},"shipping_method":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}]},"equipment_type":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}]},"first_pickup_stop_target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Target Arrival Earliest At"},"first_pickup_stop_target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Target Arrival Latest At"},"limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Limit","default":50},"offset":{"type":"integer","minimum":0.0,"title":"Offset","default":0}},"type":"object","required":["integration_connection_id"],"title":"SearchCarriersWithTrucksRequest"},"SearchCarriersWithTrucksResponse":{"properties":{"carriers_with_trucks":{"items":{"$ref":"#/components/schemas/CarrierWithTrucks"},"type":"array","title":"Carriers With Trucks"},"total_count":{"type":"integer","title":"Total Count"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["total_count","has_more"],"title":"SearchCarriersWithTrucksResponse"},"SelectOptionResponse":{"properties":{"value":{"type":"string","title":"Value","description":"The actual value stored/submitted"},"label":{"type":"string","title":"Label","description":"Human-readable display label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional tooltip/help text"}},"type":"object","required":["value","label"],"title":"SelectOptionResponse","description":"A single option for SELECT/MULTI_SELECT template variables."},"SendOfferBulkResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"sent_count":{"type":"integer","title":"Sent Count"},"results":{"items":{"$ref":"#/components/schemas/SendOfferResult"},"type":"array","title":"Results"}},"type":"object","required":["success","sent_count","results"],"title":"SendOfferBulkResponse","description":"Response from bulk send offer operation"},"SendOfferRequest":{"properties":{"channel":{"$ref":"#/components/schemas/ConversationType"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject","description":"Email subject (optional if using template)"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Email body HTML (optional if using template)"},"carriers":{"items":{"$ref":"#/components/schemas/CarrierRecipient"},"type":"array","title":"Carriers"},"load_external_reference_id":{"type":"string","title":"Load External Reference Id"},"integration_connection_id":{"type":"string","title":"Integration Connection Id","description":"TMS integration connection UUID (required for auto-creating offer if it doesn't exist)"},"min_load_offer_carrier_rate_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Min Load Offer Carrier Rate Amount","description":"Carrier-facing opening rate to persist if the offer is created or updated during send."},"max_load_offer_carrier_rate_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Load Offer Carrier Rate Amount","description":"Maximum acceptable carrier bid."},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id","description":"Specific template ID to use (optional, uses default if not provided)"},"content_is_rendered":{"type":"boolean","title":"Content Is Rendered","description":"When true, subject/body are final edited content and must not be rendered again.","default":false}},"type":"object","required":["channel","carriers","load_external_reference_id","integration_connection_id"],"title":"SendOfferRequest"},"SendOfferResult":{"properties":{"carrier_id":{"type":"string","title":"Carrier Id"},"carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Name"},"carrier_contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Contact Email"},"carrier_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Contact Name"},"carrier_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Phone"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"carrier_offer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Offer Id"},"success":{"type":"boolean","title":"Success"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["carrier_id","success"],"title":"SendOfferResult"},"SendReplyRequest":{"properties":{"body":{"type":"string","title":"Body"},"signature_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature Id"},"to_recipients":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"To Recipients"},"cc_recipients":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Cc Recipients"},"bcc_recipients":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Bcc Recipients"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"attachment_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Attachment Keys"},"draft_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Message Id"},"integration_connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Connection Id"},"media_urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Media Urls"},"twilio_content_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Content Sid"},"twilio_content_variables":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Twilio Content Variables"},"teams_target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teams Target Type"},"teams_recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teams Recipient"},"teams_team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teams Team Name"},"teams_channel_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teams Channel Name"},"teams_mentions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Teams Mentions"},"include_thread_history":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Thread History","description":"Email replies only: when true, append the conversation transcript to the reply body so newly added recipients get context. Defaults to no history."}},"type":"object","required":["body"],"title":"SendReplyRequest"},"SendSignatureTestRequest":{"properties":{"integration_connection_id":{"type":"string","format":"uuid","title":"Integration Connection Id"},"to_email":{"type":"string","format":"email","title":"To Email"}},"type":"object","required":["integration_connection_id","to_email"],"title":"SendSignatureTestRequest","description":"Send the signature to an inbox so the author can see how it actually lands."},"SendSignatureTestResponse":{"properties":{"sent_to":{"type":"string","title":"Sent To"},"from_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Email"}},"type":"object","required":["sent_to"],"title":"SendSignatureTestResponse"},"SenderHealthListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SenderHealthSchema"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"SenderHealthListResponse","description":"List wrapper for sender-identity deliverability health."},"SenderHealthSchema":{"properties":{"sender_email":{"type":"string","title":"Sender Email"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"domain":{"type":"string","title":"Domain"},"provider_name":{"type":"string","title":"Provider Name"},"identity_status":{"type":"string","title":"Identity Status"},"connected":{"type":"boolean","title":"Connected"},"status":{"type":"string","enum":["ALLOW","WARN","BLOCK"],"title":"Status"},"confidence":{"type":"string","enum":["HAVE_DATA","LOW_VOLUME","NO_TELEMETRY"],"title":"Confidence"},"bounce_rate":{"type":"number","title":"Bounce Rate"},"complaint_rate":{"type":"number","title":"Complaint Rate"},"sample_size":{"type":"integer","title":"Sample Size"},"cold_tokens_remaining":{"type":"number","title":"Cold Tokens Remaining"},"cold_capacity":{"type":"number","title":"Cold Capacity"},"sends_today":{"type":"integer","title":"Sends Today"},"provider_cap":{"type":"integer","title":"Provider Cap"},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["sender_email","domain","provider_name","identity_status","connected","status","confidence","bounce_rate","complaint_rate","sample_size","cold_tokens_remaining","cold_capacity","sends_today","provider_cap"],"title":"SenderHealthSchema","description":"Read-only deliverability health for one sender identity (spec §10).\n\nThe user-facing view of the sender reputation/budget gate. Values are\ncomputed via a non-mutating peek — reads NEVER draw a cold token."},"SequentialCallsStatusResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id","description":"Temporal workflow ID"},"status":{"type":"string","title":"Status","description":"Workflow status"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id","description":"Temporal run ID"},"current_status":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Current Status","description":"Current workflow state from query"}},"type":"object","required":["workflow_id","status"],"title":"SequentialCallsStatusResponse","description":"Status of a sequential calling workflow"},"SetLoadBuyRatesRequestBody":{"properties":{"beginning_buy_rate":{"type":"number","exclusiveMinimum":0.0,"title":"Beginning Buy Rate","description":"Target opening offer to carriers"},"max_buy_rate":{"type":"number","exclusiveMinimum":0.0,"title":"Max Buy Rate","description":"Maximum negotiation ceiling"}},"type":"object","required":["beginning_buy_rate","max_buy_rate"],"title":"SetLoadBuyRatesRequestBody","description":"Both rates, together. Half an envelope is not a decision the negotiation engine can\nact on, and `load_ready_to_be_booked` requires both > 0 before outreach starts."},"SetValueRequestSchema":{"properties":{"value":{"additionalProperties":true,"type":"object","title":"Value"}},"type":"object","required":["value"],"title":"SetValueRequestSchema"},"SettingValueResponse":{"properties":{"value":{"additionalProperties":true,"type":"object","title":"Value"},"is_configured":{"type":"boolean","title":"Is Configured"}},"type":"object","required":["value","is_configured"],"title":"SettingValueResponse"},"SharedCarrierContactSchema":{"properties":{"id":{"type":"string","title":"Id"},"contact_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Type"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers"},"email_addresses":{"items":{"type":"string"},"type":"array","title":"Email Addresses"},"data_origins":{"items":{"$ref":"#/components/schemas/MentiumTmsDataOrigin"},"type":"array","title":"Data Origins"}},"type":"object","required":["id"],"title":"SharedCarrierContactSchema","description":"A contact on the shared carrier (mentium_tms), not in the broker's own TMS."},"SharedCarrierContactsResponse":{"properties":{"contacts":{"items":{"$ref":"#/components/schemas/SharedCarrierContactSchema"},"type":"array","title":"Contacts"}},"type":"object","title":"SharedCarrierContactsResponse","description":"The shared carrier's contacts for one TMS carrier, matched by DOT then MC."},"ShipmentRequirementsCreate":{"properties":{"liftgate_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Liftgate Required","description":"Liftgate required"},"pallet_jack_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pallet Jack Required","description":"Pallet jack required"},"blanket_wrap_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Blanket Wrap Required","description":"Blanket wrap required"},"team_service_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Team Service Required","description":"Team service required"},"driver_assist_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Driver Assist Required","description":"Driver assist required"},"blind_shipment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Blind Shipment","description":"Blind shipment"},"chains_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Chains Required","description":"Chains required"},"chains_notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Chains Notes","description":"Chains notes"},"straps_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Straps Required","description":"Straps required"},"straps_notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Straps Notes","description":"Straps notes"},"tarps_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tarps Required","description":"Tarps required"},"tarp_size":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Tarp Size","description":"Tarp size"},"escorts_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Escorts Required","description":"Escorts required"},"permits_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Permits Required","description":"Permits required"},"overdimensional":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overdimensional","description":"Overdimensional load"},"twic_card_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Twic Card Required","description":"TWIC card required"},"tanker_endorsement_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tanker Endorsement Required","description":"Tanker endorsement required"},"hazmat_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hazmat Required","description":"Hazmat shipment"},"hazmat_class":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Hazmat Class","description":"Hazmat class (REQUIRED if hazmat)"},"hazmat_un_na_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Hazmat Un Na Number","description":"Hazmat UN/NA number (REQUIRED if hazmat)"},"hazmat_product":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Hazmat Product","description":"Hazmat product name (REQUIRED if hazmat)"},"hazmat_contact_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Hazmat Contact Number","description":"Hazmat emergency contact (REQUIRED if hazmat)"},"temperature_controlled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Temperature Controlled","description":"Temperature controlled"},"minimum_temperature":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minimum Temperature","description":"Minimum temperature (F) - REQUIRED if temperature_controlled"},"maximum_temperature":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maximum Temperature","description":"Maximum temperature (F) - REQUIRED if temperature_controlled"},"precool_temperature":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Precool Temperature","description":"Precool temperature (F)"}},"type":"object","title":"ShipmentRequirementsCreate","description":"Schema for shipment requirements.\n\nSafety Validation:\n- If hazmat_required=true: hazmat_class, hazmat_un_na_number, hazmat_product,\n  hazmat_contact_number are ALL required\n- If temperature_controlled=true: minimum_temperature and maximum_temperature are required"},"SimulateNegotiationRequestSchema":{"properties":{"settings":{"additionalProperties":true,"type":"object","title":"Settings","description":"An unsaved tms.pricing.settings payload to try out."},"opening_carrier_rate_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Opening Carrier Rate Amount","description":"What the agent opens at."},"max_carrier_rate_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Max Carrier Rate Amount","description":"The max load offer carrier rate, never shown to an agent."},"opened_by":{"type":"string","enum":["ai_agent","carrier"],"title":"Opened By","description":"Which role names the first number. 'carrier' is an inbound carrier quoting before the agent has offered.","default":"ai_agent"},"opening_carrier_rate_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opening Carrier Rate Source","description":"What the opening was derived from, for take-it-or-leave-it bases."},"rounds":{"items":{"$ref":"#/components/schemas/SimulationRoundInput"},"type":"array","maxItems":40,"title":"Rounds"}},"type":"object","required":["settings","opening_carrier_rate_amount","max_carrier_rate_amount"],"title":"SimulateNegotiationRequestSchema","description":"A hypothetical load envelope, a settings payload, and what the carrier says each round."},"SimulateNegotiationResponseSchema":{"properties":{"opening_carrier_rate_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Opening Carrier Rate Amount"},"max_carrier_rate_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Max Carrier Rate Amount"},"rounds":{"items":{"$ref":"#/components/schemas/SimulatedRound"},"type":"array","title":"Rounds"}},"type":"object","required":["opening_carrier_rate_amount","max_carrier_rate_amount","rounds"],"title":"SimulateNegotiationResponseSchema"},"SimulatedRound":{"properties":{"round":{"type":"integer","title":"Round"},"carrier_ask_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Carrier Ask Amount"},"agent_quote_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Agent Quote Amount"},"agent_role":{"type":"string","enum":["ai_agent","human_agent"],"title":"Agent Role"},"outcome":{"$ref":"#/components/schemas/RoundOutcome"},"moved_by":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Moved By","description":"Change from the agent's previous rate."},"detail":{"$ref":"#/components/schemas/RoundDetail"}},"type":"object","required":["round","agent_role","outcome","detail"],"title":"SimulatedRound"},"SimulationRoundInput":{"properties":{"carrier_ask_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Carrier Ask Amount","description":"What the carrier asks for on this round."},"human_agent_quote_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Human Agent Quote Amount","description":"A number you put on the table yourself instead of the agent's, for this round."}},"type":"object","title":"SimulationRoundInput","description":"One round of a hypothetical negotiation."},"SkippedInvitation":{"properties":{"email":{"type":"string","title":"Email"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["email","reason"],"title":"SkippedInvitation"},"SortOrder":{"type":"string","enum":["asc","desc"],"title":"SortOrder","description":"Sort order options."},"StopCreate":{"properties":{"stop_number":{"type":"integer","minimum":1.0,"title":"Stop Number","description":"Stop sequence number"},"stop_type":{"$ref":"#/components/schemas/MentiumTmsStopType","description":"Type of stop. Canonical values are PICKUP and DELIVERY. BOTH is accepted as a deprecated legacy input and decomposed into adjacent PICKUP + DELIVERY stops at the API boundary."},"location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id","description":"Mentium internal location ID"},"location_external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location External Reference Id","description":"Location external reference ID from your system"},"early_arrival":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Early Arrival","description":"[Deprecated] Earliest arrival (inclusive). Use target_arrival_earliest_at.","deprecated":true},"late_arrival":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Late Arrival","description":"[Deprecated] Inclusive latest arrival. The canonical replacement is `target_arrival_latest_at`, which is the EXCLUSIVE upper bound of the half-open window. `late_arrival` is preserved on emission as `target_arrival_latest_at - 1 minute` so pre-PR semantics hold until the 2027-05-15 sunset. Integrators migrating to the canonical field should expect a value one minute later than `late_arrival`.","deprecated":true},"target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Arrival Earliest At","description":"Canonical earliest target arrival (inclusive lower bound, half-open)"},"target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Arrival Latest At","description":"Exclusive upper bound (half-open)."},"planned_leg_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Leg Start At","description":"Canonical planned-leg window start (inclusive): when the truck is planned to start the trip to this stop"},"planned_leg_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Leg End At","description":"Canonical planned-leg window end (exclusive): when the truck is planned to end the trip at/after this stop"},"planned_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Arrival At","description":"Planned arrival snapshot"},"planned_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Departure At","description":"Planned departure snapshot"},"expected_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Arrival At","description":"Forecast arrival"},"expected_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Departure At","description":"Forecast departure"},"actual_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actual Arrival At","description":"Recorded actual arrival"},"actual_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actual Departure At","description":"Recorded actual departure"},"appointment_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment Datetime","description":"[Deprecated] Scheduled appointment time. Use appointment_start_at.","deprecated":true},"appointment_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment Start At","description":"Canonical appointment window start"},"appointment_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment End At","description":"Canonical appointment window end"},"appointment_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Appointment Number","description":"Appointment confirmation number"},"appointment_notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Appointment Notes","description":"Appointment notes"},"scheduling_type":{"anyOf":[{"type":"string","enum":["APPOINTMENT","CALL_AHEAD","ETA_REQUIRED","FCFS","MENTIUM_UNKNOWN_VALUE"]},{"type":"null"}],"title":"Scheduling Type","description":"Canonical stop scheduling requirement"},"is_appointment_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Required","description":"Whether an appointment is required at this stop"},"is_appointment_requested":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Requested","description":"Whether an appointment has been requested"},"is_appointment_confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Confirmed","description":"Whether the dock appointment has been confirmed by the facility"},"special_instruction":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Special Instruction","description":"Special handling instructions"}},"type":"object","required":["stop_number","stop_type"],"title":"StopCreate","description":"Schema for creating a stop.\n\nRequired fields:\n- stop_number: Sequence order (1, 2, 3, ...)\n- stop_type: PICKUP or DELIVERY\n- location reference: Either location_id OR location_external_reference_id\n- arrival window: either deprecated (early_arrival, late_arrival) or\n  canonical (target_arrival_earliest_at, target_arrival_latest_at)"},"StopDetailsResponse":{"properties":{"target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Arrival Earliest At"},"target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Arrival Latest At"},"appointment_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment Start At"},"appointment_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment End At"},"planned_leg_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Leg Start At"},"planned_leg_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Leg End At"},"planned_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Arrival At"},"planned_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Departure At"},"expected_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Arrival At"},"expected_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Departure At"},"actual_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actual Arrival At"},"actual_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actual Departure At"},"is_appointment_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Required"},"is_appointment_requested":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Requested"},"is_appointment_confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Confirmed"},"appointment_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Number"},"appointment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Notes"},"scheduling_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduling Type"},"weekday_open_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekday Open Hours"},"weekday_close_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekday Close Hours"},"weekend_open_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekend Open Hours"},"weekend_close_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekend Close Hours"},"iana_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iana Timezone"}},"type":"object","title":"StopDetailsResponse","description":"Stop details for public view. Canonical windows are half-open\n[earliest, latest) with EXCLUSIVE upper bound."},"StopResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Stop ID"},"stop_number":{"type":"integer","title":"Stop Number","description":"Stop sequence number","default":0},"stop_type":{"type":"string","title":"Stop Type","description":"Type of stop"},"location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id","description":"Location ID"},"location_external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location External Reference Id","description":"Location external reference ID"},"location_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Name","description":"Location name"},"location_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location City","description":"Location city"},"location_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location State","description":"Location state"},"early_arrival":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Early Arrival","description":"[Deprecated] Earliest arrival (inclusive). Use target_arrival_earliest_at.","deprecated":true},"late_arrival":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Late Arrival","description":"Exclusive upper bound (half-open). Emitted verbatim from the canonical `*_latest_at` column; integrators that previously interpreted this as inclusive must adjust. Deprecated — see Sunset header.","deprecated":true},"actual_arrival":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actual Arrival","description":"[Deprecated] Use actual_arrival_at.","deprecated":true},"actual_departure":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actual Departure","description":"[Deprecated] Use actual_departure_at.","deprecated":true},"appointment_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment Datetime","description":"[Deprecated] Appointment time. Use appointment_start_at.","deprecated":true},"appointment_start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Start Time","description":"[Deprecated] Appointment start (HH:MM). Use appointment_start_at.","deprecated":true},"appointment_end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment End Time","description":"[Deprecated] Appointment end (HH:MM). Use appointment_end_at.","deprecated":true},"appointment_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Number","description":"Appointment number"},"appointment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Notes","description":"Appointment notes"},"scheduling_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduling Type","description":"Canonical stop scheduling requirement"},"is_appointment_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Required","description":"Appointment required"},"is_appointment_requested":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Requested","description":"Appointment requested"},"is_appointment_confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Confirmed","description":"Dock appointment confirmed by the facility"},"is_appointment_made":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Made","description":"[Deprecated] Derived: True when appointment_start_at is set.","deprecated":true},"has_appointment_window":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Appointment Window","description":"[Deprecated] Derived: True when both appointment_start_at and appointment_end_at are set.","deprecated":true},"special_instruction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Instruction","description":"Special instructions"},"target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Arrival Earliest At","description":"Canonical earliest target arrival"},"target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Arrival Latest At","description":"Exclusive upper bound (half-open)."},"appointment_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment Start At","description":"Canonical appointment window start"},"appointment_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment End At","description":"Canonical appointment window end"},"planned_leg_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Leg Start At","description":"Canonical planned-leg window start (inclusive)"},"planned_leg_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Leg End At","description":"Canonical planned-leg window end (exclusive)"},"planned_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Arrival At","description":"Planned arrival"},"planned_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Departure At","description":"Planned departure"},"expected_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Arrival At","description":"Forecast arrival"},"expected_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Departure At","description":"Forecast departure"},"actual_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actual Arrival At","description":"Actual arrival"},"actual_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actual Departure At","description":"Actual departure"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Created timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Updated timestamp"}},"type":"object","required":["id","stop_type"],"title":"StopResponse","description":"Response schema for a stop."},"StopSchema":{"properties":{"stop_number":{"type":"integer","title":"Stop Number","description":"Stop sequence number","default":0},"stop_type":{"type":"string","title":"Stop Type","description":"Stop type (Pickup, Delivery)"},"location_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Name","description":"Location name"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code","description":"Postal code"},"target_arrival_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Arrival Earliest At","description":"Planned earliest arrival at the stop (inclusive lower bound)"},"target_arrival_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Arrival Latest At","description":"Planned latest arrival at the stop (exclusive upper bound)"},"appointment_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment Start At","description":"Booked appointment start (inclusive)"},"appointment_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment End At","description":"Booked appointment end (exclusive)"},"planned_leg_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Leg Start At","description":"Canonical planned-leg window start (inclusive)"},"planned_leg_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Leg End At","description":"Canonical planned-leg window end (exclusive)"},"planned_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned Arrival At","description":"Dispatch's static planned arrival (3G TMS)"},"expected_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Arrival At","description":"ETA forecast for arrival"},"expected_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Departure At","description":"ETA forecast for departure"},"actual_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actual Arrival At","description":"Actual arrival time"},"actual_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actual Departure At","description":"Actual departure time"},"appointment_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Number","description":"Appointment number/reference"},"appointment_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Notes","description":"Appointment notes"},"scheduling_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduling Type","description":"Canonical stop scheduling requirement"},"is_appointment_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Required","description":"Whether an appointment is required at this stop"},"is_appointment_requested":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Requested","description":"Whether an appointment has been requested"},"is_appointment_confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Appointment Confirmed","description":"Whether the dock appointment has been confirmed by the facility"},"weekday_open_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekday Open Hours","description":"Location weekday opening hours (e.g., '08:00')"},"weekday_close_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekday Close Hours","description":"Location weekday closing hours (e.g., '17:00')"},"weekend_open_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekend Open Hours","description":"Location weekend opening hours (e.g., '09:00')"},"weekend_close_hours":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weekend Close Hours","description":"Location weekend closing hours (e.g., '15:00')"},"location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id","description":"Location external reference ID"},"iana_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iana Timezone","description":"IANA timezone for the stop's facility (e.g., America/Chicago)"}},"additionalProperties":true,"type":"object","required":["stop_type"],"title":"StopSchema","description":"Stop schema for load routes."},"SubWorkflowInputFieldOut":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type","default":"string"},"description":{"type":"string","title":"Description","default":""},"required":{"type":"boolean","title":"Required","default":true},"default":{"title":"Default"},"object_fields":{"items":{"$ref":"#/components/schemas/SubWorkflowInputFieldOut"},"type":"array","title":"Object Fields"},"item_fields":{"items":{"$ref":"#/components/schemas/SubWorkflowInputFieldOut"},"type":"array","title":"Item Fields"},"item_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Type"}},"type":"object","required":["name"],"title":"SubWorkflowInputFieldOut","description":"One input parameter of a sub-workflow's trigger contract."},"SubWorkflowListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SubWorkflowOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"SubWorkflowListOut","description":"List of callable sub-workflows."},"SubWorkflowOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active","default":false},"input_fields":{"items":{"$ref":"#/components/schemas/SubWorkflowInputFieldOut"},"type":"array","title":"Input Fields","default":[]}},"type":"object","required":["id","name"],"title":"SubWorkflowOut","description":"A workflow that can be called as a sub-workflow."},"SwitchImpersonationRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"}},"type":"object","required":["user_id"],"title":"SwitchImpersonationRequest"},"SyncCarrierResponse":{"properties":{"temporal_workflow_id":{"type":"string","title":"Temporal Workflow Id"},"success":{"type":"boolean","title":"Success"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"string","title":"Entity Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"message":{"type":"string","title":"Message"}},"type":"object","required":["temporal_workflow_id","success","entity_type","entity_id","message"],"title":"SyncCarrierResponse","description":"Response from syncing a single carrier."},"SyncCustomerResponse":{"properties":{"temporal_workflow_id":{"type":"string","title":"Temporal Workflow Id"},"success":{"type":"boolean","title":"Success"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"string","title":"Entity Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"message":{"type":"string","title":"Message"}},"type":"object","required":["temporal_workflow_id","success","entity_type","entity_id","message"],"title":"SyncCustomerResponse","description":"Response from syncing a single customer."},"SyncLoadResponse":{"properties":{"temporal_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Workflow Id"},"success":{"type":"boolean","title":"Success"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"string","title":"Entity Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","entity_type","entity_id","message"],"title":"SyncLoadResponse","description":"Response from syncing a single load."},"TagAssignmentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TagAssignmentResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"TagAssignmentListResponse"},"TagAssignmentResponse":{"properties":{"id":{"type":"string","title":"Id"},"tag_definition_id":{"type":"string","title":"Tag Definition Id"},"name":{"type":"string","title":"Name"},"a_type":{"type":"string","title":"A Type"},"a_id":{"type":"string","title":"A Id"},"b_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B Type"},"b_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B Id"},"assignor":{"type":"string","title":"Assignor"},"reason":{"anyOf":[{},{"type":"null"}],"title":"Reason"},"mentium_created_at":{"type":"string","format":"date-time","title":"Mentium Created At"},"mentium_updated_at":{"type":"string","format":"date-time","title":"Mentium Updated At"}},"type":"object","required":["id","tag_definition_id","name","a_type","a_id","assignor","mentium_created_at","mentium_updated_at"],"title":"TagAssignmentResponse"},"TagDefinitionCreate":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"b_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B Type","description":"Required when name contains a `{{var}}` template; must be in the registered entity allowlist."},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color","description":"Hex color like '#0969da'. Defaults to a neutral gray if omitted."},"link_href_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Href Template","description":"Optional href template; ``{{value}}`` is substituted with the resolved variable portion of the tag name at render time. Examples: '/dashboard/loads/{{value}}', 'https://my-tms.example.com/loads/{{value}}'."}},"additionalProperties":false,"type":"object","required":["name"],"title":"TagDefinitionCreate"},"TagDefinitionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TagDefinitionResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"TagDefinitionListResponse"},"TagDefinitionResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"b_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B Type"},"color":{"type":"string","title":"Color"},"link_href_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Href Template","description":"Optional href template; ``{{value}}`` is replaced with the resolved variable portion of the tag name at render time."},"is_system":{"type":"boolean","title":"Is System"},"is_active":{"type":"boolean","title":"Is Active"},"mentium_created_at":{"type":"string","format":"date-time","title":"Mentium Created At"},"mentium_updated_at":{"type":"string","format":"date-time","title":"Mentium Updated At"}},"type":"object","required":["id","name","color","is_system","is_active","mentium_created_at","mentium_updated_at"],"title":"TagDefinitionResponse"},"TagDefinitionUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Name","description":"Rename the tag. Existing tag_assignment rows keep their previously-resolved ``name`` value; only newly-written assignments use the new template."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"b_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B Type","description":"Change the bound entity. Must match the template form of ``name`` (linking ↔ non-null, free ↔ null)."},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"link_href_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Href Template","description":"Set to an empty string to clear the existing template. Omit (or send null in JSON) to leave it untouched."}},"additionalProperties":false,"type":"object","title":"TagDefinitionUpdate"},"TagEntityFieldCatalogResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TagEntityTypeResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"TagEntityFieldCatalogResponse"},"TagEntityFieldResponse":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"placeholder":{"type":"string","title":"Placeholder"},"is_internal_id":{"type":"boolean","title":"Is Internal Id","default":false}},"type":"object","required":["key","label","description","placeholder"],"title":"TagEntityFieldResponse"},"TagEntityTypeResponse":{"properties":{"b_type":{"type":"string","title":"B Type"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"fields":{"items":{"$ref":"#/components/schemas/TagEntityFieldResponse"},"type":"array","title":"Fields"}},"type":"object","required":["b_type","label","description","fields"],"title":"TagEntityTypeResponse"},"TeamAssignmentsSchema":{"properties":{"sales_rep_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Rep User Id","description":"Sales rep user ID"},"operation_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation User Id","description":"Operations user ID"},"actual_dispatcher_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Dispatcher Id","description":"Actual dispatcher ID"},"assigned_dispatcher_rep_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Dispatcher Rep User Id","description":"Assigned dispatcher rep user ID"},"account_manager_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Manager User Id","description":"Account manager user ID"},"sales_rep_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Rep Name","description":"Sales rep display name (TMS-captured)"},"operation_user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation User Name","description":"Operations user display name (TMS-captured)"},"actual_dispatcher_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Dispatcher Name","description":"Actual dispatcher display name (TMS-captured)"},"assigned_dispatcher_rep_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Dispatcher Rep Name","description":"Assigned dispatcher rep display name (TMS-captured)"},"account_manager_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Manager Name","description":"Account manager display name (TMS-captured)"},"sales_executive_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Executive User Id","description":"Sales executive user ID"},"primary_internal_contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Internal Contact Id","description":"Primary internal contact ID"},"business_development_rep_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Development Rep User Id","description":"Business development rep user ID"}},"additionalProperties":true,"type":"object","title":"TeamAssignmentsSchema","description":"Team assignments schema for load ownership."},"TeamItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"TeamItem"},"TeamMemberCreate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name","description":"Display name (e.g. 'Jane Sales')"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email","description":"Email address (validated, lowercased)"},"external_reference_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Reference Id","description":"External reference ID for this team member from your system"}},"type":"object","title":"TeamMemberCreate","description":"Schema for a team member assigned to a load (e.g. sales rep, capacity rep).\n\nAll three fields are optional, but at least one must be provided so the\nmember can be identified. Email is validated."},"TeamMemberOptionSchema":{"properties":{"id":{"type":"string","title":"Id","description":"User identifier from TMS (external_reference_id or user_name)"},"name":{"type":"string","title":"Name","description":"User display name"}},"additionalProperties":false,"type":"object","required":["id","name"],"title":"TeamMemberOptionSchema","description":"Team member option for dropdown filters."},"TeamMemberResponse":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address"},"external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Id","description":"External reference ID from your system"},"mentium_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mentium User Id","description":"Mentium user ID when this team member is mapped to a workspace user"}},"type":"object","title":"TeamMemberResponse","description":"Response schema for a team member assigned to a load."},"TemplateCategory":{"type":"string","enum":["status","lane","assignment","financial","priority","deadline","customer","carrier","combo"],"title":"TemplateCategory","description":"Categories for organizing automation templates."},"TemplateCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"subject":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Subject"},"body":{"type":"string","minLength":1,"title":"Body"},"template_type":{"$ref":"#/components/schemas/TemplateType","default":"EMAIL"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_default":{"type":"boolean","title":"Is Default","default":false},"use_signature":{"type":"boolean","title":"Use Signature","default":false},"twilio_language":{"type":"string","maxLength":16,"title":"Twilio Language","default":"en"},"twilio_approval_category":{"type":"string","title":"Twilio Approval Category","default":"UTILITY"}},"type":"object","required":["title","body"],"title":"TemplateCreate"},"TemplateGenerateRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"},"template_type":{"$ref":"#/components/schemas/TemplateType","default":"EMAIL"}},"type":"object","required":["prompt"],"title":"TemplateGenerateRequest","description":"Request schema for AI template generation"},"TemplateGenerateResponse":{"properties":{"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"TemplateGenerateResponse","description":"Response schema for AI template generation"},"TemplateListResponse":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/TemplateSchema"},"type":"array","title":"Templates"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["templates","total","page","page_size"],"title":"TemplateListResponse"},"TemplateRenderCarrierContext":{"properties":{"external_reference_id":{"type":"string","title":"External Reference Id"},"integration_connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Connection Id"},"selected_contact":{"anyOf":[{"$ref":"#/components/schemas/TemplateRenderSelectedContact"},{"type":"null"}]}},"type":"object","required":["external_reference_id"],"title":"TemplateRenderCarrierContext"},"TemplateRenderLoadContext":{"properties":{"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"external_reference_id":{"type":"string","title":"External Reference Id"}},"type":"object","required":["integration_connection_id","external_reference_id"],"title":"TemplateRenderLoadContext"},"TemplateRenderOverrides":{"properties":{"load":{"additionalProperties":true,"type":"object","title":"Load"},"carrier":{"additionalProperties":true,"type":"object","title":"Carrier"},"offer":{"additionalProperties":true,"type":"object","title":"Offer"},"organization":{"additionalProperties":true,"type":"object","title":"Organization"}},"type":"object","title":"TemplateRenderOverrides"},"TemplateRenderRequest":{"properties":{"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"load":{"$ref":"#/components/schemas/TemplateRenderLoadContext"},"carrier":{"anyOf":[{"$ref":"#/components/schemas/TemplateRenderCarrierContext"},{"type":"null"}]},"overrides":{"$ref":"#/components/schemas/TemplateRenderOverrides"},"subject_template_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Template Override","description":"Inline subject template used instead of the saved template subject."},"body_template_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Template Override","description":"Inline body template used instead of the saved template body."}},"type":"object","required":["load"],"title":"TemplateRenderRequest"},"TemplateRenderResponse":{"properties":{"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"unresolved_variables":{"items":{"type":"string"},"type":"array","title":"Unresolved Variables"}},"type":"object","required":["subject","body"],"title":"TemplateRenderResponse"},"TemplateRenderSelectedContact":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","title":"TemplateRenderSelectedContact"},"TemplateSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"title":{"type":"string","title":"Title"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body":{"type":"string","title":"Body"},"template_type":{"$ref":"#/components/schemas/TemplateType"},"is_active":{"type":"boolean","title":"Is Active"},"is_default":{"type":"boolean","title":"Is Default","default":false},"use_signature":{"type":"boolean","title":"Use Signature","default":false},"twilio_content_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Content Sid"},"twilio_approval_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Approval Name"},"twilio_approval_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Approval Status"},"twilio_approval_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Approval Category"},"twilio_approval_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Approval Error"},"twilio_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Language"},"twilio_variable_order":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Twilio Variable Order"},"whatsapp_review_warnings":{"items":{"type":"string"},"type":"array","title":"Whatsapp Review Warnings"},"variables":{"items":{"type":"string"},"type":"array","title":"Variables"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"}},"type":"object","required":["id","organization_id","workspace_id","title","body","template_type","is_active","created_at","updated_at"],"title":"TemplateSchema"},"TemplateType":{"type":"string","enum":["EMAIL","SMS"],"title":"TemplateType"},"TemplateUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"subject":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Subject"},"body":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Body"},"template_type":{"anyOf":[{"$ref":"#/components/schemas/TemplateType"},{"type":"null"}]},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"use_signature":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Signature"},"twilio_language":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Twilio Language"},"twilio_approval_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Approval Category"}},"type":"object","title":"TemplateUpdate"},"TemplateValidationResult":{"properties":{"is_valid":{"type":"boolean","title":"Is Valid"},"variables_found":{"items":{"type":"string"},"type":"array","title":"Variables Found"},"invalid_variables":{"items":{"type":"string"},"type":"array","title":"Invalid Variables"},"error_messages":{"items":{"type":"string"},"type":"array","title":"Error Messages"}},"type":"object","required":["is_valid"],"title":"TemplateValidationResult","description":"Result of template variable validation"},"TemplateVariableInfo":{"properties":{"path":{"type":"string","title":"Path","description":"Dot-notation path (e.g., 'load.weight')"},"field_name":{"type":"string","title":"Field Name","description":"Field name from Pydantic schema"},"field_type":{"type":"string","title":"Field Type","description":"Python type (str, int, float, datetime, etc.)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Field description"},"example":{"anyOf":[{},{"type":"null"}],"title":"Example","description":"Example value"},"is_nested":{"type":"boolean","title":"Is Nested","description":"Whether this is a nested object","default":false},"is_array":{"type":"boolean","title":"Is Array","description":"Whether this is an array field","default":false}},"type":"object","required":["path","field_name","field_type"],"title":"TemplateVariableInfo","description":"Information about an available template variable"},"TemplateVariableResponse":{"properties":{"name":{"type":"string","title":"Name","description":"Variable name"},"type":{"$ref":"#/components/schemas/TemplateVariableType","description":"Type of value this variable accepts"},"label":{"type":"string","title":"Label","description":"Human-readable label for display"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of what this variable represents"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder","description":"Placeholder text for input fields"},"default":{"anyOf":[{},{"type":"null"}],"title":"Default","description":"Default value if not provided"},"required":{"type":"boolean","title":"Required","description":"Whether this variable is required","default":true},"options":{"items":{"$ref":"#/components/schemas/SelectOptionResponse"},"type":"array","title":"Options","description":"Available options for SELECT/MULTI_SELECT (resolved from any format)"},"depends_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Depends On","description":"Name of another template variable this one depends on"},"options_source_map":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OptionsSourceMapEntry"},"type":"object"},{"type":"null"}],"title":"Options Source Map","description":"Maps a depends_on variable value to an OptionsSource + pre-resolved options. When present, the frontend should swap the options list based on the current value of the depends_on variable."},"min_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Value"},"max_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Value"},"step":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Step"},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pattern"},"min_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Length"},"max_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Length"}},"type":"object","required":["name","type","label"],"title":"TemplateVariableResponse","description":"Response model for template variables with resolved options."},"TemplateVariableSchema":{"properties":{"load_fields":{"items":{"$ref":"#/components/schemas/TemplateVariableInfo"},"type":"array","title":"Load Fields","description":"Load-related variables"},"carrier_fields":{"items":{"$ref":"#/components/schemas/TemplateVariableInfo"},"type":"array","title":"Carrier Fields","description":"Carrier-related variables"},"offer_fields":{"items":{"$ref":"#/components/schemas/TemplateVariableInfo"},"type":"array","title":"Offer Fields","description":"Offer-related variables"},"organization_fields":{"items":{"$ref":"#/components/schemas/TemplateVariableInfo"},"type":"array","title":"Organization Fields","description":"Organization-related variables"}},"type":"object","required":["load_fields","carrier_fields","offer_fields"],"title":"TemplateVariableSchema","description":"Complete schema of available template variables"},"TemplateVariableType":{"type":"string","enum":["string","number","boolean","select","multi_select","date","datetime"],"title":"TemplateVariableType","description":"Types of values that template variables can hold."},"TerminateRunResponse":{"properties":{"message":{"type":"string","title":"Message"},"run_id":{"type":"string","title":"Run Id"},"run_number":{"type":"integer","title":"Run Number"},"execution_id":{"type":"string","title":"Execution Id"}},"type":"object","required":["message","run_id","run_number","execution_id"],"title":"TerminateRunResponse"},"TimeFrameMetrics":{"properties":{"timeframe_type":{"$ref":"#/components/schemas/TimeframeType","description":"Calendar time window type"},"timeframe_start_datetime":{"type":"string","format":"date-time","title":"Timeframe Start Datetime","description":"Start datetime (inclusive lower bound)"},"timeframe_end_datetime_exclusive":{"type":"string","format":"date-time","title":"Timeframe End Datetime Exclusive","description":"End datetime (exclusive upper bound)"},"elapsed_working_days":{"type":"integer","title":"Elapsed Working Days","description":"Working days in the timeframe elapsed"},"remaining_working_days":{"type":"integer","title":"Remaining Working Days","description":"Working days in the timeframe remaining"},"organization_metrics":{"$ref":"#/components/schemas/OrganizationMetrics","description":"Organization metrics for the date range"},"sales_representative_metrics":{"anyOf":[{"items":{"$ref":"#/components/schemas/SalesRepresentativeMetrics"},"type":"array"},{"type":"null"}],"title":"Sales Representative Metrics","description":"Sales representative metrics for the date range"},"top_carriers_metrics":{"anyOf":[{"items":{"$ref":"#/components/schemas/TopCarriersMetrics"},"type":"array"},{"type":"null"}],"title":"Top Carriers Metrics","description":"Top carriers metrics for the date range"}},"type":"object","required":["timeframe_type","timeframe_start_datetime","timeframe_end_datetime_exclusive","elapsed_working_days","remaining_working_days","organization_metrics"],"title":"TimeFrameMetrics"},"Timeframe":{"type":"string","enum":["last_7_days","last_30_days","this_week","this_month","last_3_months","last_6_months","last_year"],"title":"Timeframe"},"TimeframeType":{"type":"string","enum":["DAY","WEEK","MONTH","QUARTER","YEAR","CUSTOM"],"title":"TimeframeType","description":"Calendar time window type in which to calculate metrics\nE.g. average of revenue/week during a month i.e. average([week1:revenue/week, week2:revenue/week, week3:revenue/week, week4:revenue/week])"},"TmsDashboardMetricsResponse":{"properties":{"total_active_loads":{"type":"integer","title":"Total Active Loads","description":"Count of loads with ACTIVE mentium_status"},"loads_with_offers":{"type":"integer","title":"Loads With Offers","description":"Count of loads with offers sent that are not yet booked"},"offers_sent":{"type":"integer","title":"Offers Sent","description":"Total number of carrier offers sent"},"unique_carriers_contacted":{"type":"integer","title":"Unique Carriers Contacted","description":"Number of unique carriers who received offers"},"response_rate":{"type":"number","title":"Response Rate","description":"Percentage of offers that received inbound messages (0-100)"},"avg_offers_per_load":{"type":"number","title":"Avg Offers Per Load","description":"Average number of offers sent per load"},"loads_booked":{"type":"integer","title":"Loads Booked","description":"Number of loads booked via Mentium (CarrierOffer status = BOOKED)"},"booking_rate":{"type":"number","title":"Booking Rate","description":"Percentage of offers that resulted in bookings (0-100)"},"accept_rate":{"type":"number","title":"Accept Rate","description":"Percentage of offers that were accepted by carriers (0-100)"},"acceptance_to_booking_rate":{"type":"number","title":"Acceptance To Booking Rate","description":"Percentage of accepted offers that resulted in bookings (0-100)"},"avg_margin_percentage":{"type":"number","title":"Avg Margin Percentage","description":"Average margin percentage on booked loads"},"avg_margin_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Avg Margin Amount","description":"Average margin amount in dollars on booked loads"},"total_revenue_managed":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Revenue Managed","description":"Total customer revenue from Vortex for the selected timeframe (converted to org base currency)"},"total_profit":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Profit","description":"Total margin from Vortex for the selected timeframe (converted to org base currency)"}},"type":"object","required":["total_active_loads","loads_with_offers","offers_sent","unique_carriers_contacted","response_rate","avg_offers_per_load","loads_booked","booking_rate","accept_rate","acceptance_to_booking_rate","avg_margin_percentage","avg_margin_amount","total_revenue_managed","total_profit"],"title":"TmsDashboardMetricsResponse","description":"Response model for TMS dashboard metrics","example":{"accept_rate":15.5,"acceptance_to_booking_rate":64.3,"avg_margin_amount":"250.00","avg_margin_percentage":12.5,"avg_offers_per_load":3.75,"booking_rate":10.0,"loads_booked":45,"loads_with_offers":105,"offers_sent":450,"response_rate":32.5,"total_active_loads":150,"total_profit":"11250.00","total_revenue_managed":"135000.00","unique_carriers_contacted":85}},"TmsUserMentiumMappingCreate":{"properties":{"tms_user_id":{"type":"string","title":"Tms User Id","description":"TMS user identifier (e.g. from team_assignments)"},"user_id":{"type":"string","title":"User Id","description":"Mentium user UUID to link (must be in same organization)"}},"type":"object","required":["tms_user_id","user_id"],"title":"TmsUserMentiumMappingCreate","description":"Body for linking a TMS user to a Mentium user."},"TmsUserMentiumMappingResponse":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"integration_connection_id":{"type":"string","title":"Integration Connection Id"},"tms_user_id":{"type":"string","title":"Tms User Id"},"user_id":{"type":"string","title":"User Id"}},"type":"object","required":["id","organization_id","integration_connection_id","tms_user_id","user_id"],"title":"TmsUserMentiumMappingResponse","description":"Response after creating or updating a mapping."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"Bearer"},"expires_in":{"type":"integer","title":"Expires In"},"is_impersonation":{"type":"boolean","title":"Is Impersonation","default":false}},"type":"object","required":["access_token","expires_in"],"title":"TokenResponse"},"TopCarriersMetrics":{"properties":{"name":{"type":"string","title":"Name","description":"Name of carrier"},"total_loads":{"type":"integer","title":"Total Loads","description":"Total loads"},"average_loads_per_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Loads Per Interval","description":"Average loads per interval"},"total_spend":{"type":"number","title":"Total Spend","description":"Total spend on carrier"},"average_spend_per_load":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Spend Per Load","description":"Average spend per load"},"total_margin":{"type":"number","title":"Total Margin","description":"Total margin"},"average_margin_per_load":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Margin Per Load","description":"Average margin per load"},"margin_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Percentage","description":"Margin percentage"},"top_lanes":{"items":{"$ref":"#/components/schemas/CarrierLane"},"type":"array","title":"Top Lanes","description":"Top 5 lanes for this carrier"}},"type":"object","required":["name","total_loads","total_spend","total_margin"],"title":"TopCarriersMetrics","example":{"average_loads_per_interval":14.7,"average_margin_per_load":119.89,"average_spend_per_load":2240.83,"margin_percentage":5.08,"name":"LARRY WILLIAMS TRUCKING LLC","top_lanes":[{"average_margin_per_load":10.0,"destination_city":"DALLAS","destination_state":"TX","margin_percentage":10.0,"source_city":"CHICAGO","source_state":"IL","total_loads":25,"total_margin":100.0,"total_spend":1000.0}],"total_loads":147,"total_margin":17623.8,"total_spend":329472.67}},"TranscriptFeedbackGeneratorRequest":{"properties":{"type":{"type":"string","const":"transcript_feedback_generator","title":"Type"},"transcript":{"items":{"$ref":"#/components/schemas/PromptFeedbackTranscriptTurn"},"type":"array","maxItems":200,"title":"Transcript","description":"The conversation transcript to analyze."},"agent_name":{"type":"string","maxLength":200,"title":"Agent Name","description":"Name of the agent.","default":""},"agent_description":{"type":"string","maxLength":1000,"title":"Agent Description","description":"Description of the agent.","default":""},"system_prompt":{"type":"string","maxLength":50000,"title":"System Prompt","description":"The agent's system prompt, so the AI can compare actual behavior against intended behavior.","default":""}},"type":"object","required":["type"],"title":"TranscriptFeedbackGeneratorRequest","description":"Request payload for the transcript feedback generator helper."},"TriggerMetadata":{"properties":{"source_template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Template Id","description":"ID of the template this trigger was created from (if any)"},"trigger_name":{"type":"string","title":"Trigger Name","description":"Display name for this trigger (e.g., 'Load Becomes Active')","default":""},"trigger_description":{"type":"string","title":"Trigger Description","description":"Human-readable description of what triggers this automation","default":""},"trigger_icon":{"type":"string","title":"Trigger Icon","description":"Icon/emoji for display","default":"⚡"},"trigger_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Category","description":"Category for organization (status, lane, assignment, etc.)"}},"type":"object","title":"TriggerMetadata","description":"Metadata about the automation trigger for display and tracking.\n\nPopulated when a template is applied. Contains info about the source\ntemplate and human-readable descriptions of what the trigger does."},"TruncateChatRequest":{"properties":{"message_index":{"type":"integer","minimum":0.0,"title":"Message Index","description":"Index of the user message to revert to (it and all later messages are dropped)."}},"type":"object","required":["message_index"],"title":"TruncateChatRequest","description":"Request to truncate the chat history at a given user-message index.\n\nDrops messages at and after ``message_index`` and restores the canvas\nYAML to the snapshot stored on that user message. Used by the chat-aware\nundo button and the per-message pencil-edit affordance."},"TtsOverride":{"properties":{"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id","description":"ElevenLabs voice ID"},"stability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stability","description":"Voice stability (0-1)"},"similarity_boost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity Boost","description":"Voice similarity boost (0-1)"},"speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Speed","description":"Speech speed multiplier"}},"type":"object","title":"TtsOverride","description":"Override for TTS (text-to-speech) configuration"},"UndoResponseOut":{"properties":{"draft_id":{"type":"string","title":"Draft Id"},"yaml_content":{"type":"string","title":"Yaml Content","description":"Restored YAML content"},"undone_yaml":{"type":"string","title":"Undone Yaml","description":"The YAML that was undone (for redo)"},"can_undo":{"type":"boolean","title":"Can Undo","description":"Whether more undos are available"}},"type":"object","required":["draft_id","yaml_content","undone_yaml","can_undo"],"title":"UndoResponseOut","description":"Response from undo operation."},"UpdateAvailabilityRequest":{"properties":{"source":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Source"},"destination":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Destination"},"shipping_method":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}]},"equipment_type":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}]},"recurrence_frequency":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsAvailabilityRecurrenceFrequency"},{"type":"null"}]},"recurrence_interval":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Recurrence Interval"},"recurrence_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recurrence Start At"},"recurrence_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recurrence End At"},"days_of_week":{"anyOf":[{"items":{"$ref":"#/components/schemas/MentiumTmsAvailabilityDayOfWeek"},"type":"array"},{"type":"null"}],"title":"Days Of Week"},"days_of_week_monthly_occurrences":{"anyOf":[{"items":{"$ref":"#/components/schemas/MentiumTmsAvailabilityDayOfWeekMonthlyOccurrence"},"type":"array"},{"type":"null"}],"title":"Days Of Week Monthly Occurrences"},"days_of_month":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Days Of Month"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","title":"UpdateAvailabilityRequest","example":{"notes":"Extended availability through 2027","recurrence_end_at":"2027-12-31T23:59:59Z"}},"UpdateCarrierContactRequest":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"Contact's first name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Contact's last name"},"primary_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Email"},"primary_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Phone"},"contact_type":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsContactType"},{"type":"null"}]},"is_primary_contact":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Primary Contact","description":"Whether this is the primary contact"}},"type":"object","title":"UpdateCarrierContactRequest","description":"Request schema for updating a carrier contact"},"UpdateCarrierCustomPreferencesRequestBody":{"properties":{"custom_max_deadhead_distance_miles_analytics":{"anyOf":[{"type":"integer","maximum":5000.0,"minimum":0.0},{"type":"null"}],"title":"Custom Max Deadhead Distance Miles Analytics","description":"Carrier-specific maximum deadhead distance (miles) for Analytics Carrier and Load Searches"},"custom_max_deadhead_distance_miles_potential_empty_truck_nearby":{"anyOf":[{"type":"integer","maximum":5000.0,"minimum":0.0},{"type":"null"}],"title":"Custom Max Deadhead Distance Miles Potential Empty Truck Nearby","description":"Carrier-specific maximum deadhead distance (miles) for Potential Empty Truck Nearby Carrier and Load Searches"},"send_email_offers_enabled":{"type":"boolean","title":"Send Email Offers Enabled","description":"When false, email load offers are not sent to this carrier"},"historical_rate_can_exceed_range":{"type":"boolean","title":"Historical Rate Can Exceed Range","description":"Honor a historical lane rate even when it falls outside the offer's min/max range"}},"type":"object","required":["custom_max_deadhead_distance_miles_analytics","custom_max_deadhead_distance_miles_potential_empty_truck_nearby","send_email_offers_enabled","historical_rate_can_exceed_range"],"title":"UpdateCarrierCustomPreferencesRequestBody","description":"Request body for updating carrier-specific custom preferences.\n\nThe body carries the full desired state. Every field must be present on every\nrequest; ``null`` clears the value back to the organization-wide default."},"UpdateCarrierNoteRequest":{"properties":{"body":{"type":"string","maxLength":10000,"minLength":1,"title":"Body","description":"Updated note body text"}},"type":"object","required":["body"],"title":"UpdateCarrierNoteRequest"},"UpdateConversationRequest":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/ConversationStatus"},{"type":"null"}]},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Labels"},"is_starred":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Starred"}},"type":"object","title":"UpdateConversationRequest"},"UpdateEmailIntegrationRequest":{"properties":{"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"reply_to_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Reply To Email"},"sender_email_local":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email Local"}},"type":"object","title":"UpdateEmailIntegrationRequest"},"UpdateExecutionRequest":{"properties":{"business_status":{"anyOf":[{"$ref":"#/components/schemas/WorkflowBusinessStatus"},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Id"},"unassign":{"type":"boolean","title":"Unassign","default":false},"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"}},"type":"object","title":"UpdateExecutionRequest","description":"Consolidated PATCH for status transitions and assignments."},"UpdateInboxRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"UpdateInboxRequest"},"UpdateLaneRequest":{"properties":{"source":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Source"},"destination":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/MentiumTmsLocation"},{"$ref":"#/components/schemas/MentiumTmsArea"}]},{"type":"null"}],"title":"Destination"},"shipping_method":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},{"type":"null"}]},"equipment_type":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},{"type":"null"}]},"preference_level":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsLanePreferenceLevel"},{"type":"null"}]},"target_line_haul_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Target Line Haul Rate"},"target_fuel_surcharge_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Target Fuel Surcharge Rate"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"automation_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automation Enabled"},"is_contract":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Contract"},"contract_status":{"anyOf":[{"$ref":"#/components/schemas/MentiumTmsContractStatus"},{"type":"null"}]},"contract_effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Contract Effective At"},"contract_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Contract Expires At"},"contract_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Notes"}},"additionalProperties":false,"type":"object","title":"UpdateLaneRequest","example":{"automation_enabled":true,"contract_status":"ACTIVE","notes":"Updated pricing and preference based on Q4 performance","preference_level":"BACKUP","target_line_haul_rate":2800.0}},"UpdateOfferRequest":{"properties":{"min_load_offer_carrier_rate_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Load Offer Carrier Rate Amount","description":"Carrier offer amount (in org's current base currency)"},"max_load_offer_carrier_rate_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Load Offer Carrier Rate Amount","description":"Maximum carrier bid"}},"type":"object","title":"UpdateOfferRequest","description":"Update request.\n\nNotes:\n- customer_rate_amount is not editable; Vortex is its source of truth.","example":{"min_load_offer_carrier_rate_amount":2500.0}},"UpdatePhoneCallRequest":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/PhoneCallStatus"},{"type":"null"}]},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"outcome":{"anyOf":[{"$ref":"#/components/schemas/PhoneCallOutcome"},{"type":"null"}]},"negotiated_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Negotiated Rate"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"transcript":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Transcript"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id","description":"ElevenLabs conversation ID"},"twilio_call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Call Sid","description":"Twilio call SID"},"ai_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Agent Id","description":"Internal Mentium ai_agent.id"},"elevenlabs_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Elevenlabs Agent Id","description":"External ElevenLabs agent ID"},"external_reference_carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Carrier Name","description":"Carrier display name snapshotted at call creation time"}},"type":"object","title":"UpdatePhoneCallRequest","description":"Request to update a phone call record.\n\nNote: In production, calls are updated by webhooks.\nThis endpoint is primarily for testing purposes."},"UpdateUserAppAccessSchema":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"rejected_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejected Reason"},"email_notification_type":{"anyOf":[{"$ref":"#/components/schemas/NotificationType"},{"type":"null"}]}},"type":"object","title":"UpdateUserAppAccessSchema","description":"Schema for updating user app access"},"UpdateWorkspacePhoneNumberRequest":{"properties":{"twilio_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Sid"},"elevenlabs_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Elevenlabs Phone Number Id"},"sms_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sms Enabled"},"whatsapp_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Whatsapp Enabled"}},"type":"object","title":"UpdateWorkspacePhoneNumberRequest","description":"Request to update a workspace phone number settings"},"UpsertPricingConfigRequest":{"properties":{"per_minute_rate_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Per Minute Rate Usd","default":"0"},"per_call_fee_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Per Call Fee Usd","default":"0.00"},"per_phone_number_monthly_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Per Phone Number Monthly Usd","default":"0.00"},"elevenlabs_cost_per_1k_credits":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Elevenlabs Cost Per 1K Credits","default":"0.18"}},"type":"object","title":"UpsertPricingConfigRequest"},"UpstreamVariableHintRequest":{"properties":{"path":{"type":"string","maxLength":500,"title":"Path","description":"Variable reference path, e.g. '$.node-abc.output.field'."},"label":{"type":"string","maxLength":500,"title":"Label","default":""},"type":{"type":"string","maxLength":200,"title":"Type","description":"Python type annotation.","default":"Any"},"source_node":{"type":"string","maxLength":200,"title":"Source Node","default":""},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"nested_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Nested Schema","description":"Optional JSON-Schema-shaped nested type info — `properties` for objects, `items` for arrays — so the agent can index into complex types like list[dict]."}},"type":"object","required":["path"],"title":"UpstreamVariableHintRequest","description":"A variable produced by an upstream workflow node."},"UserAdminAppAccessSchema":{"properties":{"app_type":{"type":"string","title":"App Type"},"status":{"type":"string","title":"Status"},"rejected_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejected Reason"},"onboarded_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarded At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["app_type","status","created_at"],"title":"UserAdminAppAccessSchema"},"UserAdminSchema":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"workspaces":{"items":{"$ref":"#/components/schemas/UserAdminWorkspaceSchema"},"type":"array","title":"Workspaces","default":[]},"app_access":{"items":{"$ref":"#/components/schemas/UserAdminAppAccessSchema"},"type":"array","title":"App Access","default":[]},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","email","first_name","last_name","created_at","updated_at"],"title":"UserAdminSchema"},"UserAdminSessionSchema":{"properties":{"id":{"type":"string","title":"Id"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"type":"string","title":"Last Used At"},"expires_at":{"type":"string","title":"Expires At"}},"type":"object","required":["id","created_at","last_used_at","expires_at"],"title":"UserAdminSessionSchema"},"UserAdminWorkspaceSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"app_type":{"type":"string","title":"App Type"}},"type":"object","required":["id","name","app_type"],"title":"UserAdminWorkspaceSchema"},"UserAppAccessSchema":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"app_type":{"type":"string","title":"App Type"},"status":{"type":"string","title":"Status"},"rejected_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejected Reason"},"onboarded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Onboarded At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","app_type","status","rejected_reason","onboarded_at","created_at","updated_at"],"title":"UserAppAccessSchema","description":"Schema for user app access (per-app approval and onboarding tracking)"},"UserDetailAdminSchema":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"workspaces":{"items":{"$ref":"#/components/schemas/UserAdminWorkspaceSchema"},"type":"array","title":"Workspaces","default":[]},"app_access":{"items":{"$ref":"#/components/schemas/UserAdminAppAccessSchema"},"type":"array","title":"App Access","default":[]},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"sessions":{"items":{"$ref":"#/components/schemas/UserAdminSessionSchema"},"type":"array","title":"Sessions","default":[]}},"type":"object","required":["id","email","first_name","last_name","created_at","updated_at"],"title":"UserDetailAdminSchema","description":"Extended user schema for detail view with active sessions."},"UserFormKey":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_required":{"type":"boolean","title":"Is Required"},"is_secret":{"type":"boolean","title":"Is Secret"},"default_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Value"}},"type":"object","required":["key","label","is_required","is_secret"],"title":"UserFormKey"},"UserItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["id","name","email"],"title":"UserItem"},"UserRole":{"type":"string","enum":["OWNER","MEMBER","SUPER_ADMIN"],"title":"UserRole"},"UserSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"role":{"anyOf":[{"$ref":"#/components/schemas/UserRole"},{"type":"null"}]},"workspaces":{"items":{"$ref":"#/components/schemas/WorkspaceSchema"},"type":"array","title":"Workspaces","default":[]},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationSchema"},{"type":"null"}]},"products":{"items":{"$ref":"#/components/schemas/ProductSchema"},"type":"array","title":"Products","default":[]},"app_access":{"items":{"$ref":"#/components/schemas/UserAppAccessSchema"},"type":"array","title":"App Access","default":[]}},"type":"object","required":["id","updated_at","created_at","email","first_name","last_name"],"title":"UserSchema"},"UserUpdate":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"}},"type":"object","title":"UserUpdate"},"UserWithAccessTokenSchema":{"properties":{"access_token":{"type":"string","title":"Access Token"},"user":{"$ref":"#/components/schemas/AuthenticatedUserSchema"},"is_impersonation":{"type":"boolean","title":"Is Impersonation","default":false}},"type":"object","required":["access_token","user"],"title":"UserWithAccessTokenSchema"},"ValidateTemplateRequest":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"ValidateTemplateRequest","description":"Request schema for template validation"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VendorCarrierLookupResponse":{"properties":{"status":{"$ref":"#/components/schemas/VendorCarrierLookupStatus"},"contacts_found":{"type":"integer","title":"Contacts Found","default":0},"vendors_called":{"items":{"type":"string"},"type":"array","title":"Vendors Called"},"contacts":{"items":{"$ref":"#/components/schemas/SharedCarrierContactSchema"},"type":"array","title":"Contacts"}},"type":"object","required":["status"],"title":"VendorCarrierLookupResponse","description":"The result of asking the broker's own Highway / MyCarrierPackets / Genlogs connection for a carrier's contacts."},"VendorCarrierLookupStatus":{"type":"string","enum":["FOUND","NOTHING_FOUND","NO_CONNECTION","NO_DOT"],"title":"VendorCarrierLookupStatus","description":"How an on-demand vendor lookup for a carrier's contacts ended (ENG-2461)."},"VerifyMailboxRequest":{"properties":{"email_address":{"type":"string","title":"Email Address"}},"type":"object","required":["email_address"],"title":"VerifyMailboxRequest"},"VerifyMailboxResponse":{"properties":{"email_address":{"type":"string","title":"Email Address"},"accessible":{"type":"boolean","title":"Accessible"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["email_address","accessible"],"title":"VerifyMailboxResponse"},"VortexEventTriggerConfig":{"properties":{"conditions":{"items":{"$ref":"#/components/schemas/EventTriggerCondition"},"type":"array","title":"Conditions","description":"List of conditions (all must match - AND logic)"},"any_conditions":{"items":{"$ref":"#/components/schemas/EventTriggerCondition"},"type":"array","title":"Any Conditions","description":"List of conditions of which at least one must match (OR logic); ignored when empty"},"require_any_condition_transition":{"type":"boolean","title":"Require Any Condition Transition","description":"Require at least one condition to transition from non-matching to matching while every condition currently matches.","default":false},"integration_connection_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Integration Connection Ids","description":"Filter by specific TMS integration connections (optional)"},"metadata":{"anyOf":[{"$ref":"#/components/schemas/TriggerMetadata"},{"type":"null"}],"description":"Display metadata populated when applying a template"}},"type":"object","title":"VortexEventTriggerConfig","description":"Complete configuration for an event-driven automation trigger.\n\nAll conditions are combined with AND logic - trigger fires only if ALL\nconditions match, and, when ``any_conditions`` is set, at least one of those\nmatches too. ``require_any_condition_transition`` additionally requires one of\n``conditions`` to transition from non-matching to matching. Optionally filters\nby specific TMS integrations."},"VortexResourceType":{"type":"string","enum":["load","carrier","customer"],"title":"VortexResourceType","description":"Types of TMS resources that can trigger automations."},"WebhookActivateRequest":{"properties":{"webhook_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Id"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},"type":"object","title":"WebhookActivateRequest","description":"Request schema for activating a webhook."},"WebhookActivateResponse":{"properties":{"webhook_url":{"type":"string","title":"Webhook Url"},"token":{"type":"string","title":"Token"},"webhook_id":{"type":"string","title":"Webhook Id"}},"type":"object","required":["webhook_url","token","webhook_id"],"title":"WebhookActivateResponse","description":"Response schema for webhook activation."},"WebhookEventDefinition":{"properties":{"event_name":{"type":"string","title":"Event Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"provider_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Key"}},"type":"object","required":["event_name","display_name"],"title":"WebhookEventDefinition","description":"Definition of a webhook event for an integration."},"WebhookEventsResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/WebhookEventDefinition"},"type":"array","title":"Events"}},"type":"object","required":["events"],"title":"WebhookEventsResponse","description":"Response schema for webhook events list."},"WebhookInspectResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"webhook_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Id"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"token_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Fingerprint"},"docs_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Url"}},"type":"object","required":["enabled","webhook_id","webhook_url","token_fingerprint"],"title":"WebhookInspectResponse","description":"Response schema for webhook inspection."},"WebhookResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"integration_event_id":{"type":"string","title":"Integration Event Id"}},"type":"object","required":["success","integration_event_id"],"title":"WebhookResponse","description":"Response schema for webhook receiver."},"WebhookRotateTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"webhook_id":{"type":"string","title":"Webhook Id"}},"type":"object","required":["token","webhook_id"],"title":"WebhookRotateTokenResponse","description":"Response schema for token rotation."},"WebhookSupportResponse":{"properties":{"supports_webhooks":{"type":"boolean","title":"Supports Webhooks"}},"type":"object","required":["supports_webhooks"],"title":"WebhookSupportResponse","description":"Response schema for webhook support check."},"WeightUOM":{"type":"string","enum":["lbs","kg"],"title":"WeightUOM","description":"Valid weight units of measure for the public TMS API."},"WhatsAppSenderStatusResponse":{"properties":{"phone_number_id":{"type":"string","title":"Phone Number Id"},"phone_number":{"type":"string","title":"Phone Number"},"whatsapp_enabled":{"type":"boolean","title":"Whatsapp Enabled"},"whatsapp_sender_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Sender Sid"},"whatsapp_sender_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Sender Status"},"whatsapp_sender_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Sender Error"},"whatsapp_registered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Whatsapp Registered At"}},"type":"object","required":["phone_number_id","phone_number","whatsapp_enabled"],"title":"WhatsAppSenderStatusResponse","description":"Current Twilio WhatsApp sender state for a workspace phone number."},"WorkflowBusinessStatus":{"type":"string","enum":["PASSED","FAILED","IN_PROGRESS","TERMINATED","ERROR","SKIPPED","REVISION","RESOLVED","IGNORED"],"title":"WorkflowBusinessStatus"},"WorkflowDeployOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"is_draft":{"type":"boolean","title":"Is Draft"},"deployed_version":{"type":"integer","title":"Deployed Version"},"yaml_content":{"type":"string","title":"Yaml Content"},"node_count":{"type":"integer","title":"Node Count","description":"Number of materialized nodes","default":0},"parent_workflow_warnings":{"items":{"$ref":"#/components/schemas/ParentWorkflowWarning"},"type":"array","title":"Parent Workflow Warnings","description":"Parent workflows that were deactivated because they failed validation after this sub-workflow's contract changed."},"webhook_api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Api Key","description":"Raw API key for the HTTP trigger webhook. Only present on the first deploy when require_auth is enabled. Store it securely; the server does not retain the plaintext."}},"type":"object","required":["id","is_active","is_draft","deployed_version","yaml_content"],"title":"WorkflowDeployOut","description":"Response after deploying a workflow."},"WorkflowDeployRequest":{"properties":{"is_active":{"type":"boolean","title":"Is Active","description":"Whether to activate or deactivate the workflow.","default":true}},"type":"object","title":"WorkflowDeployRequest","description":"Request to deploy (activate/deactivate) a workflow."},"WorkflowDraftCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Draft name","default":"Untitled Workflow"},"yaml_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yaml Content","description":"Initial YAML content. If not provided, uses empty template."},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Existing workflow ID if editing a published workflow."}},"type":"object","title":"WorkflowDraftCreateRequest","description":"Request to create a new workflow draft."},"WorkflowDraftUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"Draft name"},"yaml_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yaml Content","description":"Updated YAML content"}},"type":"object","title":"WorkflowDraftUpdateRequest","description":"Request to update an existing workflow draft."},"WorkflowEditorListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkflowEditorOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"WorkflowEditorListOut","description":"List of workflow drafts."},"WorkflowEditorOut":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"yaml_content":{"type":"string","title":"Yaml Content"},"workflow_parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Parent Id"},"draft_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Id","description":"ID of the child draft linked to this workflow, if one exists. Only populated for non-draft (deployed / inactive) workflows."},"chat_history":{"items":{"$ref":"#/components/schemas/ChatMessageOut"},"type":"array","title":"Chat History"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"can_undo":{"type":"boolean","title":"Can Undo","description":"Whether undo is available","default":false},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the workflow is deployed and active","default":false},"is_draft":{"type":"boolean","title":"Is Draft","description":"Whether this is a draft","default":true},"deployed_version":{"type":"integer","title":"Deployed Version","description":"Number of times this workflow has been deployed","default":0}},"type":"object","required":["id","workspace_id","yaml_content","created_at","updated_at"],"title":"WorkflowEditorOut","description":"Workflow editor output schema."},"WorkflowEditorRequest":{"properties":{"message":{"type":"string","maxLength":10000,"minLength":1,"title":"Message","description":"User message"},"draft_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Id","description":"Existing workflow ID to continue editing. If not provided, creates a new draft."}},"type":"object","required":["message"],"title":"WorkflowEditorRequest","description":"Request to send a message to the workflow chat."},"WorkflowExecutionDetail":{"properties":{"id":{"type":"string","title":"Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name"},"version":{"type":"integer","title":"Version"},"execution_status":{"type":"string","title":"Execution Status"},"business_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"load_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load Id"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"assignee":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Assignee"},"temporal_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Link"},"runs":{"items":{"$ref":"#/components/schemas/RunOut"},"type":"array","title":"Runs","default":[]},"conversations":{"items":{"$ref":"#/components/schemas/LinkedConversationSchema"},"type":"array","title":"Conversations","default":[]}},"type":"object","required":["id","workflow_id","version","execution_status","created_at"],"title":"WorkflowExecutionDetail","description":"Detail response: list item fields + runs with events."},"WorkflowExecutionListItem":{"properties":{"id":{"type":"string","title":"Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name"},"version":{"type":"integer","title":"Version"},"execution_status":{"type":"string","title":"Execution Status"},"business_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"load_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Load Id"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"assignee":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Assignee"},"temporal_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Link"}},"type":"object","required":["id","workflow_id","version","execution_status","created_at"],"title":"WorkflowExecutionListItem"},"WorkflowTestOut":{"properties":{"temporal_workflow_id":{"type":"string","title":"Temporal Workflow Id","description":"Temporal workflow ID for tracking."},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow that was tested."},"execution_id":{"type":"string","title":"Execution Id","description":"The workflow execution ID."},"status":{"type":"string","title":"Status","description":"Test run status.","default":"started"}},"type":"object","required":["temporal_workflow_id","workflow_id","execution_id"],"title":"WorkflowTestOut","description":"Response after starting a V3 test workflow run."},"WorkflowTestRequest":{"properties":{"context":{"additionalProperties":true,"type":"object","title":"Context","description":"Trigger test data  - validated against the trigger node's output_model. For event-trigger: include ``resource_type``, ``resource_id``, ``event_data``, etc. For email-trigger: include ``subject``, ``sender``, ``message_id``, etc. ``triggered_at`` is auto-populated if not provided."},"is_test":{"type":"boolean","title":"Is Test","description":"Whether this is a test run.","default":true}},"type":"object","title":"WorkflowTestRequest","description":"Request to test a V3 workflow.\n\nThe ``context`` dict is validated against the trigger node's\n``output_model`` and injected as the trigger node's ``output_data``.\nDownstream nodes reference it via ``{{$.trigger-id.output.…}}``.\nThe trigger itself is **not** executed."},"WorkspaceAdminCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"organization_id":{"type":"string","title":"Organization Id"},"app_type":{"$ref":"#/components/schemas/AppType"},"is_sandbox":{"type":"boolean","title":"Is Sandbox","default":false}},"type":"object","required":["name","organization_id","app_type"],"title":"WorkspaceAdminCreateRequest"},"WorkspaceAdminSchema":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"app_type":{"type":"string","title":"App Type"},"updated_at":{"type":"string","title":"Updated At"},"created_at":{"type":"string","title":"Created At"},"name":{"type":"string","title":"Name"},"is_sandbox":{"type":"boolean","title":"Is Sandbox"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"members_count":{"type":"integer","title":"Members Count","default":0}},"type":"object","required":["id","organization_id","app_type","updated_at","created_at","name","is_sandbox"],"title":"WorkspaceAdminSchema"},"WorkspaceAdminUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"WorkspaceAdminUpdateRequest"},"WorkspaceDetailAdminSchema":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"app_type":{"type":"string","title":"App Type"},"name":{"type":"string","title":"Name"},"is_sandbox":{"type":"boolean","title":"Is Sandbox"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"members":{"items":{"$ref":"#/components/schemas/WorkspaceMemberSchema"},"type":"array","title":"Members","default":[]},"workflows":{"items":{"$ref":"#/components/schemas/WorkspaceWorkflowSchema"},"type":"array","title":"Workflows","default":[]},"integrations":{"items":{"$ref":"#/components/schemas/WorkspaceIntegrationConnectionSchema"},"type":"array","title":"Integrations","default":[]}},"type":"object","required":["id","organization_id","app_type","name","is_sandbox","created_at","updated_at"],"title":"WorkspaceDetailAdminSchema","description":"Schema for workspace detail with full nested data."},"WorkspaceIntegrationConnectionContributesToCarrierPoolUpdateRequest":{"properties":{"contributes_to_carrier_pool":{"type":"boolean","title":"Contributes To Carrier Pool"}},"type":"object","required":["contributes_to_carrier_pool"],"title":"WorkspaceIntegrationConnectionContributesToCarrierPoolUpdateRequest"},"WorkspaceIntegrationConnectionSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"integration_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Name"},"created_at":{"type":"string","title":"Created At"},"contributes_to_carrier_pool":{"type":"boolean","title":"Contributes To Carrier Pool","default":false}},"type":"object","required":["id","created_at"],"title":"WorkspaceIntegrationConnectionSchema"},"WorkspaceMemberAddRequest":{"properties":{"user_ids":{"items":{"type":"string"},"type":"array","title":"User Ids"}},"type":"object","required":["user_ids"],"title":"WorkspaceMemberAddRequest"},"WorkspaceMemberSchema":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","email","first_name","last_name","created_at"],"title":"WorkspaceMemberSchema"},"WorkspacePhoneNumberResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"organization_id":{"type":"string","title":"Organization Id"},"phone_number":{"type":"string","title":"Phone Number"},"twilio_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Sid"},"elevenlabs_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Elevenlabs Phone Number Id"},"voice_provider":{"type":"string","title":"Voice Provider","default":"elevenlabs"},"is_active":{"type":"boolean","title":"Is Active"},"sms_enabled":{"type":"boolean","title":"Sms Enabled","default":false},"whatsapp_enabled":{"type":"boolean","title":"Whatsapp Enabled","default":false},"whatsapp_sender_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Sender Sid"},"whatsapp_sender_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Sender Status"},"whatsapp_sender_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Sender Error"},"whatsapp_registered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Whatsapp Registered At"},"area_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area Code"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"}},"type":"object","required":["id","workspace_id","organization_id","phone_number","is_active","created_at","updated_at"],"title":"WorkspacePhoneNumberResponse","description":"Workspace phone number data returned from API"},"WorkspaceSchema":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"app_type":{"type":"string","title":"App Type"},"updated_at":{"type":"string","title":"Updated At"},"created_at":{"type":"string","title":"Created At"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","organization_id","app_type","updated_at","created_at","name"],"title":"WorkspaceSchema"},"WorkspaceWorkflowSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_active":{"type":"boolean","title":"Is Active","default":false},"is_draft":{"type":"boolean","title":"Is Draft","default":false},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","created_at"],"title":"WorkspaceWorkflowSchema"},"libs__recommendations__carrier_recommendation__models__OverallExplainability":{"properties":{"carrier_unscoped_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Unscoped Match Score Importance"},"carrier_customer_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Customer Match Score Importance"},"carrier_lane_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Lane Match Score Importance"},"carrier_customer_lane_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Customer Lane Match Score Importance"},"potential_empty_truck_nearby_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Potential Empty Truck Nearby Match Score Importance"},"carrier_defined_lane_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Defined Lane Match Score Importance"},"carrier_defined_availability_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Defined Availability Match Score Importance"},"carrier_lane_propensity_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Lane Propensity Match Score Importance"}},"type":"object","title":"OverallExplainability"},"libs__recommendations__carrier_recommendation__models__RelatedLoad":{"properties":{"load_external_reference_id":{"type":"string","title":"Load External Reference Id"},"first_pickup_stop_city":{"type":"string","title":"First Pickup Stop City"},"first_pickup_stop_state":{"type":"string","title":"First Pickup Stop State"},"first_pickup_stop_country":{"type":"string","title":"First Pickup Stop Country"},"last_delivery_stop_city":{"type":"string","title":"Last Delivery Stop City"},"last_delivery_stop_state":{"type":"string","title":"Last Delivery Stop State"},"last_delivery_stop_country":{"type":"string","title":"Last Delivery Stop Country"},"shipping_method":{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},"equipment_type":{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},"first_pickup_stop_target_arrival_earliest_at":{"type":"string","format":"date-time","title":"First Pickup Stop Target Arrival Earliest At"},"first_pickup_stop_target_arrival_latest_at":{"type":"string","format":"date-time","title":"First Pickup Stop Target Arrival Latest At"},"last_delivery_stop_target_arrival_earliest_at":{"type":"string","format":"date-time","title":"Last Delivery Stop Target Arrival Earliest At"},"last_delivery_stop_target_arrival_latest_at":{"type":"string","format":"date-time","title":"Last Delivery Stop Target Arrival Latest At"},"last_delivery_stop_estimated_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Estimated Earliest At"},"last_delivery_stop_estimated_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Estimated Latest At"},"tms_status":{"type":"string","title":"Tms Status"},"mentium_status":{"$ref":"#/components/schemas/MentiumTmsLoadStatus"}},"type":"object","required":["load_external_reference_id","first_pickup_stop_city","first_pickup_stop_state","first_pickup_stop_country","last_delivery_stop_city","last_delivery_stop_state","last_delivery_stop_country","shipping_method","equipment_type","first_pickup_stop_target_arrival_earliest_at","first_pickup_stop_target_arrival_latest_at","last_delivery_stop_target_arrival_earliest_at","last_delivery_stop_target_arrival_latest_at","tms_status","mentium_status"],"title":"RelatedLoad"},"libs__recommendations__load_recommendation__models__OverallExplainability":{"properties":{"carrier_customer_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Customer Match Score Importance"},"carrier_lane_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Lane Match Score Importance"},"carrier_customer_lane_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Customer Lane Match Score Importance"},"carrier_defined_lane_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Defined Lane Match Score Importance"},"carrier_defined_availability_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Carrier Defined Availability Match Score Importance"},"potential_empty_truck_nearby_match_score_importance":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Potential Empty Truck Nearby Match Score Importance"}},"type":"object","title":"OverallExplainability"},"libs__recommendations__load_recommendation__models__RelatedLoad":{"properties":{"load_external_reference_id":{"type":"string","title":"Load External Reference Id"},"first_pickup_stop_city":{"type":"string","title":"First Pickup Stop City"},"first_pickup_stop_state":{"type":"string","title":"First Pickup Stop State"},"first_pickup_stop_country":{"type":"string","title":"First Pickup Stop Country"},"last_delivery_stop_city":{"type":"string","title":"Last Delivery Stop City"},"last_delivery_stop_state":{"type":"string","title":"Last Delivery Stop State"},"last_delivery_stop_country":{"type":"string","title":"Last Delivery Stop Country"},"shipping_method":{"$ref":"#/components/schemas/MentiumTmsShippingMethod"},"equipment_type":{"$ref":"#/components/schemas/MentiumTmsEquipmentType"},"weight_lbs":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Weight Lbs"},"first_pickup_stop_target_arrival_earliest_at":{"type":"string","format":"date-time","title":"First Pickup Stop Target Arrival Earliest At"},"first_pickup_stop_target_arrival_latest_at":{"type":"string","format":"date-time","title":"First Pickup Stop Target Arrival Latest At"},"first_pickup_stop_scheduling_type":{"$ref":"#/components/schemas/MentiumTmsStopSchedulingType","default":"MENTIUM_UNKNOWN_VALUE"},"first_pickup_stop_is_appointment_confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"First Pickup Stop Is Appointment Confirmed"},"first_pickup_stop_appointment_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Appointment Start At"},"first_pickup_stop_appointment_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Appointment End At"},"first_pickup_stop_actual_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Actual Arrival At"},"first_pickup_stop_actual_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Pickup Stop Actual Departure At"},"first_pickup_stop_iana_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Pickup Stop Iana Timezone"},"last_delivery_stop_target_arrival_earliest_at":{"type":"string","format":"date-time","title":"Last Delivery Stop Target Arrival Earliest At"},"last_delivery_stop_target_arrival_latest_at":{"type":"string","format":"date-time","title":"Last Delivery Stop Target Arrival Latest At"},"last_delivery_stop_scheduling_type":{"$ref":"#/components/schemas/MentiumTmsStopSchedulingType","default":"MENTIUM_UNKNOWN_VALUE"},"last_delivery_stop_is_appointment_confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Last Delivery Stop Is Appointment Confirmed"},"last_delivery_stop_appointment_start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Appointment Start At"},"last_delivery_stop_appointment_end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Appointment End At"},"last_delivery_stop_estimated_earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Estimated Earliest At"},"last_delivery_stop_estimated_latest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Estimated Latest At"},"last_delivery_stop_actual_arrival_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Actual Arrival At"},"last_delivery_stop_actual_departure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery Stop Actual Departure At"},"last_delivery_stop_iana_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delivery Stop Iana Timezone"},"tms_status":{"type":"string","title":"Tms Status"},"mentium_status":{"$ref":"#/components/schemas/MentiumTmsLoadStatus"}},"type":"object","required":["load_external_reference_id","first_pickup_stop_city","first_pickup_stop_state","first_pickup_stop_country","last_delivery_stop_city","last_delivery_stop_state","last_delivery_stop_country","shipping_method","equipment_type","first_pickup_stop_target_arrival_earliest_at","first_pickup_stop_target_arrival_latest_at","last_delivery_stop_target_arrival_earliest_at","last_delivery_stop_target_arrival_latest_at","tms_status","mentium_status"],"title":"RelatedLoad"},"nexus__app__api__routers__v2__public__loads__ShipmentRequirementsResponse":{"properties":{"liftgate_required":{"type":"boolean","title":"Liftgate Required","default":false},"pallet_jack_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pallet Jack Required"},"blanket_wrap_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Blanket Wrap Required"},"team_service_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Team Service Required"},"driver_assist_required":{"type":"boolean","title":"Driver Assist Required","default":false},"blind_shipment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Blind Shipment"},"chains_required":{"type":"boolean","title":"Chains Required","default":false},"straps_required":{"type":"boolean","title":"Straps Required","default":false},"tarps_required":{"type":"boolean","title":"Tarps Required","default":false},"tarp_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tarp Size"},"escorts_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Escorts Required"},"permits_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Permits Required"},"overdimensional":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overdimensional"},"twic_card_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Twic Card Required"},"tanker_endorsed_drivers_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tanker Endorsed Drivers Required"},"hazmat_required":{"type":"boolean","title":"Hazmat Required","default":false},"hazmat_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hazmat Class"},"temperature_control_required":{"type":"boolean","title":"Temperature Control Required","default":false},"minimum_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum Temperature"},"maximum_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maximum Temperature"}},"type":"object","title":"ShipmentRequirementsResponse","description":"Shipment requirements for public view - only includes active requirements"},"nexus__app__schemas__tms_api__loads__ShipmentRequirementsResponse":{"properties":{"liftgate_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Liftgate Required","description":"Liftgate required"},"pallet_jack_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pallet Jack Required","description":"Pallet jack required"},"blanket_wrap_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Blanket Wrap Required","description":"Blanket wrap required"},"team_service_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Team Service Required","description":"Team service required"},"driver_assist_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Driver Assist Required","description":"Driver assist required"},"blind_shipment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Blind Shipment","description":"Blind shipment"},"chains_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Chains Required","description":"Chains required"},"chains_notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Chains Notes","description":"Chains notes"},"straps_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Straps Required","description":"Straps required"},"straps_notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Straps Notes","description":"Straps notes"},"tarps_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tarps Required","description":"Tarps required"},"tarp_size":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Tarp Size","description":"Tarp size"},"escorts_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Escorts Required","description":"Escorts required"},"permits_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Permits Required","description":"Permits required"},"overdimensional":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overdimensional","description":"Overdimensional load"},"twic_card_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Twic Card Required","description":"TWIC card required"},"tanker_endorsement_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tanker Endorsement Required","description":"Tanker endorsement required"},"hazmat_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hazmat Required","description":"Hazmat shipment"},"hazmat_class":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Hazmat Class","description":"Hazmat class (REQUIRED if hazmat)"},"hazmat_un_na_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Hazmat Un Na Number","description":"Hazmat UN/NA number (REQUIRED if hazmat)"},"hazmat_product":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Hazmat Product","description":"Hazmat product name (REQUIRED if hazmat)"},"hazmat_contact_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Hazmat Contact Number","description":"Hazmat emergency contact (REQUIRED if hazmat)"},"temperature_controlled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Temperature Controlled","description":"Temperature controlled"},"minimum_temperature":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minimum Temperature","description":"Minimum temperature (F) - REQUIRED if temperature_controlled"},"maximum_temperature":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maximum Temperature","description":"Maximum temperature (F) - REQUIRED if temperature_controlled"},"precool_temperature":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Precool Temperature","description":"Precool temperature (F)"}},"type":"object","title":"ShipmentRequirementsResponse","description":"Response schema for shipment requirements."},"nexus__app__schemas__tms_carriers__CarrierSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Carrier UUID"},"organization_id":{"type":"string","title":"Organization Id","description":"Organization UUID"},"integration_connection_id":{"type":"string","title":"Integration Connection Id","description":"Integration connection UUID"},"external_reference_id":{"type":"string","title":"External Reference Id","description":"External reference ID from TMS"},"name":{"type":"string","title":"Name","description":"Carrier name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Primary contact email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Primary phone number"},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number","description":"DOT (Department of Transportation) number"},"mc_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mc Number","description":"MC (Motor Carrier) number"},"billing_currency":{"type":"string","title":"Billing Currency","description":"Billing currency (USD, CAD, MXN)","default":"USD"},"custom_max_deadhead_distance_miles_analytics":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Custom Max Deadhead Distance Miles Analytics","description":"Carrier-specific maximum deadhead distance (miles) for Analytics Carrier and Load Searches"},"custom_max_deadhead_distance_miles_potential_empty_truck_nearby":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Custom Max Deadhead Distance Miles Potential Empty Truck Nearby","description":"Carrier-specific maximum deadhead distance (miles) for Potential Empty Truck Nearby Carrier and Load Searches"},"send_email_offers_enabled":{"type":"boolean","title":"Send Email Offers Enabled","description":"When false, email load offers are not sent to this carrier","default":true},"email_offers_opted_out_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Email Offers Opted Out At","description":"When the carrier last opted out of email load offers"},"email_offers_opt_out_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Offers Opt Out Reason","description":"Reason provided when opting out of email load offers"},"email_offers_opted_out_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Offers Opted Out By","description":"Who opted the carrier out: broker or carrier"},"historical_rate_can_exceed_range":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Historical Rate Can Exceed Range","description":"Honor a historical lane rate even when it falls outside the offer's min/max range (default true)"},"addresses":{"items":{"$ref":"#/components/schemas/AddressSchema"},"type":"array","title":"Addresses","description":"Carrier addresses (physical, billing, terminal, etc.)"},"certifications":{"items":{"$ref":"#/components/schemas/CertificationSchema"},"type":"array","title":"Certifications","description":"Carrier certifications (PHMSA, TANKER_ENDORSED_DRIVERS, etc.)"},"contacts":{"items":{"$ref":"#/components/schemas/CarrierContactSchema"},"type":"array","title":"Contacts","description":"Carrier contacts (dispatchers, admins, etc.)"},"equipment":{"items":{"$ref":"#/components/schemas/CarrierEquipmentSchema"},"type":"array","title":"Equipment","description":"Carrier equipment and capabilities"},"financial_summary":{"anyOf":[{"$ref":"#/components/schemas/CarrierFinancialSummarySchema"},{"type":"null"}],"description":"Carrier financial summary - payments and statistics"},"recent_payments":{"items":{"$ref":"#/components/schemas/CarrierPaymentSchema"},"type":"array","title":"Recent Payments","description":"Recent payments (based on delivered loads)"},"payment_terms":{"anyOf":[{"$ref":"#/components/schemas/CarrierPaymentTermsSchema"},{"type":"null"}],"description":"Payment terms from TMS"},"factor_info":{"anyOf":[{"$ref":"#/components/schemas/CarrierFactorInfoSchema"},{"type":"null"}],"description":"Factoring company info from TMS"},"engagement_metrics":{"anyOf":[{"$ref":"#/components/schemas/CarrierEngagementMetricsSchema"},{"type":"null"}],"description":"Carrier engagement and performance metrics"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Record created timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Record updated timestamp"}},"additionalProperties":true,"type":"object","required":["id","organization_id","integration_connection_id","external_reference_id","name","created_at","updated_at"],"title":"CarrierSchema","description":"Carrier schema for OpenAPI documentation\n\nThis is the main TMS Carrier object containing all carrier details.","example":{"addresses":[{"address_type":"PHYSICAL","city":"Phoenix","country":"USA","data_origin":"TMS","postal_code":"85001","state":"AZ","street":"123 Main St"},{"address_type":"BILLING","city":"Phoenix","country":"USA","data_origin":"TMS","postal_code":"85002","state":"AZ","street":"456 Finance Ave"}],"certifications":[{"certification_number":"1bb4726b4337e35d147ec6242b7b25ca","certification_type":"SMART_WAY","data_origin":"HIGHWAY","effective_at":"2024-01-01T00:00:00Z","expiration_at":"2024-12-31T00:00:00Z","is_verified":true,"verification_source":"Highway"},{"certification_type":"TANKER_ENDORSED_DRIVERS","data_origin":"HIGHWAY","filed_at":"2024-04-25T00:00:00Z","is_verified":false}],"contacts":[{"contact_type":"DISPATCHER","full_name":"John Dispatcher","id":"contact-uuid-123","is_primary_contact":true,"primary_email":"john@swift.com","primary_phone":"555-234-5678"}],"dot_number":"987654","equipment":[{"equipment_type":"Capabilities","id":"equipment-uuid-789","is_hazmat_certified":true,"is_reefer":true,"is_team_equipped":true}],"external_reference_id":"CAR12345","id":"123e4567-e89b-12d3-a456-426614174000","integration_connection_id":"int-456","name":"Swift Transportation","organization_id":"org-123","phone_number":"555-123-4567"}},"nexus__app__schemas__tms_loads__CarrierSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Carrier UUID"},"name":{"type":"string","title":"Name","description":"Carrier name"},"dot_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Number","description":"DOT number"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Phone number"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Primary contact email"},"external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Id","description":"External reference ID from TMS"},"billing_currency":{"type":"string","title":"Billing Currency","description":"Billing currency (USD, CAD, MXN)","default":"USD"}},"additionalProperties":true,"type":"object","required":["id","name"],"title":"CarrierSchema","description":"Simplified carrier schema for load responses.\n\nFor full carrier details, see tms_carriers.CarrierSchema."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}