Mockaroo Datasets API

Manage named CSV datasets used as lookup sources.

Documentation

Specifications

Schemas & Data

Other Resources

🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-list-types-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-generate-json-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-generate-csv-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-generate-txt-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-generate-custom-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-generate-sql-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-generate-xml-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-upload-dataset-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-delete-dataset-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-get-download-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-cancel-download-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-field-spec-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-field-type-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-download-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/examples/mockaroo-dataset-example.json
🔗
APIsJSON
https://raw.githubusercontent.com/api-evangelist/mockaroo/refs/heads/main/apis.yml

OpenAPI Specification

mockaroo-datasets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Mockaroo Datasets API
  version: '1.0'
  summary: Realistic Mock Data Generation
  description: Mockaroo provides a REST API for generating realistic mock data on demand using over 150 built-in field types. The API supports schema-based and field-spec-based generation, multiple output formats (JSON, CSV, TXT, custom-delimited, SQL, XML), background jobs for large requests, and management of named datasets used as lookup sources during generation.
  contact:
    name: Mockaroo Support
    url: https://www.mockaroo.com/support
  license:
    name: Mockaroo Terms of Service
    url: https://www.mockaroo.com/terms
servers:
- url: https://api.mockaroo.com
  description: Mockaroo production API
security:
- apiKeyQuery: []
- apiKeyHeader: []
tags:
- name: Datasets
  description: Manage named CSV datasets used as lookup sources.
paths:
  /api/datasets/{name}:
    parameters:
    - $ref: '#/components/parameters/DatasetName'
    post:
      tags:
      - Datasets
      operationId: uploadDataset
      summary: Upload Or Replace A Dataset
      description: Upload a CSV or plain-text dataset under the given name. The dataset can then be used as a lookup source in schemas via the Dataset Column type.
      parameters:
      - name: filename
        in: query
        schema:
          type: string
        description: Optional original filename for the uploaded dataset.
      - name: project
        in: query
        schema:
          type: string
        description: Optional project name in which to store the dataset.
      requestBody:
        required: true
        content:
          text/csv:
            schema:
              type: string
          text/plain:
            schema:
              type: string
      responses:
        '200':
          description: Dataset uploaded successfully.
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      tags:
      - Datasets
      operationId: deleteDataset
      summary: Delete A Dataset
      description: Remove the dataset with the given name.
      responses:
        '204':
          description: Dataset deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Dataset not found.
components:
  parameters:
    DatasetName:
      name: name
      in: path
      required: true
      schema:
        type: string
      description: Name of the dataset.
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        code:
          type: string
      description: Standard error envelope.
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKeyQuery:
      type: apiKey
      in: query
      name: key
      description: Mockaroo API key passed as a query parameter.
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Mockaroo API key passed as a request header.
externalDocs:
  description: Mockaroo API documentation
  url: https://www.mockaroo.com/docs