---
source_url: https://www.pubnub.com/docs/admin-api/create-a-test-input
title: Create a test input
---

# Create a test input

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

Creates a new test input for a function revision. The function revision must belong to the acting account. **Permissions:** `functions.package:write` on `account`

## Request

Example

```
{
  "data": {
    "id": "e5f6a7b8-c9d0-1234-ef01-23456789abcd",
    "functionRevisionId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "payload": {
      "message": "Hello, World!"
    },
    "mimeType": "application/json",
    "description": "Basic chat message payload",
    "createdDttm": "2026-01-15T10:30:00.000Z",
    "updatedDttm": "2026-02-01T14:20:00.000Z"
  },
  "meta": {
    "timestamp": "2026-03-10T12:00:00.000Z",
    "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "errors": []
}
```

Example

```
{
  "meta": {
    "timestamp": "2026-03-10T12:00:00.000Z",
    "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "errors": [
    {
      "code": "FAAS-404",
      "message": "Entity not found"
    }
  ]
}
```

Example

```
{
  "meta": {
    "timestamp": "2026-03-10T12:00:00.000Z",
    "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "errors": [
    {
      "code": "FAAS-404",
      "message": "Entity not found"
    }
  ]
}
```

Example

```
{
  "meta": {
    "timestamp": "2026-03-10T12:00:00.000Z",
    "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "errors": [
    {
      "code": "FAAS-404",
      "message": "Entity not found"
    }
  ]
}
```

Example

```
{
  "meta": {
    "timestamp": "2026-03-10T12:00:00.000Z",
    "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "errors": [
    {
      "code": "FAAS-404",
      "message": "Entity not found"
    }
  ]
}
```

Example

```
{
  "meta": {
    "timestamp": "2026-03-10T12:00:00.000Z",
    "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "errors": [
    {
      "code": "FAAS-404",
      "message": "Entity not found"
    }
  ]
}
```

Example

```
{
  "meta": {
    "timestamp": "2026-03-10T12:00:00.000Z",
    "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "errors": [
    {
      "code": "FAAS-404",
      "message": "Entity not found"
    }
  ]
}
```
