Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Merge topics

Not supported yet: the call changes nothing and returns 501 NOT_IMPLEMENTED, or 404 with data.reason archived_in_v1_to_v2_migration when an ID names a topic archived in the v1 to v2 migration. Merging will return with a v2 topic merge. To retire a duplicate topic, archive it with POST /topics/{topicId}/archive.

POST/topics/merge
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
sourceTopicIdsstring<uuid>[]required

IDs of topics to merge into the target. Must not include the target topic ID.

min items 1 · max items 50
Show properties
Array of string<uuid>
Any of:
string<uuid>
string<uuid>
string<uuid>
string<uuid>
targetTopicIdstring<uuid>required

ID of the topic to merge into. Must not be in the sourceTopicIds array.

Show properties
Any of:
string<uuid>
string<uuid>
string<uuid>
string<uuid>
Responses
200

OK

mergedCountnumberrequired

Number of topics that were merged into the target.

targetTopicIdstring<uuid>required

ID of the topic that received the merged content.

Show properties
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 POST 'https://api.modem.dev/v1/topics/merge' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "sourceTopicIds": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "targetTopicId": "a31cfb13-6940-44d1-a52b-ec684dd9b414"
}'
Response
{
  "mergedCount": 0,
  "targetTopicId": "a31cfb13-6940-44d1-a52b-ec684dd9b414"
}

Was this page helpful?