---
title: "Spawn Create Categories Job"
description: "How to call Spawn Create Categories Job (POST /api/catalog-category-bulk-create-jobs/) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/v2023-10-15/reference/spawn_create_categories_job"
revision: "2023-10-15"
latestUrl: "https://developers.klaviyo.com/en/reference/bulk_create_catalog_categories"
operationId: "spawn_create_categories_job"
method: "POST"
endpoint: "https://a.klaviyo.com/api/catalog-category-bulk-create-jobs/"
authentication: "privateKey"
scopes: ["catalogs:write"]
rateLimits: {"burst":"75/s","steady":"700/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
related: ["https://developers.klaviyo.com/en/v2023-10-15/reference/catalogs/llms.txt","https://developers.klaviyo.com/en/v2023-10-15/reference/get_catalog_categories.md","https://developers.klaviyo.com/en/v2023-10-15/reference/create_catalog_category.md","https://developers.klaviyo.com/en/v2023-10-15/reference/get_create_categories_jobs.md","https://developers.klaviyo.com/en/v2023-10-15/reference/get_update_categories_jobs.md","https://developers.klaviyo.com/en/v2023-10-15/reference/spawn_update_categories_job.md","https://developers.klaviyo.com/en/v2023-10-15/reference/get_delete_categories_jobs.md","https://developers.klaviyo.com/en/v2023-10-15/reference/spawn_delete_categories_job.md","https://developers.klaviyo.com/en/v2023-10-15/reference/get_catalog_item_categories.md","https://developers.klaviyo.com/en/v2023-10-15/reference/get_catalog_category.md","https://developers.klaviyo.com/en/v2023-10-15/reference/update_catalog_category.md","https://developers.klaviyo.com/en/v2023-10-15/reference/delete_catalog_category.md","https://developers.klaviyo.com/en/v2023-10-15/reference/get_create_categories_job.md","https://developers.klaviyo.com/en/v2023-10-15/reference/get_update_categories_job.md","https://developers.klaviyo.com/en/v2023-10-15/reference/get_delete_categories_job.md"]
---

# Spawn Create Categories Job

> This is the Markdown version of https://developers.klaviyo.com/en/v2023-10-15/reference/spawn_create_categories_job

```http
POST https://a.klaviyo.com/api/catalog-category-bulk-create-jobs/
```

Create a catalog category bulk create job to create a batch of catalog categories.

Accepts up to 100 catalog categories per request. The maximum allowed payload size is 4MB.

- Revision header: `revision: 2023-10-15` (required)
- Scopes: `catalogs:write`
- Rate limits: Burst: `75/s`, Steady: `700/m`

## Example request

```bash
curl --request POST \
     --url 'https://a.klaviyo.com/api/catalog-category-bulk-create-jobs/' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/json' \
     --header 'revision: 2023-10-15' \
     --header 'content-type: application/json' \
     --data '{
  "data": {
    "type": "catalog-category-bulk-create-job",
    "attributes": {
      "categories": {
        "data": [
          {
            "type": "catalog-category",
            "attributes": {
              "external_id": "SAMPLE-DATA-CATEGORY-APPAREL",
              "name": "Sample Data Category Apparel",
              "integration_type": "$custom",
              "catalog_type": "$default"
            }
          }
        ]
      }
    }
  }
}'
```

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2023-10-15`

## Request body

Content type: `application/json` (required)

- `data` (object, required)
  - `type` (string, required): Allowed values: `catalog-category-bulk-create-job`
  - `attributes` (object, required)
    - `categories` (object, required): Array of catalog categories to create.
      - `data` (object[], required): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.

### Example request body

```json
{
  "data": {
    "type": "catalog-category-bulk-create-job",
    "attributes": {
      "categories": {
        "data": [
          {
            "type": "catalog-category",
            "attributes": {
              "external_id": "SAMPLE-DATA-CATEGORY-APPAREL",
              "name": "Sample Data Category Apparel",
              "integration_type": "$custom",
              "catalog_type": "$default"
            }
          }
        ]
      }
    }
  }
}
```

## Responses

### 202: Success

Content type: `application/json`

- `data` (object, required)
  - `type` (string, required): Allowed values: `catalog-category-bulk-create-job`
  - `attributes` (object, required)
    - `job_id` (string, required): Unique identifier for retrieving the job. Generated by Klaviyo.
    - `status` (string, required): Status of the asynchronous job. Allowed values: `cancelled`, `complete`, `processing`, `queued` Example: `processing`
    - `created_at` (string<date-time>, required): The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm). Example: `2022-11-08T00:00:00`
    - `total_count` (integer, required): The total number of operations to be processed by the job. See `completed_count` for the job's current progress. Example: `10`
    - `completed_count` (integer): The total number of operations that have been completed by the job. Default: `0` Example: `9`
    - `failed_count` (integer): The total number of operations that have failed as part of the job. Default: `0` Example: `1`
    - `completed_at` (string<date-time>): Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm). Example: `2022-11-08T00:00:00`
    - `errors` (object[]): Array of errors encountered during the processing of the job.
      - `id` (string, required): Unique identifier for the error. Example: `e4eebb08-b055-4a6f-bb13-c8cb69c9eb94`
      - `code` (string, required): A code for classifying the error type. Example: `invalid`
      - `title` (string, required): A high-level message about the error. Example: `Invalid input`
      - `detail` (string, required): Specific details about the error. Example: `The payload provided in the request is invalid.`
      - `source` (object, required): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
    - `expires_at` (string<date-time>): Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm). Example: `2022-11-08T00:00:00`
  - `relationships` (object)
    - `categories` (object)
      - `data` (object[], required): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
      - `links` (object): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
  - `links` (object, required)
    - `self` (string<uri>, required)

#### Example response body

```json
{
  "data": {
    "type": "catalog-category-bulk-create-job",
    "attributes": {
      "job_id": "string",
      "status": "processing",
      "created_at": "2022-11-08T00:00:00",
      "total_count": 10,
      "completed_count": 9,
      "failed_count": 1,
      "completed_at": "2022-11-08T00:00:00",
      "errors": [
        {
          "id": "e4eebb08-b055-4a6f-bb13-c8cb69c9eb94",
          "code": "invalid",
          "title": "Invalid input",
          "detail": "The payload provided in the request is invalid.",
          "source": {
            "pointer": "/data"
          }
        }
      ],
      "expires_at": "2022-11-08T00:00:00"
    },
    "relationships": {
      "categories": {
        "data": [
          {
            "type": "catalog-category",
            "id": "$custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL"
          }
        ],
        "links": {
          "self": "https://www.example.com",
          "related": "https://www.example.com"
        }
      }
    },
    "links": {
      "self": "https://www.example.com"
    }
  }
}
```

### 4XX: Client Error

Content type: `application/json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
