# POST /v1/sessions/{session_id}/participants - Add a session participant

Source: <https://everruns.com/docs/api/operations/add_session_participant/>

POST

/v1/sessions/{session\_id}/participants

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sessions/example/participants';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"agent_id":"agent_01933b5a00007000800000000000001","kind":"agent","role":"host"}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/sessions/example/participants \
  --header 'Content-Type: application/json' \
  --data '{ "agent_id": "agent_01933b5a00007000800000000000001", "kind": "agent", "role": "host" }'
```

* Production APIapp.everruns.com/api/v1/sessions/{session\_id}/participants

## Parameters

### Path Parameters

**session\_id**

required

string

Session ID (prefixed, e.g., session\_…)

## Request Bodyrequired

Media typeapplication/json

Request to add a participant to a session.

object

**agent\_id**

Agent to add when `kind` is `agent`.

string | null

##### Example

```plaintext
agent_01933b5a00007000800000000000001
```

**kind**

required

Participant kind to add.

string

Allowed values: agent user

**role**

One of:

* string

  Participant role. Omit for ordinary members. Host assignment is managed by session creation.

  string

  Allowed values: host member

* null

  null

## Responses

### 201

Participant added successfully

Media typeapplication/json

Session participant - an agent or user that has joined a session.

object

**agent\_id**

Present for agent participants.

string | null

**display\_name**

Human-readable name captured for this participant.

string | null

**id**

required

Unique identifier for the participant row (format: part\_{32-hex}).

string

**joined\_at**

required

string format: date-time

**kind**

required

Kind of actor participating in a session.

string

Allowed values: agent user

**left\_at**

string | null format: date-time

**principal\_id**

required

Principal that joined the session.

string

**role**

required

Role a participant has inside a session.

string

Allowed values: host member

**session\_id**

required

Session this participant belongs to.

string

##### Example

```json
{
  "agent_id": "agent_01933b5a00007000800000000000001",
  "id": "part_01933b5a00007000800000000000001",
  "kind": "agent",
  "principal_id": "principal_01933b5a000070008000000000000001",
  "role": "host",
  "session_id": "session_01933b5a00007000800000000000001"
}
```

### 400

Invalid participant request

### 404

Session or agent not found

### 409

Participant conflicts with current membership

### 500

Internal server error