---
updatedAt: 2025-11-11T21:52:57.000Z
agentTools:
  projectIndex: https://docs.woopra.com/llms.txt
---

# /logs/import

Import sessions into Woopra. Note this API does not wait until the import process is complete, it will schedule an import task, and return the batch id in the response. The request body expects a line separated JSON file, containing a new session/visit object in every line.

> 👍 File format
>
> `{"visitor": {"email": "[tigi@brembo.com](mailto:tigi@brembo.com)"},"actions":[{"name": "article view", "time": 1450808259000,"properties": { "campaign_name":"EN_2014", "campaign_medium": "Social","campaign_source": "twitter", "uri": "http://www.my-website.com/blog/welcome","title": "welcome!"}}]}`
> \n\
> `{"visitor": {"email": "[naga@brembo.com](mailto:naga@brembo.com)"},"actions":[{"name": "article view", "time": 1450908259000,"properties": { "campaign_name":"EN_2016", "uri": "http://www.my-website.com/","title": "some article"}}]}`
> \n\
> ...

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "data-api",
    "version": "3.5"
  },
  "servers": [
    {
      "url": "https://www.woopra.com/rest/3.10"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/logs/import": {
      "put": {
        "summary": "/logs/import",
        "description": "Import sessions into Woopra. Note this API does not wait until the import process is complete, it will schedule an import task, and return the batch id in the response. The request body expects a line separated JSON file, containing a new session/visit object in every line.",
        "operationId": "logs",
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "description": "The project into which you would like to import logs",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "RAW_BODY"
                ],
                "properties": {
                  "RAW_BODY": {
                    "type": "string",
                    "description": "line-separated JSON visits"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": ""
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X PUT --user appID:secretKey 'https://www.woopra.com/rest/3.0/logs/import?project=mybusiness.com' --data-binary '{\"visitor\": {\"email\": \"tigi@brembo.com\"},\"actions\":[{\"name\": \"article view\", \"time\": 1450808259000,\"properties\": { \"campaign_name\":\"EN_2014\", \"campaign_medium\": \"Social\",\"campaign_source\": \"twitter\", \"uri\": \"http://www.my-website.com/blog/welcome\",\"title\": \"welcome!\"}}]}'"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```