post__conversation

⚠️ TEST ENVIRONMENT ONLY

This API endpoint is currently available only in the TEST environment. It is not yet available in production.

POST /conversation

Create Conversation

Create a new AI conversation associated with a repository. Conversations are the context containers for AI interactions, allowing users to have multi-turn conversations with AI models through the Flashback platform.

Key Features:

  • Creates a new conversation context for AI interactions

  • Associates conversation with a specific repository

  • Automatically inherits workspace and organization from the repository

  • Tracks conversation metadata and token usage

  • System events are logged for audit purposes

Important Notes:

  • Users must have access to the repository's workspace to create conversations

  • The repository must belong to a workspace (cannot be orphaned)

  • Each conversation is tied to a single repository

  • Conversations are soft-deleted (marked as deleted but not physically removed)

Security:

  • Access is validated against workspace permissions

  • Only users with workspace read access can create conversations

  • Conversation creation triggers system events for audit trails

TypeScript Client Library

public createConversation = async (data: CreateConversationRequest): Promise<CreateConversationResponse> => {
  return this.makeRequest<CreateConversationResponse>('conversation', 'POST', data);
};

Code Samples

# You can also use wget
curl -X POST https://backend.flashback.tech/conversation \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "repoId": "repo-123"
}

Parameters

Name
In
Type
Required
Description

body

body

object

true

none

» repoId

body

string

true

Unique identifier of the repository

Example responses

200 Response

{
  "success": true,
  "conversationId": "550e8400-e29b-41d4-a716-446655440000"
}

Responses

Status
Meaning
Description
Schema

200

Conversation created successfully

Inline

400

Validation error or invalid input

Inline

403

Insufficient permissions

Inline

404

Repository not found

Inline

500

Failed to create conversation

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

Operation success status

» conversationId

string

false

none

Unique identifier for the created conversation

Status Code 400

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

none

» message

string

false

none

Error message

Status Code 403

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

none

» message

string

false

none

Error message

Status Code 404

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

none

» message

string

false

none

Error message

Status Code 500

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

none

» message

string

false

none

Error message

To perform this operation, you must be authenticated by means of one of the following methods: BearerAuth

Last updated

Was this helpful?