Change a message participant without checks
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/message-participants/v1-participant-update-patch.md. Index of every page and the rules for every call: /llms.txt. Guides and concepts in one file: /llms-full.txt. OpenAPI: /openapi.json.
PATCH/
Use PUT to change a message participant. PATCH does the same but does not validate the fields: an unsupported status value is accepted and saved directly. Address and contact immutability rules still apply and can return 422. Leaving out status still resets it to all.
Business rules
statusismessage,notification,allordisabled; left out, it becomesall.- A participant's email address can't change. Without
type, sending anemailother than the address stored on the participant (compared ignoring case and surrounding spaces) is refused: 422participant_email_immutable, "A recipient's email address can't be changed. Add the new address as a new recipient." For a contact or team member, theemailyou read comes from their own record, not from the participant, so sending it back can be refused: leaveemailout. - Sending
type(whatever its value) needscontact_id, a contact of your team (otherwise 404).type: "guest"can't be used here. - The participant's contact can't be switched.
contact_idmay be the current contact (nothing changes) or, only for a guest, a contact of the order's customer (or the purchase order's vendor) whose email is the guest's address: the guest then becomes that contact. Anything else, including a team member, is refused: 422participant_destination_immutable, "A recipient can't be switched to another contact. Add the contact as a new recipient." - A refused change saves nothing, not even
status.
Side effects
- Changes what the participant receives from the order's future customer emails and texts. Past messages are unchanged.
- People with the order open see the change live.
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
The participant's
id, from the order's participant list. A hash id; unique keys and document numbers are refused with 404.- Example
vKNPqQz8fsYDuT
- Example
Request body
application/json, optional.
typestringSend
contacttogether withcontact_idto turn a guest into that contact. Sendingtypealways requirescontact_id.- Always
"contact"
- Always
can_receive_mailbooleanUnchanged when left out.
can_receive_smsbooleanUnchanged when left out.
contact_idstringA contact of your team. Used only with
type. It must be the participant's current contact or, for a guest, a contact of the order's customer (or the purchase order's vendor) with the guest's email address.emailstring (email)Can't be changed: leave it out. Without
type, an address other than the one stored on the participant is refused with 422participant_email_immutable; the same address (ignoring case and surrounding spaces) changes nothing. Ignored withtype.namestringA guest's name. It is saved for contacts and team members too, but their name always comes from their own record.
statusstringWhat they receive. The emails and texts YoPrint sends on the order by itself go only to
allandmessage. Becomesallwhen left out.- One of:
"message","notification","all","disabled"
- One of:
More examples (1)
Keep emails, stop texts
curl -X PATCH 'https://secure.yoprint.com/v1/api/store/your-team/participant/vKNPqQz8fsYDuT' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' \ -H 'X-Yoprint-Decimal-Format: exact-v1' \ -H 'Content-Type: application/json' \ -d '{ "can_receive_mail": true, "can_receive_sms": false, "status": "all" }'Response
200Successful response.
Child fields (24)
can_receive_mailbooleancan_receive_smsbooleancontactobject | nullThe contact's own record (
id,first_name,last_name,email,phone,phone_country,customer_idorvendor_id, and more). Null when the participant has no contact.contact_idstring | nulldelivery_channelstring | nullAlways null here. Set only when the participant is read as one of a message's recipients.
delivery_created_atstring | nullAlways null here. Set only when the participant is read as one of a message's recipients.
delivery_destinationstring | nullAlways null here. Set only when the participant is read as one of a message's recipients.
delivery_destination_namestring | nullAlways null here. Set only when the participant is read as one of a message's recipients.
delivery_idstring | nullAlways null here. Set only when the participant is read as one of a message's recipients.
delivery_latest_error_reasonstring | nullAlways null here. Set only when the participant is read as one of a message's recipients.
delivery_message_idstring | nullAlways null here. Set only when the participant is read as one of a message's recipients.
delivery_participant_idstring | nullAlways null here. Set only when the participant is read as one of a message's recipients.
delivery_statestring | nullAlways null here. Set only when the participant is read as one of a message's recipients.
delivery_statusstring | nullAlways null here. Set only when the participant is read as one of a message's recipients.
delivery_updated_atstring | nullAlways null here. Set only when the participant is read as one of a message's recipients.
emailstring | nullidstringnamestring | nullorder_idstring | nullphonestring | nullA contact's phone. Null for team members and guests.
purchase_order_idstring | nullstatusstringWhat they get. The emails and texts YoPrint sends on the order by itself (approval requests, order details, reminders) go only to
allandmessage;notificationanddisabledget none of them.- One of:
"message","notification","all","disabled"
- One of:
trashedbooleanAlways false here: a removed participant answers 404.
typestringuser: a team member.contact: one of the customer's or vendor's contacts (name, email and phone come from the contact).guest: just a name and email.- One of:
"user","contact","guest"
- One of:
Errors
401The API key is missing or wrong (
unauthenticated).403You are not allowed to do this.
api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only{"message": "Insufficient Permission"}. Other refusals use the error envelope, withunauthorizedoruser_is_not_authorized.404Not found.
page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's.code: null, with a message that starts "No query results for": there is no record with that id.- When
- The participant does not exist, or
typewas sent without a validcontact_id. - Fix
- Use ids from the API, and send
contact_idwhenever you sendtype.
422The request was refused and changed nothing.
validation_failedlists what to fix inerror.fields; other codes name a business rule, explained inerror.message. A few checks answer with only{"message": "..."}. An operation that calls another service (a payment provider, a carrier, an accounting app) can answerconnect_timeout("Please retry again") when that service does not answer in time: the change may or may not have happened there, so read the record back before you retry.- When
- A value is not allowed, for example
statusoremail(PUT) (validation_failed;error.fieldsnames the field). - Fix
- Send values from the lists here.
- When
emaildiffers from the participant's stored address (participant_email_immutable).- Fix
- Leave
emailout. To reach another address, add it as a new participant. - When
contact_idwould switch the participant to another contact (participant_destination_immutable). Only a guest can become a contact, of the order's customer (or the purchase order's vendor), with the same address.- Fix
- Add the contact as a new participant instead.
Related
- GETGet a message participant
/v1/ api/ store/ {team_slug}/ participant/ {id} - POSTAdd a participant to an order
/v1/ api/ store/ {team_slug}/ sales_order/ {hash_id}/ participant
