Events

Validate an event without creating it

Changed on

Checks the body as creating the event in this agenda would - the caller's right to create, the fields the agenda requires, every field value - without creating anything. A valid body answers 200 { "valid": true }; an invalid one answers 422 with per-field problems under error.errors[], and a caller who may not create gets 403.

A native image: { url } is checked for URL syntax only (an http(s) URL without embedded credentials): the URL is not fetched, so a URL that create rejects with 422 at fetch time (unreachable host, private address, over 20 MiB, not an image) passes validate. The image counts as present, so an agenda whose schema requires one validates as it would create.

post/agendas/{agendaUid}/events/validate

Request

  • Base URL: https://api.openagenda.com/v3
  • URL: https://api.openagenda.com/v3/agendas/{agendaUid}/events/validate
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://openagenda.com/api/auth/oauth2/authorize, token URL https://openagenda.com/api/auth/oauth2/token, scopes: events:write)

Path parameters

agendaUidinteger required

Numeric uid of the agenda.

Request body

titleLocalizedString

A string localized per language, keyed by ISO 639-1 code (e.g. fr, en).

descriptionLocalizedString

A string localized per language, keyed by ISO 639-1 code (e.g. fr, en).

longDescriptionLocalizedString

A string localized per language, keyed by ISO 639-1 code (e.g. fr, en).

conditionsLocalizedString

A string localized per language, keyed by ISO 639-1 code (e.g. fr, en).

keywordsLocalizedStringArray

A list of strings localized per language code (used for keywords).

attendanceMode1 | 2 | 3

How attendees take part.

onlineAccessLinkstring uri nullable

Access link for an online or hybrid event (attendanceMode 2 or 3).

state-2 | -1 | 0 | 1 | 2

Moderation state of the event.

status1 | 2 | 3 | 4 | 5 | 6

Lifecycle status of the event.

imageCreditsstring nullable

Credits for the event image. Ignored when the event has no image; null clears them.

canonicalUrlstring uri nullable

The event's own page on its publisher's website, declared by the licensor. Reads fall back on the event's page on its origin agenda; writing that page back declares nothing and is stored as null, as is null itself.

additionalFieldsAdditionalFields

Agenda-specific additional fields. The available keys and the shape of each value are defined by the agenda's event form schema (GET /agendas/{agendaUid}/events/schema): each value follows its field's fieldType. On a write, a key the schema does not declare answers 422.

A file/image field is set by reference, like the native image: stage the bytes via POST /agendas/{uid}/uploads, then send { ref, name? } here (name is the original filename, used for the download; optional), or null to clear it. On read the same field returns the stored descriptor { originalName, extension, filename }, where filename is the stored object's key; the API does not return its absolute URL.

Example request

{
  "title": {
    "fr": "Concert de jazz",
    "en": "Jazz concert"
  },
  "description": {
    "fr": "Concert de jazz",
    "en": "Jazz concert"
  },
  "longDescription": {
    "fr": "Concert de jazz",
    "en": "Jazz concert"
  },
  "conditions": {
    "fr": "Concert de jazz",
    "en": "Jazz concert"
  }
}

Response

The body is valid.

validtrue required

Changes

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • breaking

      added to the response body oneOf list for the response status

    • breaking

      the response's body type changed from object to no type for status

    • breaking

      removed the required property from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      added the new bad_request enum value to the / response property for the response status

    • warning

      added the new bad_request enum value to the / response property for the response status

    • warning

      added the new bad_request enum value to the / response property for the response status

    • warning

      added the new bad_request enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new insufficient_scope enum value to the / response property for the response status

    • warning

      added the new insufficient_scope enum value to the / response property for the response status

    • warning

      added the new insufficient_scope enum value to the / response property for the response status

    • warning

      added the new not_found enum value to the / response property for the response status

    • warning

      added the new not_found enum value to the / response property for the response status

    • warning

      added the new not_found enum value to the / response property for the response status

    • warning

      added the new read_only_credential enum value to the / response property for the response status

    • warning

      added the new read_only_credential enum value to the / response property for the response status

    • warning

      added the new read_only_credential enum value to the / response property for the response status

    • warning

      added the new service_unavailable enum value to the / response property for the response status

    • warning

      added the new service_unavailable enum value to the / response property for the response status

    • warning

      added the new service_unavailable enum value to the / response property for the response status

    • warning

      added the new unauthorized enum value to the / response property for the response status

    • warning

      added the new unauthorized enum value to the / response property for the response status

    • warning

      added the new unauthorized enum value to the / response property for the response status

    • warning

      added the new validation_error enum value to the / response property for the response status

    • info

      added the required property / to the response with the status