Opengram

Claim multiple dispatch batches

POST
/api/v1/dispatch/claim-many

Authorization

bearerAuth
AuthorizationBearer <token>

Instance secret token

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/dispatch/claim-many" \  -H "Content-Type: application/json" \  -d '{    "workerId": "string"  }'
{
  "batches": [
    {
      "batchId": "string",
      "chatId": "string",
      "kind": "user_batch",
      "agentIdHint": "string",
      "compiledContent": "string",
      "items": [
        {
          "inputId": "string",
          "sourceKind": "user_message",
          "sourceId": "string",
          "senderId": "string",
          "content": "string",
          "traceKind": "string",
          "mediaIds": [
            "string"
          ],
          "attachmentNames": [
            "string"
          ]
        }
      ],
      "attachments": [
        {
          "mediaId": "string",
          "fileName": "string",
          "kind": "image",
          "sourceInputId": "string",
          "sourceIndex": 0
        }
      ]
    }
  ]
}
Empty
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request.",
    "details": null
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request.",
    "details": null
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request.",
    "details": null
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request.",
    "details": null
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request.",
    "details": null
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request.",
    "details": null
  }
}