# Update participant by  v key and value

## Update conversation participant by contact

> Update a participant's status in the conversation by specifying their identifier key and value. For more information on identifier keys and values, please refer to the "Conversation Participants" page.<br>

```json
{"openapi":"3.0.3","info":{"title":"Conversations","version":"v1"},"tags":[{"name":"conversation_participant","description":"Manage the participants of a conversation."}],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"UpdateParticipant":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"status":{"type":"string","description":"Participant status in the conversation.","enum":["pending","invited","active"],"nullable":true}}},"Participant":{"type":"object","description":"A participant who can send and receive messages in the conversation","title":"ConversationParticipant","additionalProperties":false,"properties":{"id":{"type":"string","description":"Participant ID, the meaning of this field depends on `type`. If `type` is `user` then it's a user ID, if `type` is `contact` then it's a contact ID, if `type` is `accessKey` then it's the access key ID, and so on.\n"},"displayName":{"type":"string","description":"The participant's name."},"avatarUrl":{"type":"string","description":"An URL to the participant's avatar."},"contact":{"$ref":"#/components/schemas/ParticipantContact"},"type":{"$ref":"#/components/schemas/ParticipantType"},"status":{"type":"string","description":"Participant status in the conversation. `pending` means it's pending approval, `invited` means it's pending acceptance from the participant, and `active` means the participant can send and receive messages.\n","enum":["pending","invited","active"],"default":"active"}},"required":["id","type"]},"ParticipantContact":{"type":"object","description":"The participant's contact information. For more information on identifier keys and values, please refer to the \"Conversation Participants\" page.\n","additionalProperties":false,"properties":{"identifierKey":{"type":"string","description":"Identifier key of the contact depending on which channel is being used."},"identifierValue":{"type":"string","description":"Identifier of the contact, such as a phone number or email address"},"platformAddress":{"type":"string","description":"Identifier of the contact, such as a phone number or email address"},"platformAddressSelector":{"type":"string","description":"An expression to determine the contact's platform address (such as email or phone number) dynamically when sending messages in advanced use cases."}}},"ParticipantType":{"type":"string","description":"Participant type. The main ones are `user`, `contact`, and `agent`. `user` is a user belonging to your Bird workspace, `contact` is one of your customers, `agent` is a customer service agent, and the remaining types represent system participants.\n","enum":["user","contact","agent","flow","bot","accessKey","channel","connector","collaborationAutomation"]},"NotFoundError":{"additionalProperties":false,"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","pattern":"^([A-Z][a-z]*)+$"},"message":{"type":"string","description":"A human-readable message that describes the error."},"details":{"type":"object","description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.","additionalProperties":true}},"required":["code","message"]},"ConflictError":{"additionalProperties":false,"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","pattern":"^([A-Z][a-z]*)+$"},"message":{"type":"string","description":"A human-readable message that describes the error."},"details":{"type":"object","description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.","additionalProperties":true}},"required":["code","message"]},"ValidationError":{"title":"A validation error description","additionalProperties":false,"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","pattern":"^([A-Z][a-z]*)+$"},"message":{"type":"string","description":"A human-readable message that describes the error."},"details":{"type":"object","description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.","additionalProperties":true}},"required":["code","message"]}},"responses":{"notFound":{"description":"The resource specified in the URL was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"conflict":{"description":"The resource is in a conflicting state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"validationFailed":{"description":"The request body did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/workspaces/{workspaceId}/conversations/{conversationId}/participants/{identifierKey}/{identifierValue}":{"patch":{"summary":"Update conversation participant by contact","operationId":"updateConversationParticipantByContact","description":"Update a participant's status in the conversation by specifying their identifier key and value. For more information on identifier keys and values, please refer to the \"Conversation Participants\" page.\n","tags":["conversation_participant"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateParticipant"}}}},"responses":{"200":{"description":"Participant was updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Participant"}}}},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validationFailed"}}}}}}
```

## Examples

{% tabs %}
{% tab title="Request" %}

```bash
curl -X PATCH "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversations/c9c60caa-eaf5-4628-9687-91de4d452bfa/participants/emailaddress/john.doe@bird.com" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "status": "active"
}'
```

{% endtab %}

{% tab title="Response (200 - OK)" %}

```json
{
  "id": "3954d22c-96f7-4bc3-817b-67b4d903ed90",
  "type": "contact",
  "status": "active",
  "displayName": "",
  "avatarUrl": "",
  "contact": {
    "identifierKey": "emailaddress",
    "identifierValue": "john.doe@bird.com",
    "platformAddress": "john.doe@bird.com"
  }
}
```

{% endtab %}
{% endtabs %}
