Skip to Content
Open Retainer
Events

Move events to a different type

POST
/v1/events/move

Use dryRun to preview the change. Applying a move requires a user with admin scope. Requires the schema:write scope.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A workspace API key.

Request Body

application/json
  1. body
from*string

The event type the events have now (API name), e.g. "meeting".

Length1 <= length <= 100
to*string

The event type they move to (API name), e.g. "conversation".

Length1 <= length <= 100
events?array<>

Only these events, all of type from (at most 1000). Without it, every live event of from moves.

Items1 <= items <= 1000
fields?

Source field name to target field name, for fields named differently, e.g. { "agenda": "topic" }. Other fields map by name; title and summary always map to the target's own.

Default{}
drop?array<>

Source fields whose values you agree to delete because the target has no field for them. Without it, a move that would lose values is refused with the list.

Itemsitems <= 200
Default[]
defaults?

Target field values for moved events that have no value for that field, written as if logged with the event, e.g. { "medium": "meeting" } when moving meetings to conversation.

Default{}
dryRun?boolean

Check the move and report what it would do, changing nothing.

Defaultfalse

Response Body

Successful response.

application/json
  1. response
id*|null
dryRun*boolean
from*string
to*string
eventIds*array<>
fields*array<>
dropped*array<>
defaults*array<>
Example Request
curl -X POST 'https://retainer.tamloot.cc/v1/events/move' \  -H 'Authorization: Bearer YOUR_WORKSPACE_API_KEY' \  -H 'Content-Type: application/json' \  -d '{  "from": "meeting",  "to": "conversation",  "defaults": {    "medium": "meeting"  },  "dryRun": true}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "dryRun": true,  "from": "string",  "to": "string",  "eventIds": [    "e850fa5b-aba1-4239-8c42-22b92a305f16"  ],  "fields": [    {      "from": "string",      "to": "string",      "events": -9007199254740991    }  ],  "dropped": [    {      "field": "string",      "events": -9007199254740991,      "assertions": -9007199254740991    }  ],  "defaults": [    {      "field": "string",      "events": -9007199254740991    }  ]}