---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/40005#article
headline: "40005: Assignment Callback response does not contain Instruction"
url: https://www.twilio.com/docs/api/errors/40005
inLanguage: en
dateModified: 2026-06-08T11:29:20.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 40005: Assignment Callback response does not contain Instruction

Log Type: APPLICATION

Log Level: WARNING

## Description

This warning occurs when TaskRouter receives a `200 OK` Assignment Callback response with a JSON body, but that body does not include the required `instruction` key. If you want TaskRouter to take immediate action on the Reservation, return a valid JSON object that includes `instruction`. If you want to handle the Reservation later, return an empty JSON document such as `{}` and update the Reservation through the Reservations API when you are ready.

### Possible causes

* Your Assignment Callback returned JSON that did not include the required `instruction` key.
* Your application attempted to send an assignment instruction, such as `accept`, `reject`, `dequeue`, `call`, or `redirect`, but omitted the `instruction` field from the JSON response.
* Your application intended to defer the decision and handle the Reservation asynchronously, but returned non-empty JSON instead of an empty JSON document such as `{}`.

### Possible solutions

* If you want TaskRouter to act immediately, return `Content-Type: application/json` and a valid JSON object that includes `instruction` with a supported value such as `accept`, `reject`, `dequeue`, `call`, or `redirect`.
* If you want to process the Reservation asynchronously, return an empty JSON document such as `{}` with `200 OK`, then accept or reject the Reservation later through the Reservations API.
* Verify that your Assignment Callback response body is valid JSON and includes `instruction` whenever you return an assignment instruction.

#### Additional resources

* [Handling Assignment Callbacks](/docs/taskrouter/handle-assignment-callbacks)
* [Task Reservation Resource](/docs/taskrouter/api/reservations)
* [Lifecycle of a Task: Workflows and assignment](/docs/taskrouter/lifecycle-task-workflows-and-assignment)
