Create a new project
POST
/v2/projects
const url = 'https://api.surveycoder.io/v2/projects';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"name":"Q4 NPS Survey","language":"en","coding_type":"qualitative","objective":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.surveycoder.io/v2/projects \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "name": "Q4 NPS Survey", "language": "en", "coding_type": "qualitative", "objective": "example" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
string
Example
Q4 NPS Survey language
string
coding_type
string
objective
string
Responses
Section titled “ Responses ”Project created
Media type application/json
object
success
boolean
data
object
id
string format: uuid
name
string
language
string
coding_type
string
status
string
created_at
string format: date-time
questions
Array<object>
object
id
string format: uuid
text
string
status
string
coding_type
string
response_count
integer
Example
{ "success": true, "data": { "name": "Q4 NPS Survey", "language": "en", "coding_type": "qualitative", "status": "pending", "questions": [ { "text": "What did you like most about our service?", "status": "pending" } ] }}Missing or invalid API key.
Media type application/json
Standard error envelope.
object
success
required
boolean
error
required
object
code
required
Machine-readable error code. See the error reference for the full list.
string
message
required
Human-readable explanation of what went wrong.
string
request_id
Echo of the X-Request-Id header, when provided.
string format: uuid
doc_url
Link to documentation for this specific error code.
string format: uri
Example
{ "success": false, "error": { "code": "UNAUTHORIZED", "message": "x-api-key header is required", "doc_url": "https://docs.surveycoder.io/errors/unauthorized" }}