/api/v1/decks/{deckId}/questionsList questions
List a poll’s questions in presentation order.
Key scopespoll.read
curl -sS "https://poll.express/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions" \
-H "Authorization: Bearer $POLL_KEY"const response = await fetch("/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions", {
credentials: "include",
});Response: 200 OK
[
{
"id": "d021f5e3-48d1-4caf-a29d-30a14273e650",
"prompt": "What should we cover next?",
"config": {
"type": "choice",
"options": [
"Examples",
"Questions"
],
"maxPicks": 1
}
}
]Parameters
| Field | Type |
|---|---|
deckIdRequired | stringPath parameter. |
JSON Schema
{
"properties": {
"deckId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Path parameter."
}
},
"required": [
"deckId"
]
}Responses
200OKThe request succeeded.400InvalidThe request doesn’t match the expected input.401UnauthorizedSign in or supply a valid credential for this route.403ForbiddenThe credential lacks permission, or the request isn’t allowed.404Not foundThe resource doesn’t exist or isn’t available to you.409ConflictThe requested change conflicts with the current state or an account limit.413Too largeThe request body exceeds the size limit.429Rate limitedWait before sending more requests.503UnavailablePoll Express couldn’t complete the request right now.
Response schema: application/json
JSON Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"config": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"choice"
]
},
"options": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"minItems": 2,
"maxItems": 24,
"uniqueItems": true
},
"maxPicks": {
"type": "integer",
"minimum": 1,
"maximum": 24
}
},
"required": [
"type",
"options",
"maxPicks"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"scale"
]
},
"max": {
"type": "integer",
"minimum": 2,
"maximum": 10
},
"lowLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
},
"highLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
}
},
"required": [
"type",
"max",
"lowLabel",
"highLabel"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"id",
"prompt",
"config"
],
"additionalProperties": false
}
}/api/v1/decks/{deckId}/questionsAdd a question
Add a choice, scale or short-text question at the end of the poll.
Key scopespoll.readpoll.write
curl -sS -X POST "https://poll.express/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions" \
-H "Authorization: Bearer $POLL_KEY" \
-H "Content-Type: application/json" \
--data '{"prompt":"What should we cover next?","config":{"type":"choice","options":["Examples","Questions"]}}'const response = await fetch("/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions", {
method: "POST",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"prompt":"What should we cover next?","config":{"type":"choice","options":["Examples","Questions"]}}),
});Response: 201 Created
{
"id": "d021f5e3-48d1-4caf-a29d-30a14273e650",
"prompt": "What should we cover next?",
"config": {
"type": "choice",
"options": [
"Examples",
"Questions"
],
"maxPicks": 1
}
}Parameters
| Field | Type |
|---|---|
deckIdRequired | stringPath parameter. |
JSON Schema
{
"properties": {
"deckId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Path parameter."
}
},
"required": [
"deckId"
]
}Request body: application/json
| Field | Type |
|---|---|
promptRequired | string1 to 500 characters |
configRequired | object | object | object |
JSON Schema
{
"type": "object",
"properties": {
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"config": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"choice"
]
},
"options": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"minItems": 2,
"maxItems": 24,
"uniqueItems": true
},
"maxPicks": {
"type": "integer",
"minimum": 1,
"maximum": 24
}
},
"required": [
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"scale"
]
},
"max": {
"type": "integer",
"minimum": 2,
"maximum": 10
},
"lowLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
},
"highLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"prompt",
"config"
],
"additionalProperties": false
}Responses
201CreatedThe request created a resource.400InvalidThe request doesn’t match the expected input.401UnauthorizedSign in or supply a valid credential for this route.403ForbiddenThe credential lacks permission, or the request isn’t allowed.404Not foundThe resource doesn’t exist or isn’t available to you.409ConflictThe requested change conflicts with the current state or an account limit.413Too largeThe request body exceeds the size limit.429Rate limitedWait before sending more requests.503UnavailablePoll Express couldn’t complete the request right now.
Response schema: application/json
| Field | Type |
|---|---|
idRequired | string |
promptRequired | string1 to 500 characters |
configRequired | object | object | object |
JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"config": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"choice"
]
},
"options": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"minItems": 2,
"maxItems": 24,
"uniqueItems": true
},
"maxPicks": {
"type": "integer",
"minimum": 1,
"maximum": 24
}
},
"required": [
"type",
"options",
"maxPicks"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"scale"
]
},
"max": {
"type": "integer",
"minimum": 2,
"maximum": 10
},
"lowLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
},
"highLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
}
},
"required": [
"type",
"max",
"lowLabel",
"highLabel"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"id",
"prompt",
"config"
],
"additionalProperties": false
}/api/v1/decks/{deckId}/questions/orderReorder questions
Send every current question ID once. Confirm a change of order when the poll has responses. Numbered links follow the new order.
Key scopespoll.readpoll.write
curl -sS -X PATCH "https://poll.express/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions/order" \
-H "Authorization: Bearer $POLL_KEY" \
-H "Content-Type: application/json" \
--data '{"questionIds":["d021f5e3-48d1-4caf-a29d-30a14273e650"],"confirm":true}'const response = await fetch("/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions/order", {
method: "PATCH",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"questionIds":["d021f5e3-48d1-4caf-a29d-30a14273e650"],"confirm":true}),
});Response: 200 OK
[
{
"id": "d021f5e3-48d1-4caf-a29d-30a14273e650",
"prompt": "What should we cover next?",
"config": {
"type": "choice",
"options": [
"Examples",
"Questions"
],
"maxPicks": 1
}
}
]Parameters
| Field | Type |
|---|---|
deckIdRequired | stringPath parameter. |
JSON Schema
{
"properties": {
"deckId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Path parameter."
}
},
"required": [
"deckId"
]
}Request body: application/json
| Field | Type |
|---|---|
questionIdsRequired | string[]Up to 40 items |
expectedQuestionIds | string[]Up to 40 items |
confirm | true |
JSON Schema
{
"type": "object",
"properties": {
"questionIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"maxItems": 40
},
"expectedQuestionIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"maxItems": 40
},
"confirm": {
"type": "boolean",
"enum": [
true
]
}
},
"required": [
"questionIds"
],
"additionalProperties": false
}Responses
200OKThe request succeeded.400InvalidThe request doesn’t match the expected input.401UnauthorizedSign in or supply a valid credential for this route.403ForbiddenThe credential lacks permission, or the request isn’t allowed.404Not foundThe resource doesn’t exist or isn’t available to you.409ConflictThe requested change conflicts with the current state or an account limit.413Too largeThe request body exceeds the size limit.429Rate limitedWait before sending more requests.503UnavailablePoll Express couldn’t complete the request right now.
Response schema: application/json
JSON Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"config": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"choice"
]
},
"options": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"minItems": 2,
"maxItems": 24,
"uniqueItems": true
},
"maxPicks": {
"type": "integer",
"minimum": 1,
"maximum": 24
}
},
"required": [
"type",
"options",
"maxPicks"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"scale"
]
},
"max": {
"type": "integer",
"minimum": 2,
"maximum": 10
},
"lowLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
},
"highLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
}
},
"required": [
"type",
"max",
"lowLabel",
"highLabel"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"id",
"prompt",
"config"
],
"additionalProperties": false
}
}/api/v1/decks/{deckId}/questions/{questionId}Get a question
Read a question’s wording and configuration by ID.
Key scopespoll.read
curl -sS "https://poll.express/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions/d021f5e3-48d1-4caf-a29d-30a14273e650" \
-H "Authorization: Bearer $POLL_KEY"const response = await fetch("/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions/d021f5e3-48d1-4caf-a29d-30a14273e650", {
credentials: "include",
});Response: 200 OK
{
"id": "d021f5e3-48d1-4caf-a29d-30a14273e650",
"prompt": "What should we cover next?",
"config": {
"type": "choice",
"options": [
"Examples",
"Questions"
],
"maxPicks": 1
}
}Parameters
| Field | Type |
|---|---|
deckIdRequired | stringPath parameter. |
questionIdRequired | stringPath parameter. |
JSON Schema
{
"properties": {
"deckId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Path parameter."
},
"questionId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Path parameter."
}
},
"required": [
"deckId",
"questionId"
]
}Responses
200OKThe request succeeded.400InvalidThe request doesn’t match the expected input.401UnauthorizedSign in or supply a valid credential for this route.403ForbiddenThe credential lacks permission, or the request isn’t allowed.404Not foundThe resource doesn’t exist or isn’t available to you.409ConflictThe requested change conflicts with the current state or an account limit.413Too largeThe request body exceeds the size limit.429Rate limitedWait before sending more requests.503UnavailablePoll Express couldn’t complete the request right now.
Response schema: application/json
| Field | Type |
|---|---|
idRequired | string |
promptRequired | string1 to 500 characters |
configRequired | object | object | object |
JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"config": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"choice"
]
},
"options": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"minItems": 2,
"maxItems": 24,
"uniqueItems": true
},
"maxPicks": {
"type": "integer",
"minimum": 1,
"maximum": 24
}
},
"required": [
"type",
"options",
"maxPicks"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"scale"
]
},
"max": {
"type": "integer",
"minimum": 2,
"maximum": 10
},
"lowLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
},
"highLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
}
},
"required": [
"type",
"max",
"lowLabel",
"highLabel"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"id",
"prompt",
"config"
],
"additionalProperties": false
}/api/v1/decks/{deckId}/questions/{questionId}Replace a question
Structural edits are blocked after a response is recorded. Close voting if needed and reset responses before replacing the structure.
Key scopespoll.readpoll.write
curl -sS -X PUT "https://poll.express/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions/d021f5e3-48d1-4caf-a29d-30a14273e650" \
-H "Authorization: Bearer $POLL_KEY" \
-H "Content-Type: application/json" \
--data '{"prompt":"What should we cover next?","config":{"type":"choice","options":["Examples","Questions"]}}'const response = await fetch("/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions/d021f5e3-48d1-4caf-a29d-30a14273e650", {
method: "PUT",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"prompt":"What should we cover next?","config":{"type":"choice","options":["Examples","Questions"]}}),
});Response: 200 OK
{
"id": "d021f5e3-48d1-4caf-a29d-30a14273e650",
"prompt": "What should we cover next?",
"config": {
"type": "choice",
"options": [
"Examples",
"Questions"
],
"maxPicks": 1
}
}Parameters
| Field | Type |
|---|---|
deckIdRequired | stringPath parameter. |
questionIdRequired | stringPath parameter. |
JSON Schema
{
"properties": {
"deckId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Path parameter."
},
"questionId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Path parameter."
}
},
"required": [
"deckId",
"questionId"
]
}Request body: application/json
| Field | Type |
|---|---|
promptRequired | string1 to 500 characters |
configRequired | object | object | object |
JSON Schema
{
"type": "object",
"properties": {
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"config": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"choice"
]
},
"options": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"minItems": 2,
"maxItems": 24,
"uniqueItems": true
},
"maxPicks": {
"type": "integer",
"minimum": 1,
"maximum": 24
}
},
"required": [
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"scale"
]
},
"max": {
"type": "integer",
"minimum": 2,
"maximum": 10
},
"lowLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
},
"highLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"prompt",
"config"
],
"additionalProperties": false
}Responses
200OKThe request succeeded.400InvalidThe request doesn’t match the expected input.401UnauthorizedSign in or supply a valid credential for this route.403ForbiddenThe credential lacks permission, or the request isn’t allowed.404Not foundThe resource doesn’t exist or isn’t available to you.409ConflictThe requested change conflicts with the current state or an account limit.413Too largeThe request body exceeds the size limit.429Rate limitedWait before sending more requests.503UnavailablePoll Express couldn’t complete the request right now.
Response schema: application/json
| Field | Type |
|---|---|
idRequired | string |
promptRequired | string1 to 500 characters |
configRequired | object | object | object |
JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"config": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"choice"
]
},
"options": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"minItems": 2,
"maxItems": 24,
"uniqueItems": true
},
"maxPicks": {
"type": "integer",
"minimum": 1,
"maximum": 24
}
},
"required": [
"type",
"options",
"maxPicks"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"scale"
]
},
"max": {
"type": "integer",
"minimum": 2,
"maximum": 10
},
"lowLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
},
"highLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
}
},
"required": [
"type",
"max",
"lowLabel",
"highLabel"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"id",
"prompt",
"config"
],
"additionalProperties": false
}/api/v1/decks/{deckId}/questions/{questionId}Edit question wording
Change a prompt, choice labels by zero-based index, or scale end labels without clearing responses.
Key scopespoll.readpoll.write
curl -sS -X PATCH "https://poll.express/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions/d021f5e3-48d1-4caf-a29d-30a14273e650" \
-H "Authorization: Bearer $POLL_KEY" \
-H "Content-Type: application/json" \
--data '{"optionLabels":[{"index":0,"label":"Worked examples"}]}'const response = await fetch("/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions/d021f5e3-48d1-4caf-a29d-30a14273e650", {
method: "PATCH",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"optionLabels":[{"index":0,"label":"Worked examples"}]}),
});Response: 200 OK
{
"id": "d021f5e3-48d1-4caf-a29d-30a14273e650",
"prompt": "What should we cover next?",
"config": {
"type": "choice",
"options": [
"Worked examples",
"Questions"
],
"maxPicks": 1
}
}Parameters
| Field | Type |
|---|---|
deckIdRequired | stringPath parameter. |
questionIdRequired | stringPath parameter. |
JSON Schema
{
"properties": {
"deckId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Path parameter."
},
"questionId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Path parameter."
}
},
"required": [
"deckId",
"questionId"
]
}Request body: application/json
| Field | Type |
|---|---|
prompt | string1 to 500 characters |
optionLabels | object[]1 to 24 items |
lowLabel | string0 to 100 characters |
highLabel | string0 to 100 characters |
JSON Schema
{
"type": "object",
"properties": {
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"optionLabels": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"minimum": 0,
"maximum": 23
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"index",
"label"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 24
},
"lowLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
},
"highLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
}
},
"additionalProperties": false,
"minProperties": 1
}Responses
200OKThe request succeeded.400InvalidThe request doesn’t match the expected input.401UnauthorizedSign in or supply a valid credential for this route.403ForbiddenThe credential lacks permission, or the request isn’t allowed.404Not foundThe resource doesn’t exist or isn’t available to you.409ConflictThe requested change conflicts with the current state or an account limit.413Too largeThe request body exceeds the size limit.429Rate limitedWait before sending more requests.503UnavailablePoll Express couldn’t complete the request right now.
Response schema: application/json
| Field | Type |
|---|---|
idRequired | string |
promptRequired | string1 to 500 characters |
configRequired | object | object | object |
JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"config": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"choice"
]
},
"options": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"minItems": 2,
"maxItems": 24,
"uniqueItems": true
},
"maxPicks": {
"type": "integer",
"minimum": 1,
"maximum": 24
}
},
"required": [
"type",
"options",
"maxPicks"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"scale"
]
},
"max": {
"type": "integer",
"minimum": 2,
"maximum": 10
},
"lowLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
},
"highLabel": {
"type": "string",
"minLength": 0,
"maxLength": 100
}
},
"required": [
"type",
"max",
"lowLabel",
"highLabel"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"id",
"prompt",
"config"
],
"additionalProperties": false
}/api/v1/decks/{deckId}/questions/{questionId}Delete a question
Delete a question and its responses. Existing numbered links may now point somewhere else.
Key scopespoll.readpoll.write
curl -sS -X DELETE "https://poll.express/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions/d021f5e3-48d1-4caf-a29d-30a14273e650" \
-H "Authorization: Bearer $POLL_KEY"const response = await fetch("/api/v1/decks/6b114677-7751-4930-a2da-31fcad879038/questions/d021f5e3-48d1-4caf-a29d-30a14273e650", {
method: "DELETE",
credentials: "include",
});Response: 204 No content
No response body.
Parameters
| Field | Type |
|---|---|
deckIdRequired | stringPath parameter. |
questionIdRequired | stringPath parameter. |
JSON Schema
{
"properties": {
"deckId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Path parameter."
},
"questionId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Path parameter."
}
},
"required": [
"deckId",
"questionId"
]
}Responses
204No contentThe request succeeded and returns no body.400InvalidThe request doesn’t match the expected input.401UnauthorizedSign in or supply a valid credential for this route.403ForbiddenThe credential lacks permission, or the request isn’t allowed.404Not foundThe resource doesn’t exist or isn’t available to you.409ConflictThe requested change conflicts with the current state or an account limit.413Too largeThe request body exceeds the size limit.429Rate limitedWait before sending more requests.503UnavailablePoll Express couldn’t complete the request right now.