> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.tabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.tabs.com/_mcp/server.

# Bulk Create Events v1

POST https://integrators.prod.api.tabsplatform.com/v3/events/bulk
Content-Type: application/json

Reference: https://docs.tabs.com/api-reference/events/createEvents

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Tabs External API
  version: 1.0.0
paths:
  /v3/events/bulk:
    post:
      operationId: integrators-api-events-controller-create-events
      summary: Bulk Create Events v1
      tags:
        - events
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The Events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedEventsDto'
        '400':
          description: Some events failed validation
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkCreateEventDto'
servers:
  - url: https://integrators.prod.api.tabsplatform.com
    description: https://integrators.prod.api.tabsplatform.com
components:
  schemas:
    CreateEventDtoMetadata:
      type: object
      properties: {}
      description: event metadata
      title: CreateEventDtoMetadata
    CreateEventDto:
      type: object
      properties:
        customerId:
          type: string
          description: The ID of the customer
        datetime:
          type: string
          format: date-time
          description: The date and time of the event
        eventTypeId:
          type: string
          description: The type of event
        value:
          type: string
          description: The value of the event, usually a number
        differentiator:
          type: string
          description: The differentiator of the event
        metadata:
          $ref: '#/components/schemas/CreateEventDtoMetadata'
          description: event metadata
        invoiceGroup:
          type: string
          description: The invoice group for split invoicing
      required:
        - customerId
        - datetime
        - eventTypeId
        - value
        - metadata
      title: CreateEventDto
    BulkCreateEventDto:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/CreateEventDto'
      required:
        - events
      title: BulkCreateEventDto
    CreatedEventsDtoMetadata:
      type: object
      properties: {}
      description: event metadata
      title: CreatedEventsDtoMetadata
    CreatedEventsDto:
      type: object
      properties:
        customerId:
          type: string
          description: The ID of the customer
        datetime:
          type: string
          format: date-time
          description: The date and time of the event
        eventTypeId:
          type: string
          description: The type of event
        value:
          type: string
          description: The value of the event, usually a number
        differentiator:
          type: string
          description: The differentiator of the event
        metadata:
          $ref: '#/components/schemas/CreatedEventsDtoMetadata'
          description: event metadata
        invoiceGroup:
          type: string
          description: The invoice group for split invoicing
        id:
          type: string
          description: The id of the event
      required:
        - customerId
        - datetime
        - eventTypeId
        - value
        - metadata
        - id
      title: CreatedEventsDto
  securitySchemes:
    custom-header:
      type: apiKey
      in: header
      name: Authorization

```

## Examples



**Request**

```json
{
  "events": [
    {
      "customerId": "123e4567-e89b-12d3-a456-426614174000",
      "datetime": "2021-01-01T00:00:00.000Z",
      "eventTypeId": "123e4567-e89b-12d3-a456-426614174000",
      "value": "123",
      "metadata": "{\"key\":\"value\"}"
    }
  ]
}
```

**Response**

```json
{
  "customerId": "123e4567-e89b-12d3-a456-426614174000",
  "datetime": "2021-01-01T00:00:00.000Z",
  "eventTypeId": "123e4567-e89b-12d3-a456-426614174000",
  "value": "123",
  "metadata": "{\"key\":\"value\"}",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "differentiator": "DIFF",
  "invoiceGroup": "123"
}
```

**SDK Code**

```python
import requests

url = "https://integrators.prod.api.tabsplatform.com/v3/events/bulk"

payload = { "events": [
        {
            "customerId": "123e4567-e89b-12d3-a456-426614174000",
            "datetime": "2021-01-01T00:00:00.000Z",
            "eventTypeId": "123e4567-e89b-12d3-a456-426614174000",
            "value": "123",
            "metadata": "{\"key\":\"value\"}"
        }
    ] }
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://integrators.prod.api.tabsplatform.com/v3/events/bulk';
const options = {
  method: 'POST',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"events":[{"customerId":"123e4567-e89b-12d3-a456-426614174000","datetime":"2021-01-01T00:00:00.000Z","eventTypeId":"123e4567-e89b-12d3-a456-426614174000","value":"123","metadata":"{\"key\":\"value\"}"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://integrators.prod.api.tabsplatform.com/v3/events/bulk"

	payload := strings.NewReader("{\n  \"events\": [\n    {\n      \"customerId\": \"123e4567-e89b-12d3-a456-426614174000\",\n      \"datetime\": \"2021-01-01T00:00:00.000Z\",\n      \"eventTypeId\": \"123e4567-e89b-12d3-a456-426614174000\",\n      \"value\": \"123\",\n      \"metadata\": \"{\\\"key\\\":\\\"value\\\"}\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://integrators.prod.api.tabsplatform.com/v3/events/bulk")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"events\": [\n    {\n      \"customerId\": \"123e4567-e89b-12d3-a456-426614174000\",\n      \"datetime\": \"2021-01-01T00:00:00.000Z\",\n      \"eventTypeId\": \"123e4567-e89b-12d3-a456-426614174000\",\n      \"value\": \"123\",\n      \"metadata\": \"{\\\"key\\\":\\\"value\\\"}\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://integrators.prod.api.tabsplatform.com/v3/events/bulk")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"events\": [\n    {\n      \"customerId\": \"123e4567-e89b-12d3-a456-426614174000\",\n      \"datetime\": \"2021-01-01T00:00:00.000Z\",\n      \"eventTypeId\": \"123e4567-e89b-12d3-a456-426614174000\",\n      \"value\": \"123\",\n      \"metadata\": \"{\\\"key\\\":\\\"value\\\"}\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://integrators.prod.api.tabsplatform.com/v3/events/bulk', [
  'body' => '{
  "events": [
    {
      "customerId": "123e4567-e89b-12d3-a456-426614174000",
      "datetime": "2021-01-01T00:00:00.000Z",
      "eventTypeId": "123e4567-e89b-12d3-a456-426614174000",
      "value": "123",
      "metadata": "{\\"key\\":\\"value\\"}"
    }
  ]
}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://integrators.prod.api.tabsplatform.com/v3/events/bulk");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"events\": [\n    {\n      \"customerId\": \"123e4567-e89b-12d3-a456-426614174000\",\n      \"datetime\": \"2021-01-01T00:00:00.000Z\",\n      \"eventTypeId\": \"123e4567-e89b-12d3-a456-426614174000\",\n      \"value\": \"123\",\n      \"metadata\": \"{\\\"key\\\":\\\"value\\\"}\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["events": [
    [
      "customerId": "123e4567-e89b-12d3-a456-426614174000",
      "datetime": "2021-01-01T00:00:00.000Z",
      "eventTypeId": "123e4567-e89b-12d3-a456-426614174000",
      "value": "123",
      "metadata": "{\"key\":\"value\"}"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://integrators.prod.api.tabsplatform.com/v3/events/bulk")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```