Fetches an agent by API key. The response includes the agent details.
Successfully retrieved the agent.
Invalid API key or secret key. Ensure that you are using a valid authentication key.
Agent not found.
Unexpected error occurred while processing the request. Please try again later.
GET /external/agents/by-api-key HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Accept: */*
{
"organizationId": "123e4567-e89b-12d3-a456-426614174000",
"organizationName": "text",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"publicName": "text",
"role": "text",
"description": "text",
"vectorStoreId": "vs_1234567890",
"assistant": {
"id": "asst_1234567890",
"model": "gpt-3.5-turbo",
"temperature": 1,
"topP": 1,
"instructions": "text",
"tools": [
{
"type": "code_interpreter",
"isEnabled": true
}
],
"responseFormat": "text"
},
"avatarUrl": "https://example.com/avatar.jpg",
"status": "active",
"skills": [
{
"systemName": "AGENT_SKILL_SYSTEM_NAME",
"status": "active"
}
]
}
Creates a new webhook for the agent identified by the API key.
Title of the webhook
My Webhook
Description of the webhook
This webhook is triggered when a message is received
URL where the webhook will be sent
https://api.example.com/webhook
Condition that triggers the webhook
each_message
Possible values: Optional headers to be sent with the webhook
{"Authorization":"Bearer token"}
Successfully created the webhook.
Invalid API key or secret key. Ensure that you are using a valid authentication key.
Agent not found.
Unexpected error occurred while processing the request. Please try again later.
POST /external/agents/webhooks HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 208
{
"title": "My Webhook",
"description": "This webhook is triggered when a message is received",
"url": "https://api.example.com/webhook",
"triggerCondition": "each_message",
"headers": {
"Authorization": "Bearer token"
}
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"title": "My Webhook",
"description": "This webhook is triggered when a message is received",
"url": "https://api.example.com/webhook",
"triggerCondition": "each_message",
"headers": {
"Authorization": "Bearer token"
},
"status": "active",
"createdAt": "2024-03-20T12:00:00Z",
"updatedAt": "2024-03-20T12:00:00Z"
}