Schedule a new task
POST/partners/v1/tasks
Starter | Premium | Ultimate |
---|---|---|
✔️ | ✔️ | ✔️ |
Pragmatically schedule a new task to be executed by the given assignees.
For some properties, we support providing several kind of identifiers.
native
are type auto-generated by Mobility Workexternal
are type that you provide from an import or manually through the Web interfaceemail
are e-mails that are associated with your user accountcode
are type auto-generated by Mobility Work or manually through the Web interface
For each type, we support type inference, it means that we automatically detect the type from the value.
- For
assignees
you can mix bothnative
andemail
identifiers. - For
tags
you can mix bothnative
andcode
identifiers. - For
equipment
you can mix bothnative
andexternal
identifiers.
If type cannot be inferred, an error will be generated. You can still force the type by providing a more typed property:
{
"assignees": [
3,
"[email protected]"
]
}
is equivalent to:
{
"assignees": [
{
"type": "native",
"value": 3
},
{
"type": "email",
"value": "[email protected]"
}
]
}
The property metadata
can be used to send any arbitrary data to associate with the task you create. For example,
on task creation, you can define the following metadata:
{
"metadata": {
"internalIdentifier": 1234
}
}
It will be sent back through webhooks. You can set it to set a custom identifier to further correlate a task with any internal value.
Request
Responses
- 201
- 400
- 401
Task successfully scheduled
Request contains invalid data or does not have all required data
Missing or invalid Api Key (e.g. revoked or non-existent)