Skip to content

Declare a profile field

Quire permissions

Required capability: profilefield/declare.

Credential scopes: users:write.

The acting subject must also be allowed to perform this action in the organisation.

POST
https://your-organisation.quirelms.com/api/v1/profile_fields

Authorisation

  • apiKeyoptionalHTTP
  • oauth2optionalOAuth 2.0

Header parameters

  • Quire-Versionoptionalstring

    The dated API revision to serve this request at. Omitted, the request is served at the revision the credential was issued against. The response echoes the revision actually applied.

    format: date
  • Idempotency-Keyoptionalstring

    A caller-chosen key making this request safe to retry. A replay of a completed request returns the recorded response with Idempotency-Replayed: true. Reusing a key for a different request is refused.

    maxLength: 255

Request bodyJSONrequired

  • entityuserorcohortrequired
  • short_namestringrequired

    The key every restriction, cohort rule and report column names the field by. Fixed once created.

    maxLength: 63, minLength: 1
  • kindtextortextareaormenuorcheckboxordateordatetime+4 morerequired

    Fixed once created.

  • namestringrequired
    maxLength: 255, minLength: 1
  • categoryoptionalstringornull
    2 variants

    One of the following:

    • string
    • null
  • visibilityoptionaleveryoneorcourse_stafformanagersoradministratorsorsubject_only
  • requiredoptionalboolean
  • required_at_signupoptionalboolean
  • lockedoptionalboolean
  • unique_valuesoptionalboolean
  • sort_orderoptionalinteger
    maximum: 100000, minimum: 0
  • settingsoptionalmap ofunknown

    Settings for the field kind, for example the options of a menu. Validated against the kind on write; never served by reads.

  • external_idoptionalstring
    maxLength: 255, minLength: 1

Returns

201

Success.

JSON
  • idstringrequired
  • external_idstring | nullrequired
  • entitystringrequired
  • short_namestringrequired
  • namestringrequired
  • description_keystring | nullrequired
  • kindstringrequired
  • requiredbooleanrequired
  • required_at_signupbooleanrequired
  • visibilitystringrequired
  • lockedbooleanrequired
  • sort_orderintegerrequired
    maximum: 9007199254740991, minimum: -9007199254740991
  • categorystring | nullrequired
  • unique_valuesbooleanrequired
  • created_atstringrequired

    RFC 3339 timestamp in UTC.

  • updated_atstringrequired

    RFC 3339 timestamp in UTC.

  • deleted_atstringornullrequired
    2 variants

    One of the following:

    • string
    • null

401

The credential is missing, malformed, expired or revoked.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null

403

The credential lacks the scope this operation requires, or the acting subject lacks the capability.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null

409

The request conflicts with the current state, with a previous use of the same idempotency key, or with a concurrent write.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null

422

The request was understood and its content is not valid. errors names each field.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null

429

A rate limit or a concurrency cap was reached. Retry-After says when to try again.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null

500

Something failed at our end. Quote request_id when reporting it.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null
Navigation

Type to search…

↑↓ navigate↵ selectEsc close