Assign a conversation

.md

Put an exchange on somebody's plate, or take it off.

Scopesmail:write
POST/v1/me/mail/messages/{id}/assign

Always 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"}'
FieldTypeDescription
user_idstring or nullWho 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

StatusCodeMeaning
400missing_idempotency_keyEvery POST needs one
403insufficient_scopeThis device does not hold mail:write
404resource_not_foundNo such message, or nobody with that id can be handed it. A number in the path finds no message
422validation_faileduser_id was not sent at all, or sent as a number rather than a string. Send null to unassign