Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Bulk update

Update multiple topics at once. Supports changing priority, archiving (archived=true), and unarchiving (archived=false). At least one field must be provided. Use this instead of calling the single update endpoint multiple times. IDs that match no topic are skipped, and updatedTopicIds lists only the topics that changed. If any ID names a topic archived in the v1 to v2 migration, nothing is changed and the request returns 404 with data.reason archived_in_v1_to_v2_migration.

PATCH/topics/bulk
Authorization
AuthorizationBearer token · headerrequired

Organization API key (modem_…).

Header parameters
Idempotency-Keystring

Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.

max length 255
Request body
requiredapplication/json
archivedboolean

Set to true to archive topics, false to unarchive them.

archivedReasonstring

Optional reason for archiving. Only used when archived=true.

max length 4000
prioritystring

Update all topics to this priority. Valid values: very_low, low, default, high, very_high.

Allowed:defaulthighlowvery_highvery_low
topicIdsstring<uuid>[]required
min items 1 · max items 100
Show properties
Array of string<uuid>
Any of:
string<uuid>
string<uuid>
string<uuid>
string<uuid>
Responses
200

OK

updatedCountnumberrequired
updatedTopicIdsstring<uuid>[]required
Show properties
Array of string<uuid>
Any of:
string<uuid>
string<uuid>
string<uuid>
string<uuid>
400

Invalid request (validation failed).

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

401

Missing or invalid API key.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

403

The API key does not have access to this resource.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

404

The requested resource was not found.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

409

The request conflicts with an existing resource or idempotency operation.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

429

Rate limit exceeded.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

500

Internal server error.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH 'https://api.modem.dev/v1/topics/bulk' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "archived": true,
  "archivedReason": "string",
  "priority": "default",
  "topicIds": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}'
Response
{
  "updatedCount": 0,
  "updatedTopicIds": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}

Was this page helpful?