Agents
Fetches an agent by API key. The response includes the agent details.
Authorizations
Responses
200
Successfully retrieved the agent.
application/json
403
Invalid API key or secret key. Ensure that you are using a valid authentication key.
application/json
404
Agent not found.
application/json
500
Unexpected error occurred while processing the request. Please try again later.
application/json
get
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",
"assistantId": "asst_1234567890",
"avatarUrl": "https://example.com/avatar.jpg",
"status": "active",
"skills": [
{
"systemName": "AGENT_SKILL_SYSTEM_NAME",
"status": "active",
"email": "email@gmail.com",
"senderName": "John Doe",
"defaultSubject": "Subject of the email",
"defaultEmailIntroduction": "Welcome to our service!",
"emailSignature": "Thank you for your email!"
}
]
}
Creates a new webhook for the agent identified by the API key.
Authorizations
Body
titlestringRequiredExample:
Title of the webhook
My Webhook
descriptionstringRequiredExample:
Description of the webhook
This webhook is triggered when a message is received
urlstringRequiredExample:
URL where the webhook will be sent
https://api.example.com/webhook
triggerConditionstring · enumRequiredExample:
Condition that triggers the webhook
each_message
Possible values: headersobjectOptionalExample:
Optional headers to be sent with the webhook
{"Authorization":"Bearer token"}
Responses
201
Successfully created the webhook.
application/json
403
Invalid API key or secret key. Ensure that you are using a valid authentication key.
application/json
404
Agent not found.
application/json
500
Unexpected error occurred while processing the request. Please try again later.
application/json
post
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"
}