Ingest Motion
POST
/users/{user_id}/motion-intervals
const url = 'https://example.com/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/motion-intervals';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"intervals":[{"ended_at":"2026-04-15T12:00:00Z","mode":"automotive","started_at":"2026-04-15T12:00:00Z"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/motion-intervals \ --header 'Content-Type: application/json' \ --data '{ "intervals": [ { "ended_at": "2026-04-15T12:00:00Z", "mode": "automotive", "started_at": "2026-04-15T12:00:00Z" } ] }'Bulk-ingest automotive motion intervals from Core Motion history. Idempotent on
(user, started_at). Auth: the caller’s token must match user_id.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”user_id
required
User Id
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
MotionIntervalBatchIngest
object
intervals
required
Intervals
Array<object>
MotionIntervalIngestobject
ended_at
required
Ended At
string format: date-time
mode
Mode
string
started_at
required
Started At
string format: date-time
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
MotionIntervalIngestResult
object
created
required
Created
integer
skipped
required
Skipped
integer
Examplegenerated
{ "created": 1, "skipped": 1}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}