# Add participant to conversation

## Ensure the conversation has a specific participant

> Add a participant to the conversation if it hasn't already been added

```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","scheme":"AccessKey","type":"http"}},"schemas":{"CreateParticipant":{"nullable":true,"type":"object","oneOf":[{"type":"object","title":"User or flow participant","description":"Create a participant of the user or flow type.\n","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string","description":"ID of the flow or user."},"type":{"type":"string","description":"Participant type.","enum":["user","flow"]},"status":{"type":"string","description":"Participant status in the conversation. Defaults to `active`.","enum":["pending","invited","active"],"default":"active"}}},{"type":"object","title":"Participant with contact ID","description":"Create a participant based on an existing contact. It is optional to set the platformAddressSelector for a given contact to select the attribute for communication.\n","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string","description":"Contact ID."},"type":{"type":"string","description":"Participant type.","enum":["contact"]},"status":{"type":"string","description":"Participant status in the conversation. Defaults to `active`.","enum":["pending","invited","active"],"default":"active"},"contact":{"type":"object","description":"Contact identifier information. For more information on identifier keys and values, please refer to the \"Conversation Participants\" page.\n","additionalProperties":false,"nullable":true,"properties":{"identifierKey":{"type":"string","description":"Identifier key of the contact depending on which channel is being used.","nullable":true},"identifierValue":{"type":"string","description":"Identifier of the contact, such as a phone number or email address.","nullable":true},"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.","nullable":true}}}}},{"type":"object","title":"Participant with contact identifier.","description":"Create a participant with an identifier value. The contact will be found, or otherwise created, based on the identifier value.\n","additionalProperties":false,"required":["contact","type"],"properties":{"contact":{"type":"object","description":"Contact identifier 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.","nullable":true},"identifierValue":{"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.","nullable":true}},"required":["identifierValue"]},"type":{"type":"string","description":"Participant type.","enum":["contact"]},"status":{"type":"string","description":"Participant status in the conversation. Defaults to `active`.","enum":["pending","invited","active"],"default":"active"}}}]},"inbox.conversations.participant":{"properties":{"avatarUrl":{"type":"string"},"contact":{"$ref":"#/components/schemas/inbox.conversations.participant_contact"},"conversationId":{"format":"uuid","type":"string"},"createdAt":{"format":"date-time","type":"string"},"displayName":{"type":"string"},"id":{"type":"string"},"resourceUri":{"type":"string"},"status":{"$ref":"#/components/schemas/inbox.conversations.participant_status"},"type":{"$ref":"#/components/schemas/inbox.conversations.participant_type"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","type"],"title":"Conversation Participant","type":"object"},"inbox.conversations.participant_contact":{"properties":{"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"platformAddress":{"type":"string"},"platformAddressSelector":{"type":"string"}},"required":["identifierKey","identifierValue"],"type":"object"},"inbox.conversations.participant_status":{"enum":["invited","pending","active","inactive"],"type":"string"},"inbox.conversations.participant_type":{"enum":["user","contact","agent","flow","bot","accessKey","channel","connector","collaborationAutomation"],"type":"string"},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"},"error.validation":{"additionalProperties":false,"description":"A validation error returned from the API. The `details` map keys are JSON paths\npointing into the request body / parameters; values are arrays of human-readable\nmessages describing each problem with that path.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"Per-field validation messages keyed by JSON path.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"ValidationError","type":"object"}},"responses":{"notFound":{"$ref":"#/components/responses/error.response.not_found"},"error.response.not_found":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"The requested resource was not found."},"duplicate":{"$ref":"#/components/responses/error.response.conflict"},"error.response.conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"The request conflicts with the current state of the resource."},"validationFailed":{"$ref":"#/components/responses/error.response.invalid_request"},"error.response.invalid_request":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.validation"}}},"description":"The request contains invalid parameters or body fields."}}},"paths":{"/workspaces/{workspaceId}/conversations/{conversationId}/participants":{"post":{"summary":"Ensure the conversation has a specific participant","operationId":"createConversationParticipant","description":"Add a participant to the conversation if it hasn't already been added","tags":["conversation_participant"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateParticipant"}}}},"responses":{"200":{"description":"Participant already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inbox.conversations.participant"}}}},"201":{"description":"Participant was added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inbox.conversations.participant"}}}},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/duplicate"},"422":{"$ref":"#/components/responses/validationFailed"}}}}}}
```

## Examples

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

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

{% endtab %}

{% tab title="Response (201 - Created)" %}

```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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/conversations-api/api-reference/conversation-participants/add-participant-to-conversation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
