All URIs are relative to https://api.reveng.ai
| Method | HTTP request | Description |
|---|---|---|
| CancelRun | Post /v2/conversations/{id}/cancel | Cancel an active run |
| ConfirmTool | Post /v2/conversations/{id}/confirm | Approve or reject a pending tool confirmation |
| CreateConversation | Post /v2/conversations | Create a new conversation |
| GetConversation | Get /v2/conversations/{id} | Get a conversation with its events |
| ListConversations | Get /v2/conversations | List conversations for the authenticated user |
| SendMessage | Post /v2/conversations/{id}/messages | Send a message and start an agentic run |
| StreamEvents | Get /v2/conversations/{id}/events | Stream conversation events (SSE) |
StatusResponse CancelRun(ctx, id).Execute()
Cancel an active run
package main
import (
"context"
"fmt"
"os"
revengai "github.com/RevEngAI/sdk-go/v3"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Conversation UUID
configuration := revengai.NewConfiguration()
apiClient := revengai.NewAPIClient(configuration)
resp, r, err := apiClient.ConversationsAPI.CancelRun(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConversationsAPI.CancelRun``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CancelRun`: StatusResponse
fmt.Fprintf(os.Stdout, "Response from `ConversationsAPI.CancelRun`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Conversation UUID |
Other parameters are passed through a pointer to a apiCancelRunRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StatusResponse ConfirmTool(ctx, id).ConfirmToolInputBody(confirmToolInputBody).Execute()
Approve or reject a pending tool confirmation
package main
import (
"context"
"fmt"
"os"
revengai "github.com/RevEngAI/sdk-go/v3"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Conversation UUID
confirmToolInputBody := *revengai.NewConfirmToolInputBody(false) // ConfirmToolInputBody |
configuration := revengai.NewConfiguration()
apiClient := revengai.NewAPIClient(configuration)
resp, r, err := apiClient.ConversationsAPI.ConfirmTool(context.Background(), id).ConfirmToolInputBody(confirmToolInputBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConversationsAPI.ConfirmTool``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ConfirmTool`: StatusResponse
fmt.Fprintf(os.Stdout, "Response from `ConversationsAPI.ConfirmTool`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Conversation UUID |
Other parameters are passed through a pointer to a apiConfirmToolRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
confirmToolInputBody | ConfirmToolInputBody | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Conversation CreateConversation(ctx).CreateConversationRequest(createConversationRequest).Execute()
Create a new conversation
package main
import (
"context"
"fmt"
"os"
revengai "github.com/RevEngAI/sdk-go/v3"
)
func main() {
createConversationRequest := *revengai.NewCreateConversationRequest() // CreateConversationRequest |
configuration := revengai.NewConfiguration()
apiClient := revengai.NewAPIClient(configuration)
resp, r, err := apiClient.ConversationsAPI.CreateConversation(context.Background()).CreateConversationRequest(createConversationRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConversationsAPI.CreateConversation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateConversation`: Conversation
fmt.Fprintf(os.Stdout, "Response from `ConversationsAPI.CreateConversation`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateConversationRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createConversationRequest | CreateConversationRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ConversationWithEvents GetConversation(ctx, id).Execute()
Get a conversation with its events
package main
import (
"context"
"fmt"
"os"
revengai "github.com/RevEngAI/sdk-go/v3"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Conversation UUID
configuration := revengai.NewConfiguration()
apiClient := revengai.NewAPIClient(configuration)
resp, r, err := apiClient.ConversationsAPI.GetConversation(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConversationsAPI.GetConversation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetConversation`: ConversationWithEvents
fmt.Fprintf(os.Stdout, "Response from `ConversationsAPI.GetConversation`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Conversation UUID |
Other parameters are passed through a pointer to a apiGetConversationRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Conversation ListConversations(ctx).Execute()
List conversations for the authenticated user
package main
import (
"context"
"fmt"
"os"
revengai "github.com/RevEngAI/sdk-go/v3"
)
func main() {
configuration := revengai.NewConfiguration()
apiClient := revengai.NewAPIClient(configuration)
resp, r, err := apiClient.ConversationsAPI.ListConversations(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConversationsAPI.ListConversations``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListConversations`: []Conversation
fmt.Fprintf(os.Stdout, "Response from `ConversationsAPI.ListConversations`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListConversationsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StatusResponse SendMessage(ctx, id).SendMessageRequest(sendMessageRequest).Execute()
Send a message and start an agentic run
package main
import (
"context"
"fmt"
"os"
revengai "github.com/RevEngAI/sdk-go/v3"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Conversation UUID
sendMessageRequest := *revengai.NewSendMessageRequest("Content_example") // SendMessageRequest |
configuration := revengai.NewConfiguration()
apiClient := revengai.NewAPIClient(configuration)
resp, r, err := apiClient.ConversationsAPI.SendMessage(context.Background(), id).SendMessageRequest(sendMessageRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConversationsAPI.SendMessage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendMessage`: StatusResponse
fmt.Fprintf(os.Stdout, "Response from `ConversationsAPI.SendMessage`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Conversation UUID |
Other parameters are passed through a pointer to a apiSendMessageRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
sendMessageRequest | SendMessageRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ServerSentEventsInner StreamEvents(ctx, id).LastEventId(lastEventId).Execute()
Stream conversation events (SSE)
package main
import (
"context"
"fmt"
"os"
revengai "github.com/RevEngAI/sdk-go/v3"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Conversation UUID
lastEventId := int64(789) // int64 | Replay events after this ID (optional)
configuration := revengai.NewConfiguration()
apiClient := revengai.NewAPIClient(configuration)
resp, r, err := apiClient.ConversationsAPI.StreamEvents(context.Background(), id).LastEventId(lastEventId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConversationsAPI.StreamEvents``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `StreamEvents`: []ServerSentEventsInner
fmt.Fprintf(os.Stdout, "Response from `ConversationsAPI.StreamEvents`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Conversation UUID |
Other parameters are passed through a pointer to a apiStreamEventsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
lastEventId | int64 | Replay events after this ID |
- Content-Type: Not defined
- Accept: text/event-stream, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]