Convilyn Crowdfunding Survey API (1.0.0)

Download OpenAPI specification:

AI-driven survey system for crowdfunding projects.

This API enables creators to build surveys through natural language conversations with AI agents, collect potential backer data, and integrate with LINE for engagement.

Roles

  • Creator: Uses the system to create surveys, configure campaigns, and obtain share links
  • Respondent: Potential backers who fill out surveys through shared links

Creator Workflow

  1. Chat with Agent to describe project
  2. AI generates survey questions
  3. Configure early bird offers and mystery events
  4. Set up LINE integration
  5. Get share link and embed code

Respondent Workflow

  1. Click share link
  2. See early bird prompt (if active)
  3. Fill out survey
  4. Submit with email + name
  5. See thank you page
  6. Optionally connect LINE for mystery event unlock

Crowdfunding Surveys (Creator)

APIs for survey creators (requires authentication)

Create Survey Draft

Create a new survey draft. The survey starts in 'draft' status and can be edited before publishing.

Authorizations:
BearerAuth
Request Body schema: application/json
required
title
required
string [ 1 .. 200 ] characters

Survey title

description
string <= 2000 characters

Survey description

projectUrl
string <uri>

URL of the crowdfunding project (for AI to scrape info)

Responses

Request samples

Content type
application/json
Example
{
  • "title": "智慧水壺募資前測問卷",
  • "description": "幫助我們了解您對智慧水壺的需求"
}

Response samples

Content type
application/json
{
  • "surveyId": "string",
  • "creatorId": "string",
  • "title": "string",
  • "description": "string",
  • "questions": [
    ],
  • "earlyBirdDeadline": "2019-08-24T14:15:22Z",
  • "earlyBirdDescription": "string",
  • "mysteryEventConfig": {
    },
  • "lineOaId": "string",
  • "status": "draft",
  • "totalResponses": 0,
  • "itemVersion": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "publishedAt": "2019-08-24T14:15:22Z"
}

List My Surveys

Get a list of surveys created by the authenticated user.

Authorizations:
BearerAuth
query Parameters
status
string (SurveyStatus)
Enum: "draft" "active" "closed"

Filter by survey status

limit
integer [ 1 .. 100 ]
Default: 20

Maximum number of results

cursor
string

Pagination cursor

Responses

Response samples

Content type
application/json
{
  • "surveys": [
    ],
  • "nextCursor": "string"
}

Get Survey Details

Get detailed information about a specific survey.

Authorizations:
BearerAuth
path Parameters
surveyId
required
string

Survey ID

Responses

Response samples

Content type
application/json
{
  • "surveyId": "string",
  • "creatorId": "string",
  • "title": "string",
  • "description": "string",
  • "questions": [
    ],
  • "earlyBirdDeadline": "2019-08-24T14:15:22Z",
  • "earlyBirdDescription": "string",
  • "mysteryEventConfig": {
    },
  • "lineOaId": "string",
  • "status": "draft",
  • "totalResponses": 0,
  • "itemVersion": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "publishedAt": "2019-08-24T14:15:22Z"
}

Update Survey Settings

Update survey settings. Only available for surveys in 'draft' status. Supports optimistic locking via expectedVersion.

Authorizations:
BearerAuth
path Parameters
surveyId
required
string

Survey ID

Request Body schema: application/json
required
title
string [ 1 .. 200 ] characters
description
string <= 2000 characters
earlyBirdDeadline
string or null <date-time>

Early bird deadline (null to remove)

earlyBirdDescription
string <= 500 characters

Early bird offer description

lineOaId
string

LINE Official Account ID for notifications

expectedVersion
integer

Expected version for optimistic locking

Responses

Request samples

Content type
application/json
Example
{
  • "title": "Updated Survey Title",
  • "description": "New description",
  • "expectedVersion": 2
}

Response samples

Content type
application/json
{
  • "surveyId": "string",
  • "creatorId": "string",
  • "title": "string",
  • "description": "string",
  • "questions": [
    ],
  • "earlyBirdDeadline": "2019-08-24T14:15:22Z",
  • "earlyBirdDescription": "string",
  • "mysteryEventConfig": {
    },
  • "lineOaId": "string",
  • "status": "draft",
  • "totalResponses": 0,
  • "itemVersion": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "publishedAt": "2019-08-24T14:15:22Z"
}

Publish Survey

Publish the survey to make it available for respondents. Survey must have at least one question.

Authorizations:
BearerAuth
path Parameters
surveyId
required
string

Survey ID

Request Body schema: application/json
optional
expectedVersion
integer

Expected version for optimistic locking

Responses

Request samples

Content type
application/json
{
  • "expectedVersion": 0
}

Response samples

Content type
application/json
{
  • "surveyId": "string",
  • "creatorId": "string",
  • "title": "string",
  • "description": "string",
  • "questions": [
    ],
  • "earlyBirdDeadline": "2019-08-24T14:15:22Z",
  • "earlyBirdDescription": "string",
  • "mysteryEventConfig": {
    },
  • "lineOaId": "string",
  • "status": "draft",
  • "totalResponses": 0,
  • "itemVersion": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "publishedAt": "2019-08-24T14:15:22Z"
}

Add Question

Add a new question to the survey.

Authorizations:
BearerAuth
path Parameters
surveyId
required
string

Survey ID

Request Body schema: application/json
required
questionText
required
string [ 1 .. 500 ] characters

Question text

questionType
required
string (QuestionType)
Enum: "text" "textarea" "single_choice" "multiple_choice" "rating" "number"

Type of survey question

required
boolean
Default: false

Whether the question is required

options
Array of strings

Options for choice questions

placeholder
string

Placeholder text for input fields

minValue
number

Minimum value for number/rating questions

maxValue
number

Maximum value for number/rating questions

Responses

Request samples

Content type
application/json
Example
{
  • "questionText": "您希望智慧水壺具備哪些功能?",
  • "questionType": "text",
  • "required": true
}

Response samples

Content type
application/json
{
  • "surveyId": "string",
  • "creatorId": "string",
  • "title": "string",
  • "description": "string",
  • "questions": [
    ],
  • "earlyBirdDeadline": "2019-08-24T14:15:22Z",
  • "earlyBirdDescription": "string",
  • "mysteryEventConfig": {
    },
  • "lineOaId": "string",
  • "status": "draft",
  • "totalResponses": 0,
  • "itemVersion": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "publishedAt": "2019-08-24T14:15:22Z"
}

Get Survey Responses

Get a list of responses submitted to this survey.

Authorizations:
BearerAuth
path Parameters
surveyId
required
string

Survey ID

query Parameters
limit
integer [ 1 .. 200 ]
Default: 50
cursor
string
hasLineBinding
boolean

Filter by LINE binding status

Responses

Response samples

Content type
application/json
{
  • "responses": [
    ],
  • "nextCursor": "string"
}

Get Survey Analytics

Get analytics and statistics for the survey.

Authorizations:
BearerAuth
path Parameters
surveyId
required
string

Survey ID

Responses

Response samples

Content type
application/json
{
  • "surveyId": "string",
  • "totalResponses": 0,
  • "earlyBirdCount": 0,
  • "lineBindingCount": 0,
  • "mysteryUnlockedCount": 0,
  • "responsesByDate": [
    ],
  • "questionStats": [
    ]
}

Configure Mystery Event

Set up or update the mystery event configuration for this survey. Mystery events can be triggered by completion or threshold conditions.

Authorizations:
BearerAuth
path Parameters
surveyId
required
string

Survey ID

Request Body schema: application/json
required
unlockCondition
required
string (UnlockCondition)
Enum: "on_completion" "threshold" "both"

Mystery event unlock conditions:

  • on_completion: Unlock immediately after completing survey + LINE binding
  • threshold: Unlock when total responses reach threshold
  • both: Unlock on completion OR when threshold is reached
thresholdCount
integer >= 1

Required response count for threshold unlock

title
required
string [ 1 .. 100 ] characters

Mystery event title

description
required
string <= 1000 characters

Mystery event description

required
object

Reward configuration details

Responses

Request samples

Content type
application/json
Example
{
  • "unlockCondition": "on_completion",
  • "title": "專屬早鳥優惠",
  • "description": "感謝您的參與!您將獲得首批支持者專屬 85 折優惠碼",
  • "rewardDetails": {
    }
}

Response samples

Content type
application/json
{
  • "surveyId": "string",
  • "creatorId": "string",
  • "title": "string",
  • "description": "string",
  • "questions": [
    ],
  • "earlyBirdDeadline": "2019-08-24T14:15:22Z",
  • "earlyBirdDescription": "string",
  • "mysteryEventConfig": {
    },
  • "lineOaId": "string",
  • "status": "draft",
  • "totalResponses": 0,
  • "itemVersion": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "publishedAt": "2019-08-24T14:15:22Z"
}

Survey Respondent

Public APIs for survey respondents (anonymous)

Get Public Survey

Get the public survey form for respondents. Includes early bird information if applicable.

path Parameters
surveyId
required
string

Survey ID

Responses

Response samples

Content type
application/json
{
  • "surveyId": "string",
  • "title": "string",
  • "description": "string",
  • "questions": [
    ],
  • "status": "draft",
  • "earlyBirdActive": true,
  • "earlyBirdDescription": "string",
  • "earlyBirdEndsAt": "2019-08-24T14:15:22Z",
  • "hasMysteryEvent": true
}

Submit Survey Response

Submit a response to the survey. Requires email and name for contact purposes.

path Parameters
surveyId
required
string

Survey ID

Request Body schema: application/json
required
email
required
string <email>

Respondent email

name
required
string [ 1 .. 100 ] characters

Respondent name

required
object

Map of question ID to answer value

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "name": "王小明",
  • "answers": {
    }
}

Response samples

Content type
application/json
{
  • "responseId": "string",
  • "surveyId": "string",
  • "isEarlyBird": true,
  • "thankYouUrl": "http://example.com"
}

Get Thank You Page Data

Get data for the thank you page after submission. Includes early bird status, mystery event progress, and LINE button info.

path Parameters
surveyId
required
string

Survey ID

responseId
required
string

Response ID

Responses

Response samples

Content type
application/json
{
  • "responseId": "string",
  • "surveyId": "string",
  • "surveyTitle": "string",
  • "name": "string",
  • "isEarlyBird": true,
  • "earlyBirdMessage": "string",
  • "hasLineBinding": true,
  • "lineAuthUrl": "http://example.com",
  • "mysteryEvent": {
    }
}

Get Mystery Event Status

Get the current status of mystery event for this response.

path Parameters
surveyId
required
string

Survey ID

responseId
required
string

Response ID

Responses

Response samples

Content type
application/json
{
  • "responseId": "string",
  • "surveyId": "string",
  • "isUnlocked": true,
  • "unlockType": "completion",
  • "mysteryEvent": {
    }
}

LINE OAuth Redirect

Redirect to LINE Login for OAuth authorization. After authorization, user is redirected back to the callback URL.

path Parameters
surveyId
required
string

Survey ID

query Parameters
responseId
required
string

Response ID to bind with LINE account

redirectUri
string <uri>

Custom redirect URI after LINE auth

Responses

LINE OAuth Callback

Handle LINE OAuth callback after user authorization. Binds LINE user ID to the response and triggers mystery event if applicable.

path Parameters
surveyId
required
string

Survey ID

query Parameters
code
required
string

Authorization code from LINE

state
required
string

State parameter containing response ID and nonce

error
string

Error code if authorization failed

error_description
string

Error description

Responses