---
updatedAt: 2026-07-16T22:09:05.000Z
---

# Adds a host to an event session

Adds a user as a host of the event session. Atomic and idempotent: adding a user who is already a host returns 200 without duplicating. The user must belong to your organization. Hosts are readable on the session as host_user_ids and usable in message templates via the {{ event-session.hosts }}, {{ event-session.host }}, and {{ event-session.host-names }} merge tags.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "API V1",
    "version": "v1"
  },
  "paths": {
    "/event_sessions/{id}/hosts": {
      "post": {
        "summary": "Adds a host to an event session",
        "tags": [
          "Event Sessions"
        ],
        "description": "Adds a user as a host of the event session. Atomic and idempotent: adding a user who is already a host returns 200 without duplicating. The user must belong to your organization. Hosts are readable on the session as host_user_ids and usable in message templates via the {{ event-session.hosts }}, {{ event-session.host }}, and {{ event-session.host-names }} merge tags.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identifier of the event session",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "host added"
          },
          "404": {
            "description": "user or event session not found"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "ID of the user to add as a host",
                    "nullable": false
                  }
                },
                "required": [
                  "user_id"
                ]
              }
            }
          },
          "required": true,
          "description": "The user to add as a host"
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.solidarity.tech/v1",
      "variables": {
        "defaultHost": {
          "default": "api.solidarity.tech/v1"
        }
      }
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```