Flags (global)

Represents a list of all available flags. For a list of flags assigned to a specific application, see Flags.

URI
/api/v9/applications/flags

GET List flags

Get a list of all flags currently in the system.

Syntax
GET /api/v9/applications/flags
Host: apply.example.edu
Authorization: DREAM apikey="..."

Example request

Request
curl
curl \
  -X GET \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  "https://apply.example.edu/api/v9/applications/flags"

Response headers

HeaderValueDescription
Content-Typeapplication/jsonMedia type of the resource
Content-Length1234Size of the response body in bytes
X-Count10Number of available flags

Response codes

Response codeDescription
200 OKThe list of flags was successfully returned

Example response

Response
{
  "1": {
    "id": 1,
    "created": "2025-03-14T13:28:51+00:00",
    "name": "Awaiting interview"
  },
  "2": {
    "id": 2,
    "created": "2025-03-14T13:29:03+00:00",
    "name": "Incomplete application"
  },
  "3": {
    "id": 3,
    "created": "2025-03-14T13:29:18+00:00",
    "name": "Special consideration"
  }
}

POST Create a flag

Add a new flag using any text (up to 32 characters) as the flag’s name. The URI for the flag created is returned in the Location header.

If a flag with this name exists already, a 409 Conflict will be returned, along with the URI of the offending flag in the Location header.

This request simply creates a new flag, but does not assign it to any applications. You are expected to use the PUT verb to add existing flags to applications, see PUT /api/v9/applications/ID/flags/ID.

Syntax
POST /api/v9/applications/flags
Host: apply.example.edu
Authorization: DREAM apikey="..."

Parameters

NameRequired/OptionalDescription
nameRequiredThis text will be displayed on the flag. Up to 32 characters.

Example request

Request
curl
curl \
  -X POST \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  "https://apply.example.edu/api/v9/applications/flags?name=Early%20applicant"

Response headers

HeaderValueDescription
Content-Typeapplication/jsonMedia type of the resource
Content-Length0Size of the response body in bytes
Location/api/applications/flags/123URI of the created flag

Response codes

Response codeDescription
201 CreatedA new flag was successfully created
209 ConflictA flag with this name already exists