> For the complete documentation index, see [llms.txt](https://raia2.gitbook.io/raia/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://raia2.gitbook.io/raia/api-reference/users.md).

# Users

## Create a conversation user

> Creates a new conversation user using either an email or phoneNumber.

```json
{"openapi":"3.0.0","info":{"title":"AI Agent API","version":"1.0.0"},"servers":[{"url":"https://api.raia2.com","description":"Production server"}],"security":[{"Agent-Secret-Key":[]}],"components":{"securitySchemes":{"Agent-Secret-Key":{"type":"apiKey","in":"header","name":"Agent-Secret-Key","description":"Custom authentication header"}},"schemas":{"CreateUserWithPhoneNumberBodyDTO":{"type":"object","properties":{"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"context":{"type":"string","description":"User context"},"source":{"type":"string","description":"User source"},"fkUserId":{"type":"string","description":"User fkUserId"},"customData":{"type":"object","description":"Conversation user custom data"},"skipPhoneNumberValidation":{"type":"boolean","description":"Skip phone number validation"},"skipEmailValidation":{"type":"boolean","description":"Skip email validation"},"phoneNumber":{"type":"string","description":"User phone number"},"email":{"type":"string","description":"User email"},"fkId":{"type":"string","description":"User fkId"}},"required":["firstName","lastName","phoneNumber"]},"CreateUserWithEmailBodyDTO":{"type":"object","properties":{"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"context":{"type":"string","description":"User context"},"source":{"type":"string","description":"User source"},"fkUserId":{"type":"string","description":"User fkUserId"},"customData":{"type":"object","description":"Conversation user custom data"},"skipPhoneNumberValidation":{"type":"boolean","description":"Skip phone number validation"},"skipEmailValidation":{"type":"boolean","description":"Skip email validation"},"email":{"type":"string","description":"User email"},"phoneNumber":{"type":"string","description":"User phone number"},"fkId":{"type":"string","description":"User fkId"}},"required":["firstName","lastName","email"]},"CreateUserWithFkIdBodyDTO":{"type":"object","properties":{"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"context":{"type":"string","description":"User context"},"source":{"type":"string","description":"User source"},"fkUserId":{"type":"string","description":"User fkUserId"},"customData":{"type":"object","description":"Conversation user custom data"},"skipPhoneNumberValidation":{"type":"boolean","description":"Skip phone number validation"},"skipEmailValidation":{"type":"boolean","description":"Skip email validation"},"email":{"type":"string","description":"User email"},"phoneNumber":{"type":"string","description":"User phone number"},"fkId":{"type":"string","description":"User fkId"}},"required":["firstName","lastName","fkId"]},"ExternalApiUserResponseDTO":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"context":{"type":"string","description":"User context"},"source":{"type":"string","description":"User source"},"fkId":{"type":"string","description":"User fkId"},"fkUserId":{"type":"string","description":"User fkUserId"},"email":{"type":"string","description":"User email"},"phoneNumber":{"type":"string","description":"User phone number"},"metadata":{"type":"object","description":"Conversation user metadata"},"isAnonymized":{"type":"boolean","description":"Is anonymized"}},"required":["id","firstName","lastName","isAnonymized"]},"BadRequestErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":500},"name":{"type":"object","default":"BAD_REQUEST"},"message":{"type":"string","default":"INVALID_REQUEST"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"ForbiddenErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":403},"name":{"type":"object","default":"FORBIDDEN_ERROR"},"message":{"type":"string","default":"INVALID_CREDENTIALS"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"InternalServerErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":500},"message":{"type":"string","default":"Internal Server Error"}},"required":["status","message"]}}},"paths":{"/external/users":{"post":{"description":"Creates a new conversation user using either an email or phoneNumber.","operationId":"ExternalApiUsersController_createConversationUser","parameters":[],"requestBody":{"required":true,"description":"Provide the user details to create.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreateUserWithPhoneNumberBodyDTO"},{"$ref":"#/components/schemas/CreateUserWithEmailBodyDTO"},{"$ref":"#/components/schemas/CreateUserWithFkIdBodyDTO"}]}}}},"responses":{"201":{"description":"Successfully created a new conversation user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalApiUserResponseDTO"}}}},"400":{"description":"User already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDTO"}}}},"403":{"description":"Invalid API key or secret key. Ensure that you are using a valid authentication key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"429":{"description":"Rate limit exceeded. Each organization is limited to 1000 requests per 60 seconds for system external API operations."},"500":{"description":"Unexpected error occurred while processing the request. Please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Create a conversation user","tags":["Users","Agent API Key"]}}}}
```

## Find user by contact information

> Retrieves a user by their email, phone number or fkId, along with their conversation IDs for the current agent.

```json
{"openapi":"3.0.0","info":{"title":"AI Agent API","version":"1.0.0"},"servers":[{"url":"https://api.raia2.com","description":"Production server"}],"security":[{"Agent-Secret-Key":[]}],"components":{"securitySchemes":{"Agent-Secret-Key":{"type":"apiKey","in":"header","name":"Agent-Secret-Key","description":"Custom authentication header"}},"schemas":{"SearchConversationUserByContactsResponseDTO":{"type":"object","properties":{"user":{"description":"User info","allOf":[{"$ref":"#/components/schemas/ExternalApiUserResponseDTO"}]},"conversationIds":{"description":"Conversation ids","type":"array","items":{"type":"string"}}},"required":["user","conversationIds"]},"ExternalApiUserResponseDTO":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"context":{"type":"string","description":"User context"},"source":{"type":"string","description":"User source"},"fkId":{"type":"string","description":"User fkId"},"fkUserId":{"type":"string","description":"User fkUserId"},"email":{"type":"string","description":"User email"},"phoneNumber":{"type":"string","description":"User phone number"},"metadata":{"type":"object","description":"Conversation user metadata"},"isAnonymized":{"type":"boolean","description":"Is anonymized"}},"required":["id","firstName","lastName","isAnonymized"]},"BadRequestErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":500},"name":{"type":"object","default":"BAD_REQUEST"},"message":{"type":"string","default":"INVALID_REQUEST"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"ForbiddenErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":403},"name":{"type":"object","default":"FORBIDDEN_ERROR"},"message":{"type":"string","default":"INVALID_CREDENTIALS"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"EntityNotFoundErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":404},"name":{"type":"object","default":"ENTITY_NOT_FOUND_ERROR"},"message":{"type":"string","default":"ENTITY_NOT_FOUND"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"InternalServerErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":500},"message":{"type":"string","default":"Internal Server Error"}},"required":["status","message"]}}},"paths":{"/external/users/search":{"get":{"description":"Retrieves a user by their email, phone number or fkId, along with their conversation IDs for the current agent.","operationId":"ExternalApiUsersController_findUserByContactInfo","parameters":[{"name":"email","required":false,"in":"query","description":"User email","schema":{"type":"string"}},{"name":"phoneNumber","required":false,"in":"query","description":"User phone number","schema":{"type":"string"}},{"name":"fkId","required":false,"in":"query","description":"User fkId","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved the user and conversation ids","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchConversationUserByContactsResponseDTO"}}}},"400":{"description":"Invalid parameters provided.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDTO"}}}},"403":{"description":"Invalid API key or secret key. Ensure that you are using a valid authentication key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"404":{"description":"User not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityNotFoundErrorDTO"}}}},"429":{"description":"Rate limit exceeded. Each organization is limited to 1000 requests per 60 seconds for system external API operations."},"500":{"description":"Unexpected error occurred while processing the request. Please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Find user by contact information","tags":["Users","Agent API Key"]}}}}
```

## Get conversation user by ID

> Retrieves a conversation user by their unique identifier.

```json
{"openapi":"3.0.0","info":{"title":"AI Agent API","version":"1.0.0"},"servers":[{"url":"https://api.raia2.com","description":"Production server"}],"security":[{"Agent-Secret-Key":[]}],"components":{"securitySchemes":{"Agent-Secret-Key":{"type":"apiKey","in":"header","name":"Agent-Secret-Key","description":"Custom authentication header"}},"schemas":{"ExternalApiUserResponseDTO":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"context":{"type":"string","description":"User context"},"source":{"type":"string","description":"User source"},"fkId":{"type":"string","description":"User fkId"},"fkUserId":{"type":"string","description":"User fkUserId"},"email":{"type":"string","description":"User email"},"phoneNumber":{"type":"string","description":"User phone number"},"metadata":{"type":"object","description":"Conversation user metadata"},"isAnonymized":{"type":"boolean","description":"Is anonymized"}},"required":["id","firstName","lastName","isAnonymized"]},"ForbiddenErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":403},"name":{"type":"object","default":"FORBIDDEN_ERROR"},"message":{"type":"string","default":"INVALID_CREDENTIALS"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"EntityNotFoundErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":404},"name":{"type":"object","default":"ENTITY_NOT_FOUND_ERROR"},"message":{"type":"string","default":"ENTITY_NOT_FOUND"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"InternalServerErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":500},"message":{"type":"string","default":"Internal Server Error"}},"required":["status","message"]}}},"paths":{"/external/users/{id}":{"get":{"description":"Retrieves a conversation user by their unique identifier.","operationId":"ExternalApiUsersController_getConversationUser","parameters":[{"name":"id","required":true,"in":"path","description":"Unique identifier of the conversation user.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved the conversation user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalApiUserResponseDTO"}}}},"403":{"description":"Invalid API key or secret key. Ensure that you are using a valid authentication key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"404":{"description":"User not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityNotFoundErrorDTO"}}}},"429":{"description":"Rate limit exceeded. Each organization is limited to 1000 requests per 60 seconds for system external API operations."},"500":{"description":"Unexpected error occurred while processing the request. Please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Get conversation user by ID","tags":["Users","Agent API Key"]}}}}
```

## Delete conversation user by ID

> Delete a conversation user by their unique identifier.

```json
{"openapi":"3.0.0","info":{"title":"AI Agent API","version":"1.0.0"},"servers":[{"url":"https://api.raia2.com","description":"Production server"}],"security":[{"Agent-Secret-Key":[]}],"components":{"securitySchemes":{"Agent-Secret-Key":{"type":"apiKey","in":"header","name":"Agent-Secret-Key","description":"Custom authentication header"}},"schemas":{"ForbiddenErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":403},"name":{"type":"object","default":"FORBIDDEN_ERROR"},"message":{"type":"string","default":"INVALID_CREDENTIALS"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"EntityNotFoundErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":404},"name":{"type":"object","default":"ENTITY_NOT_FOUND_ERROR"},"message":{"type":"string","default":"ENTITY_NOT_FOUND"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"InternalServerErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":500},"message":{"type":"string","default":"Internal Server Error"}},"required":["status","message"]}}},"paths":{"/external/users/{id}":{"delete":{"description":"Delete a conversation user by their unique identifier.","operationId":"ExternalApiUsersController_deleteConversationUserById","parameters":[{"name":"id","required":true,"in":"path","description":"Unique identifier of the conversation user.","schema":{"type":"string"}}],"responses":{"204":{"description":"Successfully delete the conversation user."},"403":{"description":"Invalid API key or secret key. Ensure that you are using a valid authentication key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"404":{"description":"Conversation user not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityNotFoundErrorDTO"}}}},"429":{"description":"Rate limit exceeded. Each organization is limited to 1000 requests per 60 seconds for system external API operations."},"500":{"description":"Unexpected error occurred while processing the request. Please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Delete conversation user by ID","tags":["Users","Agent API Key"]}}}}
```

## Get conversation user limits by ID

> Retrieves limits for a conversation user by their unique identifier.

```json
{"openapi":"3.0.0","info":{"title":"AI Agent API","version":"1.0.0"},"servers":[{"url":"https://api.raia2.com","description":"Production server"}],"security":[{"Agent-Secret-Key":[]}],"components":{"securitySchemes":{"Agent-Secret-Key":{"type":"apiKey","in":"header","name":"Agent-Secret-Key","description":"Custom authentication header"}},"schemas":{"ConversationUserLimitsResponseDTO":{"type":"object","properties":{"id":{"type":"string","description":"Conversation user limits ID"},"conversationUserId":{"type":"string","description":"Conversation user ID"},"isOrganizationDefault":{"type":"boolean","description":"Is organization default"},"tokensAmountPerMonth":{"type":"number","description":"Tokens amount per month"},"smsAmountPerMonth":{"type":"number","description":"SMS amount per month"},"emailsAmountPerMonth":{"type":"number","description":"Emails amount per month"},"secondsAmountPerMonth":{"type":"number","description":"Seconds amount per month"}},"required":["id","conversationUserId","isOrganizationDefault","tokensAmountPerMonth","smsAmountPerMonth","emailsAmountPerMonth","secondsAmountPerMonth"]},"ForbiddenErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":403},"name":{"type":"object","default":"FORBIDDEN_ERROR"},"message":{"type":"string","default":"INVALID_CREDENTIALS"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"EntityNotFoundErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":404},"name":{"type":"object","default":"ENTITY_NOT_FOUND_ERROR"},"message":{"type":"string","default":"ENTITY_NOT_FOUND"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"InternalServerErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":500},"message":{"type":"string","default":"Internal Server Error"}},"required":["status","message"]}}},"paths":{"/external/users/{id}/limits":{"get":{"description":"Retrieves limits for a conversation user by their unique identifier.","operationId":"ExternalApiUsersController_getConversationUserLimits","parameters":[{"name":"id","required":true,"in":"path","description":"Unique identifier of the conversation user.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved conversation user limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUserLimitsResponseDTO"}}}},"403":{"description":"Invalid API key or secret key. Ensure that you are using a valid authentication key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"404":{"description":"User not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityNotFoundErrorDTO"}}}},"429":{"description":"Rate limit exceeded. Each organization is limited to 1000 requests per 60 seconds for system external API operations."},"500":{"description":"Unexpected error occurred while processing the request. Please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Get conversation user limits by ID","tags":["Users","Agent API Key"]}}}}
```

## Create conversation user limits by ID

> Creates limits for a conversation user by their unique identifier.

```json
{"openapi":"3.0.0","info":{"title":"AI Agent API","version":"1.0.0"},"servers":[{"url":"https://api.raia2.com","description":"Production server"}],"security":[{"Agent-Secret-Key":[]}],"components":{"securitySchemes":{"Agent-Secret-Key":{"type":"apiKey","in":"header","name":"Agent-Secret-Key","description":"Custom authentication header"}},"schemas":{"CreateConversationUserLimitsBodyDTO":{"type":"object","properties":{"tokensAmountPerMonth":{"type":"number","description":"Tokens amount per month"},"smsAmountPerMonth":{"type":"number","description":"SMS amount per month"},"emailsAmountPerMonth":{"type":"number","description":"Emails amount per month"},"secondsAmountPerMonth":{"type":"number","description":"Seconds amount per month"}},"required":["tokensAmountPerMonth","smsAmountPerMonth","emailsAmountPerMonth","secondsAmountPerMonth"]},"ConversationUserLimitsResponseDTO":{"type":"object","properties":{"id":{"type":"string","description":"Conversation user limits ID"},"conversationUserId":{"type":"string","description":"Conversation user ID"},"isOrganizationDefault":{"type":"boolean","description":"Is organization default"},"tokensAmountPerMonth":{"type":"number","description":"Tokens amount per month"},"smsAmountPerMonth":{"type":"number","description":"SMS amount per month"},"emailsAmountPerMonth":{"type":"number","description":"Emails amount per month"},"secondsAmountPerMonth":{"type":"number","description":"Seconds amount per month"}},"required":["id","conversationUserId","isOrganizationDefault","tokensAmountPerMonth","smsAmountPerMonth","emailsAmountPerMonth","secondsAmountPerMonth"]},"ForbiddenErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":403},"name":{"type":"object","default":"FORBIDDEN_ERROR"},"message":{"type":"string","default":"INVALID_CREDENTIALS"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"EntityNotFoundErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":404},"name":{"type":"object","default":"ENTITY_NOT_FOUND_ERROR"},"message":{"type":"string","default":"ENTITY_NOT_FOUND"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"InternalServerErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":500},"message":{"type":"string","default":"Internal Server Error"}},"required":["status","message"]}}},"paths":{"/external/users/{id}/limits":{"post":{"description":"Creates limits for a conversation user by their unique identifier.","operationId":"ExternalApiUsersController_createConversationUserLimits","parameters":[{"name":"id","required":true,"in":"path","description":"Unique identifier of the conversation user.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationUserLimitsBodyDTO"}}}},"responses":{"201":{"description":"Successfully created conversation user limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUserLimitsResponseDTO"}}}},"403":{"description":"Invalid API key or secret key. Ensure that you are using a valid authentication key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"404":{"description":"User not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityNotFoundErrorDTO"}}}},"429":{"description":"Rate limit exceeded. Each organization is limited to 1000 requests per 60 seconds for system external API operations."},"500":{"description":"Unexpected error occurred while processing the request. Please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Create conversation user limits by ID","tags":["Users","Agent API Key"]}}}}
```

## Update conversation user limits by ID

> Updates limits for a conversation user by their unique identifier.

```json
{"openapi":"3.0.0","info":{"title":"AI Agent API","version":"1.0.0"},"servers":[{"url":"https://api.raia2.com","description":"Production server"}],"security":[{"Agent-Secret-Key":[]}],"components":{"securitySchemes":{"Agent-Secret-Key":{"type":"apiKey","in":"header","name":"Agent-Secret-Key","description":"Custom authentication header"}},"schemas":{"UpdateConversationUserLimitsBodyDTO":{"type":"object","properties":{"tokensAmountPerMonth":{"type":"number","description":"Tokens amount per month"},"smsAmountPerMonth":{"type":"number","description":"SMS amount per month"},"emailsAmountPerMonth":{"type":"number","description":"Emails amount per month"},"secondsAmountPerMonth":{"type":"number","description":"Seconds amount per month"}},"required":["tokensAmountPerMonth","smsAmountPerMonth","emailsAmountPerMonth","secondsAmountPerMonth"]},"ConversationUserLimitsResponseDTO":{"type":"object","properties":{"id":{"type":"string","description":"Conversation user limits ID"},"conversationUserId":{"type":"string","description":"Conversation user ID"},"isOrganizationDefault":{"type":"boolean","description":"Is organization default"},"tokensAmountPerMonth":{"type":"number","description":"Tokens amount per month"},"smsAmountPerMonth":{"type":"number","description":"SMS amount per month"},"emailsAmountPerMonth":{"type":"number","description":"Emails amount per month"},"secondsAmountPerMonth":{"type":"number","description":"Seconds amount per month"}},"required":["id","conversationUserId","isOrganizationDefault","tokensAmountPerMonth","smsAmountPerMonth","emailsAmountPerMonth","secondsAmountPerMonth"]},"ForbiddenErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":403},"name":{"type":"object","default":"FORBIDDEN_ERROR"},"message":{"type":"string","default":"INVALID_CREDENTIALS"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"EntityNotFoundErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":404},"name":{"type":"object","default":"ENTITY_NOT_FOUND_ERROR"},"message":{"type":"string","default":"ENTITY_NOT_FOUND"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"InternalServerErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":500},"message":{"type":"string","default":"Internal Server Error"}},"required":["status","message"]}}},"paths":{"/external/users/{id}/limits":{"put":{"description":"Updates limits for a conversation user by their unique identifier.","operationId":"ExternalApiUsersController_updateConversationUserLimits","parameters":[{"name":"id","required":true,"in":"path","description":"Unique identifier of the conversation user.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConversationUserLimitsBodyDTO"}}}},"responses":{"200":{"description":"Successfully updated conversation user limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUserLimitsResponseDTO"}}}},"403":{"description":"Invalid API key or secret key. Ensure that you are using a valid authentication key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"404":{"description":"User not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityNotFoundErrorDTO"}}}},"429":{"description":"Rate limit exceeded. Each organization is limited to 1000 requests per 60 seconds for system external API operations."},"500":{"description":"Unexpected error occurred while processing the request. Please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Update conversation user limits by ID","tags":["Users","Agent API Key"]}}}}
```

## Delete conversation user limits by ID

> Deletes limits for a conversation user by their unique identifier.

```json
{"openapi":"3.0.0","info":{"title":"AI Agent API","version":"1.0.0"},"servers":[{"url":"https://api.raia2.com","description":"Production server"}],"security":[{"Agent-Secret-Key":[]}],"components":{"securitySchemes":{"Agent-Secret-Key":{"type":"apiKey","in":"header","name":"Agent-Secret-Key","description":"Custom authentication header"}},"schemas":{"ForbiddenErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":403},"name":{"type":"object","default":"FORBIDDEN_ERROR"},"message":{"type":"string","default":"INVALID_CREDENTIALS"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"EntityNotFoundErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":404},"name":{"type":"object","default":"ENTITY_NOT_FOUND_ERROR"},"message":{"type":"string","default":"ENTITY_NOT_FOUND"},"details":{"type":"array","items":{"type":"object"}}},"required":["status","name","message","details"]},"InternalServerErrorDTO":{"type":"object","properties":{"status":{"type":"number","default":500},"message":{"type":"string","default":"Internal Server Error"}},"required":["status","message"]}}},"paths":{"/external/users/{id}/limits":{"delete":{"description":"Deletes limits for a conversation user by their unique identifier.","operationId":"ExternalApiUsersController_deleteConversationUserLimits","parameters":[{"name":"id","required":true,"in":"path","description":"Unique identifier of the conversation user.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted conversation user limits."},"403":{"description":"Invalid API key or secret key. Ensure that you are using a valid authentication key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"404":{"description":"User not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityNotFoundErrorDTO"}}}},"429":{"description":"Rate limit exceeded. Each organization is limited to 1000 requests per 60 seconds for system external API operations."},"500":{"description":"Unexpected error occurred while processing the request. Please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Delete conversation user limits by ID","tags":["Users","Agent API Key"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

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

```
GET https://raia2.gitbook.io/raia/api-reference/users.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

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