For the complete documentation index, see llms.txt. This page is also available as Markdown.

AI

List AI Conversations

get

Retrieves a paginated list of AI conversations. Can be filtered by status, type, user_id, and reported.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Responses
200

Successful response

application/json
get/api/v1/ai/conversations
GET /api/v1/ai/conversations HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": "string",
      "type": "string",
      "status": "string",
      "reported": false,
      "initial_user_prompt": "string",
      "user_interaction_logs_count": 0,
      "created_at": "2025-01-15T10:30:00.000000Z",
      "updated_at": "2025-01-15T10:30:00.000000Z",
      "user": {
        "id": 0,
        "name": "string"
      }
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https://api.example.com/api/v1/ai/conversations",
    "per_page": 15,
    "to": 1,
    "total": 1
  },
  "links": {
    "first": "https://api.example.com/api/v1/ai/conversations?page=1",
    "last": "https://api.example.com/api/v1/ai/conversations?page=1",
    "prev": null,
    "next": null
  }
}

Generate AI Script

post

Generates a new script from a prompt using AI.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Body
userPromptstringRequired
examplePayloadstringOptional
languagestringOptional
Responses
200

Successful response

application/json
objectOptional
post/api/v1/ai/scripts/generate
POST /api/v1/ai/scripts/generate HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 107

{
  "userPrompt": "example_userPrompt",
  "examplePayload": "example_examplePayload",
  "language": "example_language"
}
{}

Reply AI Script

post

Submits a follow-up reply to an existing AI script conversation, identified by conversationUlid.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
conversationUlidstringRequired

The conversationUlid identifier.

Body
userReplystringRequired
Responses
200

Successful response

application/json
objectOptional
post/api/v1/ai/scripts/{conversationUlid}/reply
POST /api/v1/ai/scripts/{conversationUlid}/reply HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "userReply": "example_userReply"
}
{}

End AI

patch

Ends a specific AI conversation.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
conversationUlidstringRequired

The conversationUlid identifier.

Responses
200

Successful response

application/json
objectOptional
patch/api/v1/ai/{conversationUlid}/end
PATCH /api/v1/ai/{conversationUlid}/end HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{}

Report AI

patch

Flags a specific AI conversation for review.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
conversationUlidstringRequired

The conversationUlid identifier.

Responses
200

Successful response

application/json
objectOptional
patch/api/v1/ai/{conversationUlid}/report
PATCH /api/v1/ai/{conversationUlid}/report HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{}

Last updated

Was this helpful?