---
updatedAt: 2026-10-18T16:41:59.000Z
agentTools:
  projectIndex: https://developer.liveswitch.com/llms.txt
---

# Creates a Spark on a project

**Required scope:** `sparks.write`

This endpoint creates a Spark run on a Project.
If Project media is not available, the Spark run waits in the queue.
The Spark run starts automatically when media arrives.
The initial status is always `"queued"`.

If the Spark template has user inputs (`requiresUserInput: true`), first validate them with `POST /v1/spark-templates/{sparkTemplateId}/validate-inputs`.
Then send the validation token from `validationToken` in that response.
Do not send `tasks` with the validation token.

If the Spark template has no user inputs, a validation token is not necessary.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "LiveSwitch Public API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://public-api.production.liveswitch.com/",
      "description": "Public API"
    }
  ],
  "paths": {
    "/v1/projects/{projectId}/sparks": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Creates a Spark on a project",
        "description": "**Required scope:** `sparks.write`",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSparkRequestDto"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSparkResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "sparks.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CreateSparkRequestDto": {
        "type": "object",
        "properties": {
          "sparkTemplateId": {
            "type": "string",
            "description": "The ID of the Spark template to run. Obtain available IDs from GET /v1/spark-templates.",
            "nullable": true,
            "example": "eda160d7-5372-463c-8162-1f84648b93ac"
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SparkTaskInputRequestDto"
            },
            "description": "Input values for tasks in the Spark template, sent only with `skipInputValidation`: true. Normally, validate\r\nthe inputs first with POST /v1/spark-templates/{id}/validate-inputs and send its `validationToken` instead.\r\nThe Spark runs with the template's default task selection, matching Contact Admin.\r\nIdentify each task with `tasks[].codeName` from GET /v1/spark-templates.",
            "nullable": true
          },
          "validationToken": {
            "type": "string",
            "description": "The token returned by POST /v1/spark-templates/{id}/validate-inputs. The Spark runs with the inputs that were\r\nvalidated, without validating them again. Required when the Spark template has user inputs, unless\r\n`skipInputValidation` is true; not needed for a template with no user inputs. Do not send `tasks` with\r\nit. Valid for 24 hours, and only until the Spark template's tasks or inputs change.",
            "nullable": true
          },
          "skipInputValidation": {
            "type": "boolean",
            "description": "Set to true to run with `tasks` as sent, without validating them (no validation token needed).\r\nDefault false: send a `validationToken` from POST /v1/spark-templates/{id}/validate-inputs."
          },
          "shareWith": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional sharing targets for the completed Spark.\r\nAccepted values: `[\"anyone\"]` to generate a public share URL.\r\nOmit or pass an empty array for no public sharing.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateSparkResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for this spark run. Use with GET /v1/sparks/{id}\r\nto poll for status.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Always `queued` — the spark has been accepted and will run when media is available.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SparkTaskInputRequestDto": {
        "type": "object",
        "properties": {
          "codeName": {
            "type": "string",
            "description": "Stable task code name from GET /v1/spark-templates (tasks[].codeName).",
            "nullable": true,
            "example": "identify_opportunity_id"
          },
          "inputs": {
            "type": "object",
            "additionalProperties": {},
            "description": "Input values for this task. Required when the task has required input fields.\r\nKeys are input field keys from tasks[].inputs[].key.\r\nValues are raw scalar values (string, number, or boolean), or a list of them for an input whose\r\n`multiple` is true.\r\nFor a selection input, send back the option you picked exactly as the options lookup returned it:\r\n`{ \"value\": \"8f2c1a94-...\", \"label\": \"John Smith\", \"search\": \"john\" }` (`displayLabel` is accepted for\r\n`label`), or a list of them for a multi-value input. `search` is what validation searches the platform\r\nwith to confirm the value. For a fixed-list dropdown or radio a plain value is enough — its label is filled in for you.\r\nA plain value for a connected input only works where the value is itself the search key (e.g. a job number).",
            "nullable": true,
            "example": {
              "customer_name": {
                "value": "086d9a35-f81d-413d-8188-b3e000bf0775",
                "displayLabel": "Peter Arroyo"
              },
              "quote_number": {
                "value": "89198382-ca9b-426f-bf71-b433015cf4aa",
                "displayLabel": "Quote Number 1245"
              },
              "rooms": [
                {
                  "value": "kitchen",
                  "displayLabel": "Kitchen"
                },
                {
                  "value": "garage",
                  "displayLabel": "Garage"
                }
              ],
              "job_number": "123456"
            }
          }
        },
        "additionalProperties": false,
        "description": "Input values for one task in a Spark report."
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth2 authentication using Auth0 Implicit flow",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://id.staging.liveswitch.com/authorize",
            "scopes": {
              "openid": "OpenID Connect scope",
              "profile": "Access to user profile",
              "email": "Access to user email",
              "me": "Access to user information",
              "contacts": "Read access to contacts",
              "contacts.write": "Write access to contacts",
              "conversations": "Read access to conversations",
              "conversations.write": "Write access to conversations",
              "organizations": "Read access to organizations",
              "webhooks": "Read access to webhooks",
              "webhooks.write": "Write access to webhooks",
              "applications": "Read access to applications",
              "applications.write": "Write access to applications",
              "forms": "Read access to forms",
              "projects": "Read access to projects",
              "projects.write": "Write access to projects",
              "recordings": "Read access to recordings",
              "documents": "Read access to documents",
              "accounts": "Read access to accounts",
              "guided-instructions": "Read access to guided instructions",
              "sparks": "Read access to Spark runs",
              "sparks.write": "Write access to Spark runs",
              "spark-templates": "Read access to installed Spark templates for the organization",
              "scribe-templates": "Read access to installed Scribe templates (legacy)"
            }
          }
        }
      },
      "bearer": {
        "type": "http",
        "description": "<p>Please enter a valid token. This shoud NOT include the Bearer: prefix, but just the token itself.</p>\n            <br/>\n             <p>To generate a token from the Swagger UI:</p>\n             <p>\n               1. Select the 'v1/tokens' endpoint in the Swagger UI<br/>\n               2. Set the 'redirect' setting to false<br/>\n               3. Fill in the values according to your application configuration<br/>\n               4. Click 'Execute'<br/>\n            </p>\n            <br/>\n            <p>\n            The response from this request will include the URL you need to generate a token. Copy/paste it into a new window and follow the instructions.\n            </p>",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ]
}
```

# Sibling pages

* [Creates a project](https://developer.liveswitch.com/reference/post_v1-projects.md)
* [Retrieves a list of projects](https://developer.liveswitch.com/reference/get_v1-projects.md)
* [Gets a project by id](https://developer.liveswitch.com/reference/get_v1-projects-id.md)
* [Updates a project](https://developer.liveswitch.com/reference/put_v1-projects-id.md)
* [Creates presigned URLs for uploading images to a project](https://developer.liveswitch.com/reference/post_v1-projects-id-upload-urls-images.md)
* [Creates presigned URLs for uploading documents to a project](https://developer.liveswitch.com/reference/post_v1-projects-id-upload-urls-documents.md)
* [Creates presigned URLs for uploading videos to a project](https://developer.liveswitch.com/reference/post_v1-projects-id-upload-urls-videos.md)
* [Lists all Spark runs for a project](https://developer.liveswitch.com/reference/get_v1-projects-projectid-sparks.md)