Skip to content
campaiDeveloper
campai.com

Booking · Events

POST/{organizationId}/{mandateId}/booking/events/{eventId}/visibility

Update event visibility

Updates who sees a specific event (everyone, only people linked to the organization in the Community-App, or only staff), where it is listed (only through its link, in the organization's own lists, or also in Discover of the Community-App, which needs everyone) and who may book it (whoever sees it, only staff, or nobody). With applyTo course, every upcoming date of its course is updated as well.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • mandate.read
  • event.edit

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • eventIdidrequired

Body

Content-Type: application/json

  • visibilityobjectrequired
    3 properties
    • audiencestringrequired
      everyone organization staff
    • listingstringrequired
      link own discover
    • bookingstringrequired
      audience staff none
  • applyTostring

    default "date"

    date course
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/booking/events/YOUR_EVENT_ID/visibility' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

Content-Type: application/json

  • insertedid[]
  • updatedid[]
  • deletedid[]
Response200
{
  "inserted": [
    "000000000000000000000001"
  ],
  "updated": [
    "000000000000000000000001"
  ],
  "deleted": [
    "000000000000000000000001"
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.