Create a Message changedapi/messages/create
Nearest release: v2.1.328, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+124added
Lines−0removed
From line
4,450
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits31to this page, all time
## Errors
The whole hunk
from line 4450, old and new numbered
/
from line 4450
44504450
44514451 - `index: number`
44524452
4453## Errors
4454
4455Any method can also return the general [HTTP errors](https://platform.claude.com/docs/en/api/errors?sdk_languages=http).
4456
4457Each code below is the value of `error.details.error_code` in the response body.
4458
4459On a streaming call, the errors listed below apply when the API rejects the request before the stream starts. Once the stream has started, the response status is already 200, so a later error comes through the stream, with no status of its own. To identify it, use `error.details.error_code` if the error has one, and `error.type` if not.
4460
4461- `available_tools_limit_exceeded` (HTTP status 400)
4462
4463 The tools available after a message exceed a limit on their number or their size.
4464
4465- `claude_code_key_creator_not_member` (HTTP status 400)
4466
4467 The API key belongs to the Claude Code workspace, and the user who created it is no longer a member of the organization or of that workspace.
4468
4469- `claude_code_version_too_old` (HTTP status 400)
4470
4471 The request comes from a Claude Code version older than the minimum that the requested model or the organization requires. Update Claude Code, then retry.
4472
4473- `cmek_key_disabled` (HTTP status 400)
4474
4475 The workspace's customer-managed encryption key is disabled or revoked. Re-enable the key, then retry.
4476
4477- `cmek_key_network_blocked` (HTTP status 400)
4478
4479 The key management service's network access controls blocked the request to the workspace's customer-managed encryption key. The key itself may be healthy.
4480
4481- `compaction_block_ambiguous` (HTTP status 400)
4482
4483 `messages` holds more than one `compaction` block with content. Send only the block the conversation returned last.
4484
4485- `compaction_block_misplaced` (HTTP status 400)
4486
4487 The `compaction` block is not the first block of the conversation, or is in a `system` message.
4488
4489- `compaction_content_mismatch` (HTTP status 400)
4490
4491 The `compaction` block's `content` differs from the text its `signature` recorded.
4492
4493- `compaction_incomplete_turn` (HTTP status 400)
4494
4495 The compaction request ends on an `assistant` turn that is not finished.
4496
4497- `compaction_nothing_to_summarize` (HTTP status 400)
4498
4499 `messages` holds no `user` or `assistant` content to summarize or adopt.
4500
4501- `compaction_signature_invalid` (HTTP status 400)
4502
4503 The `compaction` block's `signature` does not verify.
4504
4505- `compaction_too_many_tool_references` (HTTP status 400)
4506
4507 The conversation references more distinct tools than a `compaction` block can record.
4508
4509- `compaction_tool_changes_mismatch` (HTTP status 400)
4510
4511 The `compaction` block's `tool_changes` differs from what was returned with the block.
4512
4513- `organization_on_hold` (HTTP status 400)
4514
4515 Anthropic has disabled the organization for trust and safety reasons. An organization disabled for any other reason, such as billing, does not get this code. `appeal_url`, when present, is where the organization can appeal.
4516
4517- `request_body_encoding_invalid` (HTTP status 400)
4518
4519 The request body is not valid for its `Content-Encoding`.
4520
4521- `request_body_encoding_unsupported` (HTTP status 400)
4522
4523 The request's `Content-Encoding` is not supported.
4524
4525- `thread_already_continued` (HTTP status 400)
4526
4527 The response that `previous_message_id` names has already been continued, and each response can be continued only once. Continue from the Thread's most recent response `id`.
4528
4529- `thread_continue_in_flight` (HTTP status 400)
4530
4531 Another request is still continuing from the same `previous_message_id`. Wait for it to complete and continue from its response `id`, or replay the full conversation with `thread: {"type": "create"}`.
4532
4533- `thread_fingerprint_mismatch` (HTTP status 400)
4534
4535 A field that must stay the same across a Thread's turns differs from the value stored with the Thread; the message names each such field. Send the stored values, or replay the full conversation with `thread: {"type": "create"}` to change them.
4536
4537- `thread_unsupported_request` (HTTP status 400)
4538
4539 The request combines `thread` with a request field or an organization setting that Threads do not support; `unsupported`, when present, names it. Send the full conversation without `thread`, or change that field.
4540
4541- `tool_name_conflict` (HTTP status 400)
4542
4543 A tool made available in `messages` takes a name that an available tool of another kind, or of another MCP server, already holds.
4544
4545- `tool_reference_unresolved` (HTTP status 400)
4546
4547 A tool change or MCP tool listing references a tool or MCP server that is not defined at that position in the conversation.
4548
4549- `thread_not_found` (HTTP status 404)
4550
4551 No usable Thread state was found for `previous_message_id`. Replay the full conversation with `thread: {"type": "create"}` to start a new Thread.
4552
4553- `skill_read_blocked_undecryptable` (HTTP status 409)
4554
4555 A custom skill the request names is stored under an encryption key state the workspace cannot currently decrypt.
4556
4557- `request_body_too_large_after_decoding` (HTTP status 413)
4558
4559 The compressed request body exceeds the request size limit once decoded.
4560
4561- `enforced_spend_limit_reached` (HTTP status 429)
4562
4563 The organization has crossed the monthly API usage threshold of its API tier.
4564
4565- `ramp_limit_exceeded` (HTTP status 429)
4566
4567 The request would exceed a ramp limit, which caps how fast usage can grow. Retry after the time in the `retry-after` header.
4568
4569- `cmek_key_unreachable` (HTTP status 503)
4570
4571 The workspace's customer-managed encryption key could not be reached. Retry the request; if this continues, check that the key is available in your key management service, or contact Anthropic support.
4572
4573- `compaction_unavailable` (HTTP status 529)
4574
4575 The compaction could not be completed for a transient server reason. Retry the request.
4576
44534577## Example
44544578
44554579```bash
No line in this hunk matches that.