# Raia AI

> Create Raia users and conversations, send messages and prompts, and read agent knowledge and usage.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/raia-ai

## Actions

### Create a conversation user

Create a conversation user with an email address or a phone number.

**Inputs**

- First name (`first_name`, text, required): User first name
- Last name (`last_name`, text, required): User last name
- Context (`context`, text): User context
- Source (`source`, text): User source
- Fk user ID (`fk_user_id`, text): User fkUserId
- Custom data (`custom_data`, object): Conversation user custom data
- Skip phone number validation (`skip_phone_number_validation`, true/false): Skip phone number validation
- Skip email validation (`skip_email_validation`, true/false): Skip email validation
- Phone number (`phone_number`, text): User phone number
- Email (`email`, text): User email
- Fk ID (`fk_id`, text): User fkId

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "context": "example",
    "email": "example",
    "firstName": "example",
    "fkId": "example",
    "fkUserId": "example",
    "id": "example",
    "isAnonymized": false,
    "lastName": "example",
    "metadata": {},
    "phoneNumber": "example",
    "source": "example"
  }
}
```

### Create a new conversation

Create a conversation. Returns its ID.

**Inputs**

- Conversation user ID (`conversation_user_id`, text, required): Conversation user ID
- Title (`title`, text): Conversation title
- Context (`context`, text): Conversation context
- Custom data (`custom_data`, object): Conversation custom data
- Conversation state ID (`conversation_state_id`, text): Conversation state ID

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "aiCallId": "example",
    "analysisStatus": "not_started",
    "analyzedAt": "2026-10-24T12:00:00Z",
    "assignedUser": {
      "avatarUrl": "example",
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example",
      "phoneNumber": "example"
    },
    "conversationStateId": "example",
    "conversationUserId": "example",
    "createdAt": "2026-10-24T12:00:00Z",
    "id": "example",
    "isAnonymized": false,
    "metadata": {},
    "mode": "manual",
    "score": 1,
    "summary": "example",
    "title": "example",
    "updatedAt": "2026-10-24T12:00:00Z",
    "user": {
      "context": "example",
      "email": "example",
      "firstName": "example",
      "fkId": "example",
      "fkUserId": "example",
      "id": "example",
      "isAnonymized": false,
      "lastName": "example",
      "metadata": {},
      "phoneNumber": "example",
      "source": "example"
    }
  }
}
```

### Create a prompt request

Submit a prompt and get back an ID for fetching the response later.

**Inputs**

- Prompt (`prompt`, text, required): The question that the user sends to the AI agent
- Token tracking ID (`token_tracking_id`, text): The ID of the token tracking
- Files (`files`, list): Files attached to the message

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "promptId": "example"
  }
}
```

### Create or update conversation message feedback

Add or update feedback on a message in a conversation. Returns the saved feedback.

**Inputs**

- Conversation message ID (`conversation_message_id`, text, required): Unique identifier for the conversation message.
- API user ID (`api_user_id`, text, required): Unique identifier for the user.
- Vote type (`vote_type`, text, required): Feedback vote type. Up if feedback is positive. One of: `up`, `down`.
- Question (`question`, text, required): Your question.
- Answer (`answer`, text): Agent answer.
- Comment (`comment`, text): Comment for your feedback.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "answer": "example",
    "comment": "example",
    "conversationMessageId": "123e4567-e89b-42d3-a456-426614174000",
    "createdAt": "example",
    "id": "123e4567-e89b-42d3-a456-426614174000",
    "question": "example",
    "updatedAt": "example",
    "voteType": "up"
  }
}
```

### Delete conversation user by ID

Delete a conversation user by ID.

**Inputs**

- ID (`id`, text, required): Unique identifier of the conversation user.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {}
}
```

### Find user by contact information

Find a user by email address, phone number or your own reference ID, with their conversation IDs for the current agent.

**Inputs**

- Email (`email`, text): User email
- Phone number (`phone_number`, text): User phone number
- Fk ID (`fk_id`, text): User fkId

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "conversationIds": [],
    "user": {
      "context": "example",
      "email": "example",
      "firstName": "example",
      "fkId": "example",
      "fkUserId": "example",
      "id": "example",
      "isAnonymized": false,
      "lastName": "example",
      "metadata": {},
      "phoneNumber": "example",
      "source": "example"
    }
  }
}
```

### Get a response on prompt request

Get the response to a prompt by its ID.

**Inputs**

- ID (`id`, text, required): Provide the prompt ID to process.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "artifacts": [],
    "error": "example",
    "response": "example",
    "status": "pending",
    "totalTokens": 1,
    "usage": {
      "inputTokens": 1,
      "model": "example",
      "modelProvider": "example",
      "outputTokens": 1,
      "reasoningEffort": "example",
      "reasoningMode": "example",
      "reasoningTokens": 1,
      "totalTokens": 1
    }
  }
}
```

### Get agent by API key

Get the details of the agent your API key belongs to.

**Inputs**: None.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "aiConfig": {
      "fileSearchMaxNumResults": 1,
      "id": "example",
      "instructions": "example",
      "isCodeInterpreterEnabled": false,
      "isFileSearchEnabled": false,
      "isOutputJsonSchemaEnabled": false,
      "model": "example",
      "outputJsonSchema": "example",
      "reasoningEffort": "none",
      "reasoningMode": "standard",
      "temperature": 1,
      "topP": 1
    },
    "avatarUrl": "example",
    "description": "example",
    "id": "123e4567-e89b-42d3-a456-426614174000",
    "name": "example",
    "organizationId": "123e4567-e89b-42d3-a456-426614174000",
    "organizationName": "example",
    "publicName": "example",
    "restrictDocumentsToOwnerOnly": false,
    "role": "example",
    "skills": [],
    "status": "active",
    "tags": [],
    "vectorStoreId": "example"
  }
}
```

### Get agent file by ID

Get one of the agent's files by ID.

**Inputs**

- ID (`id`, text, required): Unique identifier of the agent file.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "createdAt": "2026-10-24T12:00:00Z",
    "fileName": "example",
    "id": "123e4567-e89b-42d3-a456-426614174000",
    "isUploadedToVectorStore": false,
    "uploadedToVectorStoreAt": "2026-10-24T12:00:00Z",
    "url": "example",
    "vectorStoreFileId": "example",
    "vectorStoreUploadStatus": "processing"
  }
}
```

### Get agent limits by Agent API key

Get the limits of the agent your API key belongs to.

**Inputs**: None.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "agentId": "123e4567-e89b-42d3-a456-426614174000",
    "emailsAmountPerMonth": 1,
    "id": "123e4567-e89b-42d3-a456-426614174000",
    "isOrganizationDefault": false,
    "secondsAmountPerMonth": 1,
    "smsAmountPerMonth": 1,
    "tokensAmountPerMonth": 1
  }
}
```

### Get agent usage by Agent API key

Get the usage of the agent your API key belongs to.

**Inputs**: None.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "emailsAmount": 1,
    "secondsAmount": 1,
    "smsAmount": 1,
    "tokensAmount": 1
  }
}
```

### Get agent users by Agent API key

List the agent's users, with their details. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number
- Page size (`page_size`, number): Page size
- Order by (`order_by`, text): Order by. One of: `createdAt`.
- Order direction (`order_direction`, text): Order direction. One of: `ASC`, `DESC`.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "currentPage": 1,
    "data": [],
    "hasNextPage": false,
    "hasPreviousPage": false,
    "pageSize": 1,
    "totalItems": 1,
    "totalPages": 1
  }
}
```

### Get conversation by ID

Get a conversation and its details by ID.

**Inputs**

- ID (`id`, text, required): The ID of the conversation to retrieve.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "aiCallId": "example",
    "analysisStatus": "not_started",
    "analyzedAt": "2026-10-24T12:00:00Z",
    "assignedUser": {
      "avatarUrl": "example",
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example",
      "phoneNumber": "example"
    },
    "conversationStateId": "example",
    "conversationUserId": "example",
    "createdAt": "2026-10-24T12:00:00Z",
    "feedbacks": [],
    "id": "example",
    "isAnonymized": false,
    "metadata": {},
    "mode": "manual",
    "score": 1,
    "summary": "example",
    "title": "example",
    "updatedAt": "2026-10-24T12:00:00Z",
    "user": {
      "context": "example",
      "email": "example",
      "firstName": "example",
      "fkId": "example",
      "fkUserId": "example",
      "id": "example",
      "isAnonymized": false,
      "lastName": "example",
      "metadata": {},
      "phoneNumber": "example",
      "source": "example"
    }
  }
}
```

### Get conversation messages

Get all the messages in a conversation.

**Inputs**

- Should include feedbacks (`should_include_feedbacks`, true/false): If true, returns conversation messages with feedbacks
- Order direction (`order_direction`, text): Message created at order direction. Default: ASC. One of: `ASC`, `DESC`.
- ID (`id`, text, required): The ID of the conversation to retrieve messages for.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "messages": []
  }
}
```

### Get conversation states

List the conversation states available to the agent.

**Inputs**: None.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "color": "example",
    "createdAt": "example",
    "description": "example",
    "id": "123e4567-e89b-42d3-a456-426614174000",
    "isPersistent": false,
    "name": "example",
    "updatedAt": "example"
  }
}
```

### Get conversation user by ID

Get a conversation user by ID.

**Inputs**

- ID (`id`, text, required): Unique identifier of the conversation user.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "context": "example",
    "email": "example",
    "firstName": "example",
    "fkId": "example",
    "fkUserId": "example",
    "id": "example",
    "isAnonymized": false,
    "lastName": "example",
    "metadata": {},
    "phoneNumber": "example",
    "source": "example"
  }
}
```

### Get conversation user limits by ID

Get a conversation user's limits by their ID.

**Inputs**

- ID (`id`, text, required): Unique identifier of the conversation user.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "conversationUserId": "example",
    "emailsAmountPerMonth": 1,
    "id": "example",
    "isOrganizationDefault": false,
    "secondsAmountPerMonth": 1,
    "smsAmountPerMonth": 1,
    "tokensAmountPerMonth": 1
  }
}
```

### Get conversations

List the agent's conversations, with their details. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number
- Page size (`page_size`, number): Page size
- Order by (`order_by`, text): Order by. One of: `createdAt`, `updatedAt`.
- Order direction (`order_direction`, text): Order direction. One of: `ASC`, `DESC`.
- Search keyword (`search_keyword`, text): Search keyword in conversation title, summary, agent name, user first and last name, email and phone number
- API user ID (`api_user_id`, text): Conversation user ID
- Start date (`start_date`, date and time): Start date of conversation updatedAt.
- End date (`end_date`, date and time): End date of conversation updatedAt.
- With feedbacks only (`with_feedbacks_only`, true/false): If true, returns conversations with at least one feedback

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "currentPage": 1,
    "data": [],
    "hasNextPage": false,
    "hasPreviousPage": false,
    "pageSize": 1,
    "totalItems": 1,
    "totalPages": 1
  }
}
```

### Get paginated agent files by API key

List the agent's files, sorted. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Zero-based page number. At least 0.0.
- Page size (`page_size`, number): Number of files per page. From 1.0 to 100.0.
- Order by (`order_by`, text): File field used for sorting. One of: `createdAt`, `fileName`.
- Order direction (`order_direction`, text): Sort direction. One of: `ASC`, `DESC`.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "currentPage": 1,
    "data": [],
    "hasNextPage": false,
    "hasPreviousPage": false,
    "pageSize": 1,
    "totalItems": 1,
    "totalPages": 1
  }
}
```

### Get response on

Get the agent's response to a message in a conversation.

**Inputs**

- ID (`id`, text, required): The ID of the conversation to retrieve message for.
- Question message ID (`question_message_id`, text, required): The ID of the question message to retrieve response for. (The message that the user sent to the AI agent)

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "error": "example",
    "message": {
      "conversationId": "example",
      "conversationMessageFeedbacks": [],
      "conversationMessageId": "example",
      "createdAt": "2026-10-24T12:00:00Z",
      "expandedMessage": "example",
      "files": [],
      "fullAIResponse": {
        "fileCitations": [],
        "outputText": "example",
        "reasoning": [],
        "urlCitations": []
      },
      "id": "example",
      "isAnonymized": false,
      "message": "example",
      "modelUsage": {
        "inputTokens": 1,
        "model": "example",
        "modelProvider": "example",
        "outputTokens": 1,
        "reasoningEffort": "example",
        "reasoningMode": "example",
        "reasoningTokens": 1,
        "totalTokens": 1
      },
      "rawMessage": "example",
      "senderRole": "conversation_user",
      "source": "email",
      "subagentId": "example",
      "usedFunctions": []
    },
    "status": "pending"
  }
}
```

### Process a prompt request

Send a prompt and wait for the agent's AI-generated response.

**Inputs**

- Prompt (`prompt`, text, required): The question that the user sends to the AI agent
- Token tracking ID (`token_tracking_id`, text): The ID of the token tracking
- Files (`files`, list): Files attached to the message

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "artifacts": [],
    "error": "example",
    "response": "example",
    "status": "pending",
    "totalTokens": 1,
    "usage": {
      "inputTokens": 1,
      "model": "example",
      "modelProvider": "example",
      "outputTokens": 1,
      "reasoningEffort": "example",
      "reasoningMode": "example",
      "reasoningTokens": 1,
      "totalTokens": 1
    }
  }
}
```

### Send a message to an agent

Send a message to the agent in a conversation.

**Inputs**

- ID (`id`, text, required): The ID of the conversation to send a message to.
- Message (`message`, text, required): The message that the user sends to the AI agent
- Context (`context`, text): Context of the message
- Files (`files`, list): Files attached to the message

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "conversationId": "example",
    "conversationMessageFeedbacks": [],
    "conversationMessageId": "example",
    "createdAt": "2026-10-24T12:00:00Z",
    "expandedMessage": "example",
    "files": [],
    "fullAIResponse": {
      "fileCitations": [],
      "outputText": "example",
      "reasoning": [],
      "urlCitations": []
    },
    "id": "example",
    "isAnonymized": false,
    "message": "example",
    "modelUsage": {
      "inputTokens": 1,
      "model": "example",
      "modelProvider": "example",
      "outputTokens": 1,
      "reasoningEffort": "example",
      "reasoningMode": "example",
      "reasoningTokens": 1,
      "totalTokens": 1
    },
    "rawMessage": "example",
    "senderRole": "conversation_user",
    "source": "email",
    "subagentId": "example",
    "usedFunctions": []
  }
}
```

### Send a message to an agent (async)

Send a message to the agent in a conversation.

**Inputs**

- ID (`id`, text, required): The ID of the conversation to send a message to.
- Message (`message`, text, required): The message that the user sends to the AI agent
- Context (`context`, text): Context of the message
- Files (`files`, list): Files attached to the message

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "conversationId": "example",
    "conversationMessageFeedbacks": [],
    "conversationMessageId": "example",
    "createdAt": "2026-10-24T12:00:00Z",
    "expandedMessage": "example",
    "files": [],
    "fullAIResponse": {
      "fileCitations": [],
      "outputText": "example",
      "reasoning": [],
      "urlCitations": []
    },
    "id": "example",
    "isAnonymized": false,
    "message": "example",
    "modelUsage": {
      "inputTokens": 1,
      "model": "example",
      "modelProvider": "example",
      "outputTokens": 1,
      "reasoningEffort": "example",
      "reasoningMode": "example",
      "reasoningTokens": 1,
      "totalTokens": 1
    },
    "rawMessage": "example",
    "senderRole": "conversation_user",
    "source": "email",
    "subagentId": "example",
    "usedFunctions": []
  }
}
```

### Update conversation

Update a conversation by ID. Returns the updated conversation.

**Inputs**

- ID (`id`, text, required): The ID of the conversation to update.
- Title (`title`, text): Conversation title
- Context (`context`, text): Conversation context
- Status (`status`, text): Conversation status. One of: `active`, `inactive`, `archived`.
- Conversation state ID (`conversation_state_id`, text): Conversation state ID

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "aiCallId": "example",
    "analysisStatus": "not_started",
    "analyzedAt": "2026-10-24T12:00:00Z",
    "assignedUser": {
      "avatarUrl": "example",
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example",
      "phoneNumber": "example"
    },
    "conversationStateId": "example",
    "conversationUserId": "example",
    "createdAt": "2026-10-24T12:00:00Z",
    "id": "example",
    "isAnonymized": false,
    "metadata": {},
    "mode": "manual",
    "score": 1,
    "summary": "example",
    "title": "example",
    "updatedAt": "2026-10-24T12:00:00Z",
    "user": {
      "context": "example",
      "email": "example",
      "firstName": "example",
      "fkId": "example",
      "fkUserId": "example",
      "id": "example",
      "isAnonymized": false,
      "lastName": "example",
      "metadata": {},
      "phoneNumber": "example",
      "source": "example"
    }
  }
}
```

### Update conversation mode

Change a conversation's mode. Returns the updated conversation.

**Inputs**

- ID (`id`, text, required): The ID of the conversation to update.
- Mode (`mode`, text): Conversation mode. One of: `manual`, `ai`.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "aiCallId": "example",
    "analysisStatus": "not_started",
    "analyzedAt": "2026-10-24T12:00:00Z",
    "assignedUser": {
      "avatarUrl": "example",
      "email": "example",
      "firstName": "example",
      "id": "example",
      "lastName": "example",
      "phoneNumber": "example"
    },
    "conversationStateId": "example",
    "conversationUserId": "example",
    "createdAt": "2026-10-24T12:00:00Z",
    "id": "example",
    "isAnonymized": false,
    "metadata": {},
    "mode": "manual",
    "score": 1,
    "summary": "example",
    "title": "example",
    "updatedAt": "2026-10-24T12:00:00Z",
    "user": {
      "context": "example",
      "email": "example",
      "firstName": "example",
      "fkId": "example",
      "fkUserId": "example",
      "id": "example",
      "isAnonymized": false,
      "lastName": "example",
      "metadata": {},
      "phoneNumber": "example",
      "source": "example"
    }
  }
}
```
