AppDirect Devs.ai API
API for building and managing AI/LLM agents (Devs.ai) — create AIs, chats, data sources, and API keys.
API for building and managing AI/LLM agents (Devs.ai) — create AIs, chats, data sources, and API keys.
{
"openapi": "3.0.0",
"info": {
"title": "Devs.ai API",
"version": "1.0"
},
"components": {
"securitySchemes": {
"ApiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "Enter your bearer token in the format **Bearer {token}**. Legacy header X-Authorization is also supported for backwards compatibility."
}
},
"schemas": {
"ListChatsResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ChatSummary"
}
}
}
},
"ChatSummary": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the chat session."
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "The date and time when the chat session was created."
},
"updatedAt": {
"type": "string",
"format": "date-time",
"description": "The date and time when the chat session was last updated."
},
"name": {
"type": "string",
"description": "Name of the chat session."
},
"userId": {
"type": "string",
"description": "Identifier of the user associated with the chat session."
},
"pinPosition": {
"type": "integer",
"format": "int32",
"description": "The position of the chat in a pinned list or similar.",
"nullable": true
},
"ai": {
"$ref": "#/components/schemas/ChatAI"
}
}
},
"ChatDetails": {
"allOf": [
{
"$ref": "#/components/schemas/ChatSummary"
},
{
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ChatMessage"
}
}
}
}
]
},
"ChatMessage": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the chat message."
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "The date and time when the chat message was created."
},
"updatedAt": {
"type": "string",
"format": "date-time",
"description": "The date and time when the chat message was last updated."
},
"content": {
"type": "string",
"description": "The content of the message"
},
"role": {
"type": "string",
"description": "The role of the message sender, either user or system"
}
}
},
"ChatAI": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the AI."
},
"name": {
"type": "string",
"description": "Name of the AI."
},
"src": {
"type": "string",
"description": "URL for the AI's image."
},
"description": {
"type": "string",
"description": "Description of the AI."
},
"userId": {
"type": "string",
"description": "Identifier of the AI's owner."
},
"userName": {
"type": "string",
"description": "The user name of the AI's owner."
}
}
},
"Error": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
},
"CreateApiKeyRequestDto": {
"type": "object",
"required": [
"name",
"scopes"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the API key."
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"description": "Scopes to grant to the API key."
},
"orgId": {
"type": "string",
"description": "Optional organization ID to create the API key in. Defaults to the caller's organization. Tenant-scoped callers may use this to create keys for users in another organization within the same tenant."
},
"userId": {
"type": "string",
"description": "Optional user ID to create the API key for. Defaults to the caller."
}
}
},
"ApiKeyDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the API key."
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "The date and time when the API key was created."
},
"updatedAt": {
"type": "string",
"format": "date-time",
"description": "The date and time when the API key was last updated."
},
"lastUsedAt": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "The date and time when the API key was last used."
},
"orgId": {
"type": "string",
"description": "Organization ID associated with the API key."
},
"userId": {
"type": "string",
"description": "User ID associated with the API key."
},
"userEmail": {
"type": "string",
"nullable": true,
"description": "Email of the user associated with the API key."
},
"name": {
"type": "string",
"description": "Name of the API key."
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Scopes granted to the API key."
}
}
},
"ApiKeyWithTokenDto": {
"allOf": [
{
"$ref": "#/components/schemas/ApiKeyDto"
},
{
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "The plain API key token. Only returned at creation time."
}
}
}
]
},
"ListDataSourcesResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DataSource"
}
}
}
},
"DataSource": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the data source."
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "The date and time when the data source was created."
},
"updatedAt": {
"type": "string",
"format": "date-time",
"description": "The date and time when the data source was last updated."
},
"lastIndexedAt": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "The date and time when the data source was last indexed, if applicable."
},
"orgId": {
"type": "string",
"description": "Organization ID that owns the data source."
},
"ownerUserId": {
"type": "string",
"description": "User ID that created the data source."
},
"name": {
"type": "string",
"description": "Name of the data source."
},
"type": {
"$ref": "#/components/schemas/DataSourceType"
},
"refreshPeriod": {
"$ref": "#/components/schemas/DataSourceRefreshPeriod"
},
"indexStatus": {
"$ref": "#/components/schemas/DataSourceIndexStatus"
},
"indexPercentage": {
"type": "string",
"description": "Percentage of the indexing process completed, if applicable."
},
"data": {
"type": "object",
"nullable": true,
"description": "Provider-specific data source configuration."
},
"cite": {
"type": "boolean",
"description": "Whether this data source should be cited in responses."
},
"orgVisible": {
"type": "boolean",
"description": "Whether this data source is visible to the organization."
}
}
},
"DataSourceType": {
"type": "string",
"description": "The type of the data source.",
"enum": [
"API",
"FILE_UPLOAD",
"GOOGLE_DRIVE",
"ONEDRIVE",
"WEB_URL",
"CONFLUENCE",
"JIRA",
"GITHUB"
]
},
"DataSourceRefreshPeriod": {
"type": "string",
"description": "How frequently the data source should be refreshed.",
"enum": [
"NEVER",
"DAILY",
"WEEKLY",
"MONTHLY"
]
},
"DataSourceIndexStatus": {
"type": "string",
"description": "The indexing status of the data source.",
"enum": [
"INITIALIZED",
"INDEXING",
"REFRESHING",
"PARTIALLY_COMPLETED",
"COMPLETED",
"FAILED",
"DELETION_REQUESTED",
"DELETED",
"MISSING"
]
},
"AIReference": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"src": {
"type": "string"
}
}
},
"UserSummary": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"email": {
"type": "string"
},
"name": {
"type": "string",
"nullable": true
}
}
},
"AgentDataSource": {
"allOf": [
{
"$ref": "#/components/schemas/DataSource"
},
{
"type": "object",
"properties": {
"hasValidCredentials": {
"type": "boolean",
"description": "Whether the data source has valid credentials."
}
}
}
]
},
"ListAgentDataSourcesResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AgentDataSource"
}
}
}
},
"DataSourceWithAiDetails": {
"allOf": [
{
"$ref": "#/components/schemas/DataSource"
},
{
"type": "object",
"properties": {
"ais": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AIReference"
}
},
"ownerUser": {
"$ref": "#/components/schemas/UserSummary",
"nullable": true
}
}
}
]
},
"PaginatedDataSourceWithAiDetailsResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DataSourceWithAiDetails"
}
},
"total": {
"type": "integer"
}
}
},
"UpdateDataSourceRequest": {
"type": "object",
"properties": {
"refreshPeriod": {
"$ref": "#/components/schemas/DataSourceRefreshPeriod"
},
"cite": {
"type": "boolean",
"nullable": true
},
"ais": {
"type": "array",
"items": {
"type": "string"
}
},
"orgVisible": {
"type": "boolean",
"nullable": true
}
}
},
"UpdateKnowledgeRequest": {
"type": "object",
"properties": {
"cite": {
"type": "boolean"
}
},
"required": [
"cite"
]
},
"DataSourceKnowledgeStats": {
"type": "object",
"properties": {
"doneCount": {
"type": "integer"
},
"failedCount": {
"type": "integer"
},
"pendingCount": {
"type": "integer"
},
"indexingCount": {
"type": "integer"
},
"totalCount": {
"type": "integer"
}
}
},
"KnowledgeIndexStatus": {
"type": "string",
"enum": [
"INITIALIZED",
"RETRIEVING_CONTENT",
"CONTENT_RETRIEVED",
"DOCUMENTS_CREATED",
"INDEXING",
"PARTIALLY_COMPLETED",
"COMPLETED",
"FAILED",
"DELETED"
]
},
"KnowledgeOriginalContent": {
"type": "object",
"properties": {
"contentBlobUrl": {
"type": "string"
},
"filename": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"isContentStoredExternally": {
"type": "boolean"
},
"contentUrl": {
"type": "string"
}
}
},
"Knowledge": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"$ref": "#/components/schemas/DataSourceType"
},
"uniqueId": {
"type": "string",
"nullable": true
},
"parentUniqueId": {
"type": "string",
"nullable": true
},
"indexStatus": {
"$ref": "#/components/schemas/KnowledgeIndexStatus"
},
"documentCount": {
"type": "integer",
"nullable": true
},
"tokenCount": {
"type": "integer",
"nullable": true
},
"originalContent": {
"$ref": "#/components/schemas/KnowledgeOriginalContent",
"nullable": true
},
"documentsBlobUrl": {
"type": "string",
"nullable": true
},
"indexPercentage": {
"type": "string"
},
"metadata": {
"type": "object",
"nullable": true
},
"isBlobStorageDeleted": {
"type": "boolean"
},
"cite": {
"type": "boolean"
}
}
},
"GetKnowledgeResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Knowledge"
}
},
"pagination": {
"type": "object",
"properties": {
"nextCursor": {
"type": "string"
}
}
}
}
},
"WebUrlFileType": {
"type": "string",
"enum": [
"TEXT",
"CSV",
"PDF",
"MARKDOWN",
"DOC",
"XLS"
]
},
"WebUrlDataSourceInput": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"dataRefreshPeriod": {
"$ref": "#/components/schemas/DataSourceRefreshPeriod"
},
"includeFiles": {
"type": "boolean"
},
"includedFileTypes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WebUrlFileType"
}
},
"includeUrlGlobs": {
"type": "array",
"items": {
"type": "string"
}
},
"excludeUrlGlobs": {
"type": "array",
"items": {
"type": "string"
}
},
"maxPages": {
"type": "integer"
},
"maxMemory": {
"type": "integer"
},
"timeout": {
"type": "integer"
}
},
"required": [
"url",
"dataRefreshPeriod",
"includeFiles",
"includedFileTypes"
]
},
"GoogleDriveFile": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"CreateGoogleDriveKnowledgeRequest": {
"type": "object",
"properties": {
"oauthTokenId": {
"type": "string"
},
"files": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GoogleDriveFile"
}
},
"dataRefreshPeriod": {
"$ref": "#/components/schemas/DataSourceRefreshPeriod"
}
},
"required": [
"files"
]
},
"CreateOneDriveKnowledgeRequest": {
"type": "object",
"properties": {
"oauthTokenId": {
"type": "string"
},
"fileId": {
"type": "string"
},
"filename": {
"type": "string"
},
"dataRefreshPeriod": {
"$ref": "#/components/schemas/DataSourceRefreshPeriod"
}
},
"required": [
"oauthTokenId",
"fileId",
"filename"
]
},
"CreateConfluenceKnowledgeRequest": {
"type": "object",
"properties": {
"oauthTokenId": {
"type": "string"
},
"pageId": {
"type": "string"
},
"pageName": {
"type": "string"
},
"contentType": {
"type": "string"
},
"spaceId": {
"type": "string"
},
"dataRefreshPeriod": {
"$ref": "#/components/schemas/DataSourceRefreshPeriod"
},
"indexChildPages": {
"type": "boolean"
},
"indexDriveFiles": {
"type": "boolean"
},
"indexAttachments": {
"type": "boolean"
},
"selectedDriveAccount": {
"type": "string"
},
"archive": {
"type": "boolean"
},
"allSpaces": {
"type": "boolean"
}
},
"required": [
"oauthTokenId",
"pageName"
]
},
"CreateJiraKnowledgeRequest": {
"type": "object",
"properties": {
"oauthTokenId": {
"type": "string"
},
"projectName": {
"type": "string"
},
"projectKey": {
"type": "string"
},
"dataRefreshPeriod": {
"$ref": "#/components/schemas/DataSourceRefreshPeriod"
}
},
"required": [
"oauthTokenId",
"projectName",
"projectKey"
]
},
"CreateGithubKnowledgeRequest": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"repos",
"all"
]
},
"gitHubAppInstallationId": {
"type": "integer"
},
"repos": {
"type": "array",
"items": {
"type": "string"
}
},
"dataRefreshPeriod": {
"$ref": "#/components/schemas/DataSourceRefreshPeriod"
}
},
"required": [
"mode",
"gitHubAppInstallationId"
]
},
"StreamingTextResponse": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The streaming text response from the AI."
}
}
},
"ListAIsRequestScope": {
"type": "string",
"enum": [
"PRIVATE",
"OWNED",
"GROUP",
"SHARED",
"ORGANIZATION",
"PUBLIC",
"ALL"
]
},
"AIDetail": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"name": {
"type": "string"
},
"introduction": {
"type": "string",
"nullable": true
},
"description": {
"type": "string"
},
"instructions": {
"type": "string"
},
"seed": {
"type": "string"
},
"src": {
"type": "string"
},
"orgId": {
"type": "string"
},
"userId": {
"type": "string"
},
"profile": {
"$ref": "#/components/schemas/AIProfile"
},
"userName": {
"type": "string"
},
"orgName": {
"type": "string"
},
"categoryId": {
"type": "string"
},
"visibility": {
"$ref": "#/components/schemas/AIVisibility"
},
"listInOrgCatalog": {
"type": "boolean"
},
"listInPublicCatalog": {
"type": "boolean"
},
"listInTenantCatalog": {
"type": "boolean"
},
"chatLogsVisible": {
"type": "boolean"
},
"generateCitations": {
"type": "boolean"
},
"intermediateStepsVisible": {
"type": "boolean"
},
"modelId": {
"type": "string"
},
"options": {
"$ref": "#/components/schemas/AIModelOptions"
},
"groups": {
"type": "array",
"items": {
"type": "string"
}
},
"editors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AIEditorUser"
}
},
"publicCategories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PublicCategoryType"
}
},
"orgCategoryIds": {
"type": "array",
"items": {
"type": "string"
}
},
"messageCount": {
"type": "integer"
},
"rating": {
"type": "number"
},
"ratingCount": {
"type": "integer"
},
"isShared": {
"type": "boolean"
},
"hasUserChats": {
"type": "boolean"
},
"isApprovedByOrg": {
"type": "boolean"
},
"isPremiumModel": {
"type": "boolean"
},
"isDeleted": {
"type": "boolean"
}
}
},
"AIProfile": {
"type": "object",
"properties": {
"headline": {
"type": "string"
},
"description": {
"type": "string"
},
"features": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AIProfileFeature"
}
},
"showCharacter": {
"type": "boolean"
},
"showTraining": {
"type": "boolean"
},
"showPersonality": {
"type": "boolean"
},
"trainingDescription": {
"type": "string"
},
"conversations": {
"type": "array",
"items": {
"type": "object"
}
},
"socialImage": {
"type": "string"
},
"idleVideo": {
"type": "string"
},
"idleVideoError": {
"type": "string"
},
"showSpeaker": {
"type": "boolean"
},
"showVideo": {
"type": "boolean"
},
"voice": {
"type": "string"
},
"voiceEngine": {
"type": "string"
},
"videoModel": {
"type": "string"
}
}
},
"AIProfileFeature": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"AIEditorUser": {
"type": "object",
"properties": {
"id": {
"type": "string",
"nullable": true
},
"name": {
"type": "string"
},
"email": {
"type": "string"
}
}
},
"PublicCategoryType": {
"type": "string",
"enum": [
"ACCOUNTING_FINANCE",
"AI_MODELS",
"ENGINEERING",
"HUMAN_RESOURCES",
"INFORMATION_TECHNOLOGY",
"LEARNING_DEVELOPMENT",
"MARKETING",
"PRODUCTIVITY",
"SALES",
"ADVISOR",
"FEATURED"
]
},
"GroupAvailability": {
"type": "string",
"enum": [
"EVERYONE",
"RESTRICTED"
],
"description": "Availability status of the group."
},
"GroupSummary": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"orgId": {
"type": "string"
},
"ownerUserId": {
"type": "string"
},
"name": {
"type": "string"
},
"availability": {
"$ref": "#/components/schemas/GroupAvailability"
}
}
},
"GroupDetail": {
"allOf": [
{
"$ref": "#/components/schemas/GroupSummary"
},
{
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GroupUser"
}
}
}
}
]
},
"GroupUser": {
"type": "object",
"properties": {
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"userId": {
"type": "string",
"nullable": true
},
"email": {
"type": "string"
}
}
},
"OrgUsage": {
"type": "object",
"properties": {
"orgId": {
"type": "string",
"description": "Unique identifier for the organization."
},
"dataTokensUsed": {
"type": "number",
"description": "Number of data tokens used by the organization."
},
"dataUsageTokenLimit": {
"type": "number",
"nullable": true,
"description": "The data token usage limit for the organization, if any."
},
"apiTokensUsed": {
"type": "number",
"description": "Number of API tokens used by the organization."
},
"apiUsageTokenLimit": {
"type": "number",
"nullable": true,
"description": "The API token usage limit for the organization, if any."
}
}
},
"OrgUsageByAI": {
"type": "object",
"properties": {
"orgUsage": {
"$ref": "#/components/schemas/OrgUsage"
},
"aiUsages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AIUsage"
}
}
}
},
"AIUsage": {
"type": "object",
"properties": {
"aiId": {
"type": "string",
"description": "Unique identifier for the AI instance."
},
"aiDataTokensUsed": {
"type": "number",
"nullable": true,
"description": "Number of data tokens used by this AI instance."
},
"aiApiTokensUsed": {
"type": "number",
"nullable": true,
"description": "Number of API tokens used by this AI instance."
}
}
},
"AIVisibility": {
"type": "string",
"description": "Visibility level controlling who can access the AI. PRIVATE: Only the owner can access. GROUP: Only specified groups can access. ORGANIZATION: Anyone in the organization can access. ANYONE_WITH_LINK: Anyone with the link can access.",
"enum": [
"PRIVATE",
"GROUP",
"ORGANIZATION",
"ANYONE_WITH_LINK"
]
},
"AIModelOptions": {
"type": "object",
"description": "Configuration options for the AI model's behavior",
"properties": {
"temperature": {
"type": "array",
"description": "Controls randomness in the model's output",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "number"
}
},
"topP": {
"type": "array",
"description": "Controls diversity via nucleus sampling",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "number"
}
},
"topK": {
"type": "array",
"description": "Controls diversity by limiting to top K tokens",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "number"
}
},
"maxTokens": {
"type": "array",
"description": "Maximum number of tokens in the model's response",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "number"
}
},
"maxInputTokens": {
"type": "array",
"description": "Maximum number of input tokens allowed",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "number"
}
},
"frequencyPenalty": {
"type": "array",
"description": "Penalizes frequent token usage",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "number"
}
},
"presencePenalty": {
"type": "array",
"de
# --- truncated at 32 KB (441 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/appdirect/refs/heads/main/openapi/appdirect-devsai-openapi-original.json