Create a context

POST /contexts

Create a context

Headers

  • Authorization string

    Bearer token used for authorization

    Minimum length is 1.

  • X-Correlation-Id string

    Unique identifier to allow referencing a particular transaction or event chain

    Minimum length is 1.

  • Accept-Language string

    Returns the requested resources translated according to the passed languages (see translatable resources)

    Minimum length is 1.

application/json

Body

  • externalId string | null

    Minimum length is 1, maximum length is 255.

  • appointmentExternalId string | null

    Minimum length is 1, maximum length is 255.

  • end string(date-time) | null

    Minimum length is 1.

  • metadata object | null

    Additional properties are allowed.

  • employeeIds array[string]

    ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1.

  • secondaryEmployeeIds array[string]

    ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1.

  • subjectIds array[string]

    ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1.

  • subjectGroupIds array[string]

    ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1.

  • listingIds array[string]

    ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1.

  • leadSegmentIds array[string]

    ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1.

  • meetingRoomIds array[string]

    ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1.

  • meetingTypes array[string]

    Values are OFFICE, ON_LOCATION, PHONE, or VIDEO.

  • customerIds array[string]

    ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1.

  • secondaryCustomerIds array[string]

    ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1.

  • start string(date-time) | null

    Minimum length is 1.

  • employeeExternalIds array[string]

    External ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1, maximum length of each is 255.

  • secondaryEmployeeExternalIds array[string]

    External ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1, maximum length of each is 255.

  • officeExternalIds array[string]

    External ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1, maximum length of each is 255.

  • subjectExternalIds array[string]

    External ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1, maximum length of each is 255.

  • subjectGroupExternalIds array[string]

    External ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1, maximum length of each is 255.

  • listingExternalIds array[string]

    External ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1, maximum length of each is 255.

  • leadSegmentCodes array[string]

    External ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1, maximum length of each is 255.

  • customerExternalids array[string]

    External ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1, maximum length of each is 255.

  • secondaryCustomerExternalIds array[string]

    External ID(s) to be considered for filtering

    At least 1 element. Minimum length of each is 1, maximum length of each is 255.

  • customers array[object]
    Hide customers attributes Show customers attributes object
    • externalId string | null

      Minimum length is 1, maximum length is 255.

    • customerNumber string | null

      Minimum length is 1.

    • email string | null

      Minimum length is 1.

    • firstName string | null

      Minimum length is 1.

    • lastName string | null

      Minimum length is 1.

    • company string | null

      Minimum length is 1.

    • language string | null

      Values are da, de, el, en, es, fr, ja, nl, no, or pl.

    • notes string | null

      Minimum length is 1.

    • phoneNumber string | null

      Minimum length is 1.

    • existing boolean | null

      Default value is false.

    • timeZone string | null

      Minimum length is 1.

    • location object | null

      Additional properties are NOT allowed.

      Hide location attributes Show location attributes object | null
      • postalCode string | null

        Minimum length is 1.

      • countryCode string Required

        Minimum length is 2, maximum length is 2.

      • geolocation object | null

        Additional properties are NOT allowed.

        Hide geolocation attributes Show geolocation attributes object | null
        • latitude number Required

          Minimum value is -90, maximum value is 90.

        • longitude number Required

          Minimum value is -180, maximum value is 180.

      • translations object Required

        Additional properties are NOT allowed.

        Hide translations attributes Show translations attributes object
        • city array[object] Required

          At least 1 element.

          Hide city attributes Show city attributes object
          • language string Required

            Values are da, de, el, en, es, fr, ja, nl, no, or pl.

          • value string Required

            Minimum length is 1.

        • state array[object]

          At least 0 elements.

          Hide state attributes Show state attributes object
          • language string Required

            Values are da, de, el, en, es, fr, ja, nl, no, or pl.

          • value string Required

            Minimum length is 1.

        • street1 array[object] Required

          At least 1 element.

          Hide street1 attributes Show street1 attributes object
          • language string Required

            Values are da, de, el, en, es, fr, ja, nl, no, or pl.

          • value string Required

            Minimum length is 1.

        • street2 array[object]

          At least 0 elements.

          Hide street2 attributes Show street2 attributes object
          • language string Required

            Values are da, de, el, en, es, fr, ja, nl, no, or pl.

          • value string Required

            Minimum length is 1.

  • secondaryCustomers array[object]
    Hide secondaryCustomers attributes Show secondaryCustomers attributes object
    • externalId string | null

      Minimum length is 1, maximum length is 255.

    • customerNumber string | null

      Minimum length is 1.

    • email string | null

      Minimum length is 1.

    • firstName string | null

      Minimum length is 1.

    • lastName string | null

      Minimum length is 1.

    • company string | null

      Minimum length is 1.

    • language string | null

      Values are da, de, el, en, es, fr, ja, nl, no, or pl.

    • notes string | null

      Minimum length is 1.

    • phoneNumber string | null

      Minimum length is 1.

    • existing boolean | null

      Default value is false.

    • timeZone string | null

      Minimum length is 1.

    • location object | null

      Additional properties are NOT allowed.

      Hide location attributes Show location attributes object | null
      • postalCode string | null

        Minimum length is 1.

      • countryCode string Required

        Minimum length is 2, maximum length is 2.

      • geolocation object | null

        Additional properties are NOT allowed.

        Hide geolocation attributes Show geolocation attributes object | null
        • latitude number Required

          Minimum value is -90, maximum value is 90.

        • longitude number Required

          Minimum value is -180, maximum value is 180.

      • translations object Required

        Additional properties are NOT allowed.

        Hide translations attributes Show translations attributes object
        • city array[object] Required

          At least 1 element.

          Hide city attributes Show city attributes object
          • language string Required

            Values are da, de, el, en, es, fr, ja, nl, no, or pl.

          • value string Required

            Minimum length is 1.

        • state array[object]

          At least 0 elements.

          Hide state attributes Show state attributes object
          • language string Required

            Values are da, de, el, en, es, fr, ja, nl, no, or pl.

          • value string Required

            Minimum length is 1.

        • street1 array[object] Required

          At least 1 element.

          Hide street1 attributes Show street1 attributes object
          • language string Required

            Values are da, de, el, en, es, fr, ja, nl, no, or pl.

          • value string Required

            Minimum length is 1.

        • street2 array[object]

          At least 0 elements.

          Hide street2 attributes Show street2 attributes object
          • language string Required

            Values are da, de, el, en, es, fr, ja, nl, no, or pl.

          • value string Required

            Minimum length is 1.

Responses

  • 201 application/json

    Successful operation

    Hide response attribute Show response attribute object
    • data object Required

      Additional properties are NOT allowed.

      Hide data attributes Show data attributes object
      • externalId string | null

        Minimum length is 1, maximum length is 255.

      • appointmentExternalId string | null

        Minimum length is 1, maximum length is 255.

      • end string(date-time) | null

        Minimum length is 1.

      • metadata object | null

        Additional properties are allowed.

      • employeeIds array[string]

        ID(s) to be considered for filtering

        At least 1 element. Minimum length of each is 1.

      • secondaryEmployeeIds array[string]

        ID(s) to be considered for filtering

        At least 1 element. Minimum length of each is 1.

      • subjectIds array[string]

        ID(s) to be considered for filtering

        At least 1 element. Minimum length of each is 1.

      • subjectGroupIds array[string]

        ID(s) to be considered for filtering

        At least 1 element. Minimum length of each is 1.

      • listingIds array[string]

        ID(s) to be considered for filtering

        At least 1 element. Minimum length of each is 1.

      • leadSegmentIds array[string]

        ID(s) to be considered for filtering

        At least 1 element. Minimum length of each is 1.

      • meetingRoomIds array[string]

        ID(s) to be considered for filtering

        At least 1 element. Minimum length of each is 1.

      • meetingTypes array[string]

        Values are OFFICE, ON_LOCATION, PHONE, or VIDEO.

      • customerIds array[string]

        ID(s) to be considered for filtering

        At least 1 element. Minimum length of each is 1.

      • secondaryCustomerIds array[string]

        ID(s) to be considered for filtering

        At least 1 element. Minimum length of each is 1.

      • start string(date-time) | null

        Minimum length is 1.

      • id string Required

        Minimum length is 1.

      • expiresAt string(date-time) Required

        Minimum length is 1.

POST /contexts
curl \
 --request POST 'https://api.development.pexipengage.com/enterprises/acme/contexts' \
 --header "Content-Type: application/json" \
 --header "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" \
 --header "X-Correlation-Id: a4f0048e-c983-11ed-afa1-0242ac120002" \
 --header "Accept-Language: en *" \
 --data '{"externalId":"ABCD1234","appointmentExternalId":"ABCD1234","end":"2025-05-04T09:42:00Z","metadata":{},"employeeIds":["123"],"secondaryEmployeeIds":["123"],"subjectIds":["123"],"subjectGroupIds":["123"],"listingIds":["123"],"leadSegmentIds":["123"],"meetingRoomIds":["123"],"meetingTypes":["OFFICE"],"customerIds":["123"],"secondaryCustomerIds":["123"],"start":"2025-05-04T09:42:00Z","employeeExternalIds":["ABCD1234"],"secondaryEmployeeExternalIds":["ABCD1234"],"officeExternalIds":["ABCD1234"],"subjectExternalIds":["ABCD1234"],"subjectGroupExternalIds":["ABCD1234"],"listingExternalIds":["ABCD1234"],"leadSegmentCodes":["ABCD1234"],"customerExternalids":["ABCD1234"],"secondaryCustomerExternalIds":["ABCD1234"],"customers":[{"externalId":"ABCD1234","customerNumber":"123456","email":"john.doe@pexip.com","firstName":"John","lastName":"Doe","company":"Acme Corp","language":"da","notes":"Lorem ipsum","phoneNumber":"+32412345678","existing":true,"timeZone":"Europe/Brussels","location":{"postalCode":"9000","countryCode":"BE","geolocation":{"latitude":51.0479466,"longitude":3.6912248},"translations":{"city":[{"language":"en","value":"Lorem ipsum"}],"state":[{"language":"en","value":"Lorem ipsum"}],"street1":[{"language":"en","value":"Lorem ipsum"}],"street2":[{"language":"en","value":"Lorem ipsum"}]}}}],"secondaryCustomers":[{"externalId":"ABCD1234","customerNumber":"123456","email":"john.doe@pexip.com","firstName":"John","lastName":"Doe","company":"Acme Corp","language":"da","notes":"Lorem ipsum","phoneNumber":"+32412345678","existing":true,"timeZone":"Europe/Brussels","location":{"postalCode":"9000","countryCode":"BE","geolocation":{"latitude":51.0479466,"longitude":3.6912248},"translations":{"city":[{"language":"en","value":"Lorem ipsum"}],"state":[{"language":"en","value":"Lorem ipsum"}],"street1":[{"language":"en","value":"Lorem ipsum"}],"street2":[{"language":"en","value":"Lorem ipsum"}]}}}]}'
Request examples
# Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
X-Correlation-Id: a4f0048e-c983-11ed-afa1-0242ac120002
Accept-Language: en *

# Payload
{
  "externalId": "ABCD1234",
  "appointmentExternalId": "ABCD1234",
  "end": "2025-05-04T09:42:00Z",
  "metadata": {},
  "employeeIds": [
    "123"
  ],
  "secondaryEmployeeIds": [
    "123"
  ],
  "subjectIds": [
    "123"
  ],
  "subjectGroupIds": [
    "123"
  ],
  "listingIds": [
    "123"
  ],
  "leadSegmentIds": [
    "123"
  ],
  "meetingRoomIds": [
    "123"
  ],
  "meetingTypes": [
    "OFFICE"
  ],
  "customerIds": [
    "123"
  ],
  "secondaryCustomerIds": [
    "123"
  ],
  "start": "2025-05-04T09:42:00Z",
  "employeeExternalIds": [
    "ABCD1234"
  ],
  "secondaryEmployeeExternalIds": [
    "ABCD1234"
  ],
  "officeExternalIds": [
    "ABCD1234"
  ],
  "subjectExternalIds": [
    "ABCD1234"
  ],
  "subjectGroupExternalIds": [
    "ABCD1234"
  ],
  "listingExternalIds": [
    "ABCD1234"
  ],
  "leadSegmentCodes": [
    "ABCD1234"
  ],
  "customerExternalids": [
    "ABCD1234"
  ],
  "secondaryCustomerExternalIds": [
    "ABCD1234"
  ],
  "customers": [
    {
      "externalId": "ABCD1234",
      "customerNumber": "123456",
      "email": "john.doe@pexip.com",
      "firstName": "John",
      "lastName": "Doe",
      "company": "Acme Corp",
      "language": "da",
      "notes": "Lorem ipsum",
      "phoneNumber": "+32412345678",
      "existing": true,
      "timeZone": "Europe/Brussels",
      "location": {
        "postalCode": "9000",
        "countryCode": "BE",
        "geolocation": {
          "latitude": 51.0479466,
          "longitude": 3.6912248
        },
        "translations": {
          "city": [
            {
              "language": "en",
              "value": "Lorem ipsum"
            }
          ],
          "state": [
            {
              "language": "en",
              "value": "Lorem ipsum"
            }
          ],
          "street1": [
            {
              "language": "en",
              "value": "Lorem ipsum"
            }
          ],
          "street2": [
            {
              "language": "en",
              "value": "Lorem ipsum"
            }
          ]
        }
      }
    }
  ],
  "secondaryCustomers": [
    {
      "externalId": "ABCD1234",
      "customerNumber": "123456",
      "email": "john.doe@pexip.com",
      "firstName": "John",
      "lastName": "Doe",
      "company": "Acme Corp",
      "language": "da",
      "notes": "Lorem ipsum",
      "phoneNumber": "+32412345678",
      "existing": true,
      "timeZone": "Europe/Brussels",
      "location": {
        "postalCode": "9000",
        "countryCode": "BE",
        "geolocation": {
          "latitude": 51.0479466,
          "longitude": 3.6912248
        },
        "translations": {
          "city": [
            {
              "language": "en",
              "value": "Lorem ipsum"
            }
          ],
          "state": [
            {
              "language": "en",
              "value": "Lorem ipsum"
            }
          ],
          "street1": [
            {
              "language": "en",
              "value": "Lorem ipsum"
            }
          ],
          "street2": [
            {
              "language": "en",
              "value": "Lorem ipsum"
            }
          ]
        }
      }
    }
  ]
}
Response examples (201)
{
  "data": {
    "externalId": "ABCD1234",
    "appointmentExternalId": "ABCD1234",
    "end": "2025-05-04T09:42:00Z",
    "metadata": {},
    "employeeIds": [
      "123"
    ],
    "secondaryEmployeeIds": [
      "123"
    ],
    "subjectIds": [
      "123"
    ],
    "subjectGroupIds": [
      "123"
    ],
    "listingIds": [
      "123"
    ],
    "leadSegmentIds": [
      "123"
    ],
    "meetingRoomIds": [
      "123"
    ],
    "meetingTypes": [
      "OFFICE"
    ],
    "customerIds": [
      "123"
    ],
    "secondaryCustomerIds": [
      "123"
    ],
    "start": "2025-05-04T09:42:00Z",
    "id": "123",
    "expiresAt": "2025-05-04T09:42:00Z"
  }
}