POST
/v1/me/mail/messages/{id}/assignAlways the whole conversation, and there is no parameter offering otherwise. Assignment lives on the exchange precisely because an exchange has one owner; a per-message version would be a way to give two people halves of the same job.
Whoever it goes to has to be able to open the mailbox it is in. Filing it with
somebody who cannot see that mailbox puts it where they will never find it, so
that is a 404 rather than a silent success.
Request
curl -X POST https://api.proppertrading.com/v1/me/mail/messages/msg_h3k8q2w7n4r9t5vx/assign \
-H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 9c3d5e77-2b1a-4f8e-9d0c-1a2b3c4d5e6f" \
-d '{"user_id": "usr_t7q3m8k2x9n4w6pb"}'
| Field | Type | Description |
|---|---|---|
user_id | string or null | Who takes it, as the id from list assignees. null puts it back on nobody's plate. Required, and may be null |
Response
{
"data": {
"object": "mail_assignment",
"message_id": "msg_h3k8q2w7n4r9t5vx",
"thread_id": "thr_c4n8w2k7p5x9m3qd",
"assignee": { "id": "usr_t7q3m8k2x9n4w6pb", "name": "Han Aarts" }
},
"meta": { "request_id": "req_01kz4bkr1aj1gv63d8fv3133ey" }
}
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | missing_idempotency_key | Every POST needs one |
| 403 | insufficient_scope | This device does not hold mail:write |
| 404 | resource_not_found | No such message, or nobody with that id can be handed it. A number in the path finds no message |
| 422 | validation_failed | user_id was not sent at all, or sent as a number rather than a string. Send null to unassign |