Neo4j Transactions API

Manage explicit transactions with full control over the transaction lifecycle including open, run, commit, and rollback operations.

Operations 4

POST /db/{databaseName}/tx Open a new explicit transaction #
POST /db/{databaseName}/tx/{transactionId} Execute statements in an open transaction #
DELETE /db/{databaseName}/tx/{transactionId} Rollback a transaction #
POST /db/{databaseName}/tx/{transactionId}/commit Commit a transaction #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/neo4j-transactions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

neo4j-transactions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Neo4j HTTP Transactions API
  description: The Neo4j HTTP API allows developers to execute Cypher queries against a Neo4j database through HTTP requests. It supports both implicit transactions, where the API handles transaction management automatically, and explicit transactions, where developers control the full transaction lifecycle including open, commit, and rollback operations. By default the API uses port 7474 for HTTP and port 7473 for HTTPS on self-managed instances.
  version: '5.0'
  contact:
    name: Neo4j Support
    url: https://support.neo4j.com
  termsOfService: https://neo4j.com/terms/
servers:
- url: http://localhost:7474
  description: Self-managed HTTP server
- url: https://localhost:7473
  description: Self-managed HTTPS server
security:
- basicAuth: []
tags:
- name: Transactions
  description: Manage explicit transactions with full control over the transaction lifecycle including open, run, commit, and rollback operations.
paths:
  /db/{databaseName}/tx:
    post:
      operationId: openTransaction
      summary: Open a new explicit transaction
      description: Opens a new explicit transaction on the specified database. The response includes the transaction location URI which contains the transaction ID needed for subsequent operations. Optionally, Cypher statements can be included in the request body to be executed as part of the transaction opening. Transactions expire automatically after a period of inactivity with a default timeout of 30 seconds, configurable via server.http.transaction_idle_timeout.
      tags:
      - Transactions
      parameters:
      - $ref: '#/components/parameters/databaseName'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionRequest'
      responses:
        '201':
          description: Transaction opened successfully
          headers:
            Location:
              description: URI of the new transaction
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
        '404':
          description: Database not found
  /db/{databaseName}/tx/{transactionId}:
    post:
      operationId: executeInTransaction
      summary: Execute statements in an open transaction
      description: Submits one or more Cypher statements to be executed within an existing open transaction. The transaction remains open after execution and must be explicitly committed or rolled back. Each request resets the transaction idle timeout.
      tags:
      - Transactions
      parameters:
      - $ref: '#/components/parameters/databaseName'
      - $ref: '#/components/parameters/transactionId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionRequest'
      responses:
        '200':
          description: Statements executed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
        '404':
          description: Transaction or database not found
    delete:
      operationId: rollbackTransaction
      summary: Rollback a transaction
      description: Rolls back an open transaction, restoring the database to the state it was in before the transaction was opened. All changes made within the transaction are discarded.
      tags:
      - Transactions
      parameters:
      - $ref: '#/components/parameters/databaseName'
      - $ref: '#/components/parameters/transactionId'
      responses:
        '200':
          description: Transaction rolled back successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
        '401':
          description: Authentication required
        '404':
          description: Transaction or database not found
  /db/{databaseName}/tx/{transactionId}/commit:
    post:
      operationId: commitTransaction
      summary: Commit a transaction
      description: Commits an open transaction, making all changes permanent in the database. Optionally, final Cypher statements can be included in the request body to be executed before the transaction is committed.
      tags:
      - Transactions
      parameters:
      - $ref: '#/components/parameters/databaseName'
      - $ref: '#/components/parameters/transactionId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionRequest'
      responses:
        '200':
          description: Transaction committed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
        '400':
          description: Invalid request or transaction error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
        '404':
          description: Transaction or database not found
components:
  schemas:
    StatementResult:
      type: object
      description: Result of a single Cypher statement execution.
      properties:
        columns:
          type: array
          description: Column names in the result set
          items:
            type: string
        data:
          type: array
          description: Array of result rows
          items:
            type: object
            properties:
              row:
                type: array
                description: Row data values
                items: {}
              meta:
                type: array
                description: Metadata for each value in the row
                items: {}
              graph:
                type: object
                description: Graph representation of the result when requested
                properties:
                  nodes:
                    type: array
                    description: Graph nodes in the result
                    items:
                      $ref: '#/components/schemas/GraphNode'
                  relationships:
                    type: array
                    description: Graph relationships in the result
                    items:
                      $ref: '#/components/schemas/GraphRelationship'
        stats:
          $ref: '#/components/schemas/QueryStatistics'
    GraphRelationship:
      type: object
      description: A relationship returned in graph result format.
      properties:
        id:
          type: string
          description: The internal relationship ID
        type:
          type: string
          description: The relationship type
        startNode:
          type: string
          description: The ID of the start node
        endNode:
          type: string
          description: The ID of the end node
        properties:
          type: object
          description: Key-value properties of the relationship
          additionalProperties: true
    TransactionResponse:
      type: object
      description: Response from a transaction operation.
      properties:
        results:
          type: array
          description: Array of result objects corresponding to each executed statement
          items:
            $ref: '#/components/schemas/StatementResult'
        errors:
          type: array
          description: Array of errors that occurred during execution
          items:
            $ref: '#/components/schemas/Neo4jError'
        commit:
          type: string
          description: URI to commit the transaction
          example: http://localhost:7474/db/neo4j/tx/1/commit
        transaction:
          type: object
          description: Transaction metadata
          properties:
            expires:
              type: string
              description: Timestamp when the transaction will expire if idle
              example: Wed, 01 Jan 2025 12:00:30 +0000
    GraphNode:
      type: object
      description: A node returned in graph result format.
      properties:
        id:
          type: string
          description: The internal node ID
        labels:
          type: array
          description: Labels assigned to the node
          items:
            type: string
        properties:
          type: object
          description: Key-value properties of the node
          additionalProperties: true
    CypherStatement:
      type: object
      description: A single Cypher statement with optional parameters and result format.
      required:
      - statement
      properties:
        statement:
          type: string
          description: The Cypher query string to execute
          example: MATCH (n) RETURN n LIMIT 10
        parameters:
          type: object
          description: Named parameters for the Cypher query. Always use parameters instead of string concatenation to prevent Cypher injection.
          additionalProperties: true
          example:
            name: Alice
            age: 30
        resultDataContents:
          type: array
          description: Requested result formats. Possible values include row and graph.
          items:
            type: string
            enum:
            - row
            - graph
        includeStats:
          type: boolean
          description: Whether to include query execution statistics in the response
          default: false
    ErrorResponse:
      type: object
      description: Response containing one or more errors.
      properties:
        results:
          type: array
          description: Empty or partial results
          items: {}
        errors:
          type: array
          description: Array of errors that occurred
          items:
            $ref: '#/components/schemas/Neo4jError'
    TransactionRequest:
      type: object
      description: Request body for executing Cypher statements within a transaction.
      properties:
        statements:
          type: array
          description: Array of Cypher statements to execute within the transaction
          items:
            $ref: '#/components/schemas/CypherStatement'
    QueryStatistics:
      type: object
      description: Statistics about query execution.
      properties:
        contains_updates:
          type: boolean
          description: Whether the query modified the database
        nodes_created:
          type: integer
          description: Number of nodes created
        nodes_deleted:
          type: integer
          description: Number of nodes deleted
        properties_set:
          type: integer
          description: Number of properties set
        relationships_created:
          type: integer
          description: Number of relationships created
        relationships_deleted:
          type: integer
          description: Number of relationships deleted
        labels_added:
          type: integer
          description: Number of labels added to nodes
        labels_removed:
          type: integer
          description: Number of labels removed from nodes
        indexes_added:
          type: integer
          description: Number of indexes created
        indexes_removed:
          type: integer
          description: Number of indexes removed
        constraints_added:
          type: integer
          description: Number of constraints created
        constraints_removed:
          type: integer
          description: Number of constraints removed
    Neo4jError:
      type: object
      description: An error returned by the Neo4j server.
      properties:
        code:
          type: string
          description: Neo4j error code in the format Neo.ErrorClassification.Category.Title
          example: Neo.ClientError.Statement.SyntaxError
        message:
          type: string
          description: Human-readable error message
          example: Invalid input 'X'
  parameters:
    transactionId:
      name: transactionId
      in: path
      required: true
      description: The unique identifier of an open transaction, returned in the Location header when a transaction is opened.
      schema:
        type: string
    databaseName:
      name: databaseName
      in: path
      required: true
      description: The name of the database to execute queries against. Use neo4j for the default database.
      schema:
        type: string
        example: neo4j
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication using the Neo4j database username and password encoded as a base64 hash.
externalDocs:
  description: Neo4j HTTP API Documentation
  url: https://neo4j.com/docs/http-api/current/