---
title: "Unpublish Form"
description: "How to call Unpublish Form (POST /api/form-unpublish-jobs) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/reference/unpublish_form"
revision: "2026-10-15"
operationId: "unpublish_form"
aliases: ["create_form_unpublish_job"]
method: "POST"
endpoint: "https://a.klaviyo.com/api/form-unpublish-jobs"
authentication: "privateKey"
scopes: ["forms:write"]
rateLimits: {"burst":"3/s","steady":"60/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/unpublish_form.json"
jsonApi: {"fields":{"form-unpublish-job":["created_at","id","status"]}}
related: ["https://developers.klaviyo.com/en/reference/forms/llms.txt","https://developers.klaviyo.com/en/reference/get_forms.md","https://developers.klaviyo.com/en/reference/get_form.md","https://developers.klaviyo.com/en/reference/create_form.md","https://developers.klaviyo.com/en/reference/update_form.md","https://developers.klaviyo.com/en/reference/delete_form.md","https://developers.klaviyo.com/en/reference/get_form_version.md","https://developers.klaviyo.com/en/reference/publish_form.md","https://developers.klaviyo.com/en/reference/get_versions_for_form.md","https://developers.klaviyo.com/en/reference/get_version_ids_for_form.md","https://developers.klaviyo.com/en/reference/get_form_for_form_version.md","https://developers.klaviyo.com/en/reference/get_form_id_for_form_version.md"]
---

# Unpublish Form

> This is the Markdown version of https://developers.klaviyo.com/en/reference/unpublish_form

```http
POST https://a.klaviyo.com/api/form-unpublish-jobs
```

Unpublish the live version of a form.

The unpublish completes synchronously; the returned job resource cannot be retrieved afterwards. Forms with a live A/B test are not supported and must be unpublished from the form editor.

- Revision header: `revision: 2026-10-15` (required)
- Scopes: `forms:write`
- Rate limits: Burst: `3/s`, Steady: `60/m`
- OpenAPI: [Download this endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/unpublish_form.json)

## Example request

### curl

```bash
curl --request POST \
     --url 'https://a.klaviyo.com/api/form-unpublish-jobs' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2026-10-15' \
     --header 'content-type: application/vnd.api+json' \
     --data '{
  "data": {
    "type": "form-unpublish-job",
    "relationships": {
      "form": {}
    }
  }
}'
```

### CLI

```bash
klaviyo forms unpublish-form \
  -d '{
  "data": {
    "type": "form-unpublish-job",
    "relationships": {
      "form": {}
    }
  }
}'
```

Sign in first with `klaviyo auth login`. [Install the Klaviyo CLI](https://developers.klaviyo.com/en/docs/klaviyo_cli.md)

### Python

```python
from klaviyo_api import KlaviyoAPI

klaviyo = KlaviyoAPI("your-private-api-key")

response = klaviyo.Forms.unpublish_form(
    {
        "data": {
            "type": "form-unpublish-job",
            "relationships": {
                "form": {},
            },
        },
    },
)
```

Install it with `pip install klaviyo-api`. [The Python SDK on GitHub](https://github.com/klaviyo/klaviyo-api-python)

### Node.js

```javascript
import { ApiKeySession, FormsApi } from 'klaviyo-api'

const session = new ApiKeySession('your-private-api-key')
const formsApi = new FormsApi(session)

const response = await formsApi.unpublishForm(
  {
    data: {
      type: 'form-unpublish-job',
      relationships: {
        form: {},
      },
    },
  },
)
```

Install it with `npm install klaviyo-api`. [The Node.js SDK on GitHub](https://github.com/klaviyo/klaviyo-api-node)

### Ruby

```ruby
require 'klaviyo-api-sdk'

KlaviyoAPI.configure do |config|
  config.api_key['Klaviyo-API-Key'] = 'Klaviyo-API-Key your-private-api-key'
end

response = KlaviyoAPI::Forms.unpublish_form(
  {
    data: {
      type: 'form-unpublish-job',
      relationships: {
        form: {},
      },
    },
  },
)
```

Install it with `gem install klaviyo-api-sdk`. [The Ruby SDK on GitHub](https://github.com/klaviyo/klaviyo-api-ruby)

### PHP

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

use KlaviyoAPI\KlaviyoAPI;

$klaviyo = new KlaviyoAPI('your-private-api-key');

$response = $klaviyo->Forms->unpublishForm(
    [
        'data' => [
            'type' => 'form-unpublish-job',
            'relationships' => [
                'form' => new \stdClass(),
            ],
        ],
    ],
);
```

Install it with `composer require klaviyo/api`. [The PHP SDK on GitHub](https://github.com/klaviyo/klaviyo-api-php)

## Query parameters

- `fields[form-unpublish-job]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md) Allowed values: `created_at`, `id`, `status`

## Headers

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

## Request body

Content type: `application/vnd.api+json` (required)

- `data` (object, required)
  - `type` (string, required): Allowed values: `form-unpublish-job`
  - `relationships` (object, required)
    - `form` (object, required)
      - `data` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/unpublish_form.json).

### Example request body

```json
{
  "data": {
    "type": "form-unpublish-job",
    "relationships": {
      "form": {}
    }
  }
}
```

## Responses

### 202: Success

Content type: `application/vnd.api+json`

- `data` (object, required)
  - `type` (string, required): Allowed values: `form-unpublish-job`
  - `id` (string, required): ID of the unpublish job.
  - `attributes` (object, required)
    - `status` (string, required): The status of the job. The unpublish completes synchronously, so this status does not transition and the job cannot be retrieved later. Allowed values: `cancelled`, `complete`, `processing`, `queued`
    - `created_at` (string<date-time>, required): ISO8601 timestamp when the job was created. Example: `2026-07-15T00:00:00Z`
  - `relationships` (object)
    - `form` (object)
      - `data` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/unpublish_form.json).
      - `links` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/unpublish_form.json).
  - `links` (object, required)
    - `self` (string<uri>, required)
- `links` (ObjectLinks): Same fields as the first ObjectLinks above.
- `meta` (object): Response-level metadata
  - `agent_hints` (object): Optional hints emitted by the API for agent callers
    - `next_steps` (string[]): Suggested follow-up actions for agents to take after this response

#### Example response body

```json
{
  "data": {
    "type": "form-unpublish-job",
    "id": "string",
    "attributes": {
      "status": "cancelled",
      "created_at": "2026-07-15T00:00:00Z"
    },
    "relationships": {
      "form": {
        "data": {
          "type": "form",
          "id": "string"
        },
        "links": {
          "self": "https://www.example.com",
          "related": "https://www.example.com"
        }
      }
    },
    "links": {
      "self": "https://www.example.com"
    }
  },
  "links": {
    "self": "https://www.example.com"
  },
  "meta": {
    "agent_hints": {
      "next_steps": [
        "string"
      ]
    }
  }
}
```

### 4XX: Client Error

Content type: `application/vnd.api+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/vnd.api+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"
      }
    }
  ]
}
```
